Skip to content

Commit

Permalink
lilith appears, statues awaken
Browse files Browse the repository at this point in the history
  • Loading branch information
white-haired-uncle committed May 14, 2024
1 parent 7458c7d commit 7a3451b
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 31 deletions.
24 changes: 12 additions & 12 deletions scenarios9/30_Nightmare_Cellar.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
{RARE_ITEM_TURN 28 8 -999}
[if]
[variable]
name=quests.entered_sc30
name=quests.sc30.entered
equals=yes
[/variable]
[else]
Expand All @@ -86,13 +86,13 @@
speaker=Lethalia
message= _ "Collectors' items, contemporary art... A stroll through her museum, that is all we needed. We better go back and pay a courtesy visit to the artist herself in Pandemonium..."
[/message]
{VARIABLE quests.entered_sc30 yes}
{VARIABLE quests.sc30.entered yes}
[/else]
[/if]
[/event]

[event]
name=before fist activation of statues
name=before first activation of statues
[message]
speaker=Efraim
message= _ "These statues look somewhat... menacing."
Expand All @@ -107,7 +107,7 @@
[/message]
[/event]
[event]
name=after fist activation of statues
name=after first activation of statues
[message]
speaker=Lethalia
message= _ "The statues... they are moving! What wicked spell made that happen?"
Expand All @@ -118,16 +118,16 @@
[/message]
[/event]

{STATUE_AMBUSH sc30_1 10-15,25-28 13 14 16 23 24 26}
{STATUE_AMBUSH sc30_2 14-21,15-20 15 13 11 18 20 22}
{STATUE_AMBUSH sc30_3 3-10,3-7 10 11 12 10 9 8}
{STATUE_AMBUSH sc30_4 27-29,7-10 26 24 23 5 4 3}
{STATUE_AMBUSH sc30_5 25-31,9-15 18 20 22 13 15 17}
{STATUE_AMBUSH sc30_6 20-26,19-24 26 27 29 22 21 19}
{STATUE_AMBUSH sc30_7 35-41,18-24 40 38 36 18 20 22}
{STATUE_AMBUSH sc30_1 3 13 14 16 23 24 26}
{STATUE_AMBUSH sc30_2 3 14 12 10 16 18 20}
{STATUE_AMBUSH sc30_3 3 10 11 12 10 9 8}
{STATUE_AMBUSH sc30_4 2 26 24 22 5 4 3}
{STATUE_AMBUSH sc30_5 3 18 20 22 13 15 17}
{STATUE_AMBUSH sc30_6 3 26 27 29 22 21 19}
{STATUE_AMBUSH sc30_7 3 40 38 36 18 20 22}

{DROPS 10 14 (axe,axe,staff,sword,sword,knife,bow,xbow,spear,spear,bow,dagger,mace) yes 2,3,4,5}
{INFERNO_LILITH_SPAWN 7-34,7-37 22 22 5}
{INFERNO_LILITH_SPAWN 7-34,7-37 22 22 4}
{INFERNO_SPAWN_POINT 4 3 16 25}
{INFERNO_SPAWN_POINT 4 5 10 17}
{INFERNO_SPAWN_POINT 4 4 9 12}
Expand Down
4 changes: 2 additions & 2 deletions utils/abilities_events.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@

[filter]
[not]
status=not_living
status=undrainable
[/not]
[/filter]

Expand Down Expand Up @@ -3315,7 +3315,7 @@
first_time_only=no
[filter]
[not]
status=not_living
status=undrainable
[/not]
[/filter]

Expand Down
52 changes: 35 additions & 17 deletions utils/chapter9_utils.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@
[/variable]
[then]
{VARIABLE_OP did_spawn rand (yes,no,no)}
{VARIABLE_OP spawn_count add "$(2*$quests.seen_lilith)"}
{VARIABLE_OP spawn_count add "$(2*$quests.met_lilith)"}
[/then]
[else]
{VARIABLE quests.lilith 1}
Expand Down Expand Up @@ -545,6 +545,17 @@
#ifdef EASY
{VARIABLE_OP spawn_count divide "1.2"}
#endif
[lua]
code=<<
if wml.variables["quests.deaths_lilith"] ~= nil then
wml.variables["lil_incr_damage"] = wml.variables["quests.met_lilith"] * 2 - wml.variables["quests.lilith_deaths"]
wml.variables["lil_incr_total"] = wml.variables["quests.met_lilith"] * 60 - wml.variables["quests.lilith_deaths"] * 30
else
wml.variables["lil_incr_damage"] = wml.variables["quests.met_lilith"] * 2
wml.variables["lil_incr_total"] = wml.variables["quests.met_lilith"] * 60
end
>>
[/lua]
[unit]
x,y={X},{Y}
side={SIDE}
Expand All @@ -570,14 +581,15 @@
[/filter]
[effect]
apply_to=attack
increase_damage="$($quests.met_lilith*2-$quests.lilith_deaths)"
increase_damage=$lil_incr_damage
[/effect]
[effect]
apply_to=hitpoints
increase_total="$($quests.met_lilith*60-$quests.lilith_deaths*30)"
increase_total=$lil_incr_total
heal_full=yes
[/effect]
[/object]
{CLEAR_VARIABLE lil_incr_damage,lil_incr_total}
[remove_shroud]
x,y={X},{Y}
radius=2
Expand Down Expand Up @@ -8172,12 +8184,15 @@ The map can be viewed through the right-click menu."}
[/unit]
#enddef

#define STATUE_AMBUSH NUMBER ACTIVATION X1 X2 X3 Y1 Y2 Y3
#define STATUE_AMBUSH NUMBER RADIUS X1 X2 X3 Y1 Y2 Y3
# Lilith statue at X2,Y2
# X1,Y1 and Y3,Y3 form the boundary of the statue area
# RADIUS is distance from Lilith to awaken statues
[event]
name=prestart
[if]
[variable]
name=quests.statues_{NUMBER}
name=quests.sc30.statues_{NUMBER}
equals=yes
[/variable]
[then]
Expand All @@ -8195,9 +8210,9 @@ The map can be viewed through the right-click menu."}
{PLACE_IMAGE scenery/lilith-statue.png {X2} {Y2}}
[/then]
[else]
{VARIABLE_OP gender_{X2}_{Y3} rand (male,female)}
{VARIABLE_OP quests.sc30.gender_{X2}_{Y3} rand (male,female)}
#ifdef HARD
{VARIABLE_OP gender_{X3}_{Y1} rand (male,female)}
{VARIABLE_OP quests.sc30.gender_{X3}_{Y1} rand (male,female)}
#endif

#ifndef EASY
Expand All @@ -8209,7 +8224,7 @@ The map can be viewed through the right-click menu."}
{PLACE_IMAGE scenery/demon-despot-statue.png {X3} {Y2}}
[if]
[variable]
name=gender_{X2}_{Y3}
name=quests.sc30.gender_{X2}_{Y3}
equals=male
[/variable]
[then]
Expand All @@ -8222,7 +8237,7 @@ The map can be viewed through the right-click menu."}
#ifdef HARD
[if]
[variable]
name=gender_{X3}_{Y1}
name=quests.sc30.gender_{X3}_{Y1}
equals=male
[/variable]
[then]
Expand All @@ -8239,10 +8254,13 @@ The map can be viewed through the right-click menu."}
name=moveto
[filter]
side=1
x,y={ACTIVATION}
[filter_location]
x,y={X2},{Y2}
radius={RADIUS}
[/filter_location]
[/filter]
[fire_event]
name=before fist activation of statues
name=before first activation of statues
[/fire_event]
#ifndef EASY
{MAKE_ANIMATED_STATUE "Demon Manowar" male {X1} {Y2} scenery/demon-manowar-statue.png}
Expand All @@ -8253,7 +8271,7 @@ The map can be viewed through the right-click menu."}
{MAKE_ANIMATED_STATUE "Demon Despot" male {X3} {Y2} scenery/demon-despot-statue.png}
[if]
[variable]
name=gender_{X2}_{Y3}
name=quests.sc30.gender_{X2}_{Y3}
equals=male
[/variable]
[then]
Expand All @@ -8263,11 +8281,11 @@ The map can be viewed through the right-click menu."}
{MAKE_ANIMATED_STATUE "Succubus" female {X2} {Y3} scenery/succubus-statue.png}
[/else]
[/if]
{CLEAR_VARIABLE gender_{X2}_{Y3}}
{CLEAR_VARIABLE quests.sc30.gender_{X2}_{Y3}}
#ifdef HARD
[if]
[variable]
name=gender_{X3}_{Y1}
name=quests.sc30.gender_{X3}_{Y1}
equals=male
[/variable]
[then]
Expand All @@ -8277,12 +8295,12 @@ The map can be viewed through the right-click menu."}
{MAKE_ANIMATED_STATUE "Succubus" female {X3} {Y1} scenery/succubus-statue.png}
[/else]
[/if]
{CLEAR_VARIABLE gender_{X3}_{Y1}}
{CLEAR_VARIABLE quests.sc30.gender_{X3}_{Y1}}
#endif
[fire_event]
name=after fist activation of statues
name=after first activation of statues
[/fire_event]
{VARIABLE quests.statues_{NUMBER} yes}
{VARIABLE quests.sc30.statues_{NUMBER} yes}
[/event]
[/else]
[/if]
Expand Down

0 comments on commit 7a3451b

Please sign in to comment.