From 7a3451b8b94ede37432df8cd0f80c13308a5844a Mon Sep 17 00:00:00 2001 From: white-haired-uncle Date: Tue, 14 May 2024 16:28:53 -0400 Subject: [PATCH] lilith appears, statues awaken --- scenarios9/30_Nightmare_Cellar.cfg | 24 +++++++------- utils/abilities_events.cfg | 4 +-- utils/chapter9_utils.cfg | 52 ++++++++++++++++++++---------- 3 files changed, 49 insertions(+), 31 deletions(-) diff --git a/scenarios9/30_Nightmare_Cellar.cfg b/scenarios9/30_Nightmare_Cellar.cfg index 4e6d209d..5c2a9b82 100644 --- a/scenarios9/30_Nightmare_Cellar.cfg +++ b/scenarios9/30_Nightmare_Cellar.cfg @@ -74,7 +74,7 @@ {RARE_ITEM_TURN 28 8 -999} [if] [variable] - name=quests.entered_sc30 + name=quests.sc30.entered equals=yes [/variable] [else] @@ -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." @@ -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?" @@ -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} diff --git a/utils/abilities_events.cfg b/utils/abilities_events.cfg index 2327fae5..13c99e4e 100644 --- a/utils/abilities_events.cfg +++ b/utils/abilities_events.cfg @@ -469,7 +469,7 @@ [filter] [not] - status=not_living + status=undrainable [/not] [/filter] @@ -3315,7 +3315,7 @@ first_time_only=no [filter] [not] - status=not_living + status=undrainable [/not] [/filter] diff --git a/utils/chapter9_utils.cfg b/utils/chapter9_utils.cfg index 4f9952f4..89111a2c 100644 --- a/utils/chapter9_utils.cfg +++ b/utils/chapter9_utils.cfg @@ -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} @@ -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} @@ -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 @@ -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] @@ -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 @@ -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] @@ -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] @@ -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} @@ -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] @@ -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] @@ -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]