Across the Harsh Sands: Dehydration changed to cause damage...
...and relative loss of attack strength, dialogue has been changed to reflect this. Also the Bandit encounter has been improved.
This commit is contained in:
parent
2318365846
commit
3f7aeada2b
1 changed files with 486 additions and 203 deletions
|
@ -224,6 +224,9 @@
|
|||
# add more undead at higher difficulty levels
|
||||
|
||||
#!***Scraped $nightly_limit -> can div $ghosts by two***
|
||||
|
||||
# dehydration loss - a variable for the dialogue
|
||||
{VARIABLE dehydration_loss 2}
|
||||
[/event]
|
||||
|
||||
[event]
|
||||
|
@ -271,18 +274,15 @@
|
|||
message= _ "Unfortunately, because of our hasty flight from our village, we are short on waterskins and rations. We'll have enough if we move quickly and eat as little as possible, but we won't last long in the wastes if we can't find more sources of water. As it is, between the heat of the day and the cold of the night, this journey will be hard on our people."
|
||||
[/message]
|
||||
|
||||
[message]
|
||||
description=Zhul
|
||||
message= _ "The other shamans and I can prevent exhaustion and dehydration from weakening anyone close to us. But oases like the one next to us are the key to our survival; their fresh water will heal our people back to their full strength."
|
||||
[/message]
|
||||
|
||||
#!***Rewriten message -> explains new dehydration rules***
|
||||
[message]
|
||||
speaker=narrator
|
||||
message= _ "During the daytime (Dawn, Morning, Mid-day, Afternoon, and Dusk) at the beginning of your turn, every unit not on grassland, castles or encampments will have their melee attack damage weakened by one point. Adjacent healer units will prevent the dehydration from taking place, and ranged attacks will always remain unaffected. Every unit beginning their turn in an oasis (shallow water) will regain full attack strength."
|
||||
message= _ "During the daytime (Dawn, Morning, Mid-day, Afternoon, and Dusk) at the beginning of each your turns, every unit in a sand, road, rubble or sand dune hex will suffer from thirst, losing $dehydration_loss hitpoints and weaking attack damage. Your shamans cannot heal this damage. Only by refreshing at an oasis (any shallow water hex) at the start of your turn, your units will regain full attack strength and some of the lost hitpoints."
|
||||
image=wesnoth-icon.png
|
||||
[/message]
|
||||
|
||||
#!***Deleted message -> druids no longer prevent dehydration effects***
|
||||
|
||||
[message]
|
||||
description=Nym
|
||||
message= _ "Kaleh, be careful you don't recruit too many guards to go with us. I doubt we're going to find any other villages out in the sands, so the income that we have right now is all we're going to get. Remember that as our people get more experienced they often require more support, so we don't want to run out of supplies halfway across the desert."
|
||||
|
@ -297,6 +297,26 @@
|
|||
#!***Scraped clock-> This can be achieved without dedicated event***
|
||||
#!***Scraped bandit gold check -> Can be done by using gold in caling event***
|
||||
|
||||
# This sets up some unit variables for sides that
|
||||
# will suffer thirst
|
||||
#define SETUP_ENEMY_THIRST SIDE
|
||||
[store_unit]
|
||||
variable=enemy
|
||||
kill=no
|
||||
[filter]
|
||||
side={SIDE}
|
||||
[/filter]
|
||||
[/store_unit]
|
||||
{FOREACH enemy i}
|
||||
{VARIABLE enemy[$i].variables.dehydration 0}
|
||||
{VARIABLE enemy[$i].variables.full_hitpoints $enemy[$i].hitpoints}
|
||||
[unstore_unit]
|
||||
variable=enemy[$i]
|
||||
find_vacant=no
|
||||
[/unstore_unit]
|
||||
{NEXT i}
|
||||
#enddef
|
||||
|
||||
# Special Encounter events
|
||||
|
||||
# Encounter 1: Scorpions attack
|
||||
|
@ -366,7 +386,7 @@
|
|||
id=Travelring
|
||||
name= _ "Traveler's Ring"
|
||||
image=items/ring-white.png
|
||||
description= _ "This unit will no longer suffer from the fatiguing effects of the daytime heat."
|
||||
description= _ "At the end of each turn, this unit takes no damage from the desert."
|
||||
[filter]
|
||||
x={X}
|
||||
y={Y}
|
||||
|
@ -379,16 +399,15 @@
|
|||
y={Y}
|
||||
[/removeitem]
|
||||
|
||||
{VARIABLE unit.variables.dehydration_immunity yes}
|
||||
|
||||
[unstore_unit]
|
||||
variable=unit
|
||||
find_vacant=no
|
||||
[/unstore_unit]
|
||||
|
||||
[role]
|
||||
role=immune
|
||||
x={X}
|
||||
y={Y}
|
||||
[/role]
|
||||
{CLEAR_VARIABLE tempx}
|
||||
{CLEAR_VARIABLE tempy}
|
||||
[/event]
|
||||
|
||||
#enddef
|
||||
|
||||
#!***Check if unit is scout type***
|
||||
|
@ -628,7 +647,9 @@
|
|||
[/event]
|
||||
[/else]
|
||||
[/if]
|
||||
|
||||
|
||||
{SETUP_ENEMY_THIRST 3}
|
||||
|
||||
#!***Created -> Set ogre die event
|
||||
[event]
|
||||
name=die
|
||||
|
@ -774,35 +795,48 @@
|
|||
#Medium: 1 trapper, 1 bandit, 3 thugs, 3 poachers
|
||||
#Hard: 2 trappers, 2 bandits, 2 thugs, 2 poachers
|
||||
|
||||
{RANDOM_PLACEMENT 6 43 3 ({CREATE_UNIT 2 "Trapper" 1 1 "Patrol Bandit" (user_description=_"Black Hand Bandit")})}
|
||||
{RANDOM_PLACEMENT 6 43 3 ({CREATE_UNIT 2 "Thug" 1 1 "Patrol Bandit" (user_description=_"Black Hand Bandit")})}
|
||||
{RANDOM_PLACEMENT 6 43 3 ({CREATE_UNIT 2 "Thug" 1 1 "Patrol Bandit" (user_description=_"Black Hand Bandit")})}
|
||||
{RANDOM_PLACEMENT 6 43 3 ({CREATE_UNIT 2 "Poacher" 1 1 "Patrol Bandit" (user_description=_"Black Hand Bandit")})}
|
||||
{RANDOM_PLACEMENT 6 43 3 ({CREATE_UNIT 2 "Poacher" 1 1 "Patrol Bandit" (user_description=_"Black Hand Bandit")})}
|
||||
{RANDOM_PLACEMENT 6 43 3 ({CREATE_UNIT 2 "Trapper" 1 1 "Black Lieutenant" (user_description=_"Black Lieutenant"
|
||||
ai_special="guardian")})}
|
||||
{RANDOM_PLACEMENT 6 43 3 ({CREATE_UNIT 2 "Thug" 1 1 "Patrol Bandit" (user_description=_"Black Hand Bandit"
|
||||
ai_special="guardian")})}
|
||||
{RANDOM_PLACEMENT 6 43 3 ({CREATE_UNIT 2 "Thug" 1 1 "Patrol Bandit" (user_description=_"Black Hand Bandit"
|
||||
ai_special="guardian")})}
|
||||
{RANDOM_PLACEMENT 6 43 3 ({CREATE_UNIT 2 "Poacher" 1 1 "Patrol Bandit" (user_description=_"Black Hand Bandit"
|
||||
ai_special="guardian")})}
|
||||
{RANDOM_PLACEMENT 6 43 3 ({CREATE_UNIT 2 "Poacher" 1 1 "Patrol Bandit" (user_description=_"Black Hand Bandit"
|
||||
ai_special="guardian")})}
|
||||
|
||||
#ifdef EASY
|
||||
|
||||
{RANDOM_PLACEMENT 6 43 3 ({CREATE_UNIT 2 "Thug" 1 1 "Patrol Bandit" (user_description=_"Black Hand Bandit")})}
|
||||
{RANDOM_PLACEMENT 6 43 3 ({CREATE_UNIT 2 "Poacher" 1 1 "Patrol Bandit" (user_description=_"Black Hand Bandit")})}
|
||||
{RANDOM_PLACEMENT 6 43 3 ({CREATE_UNIT 2 "Thug" 1 1 "Patrol Bandit" (user_description=_"Black Hand Bandit"
|
||||
ai_special="guardian")})}
|
||||
{RANDOM_PLACEMENT 6 43 3 ({CREATE_UNIT 2 "Poacher" 1 1 "Patrol Bandit" (user_description=_"Black Hand Bandit"
|
||||
ai_special="guardian")})}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef MEDIUM
|
||||
|
||||
{RANDOM_PLACEMENT 6 43 3 ({CREATE_UNIT 2 "Bandit" 1 1 "Patrol Bandit" (user_description=_"Black Hand Bandit")})}
|
||||
{RANDOM_PLACEMENT 6 43 3 ({CREATE_UNIT 2 "Thug" 1 1 "Patrol Bandit" (user_description=_"Black Hand Bandit")})}
|
||||
{RANDOM_PLACEMENT 6 43 3 ({CREATE_UNIT 2 "Poacher" 1 1 "Patrol Bandit" (user_description=_"Black Hand Bandit")})}
|
||||
{RANDOM_PLACEMENT 6 43 3 ({CREATE_UNIT 2 "Bandit" 1 1 "Patrol Bandit" (user_description=_"Black Hand Bandit"
|
||||
ai_special="guardian")})}
|
||||
{RANDOM_PLACEMENT 6 43 3 ({CREATE_UNIT 2 "Thug" 1 1 "Patrol Bandit" (user_description=_"Black Hand Bandit"
|
||||
ai_special="guardian")})}
|
||||
{RANDOM_PLACEMENT 6 43 3 ({CREATE_UNIT 2 "Poacher" 1 1 "Patrol Bandit" (user_description=_"Black Hand Bandit"
|
||||
ai_special="guardian")})}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef HARD
|
||||
|
||||
{RANDOM_PLACEMENT 6 43 3 ({CREATE_UNIT 2 "Trapper" 1 1 "Patrol Bandit" (user_description=_"Black Hand Bandit")})}
|
||||
{RANDOM_PLACEMENT 6 43 3 ({CREATE_UNIT 2 "Bandit" 1 1 "Patrol Bandit" (user_description=_"Black Hand Bandit")})}
|
||||
{RANDOM_PLACEMENT 6 43 3 ({CREATE_UNIT 2 "Bandit" 1 1 "Patrol Bandit" (user_description=_"Black Hand Bandit")})}
|
||||
{RANDOM_PLACEMENT 6 43 3 ({CREATE_UNIT 2 "Trapper" 1 1 "Patrol Bandit" (user_description=_"Black Hand Bandit"
|
||||
ai_special="guardian")})}
|
||||
{RANDOM_PLACEMENT 6 43 3 ({CREATE_UNIT 2 "Bandit" 1 1 "Patrol Bandit" (user_description=_"Black Hand Bandit"
|
||||
ai_special="guardian")})}
|
||||
{RANDOM_PLACEMENT 6 43 3 ({CREATE_UNIT 2 "Bandit" 1 1 "Patrol Bandit" (user_description=_"Black Hand Bandit"
|
||||
ai_special="guardian")})}
|
||||
|
||||
#endif
|
||||
|
||||
{SETUP_ENEMY_THIRST 2}
|
||||
[if]
|
||||
[have_unit]
|
||||
side=1
|
||||
|
@ -813,13 +847,14 @@
|
|||
[then]
|
||||
[message]
|
||||
type=Thug
|
||||
message= _ "And I tought it was going to be another boring patrol. You there! Elf! This is our oasis, and we will water it with your blood!"
|
||||
message= _ "And I thought it was going to be another boring patrol. You there! Elf! This is our oasis, and we will water it with your blood!"
|
||||
[/message]
|
||||
|
||||
[message]
|
||||
speaker=Kaleh
|
||||
message= _ "We need that water, and if we have to go through you to get it, so be it."
|
||||
[/message]
|
||||
{MODIFY_UNIT side=2 ai_special ""}
|
||||
[/then]
|
||||
|
||||
[else]
|
||||
|
@ -843,6 +878,28 @@
|
|||
speaker=Kaleh
|
||||
message= _ "We need that water, and if we have to go through you to get it, so be it."
|
||||
[/message]
|
||||
{MODIFY_UNIT side=2 ai_special ""}
|
||||
[/event]
|
||||
# events that spark off Bandit mobility
|
||||
[event]
|
||||
name=attack
|
||||
[filter]
|
||||
side=1
|
||||
[/filter]
|
||||
[filter_second]
|
||||
side=2
|
||||
[/filter_second]
|
||||
{MODIFY_UNIT side=2 ai_special ""}
|
||||
[/event]
|
||||
[event]
|
||||
name=attack
|
||||
[filter]
|
||||
side=2
|
||||
[/filter]
|
||||
[filter_second]
|
||||
side=1
|
||||
[/filter_second]
|
||||
{MODIFY_UNIT side=2 ai_special ""}
|
||||
[/event]
|
||||
[/else]
|
||||
[/if]
|
||||
|
@ -903,6 +960,10 @@
|
|||
x=$x_coord
|
||||
y=$y_coord
|
||||
side=1
|
||||
[variables]
|
||||
dehydration=0
|
||||
full_hitpoints=34
|
||||
[/variables]
|
||||
[/unit]
|
||||
|
||||
{ADD x_coord 7}
|
||||
|
@ -962,14 +1023,14 @@
|
|||
#ifdef HARD
|
||||
|
||||
[message]
|
||||
description="Go'hag"
|
||||
description=Go'hag
|
||||
message= _ "You have defied our master for the last time. Now you shall die! And I shall personally make it slow and painful, to thank you for that scorching you gave me. "
|
||||
[/message]
|
||||
|
||||
#else
|
||||
|
||||
[message]
|
||||
description="Go'hag"
|
||||
description=Go'hag
|
||||
message= _ "You have defied our master for the last time. Now you shall die!"
|
||||
[/message]
|
||||
|
||||
|
@ -1243,6 +1304,8 @@
|
|||
message= _ "Elves! Kill them all!"
|
||||
[/message]
|
||||
|
||||
{SETUP_ENEMY_THIRST 3}
|
||||
|
||||
[message]
|
||||
description=Garak
|
||||
message= _ "This ruined castle must be where the ogres make their home. Well, if it's a fight they want, it's a fight they'll get. "
|
||||
|
@ -1615,9 +1678,377 @@
|
|||
|
||||
#victory if Kaleh moves to north of map and outlaw is defeated
|
||||
|
||||
# macro for all hydration effects to all units stored in
|
||||
# a variable called "affected_unit"
|
||||
#define APPLY_HYDRATION_EFFECT EFFECT
|
||||
{VARIABLE effect {EFFECT}}
|
||||
{FOREACH affected_unit i}
|
||||
{VARIABLE thirst $affected_unit[$i].variables.dehydration}
|
||||
{VARIABLE hp_to_regain 0}
|
||||
# are we dehydrating or rehydrating?
|
||||
[if]
|
||||
[variable]
|
||||
name=effect
|
||||
greater_than=0
|
||||
[/variable]
|
||||
[then]
|
||||
{VARIABLE_OP thirst add 1}
|
||||
{VARIABLE green -25}
|
||||
{VARIABLE_OP green multiply $thirst}
|
||||
{VARIABLE_OP green add 265}
|
||||
[if]
|
||||
[variable]
|
||||
name=green
|
||||
less_than=0
|
||||
[/variable]
|
||||
[then]
|
||||
{VARIABLE green 0}
|
||||
[/then]
|
||||
[/if]
|
||||
{VARIABLE red 250}
|
||||
{VARIABLE blue 52}
|
||||
[/then]
|
||||
[else]
|
||||
# rehydrate
|
||||
{VARIABLE hp_to_regain $thirst}
|
||||
{VARIABLE_OP hp_to_regain multiply 2}
|
||||
{VARIABLE red 170}
|
||||
{VARIABLE green 230}
|
||||
{VARIABLE blue 245}
|
||||
[if]
|
||||
[variable]
|
||||
name=hp_to_regain
|
||||
greater_than=8
|
||||
[/variable]
|
||||
[then]
|
||||
{VARIABLE hp_to_regain 8}
|
||||
[/then]
|
||||
[/if]
|
||||
{VARIABLE thirst 0}
|
||||
[/else]
|
||||
[/if]
|
||||
# modify attacks
|
||||
{FOREACH affected_unit[$i].attack j}
|
||||
[if]
|
||||
[variable]
|
||||
name=affected_unit[$i].attack[$j].range
|
||||
equals=melee
|
||||
[/variable]
|
||||
[then]
|
||||
{VARIABLE damage_multiplier 10}
|
||||
[/then]
|
||||
[else]
|
||||
{VARIABLE damage_multiplier 20}
|
||||
[/else]
|
||||
[/if]
|
||||
{VARIABLE damage_divisor $damage_multiplier}
|
||||
{VARIABLE_OP damage_multiplier add -$thirst}
|
||||
# store real_damage
|
||||
[if]
|
||||
[variable]
|
||||
name=affected_unit[$i].attack[$j].real_damage
|
||||
greater_than=0
|
||||
[/variable]
|
||||
[else]
|
||||
{VARIABLE affected_unit[$i].attack[$j].real_damage $affected_unit[$i].attack[$j].damage}
|
||||
[/else]
|
||||
[/if]
|
||||
{VARIABLE new_damage $affected_unit[$i].attack[$j].real_damage}
|
||||
{VARIABLE_OP new_damage multiply $damage_multiplier}
|
||||
{VARIABLE_OP new_damage divide $damage_divisor}
|
||||
[if]
|
||||
[variable]
|
||||
name=new_damage
|
||||
less_than=1
|
||||
[/variable]
|
||||
[then]
|
||||
{VARIABLE new_damage 1}
|
||||
[/then]
|
||||
[/if]
|
||||
{VARIABLE affected_unit[$i].attack[$j].damage $new_damage}
|
||||
{NEXT j}
|
||||
# adjust current hp
|
||||
[if]
|
||||
[variable]
|
||||
name=thirst
|
||||
greater_than=0
|
||||
[/variable]
|
||||
[then]
|
||||
{VARIABLE_OP affected_unit[$i].hitpoints add -2}
|
||||
{VARIABLE_OP affected_unit[$i].max_hitpoints add -2}
|
||||
{VARIABLE affected_unit[$i].variables.dehydration $thirst}
|
||||
[/then]
|
||||
[else]
|
||||
{VARIABLE_OP affected_unit[$i].hitpoints add $hp_to_regain}
|
||||
{VARIABLE affected_unit[$i].max_hitpoints $affected_unit[$i].variables.max_hitpoints}
|
||||
{VARIABLE affected_unit[$i].variables.dehydration 0}
|
||||
[/else]
|
||||
[/if]
|
||||
{VARIABLE hp_check $affected_unit[$i].hitpoints}
|
||||
# check hp
|
||||
[if]
|
||||
[variable]
|
||||
name=hp_check
|
||||
less_than=1
|
||||
[/variable]
|
||||
[then]
|
||||
{VARIABLE affected_unit[$i].hitpoints 1}
|
||||
[/then]
|
||||
[/if]
|
||||
[if]
|
||||
[variable]
|
||||
name=effect
|
||||
greater_than=0
|
||||
[/variable]
|
||||
[then]
|
||||
[unstore_unit]
|
||||
variable=affected_unit[$i]
|
||||
find_vacant=no
|
||||
red,green,blue=$red,$green,$blue
|
||||
text= _ "thirst"
|
||||
[/unstore_unit]
|
||||
[/then]
|
||||
[else]
|
||||
[unstore_unit]
|
||||
variable=affected_unit[$i]
|
||||
find_vacant=no
|
||||
red,green,blue=$red,$green,$blue
|
||||
text= _ "refreshed"
|
||||
[/unstore_unit]
|
||||
[/else]
|
||||
[/if]
|
||||
{NEXT i}
|
||||
{CLEAR_VARIABLE hp_check}
|
||||
{CLEAR_VARIABLE thirst}
|
||||
{CLEAR_VARIABLE hp_to_regain}
|
||||
{CLEAR_VARIABLE damage_multiplier}
|
||||
{CLEAR_VARIABLE damage_divisor}
|
||||
{CLEAR_VARIABLE new_damage}
|
||||
{CLEAR_VARIABLE green}
|
||||
{CLEAR_VARIABLE red}
|
||||
{CLEAR_VARIABLE blue}
|
||||
#enddef
|
||||
|
||||
#define INIT_HYDRATION_FOR_PLAYER_UNIT
|
||||
{VARIABLE hp $player_unit.max_hitpoints}
|
||||
{FOREACH player_unit.modifications.trait j}
|
||||
{VARIABLE trait_id $player_unit.modifications.trait[$j].id}
|
||||
[if]
|
||||
[variable]
|
||||
name=trait_id
|
||||
equals="strong"
|
||||
[/variable]
|
||||
[then]
|
||||
{VARIABLE_OP hp add 1}
|
||||
[/then]
|
||||
[else]
|
||||
[if]
|
||||
[variable]
|
||||
name=trait_id
|
||||
equals=resilient
|
||||
[/variable]
|
||||
[then]
|
||||
{VARIABLE_OP hp add 4}
|
||||
{VARIABLE_OP hp add $player_unit.level}
|
||||
[/then]
|
||||
[/if]
|
||||
[/else]
|
||||
[/if]
|
||||
{NEXT j}
|
||||
{VARIABLE player_unit.variables.full_hitpoints $player_unit.hitpoints}
|
||||
{VARIABLE player_unit.variables.max_hitpoints $player_unit.max_hitpoints}
|
||||
{VARIABLE player_unit.variables.dehydration 0}
|
||||
[unstore_unit]
|
||||
variable=player_unit
|
||||
find_vacant=no
|
||||
[/unstore_unit]
|
||||
#enddef
|
||||
|
||||
# store full_hitpoints at start, recruit and on
|
||||
# advance
|
||||
[event]
|
||||
name=start
|
||||
[store_unit]
|
||||
variable=player_unit
|
||||
kill=no
|
||||
[filter]
|
||||
x=1-39
|
||||
y=1-74
|
||||
[/filter]
|
||||
[/store_unit]
|
||||
{FOREACH player_unit i}
|
||||
{VARIABLE hp $player_unit[$i].max_hitpoints}
|
||||
{FOREACH player_unit[$i].modifications.trait j}
|
||||
{VARIABLE trait_id $player_unit[$i].modifications.trait[$j].id}
|
||||
# [message]
|
||||
# description=$player_unit[$i].description
|
||||
# message= "Found $trait_id for $player_unit[$i].user_description"
|
||||
# [/message]
|
||||
[if]
|
||||
[variable]
|
||||
name=trait_id
|
||||
equals="strong"
|
||||
[/variable]
|
||||
[then]
|
||||
#{VARIABLE_OP hp add -1}
|
||||
[/then]
|
||||
[else]
|
||||
[if]
|
||||
[variable]
|
||||
name=trait_id
|
||||
equals=resilient
|
||||
[/variable]
|
||||
[then]
|
||||
#{VARIABLE_OP hp add 4}
|
||||
#{VARIABLE_OP hp add -$player_unit[$i].level}
|
||||
[/then]
|
||||
[/if]
|
||||
[/else]
|
||||
[/if]
|
||||
{NEXT j}
|
||||
{VARIABLE player_unit[$i].variables.full_hitpoints $player_unit[$i].hitpoints}
|
||||
{VARIABLE player_unit[$i].variables.max_hitpoints $player_unit[$i].max_hitpoints}
|
||||
# [message]
|
||||
# description=$player_unit[$i].description
|
||||
# message= "Storing $hp full hitpoints for $player_unit[$i].user_description
|
||||
#
|
||||
#(previous:
|
||||
#max_hitpoints: $player_unit[$i].max_hitpoints
|
||||
#hitpoints: $player_unit[$i].hitpoints )"
|
||||
# [/message]
|
||||
{VARIABLE player_unit[$i].variables.dehydration 0}
|
||||
[unstore_unit]
|
||||
variable=player_unit[$i]
|
||||
find_vacant=no
|
||||
[/unstore_unit]
|
||||
{NEXT i}
|
||||
[/event]
|
||||
|
||||
[event]
|
||||
name=recruit
|
||||
first_time_only=no
|
||||
[store_unit]
|
||||
variable=player_unit
|
||||
kill=no
|
||||
[filter]
|
||||
x=$x1
|
||||
y=$y1
|
||||
[/filter]
|
||||
[/store_unit]
|
||||
{INIT_HYDRATION_FOR_PLAYER_UNIT}
|
||||
[/event]
|
||||
|
||||
#!Clear the desert heat flag on unit advancement
|
||||
# and adjust full_hitpoints
|
||||
[event]
|
||||
name=post_advance
|
||||
first_time_only=no
|
||||
[store_unit]
|
||||
[filter]
|
||||
x=$x1
|
||||
y=$y1
|
||||
[/filter]
|
||||
variable=player_unit
|
||||
kill=yes
|
||||
[/store_unit]
|
||||
{INIT_HYDRATION_FOR_PLAYER_UNIT}
|
||||
[/event]
|
||||
|
||||
# Adjust max_hitpoints just before healing
|
||||
# to make sure the dehydration damage
|
||||
# doesn't heal, then restore max_hitpoints
|
||||
# on the next select event to show the
|
||||
# dehydration damage
|
||||
[event]
|
||||
name=side turn
|
||||
first_time_only=no
|
||||
[if]
|
||||
[variable]
|
||||
name=side_number
|
||||
equals=1
|
||||
[/variable]
|
||||
[then]
|
||||
[store_unit]
|
||||
variable=player_unit
|
||||
kill=no
|
||||
[filter]
|
||||
side=1
|
||||
x=1-39
|
||||
y=1-74
|
||||
[/filter]
|
||||
[/store_unit]
|
||||
{FOREACH player_unit i}
|
||||
{VARIABLE thirst $player_unit[$i].variables.dehydration}
|
||||
[if]
|
||||
[variable]
|
||||
name=thirst
|
||||
greater_than=0
|
||||
[/variable]
|
||||
[then]
|
||||
{VARIABLE_OP thirst multiply -2}
|
||||
{VARIABLE_OP thirst add $player_unit[$i].variables.max_hitpoints}
|
||||
# [message]
|
||||
# description=$player_unit[$i].description
|
||||
# message="Lower max hitpoints for $player_unit[$i].user_description from $player_unit[$i].variables.max_hitpoints to $thirst"
|
||||
# [/message]
|
||||
{VARIABLE player_unit[$i].max_hitpoints $thirst}
|
||||
[/then]
|
||||
[/if]
|
||||
[unstore_unit]
|
||||
variable=player_unit[$i]
|
||||
find_vacant=no
|
||||
[/unstore_unit]
|
||||
{NEXT i}
|
||||
[/then]
|
||||
[/if]
|
||||
# event on next select
|
||||
# that reapplies max hitpoints - for representational purposes
|
||||
[event]
|
||||
name=select
|
||||
[store_unit]
|
||||
variable=player_unit
|
||||
kill=no
|
||||
[filter]
|
||||
side=1
|
||||
x=1-39
|
||||
y=1-74
|
||||
[/filter]
|
||||
[/store_unit]
|
||||
{FOREACH player_unit i}
|
||||
{VARIABLE hp_check $player_unit[$i].variables.max_hitpoints}
|
||||
[if]
|
||||
[variable]
|
||||
name=hp_check
|
||||
greater_than=0
|
||||
[/variable]
|
||||
[then]
|
||||
{VARIABLE player_unit[$i].max_hitpoints $hp_check}
|
||||
[/then]
|
||||
[/if]
|
||||
[unstore_unit]
|
||||
variable=player_unit[$i]
|
||||
find_vacant=no
|
||||
[/unstore_unit]
|
||||
{NEXT i}
|
||||
[/event]
|
||||
[/event]
|
||||
|
||||
|
||||
[event]
|
||||
name=victory
|
||||
|
||||
# Rehydrate all units for the next scenario
|
||||
[store_unit]
|
||||
variable=affected_unit
|
||||
kill=no
|
||||
[filter]
|
||||
side=1
|
||||
x=1-39
|
||||
y=1-74
|
||||
[/filter]
|
||||
[/store_unit]
|
||||
{APPLY_HYDRATION_EFFECT -1}
|
||||
|
||||
[if]
|
||||
[have_unit]
|
||||
description=Elyssa
|
||||
|
@ -1665,50 +2096,6 @@
|
|||
[/message]
|
||||
[/then]
|
||||
[/if]
|
||||
|
||||
# Rehydrate all units for the next scenario
|
||||
|
||||
[store_unit]
|
||||
[filter]
|
||||
side=1
|
||||
[/filter]
|
||||
|
||||
kill=no
|
||||
variable=units_to_rehydrate
|
||||
[/store_unit]
|
||||
|
||||
{FOREACH units_to_rehydrate i}
|
||||
[if]
|
||||
[variable]
|
||||
name=units_to_rehydrate[$i].variables.dehydrated
|
||||
equals=1
|
||||
[/variable]
|
||||
|
||||
[then]
|
||||
{VARIABLE units_to_rehydrate[$i].variables.dehydrated 0}
|
||||
|
||||
{FOREACH units_to_rehydrate[$i].attack j}
|
||||
[if]
|
||||
[variable]
|
||||
name=units_to_rehydrate[$i].attack[$j].range
|
||||
equals=melee
|
||||
[/variable]
|
||||
|
||||
[then]
|
||||
{VARIABLE units_to_rehydrate[$i].attack[$j].damage $units_to_rehydrate[$i].variables.attack[$j].real_damage}
|
||||
[/then]
|
||||
[/if]
|
||||
{NEXT j}
|
||||
|
||||
[unstore_unit]
|
||||
variable=units_to_rehydrate[$i]
|
||||
find_vacant=no
|
||||
[/unstore_unit]
|
||||
[/then]
|
||||
[/if]
|
||||
{NEXT i}
|
||||
|
||||
{CLEAR_VARIABLE units_to_rehydrate}
|
||||
[/event]
|
||||
|
||||
#time over defeat event
|
||||
|
@ -1815,24 +2202,6 @@
|
|||
{CLEAR_VARIABLE turn_temp}
|
||||
[/event]
|
||||
|
||||
#!Clear the desert heat flag on unit advancement
|
||||
[event]
|
||||
name=post_advance
|
||||
first_time_only=no
|
||||
[store_unit]
|
||||
[filter]
|
||||
x=$x1
|
||||
y=$y1
|
||||
[/filter]
|
||||
variable=victim
|
||||
kill=yes
|
||||
[/store_unit]
|
||||
{VARIABLE victim.variables.dehydrated 0}
|
||||
[unstore_unit]
|
||||
variable=victim
|
||||
[/unstore_unit]
|
||||
[/event]
|
||||
|
||||
[event]
|
||||
name=turn 5
|
||||
|
||||
|
@ -1915,18 +2284,12 @@
|
|||
[/event]
|
||||
|
||||
[event]
|
||||
name=new turn
|
||||
first_time_only=no
|
||||
|
||||
[store_unit]
|
||||
name=new turn
|
||||
first_time_only=no
|
||||
# dehydration:
|
||||
# only at dawn, morning, mid-day, afternoon and dusk
|
||||
[store_unit]
|
||||
[filter]
|
||||
[not]
|
||||
[wml_filter]
|
||||
[variables]
|
||||
dehydration_immunity=yes
|
||||
[/variables]
|
||||
[/wml_filter]
|
||||
[/not]
|
||||
[not]
|
||||
race=undead
|
||||
[/not]
|
||||
|
@ -1936,77 +2299,32 @@
|
|||
[not]
|
||||
type=Dust Devil
|
||||
[/not]
|
||||
[not]
|
||||
# traveller's ring
|
||||
role=immune
|
||||
[/not]
|
||||
[not]
|
||||
# prevent AI units from being depleted
|
||||
# by hydration before the player shows
|
||||
# up
|
||||
ai_special=guardian
|
||||
[/not]
|
||||
[filter_location]
|
||||
terrain=Hd, Dd, Rr, Dd^Dr
|
||||
[not]
|
||||
time_of_day=chaotic
|
||||
[/not]
|
||||
[/filter_location]
|
||||
[not]
|
||||
[filter_adjacent]
|
||||
ability=healing,curing
|
||||
is_enemy=no
|
||||
[/filter_adjacent]
|
||||
[/not]
|
||||
[not]
|
||||
[filter_location]
|
||||
time_of_day=chaotic
|
||||
[/filter_location]
|
||||
[/not]
|
||||
[/filter]
|
||||
|
||||
kill=no
|
||||
variable=units_to_dehydrate
|
||||
[/store_unit]
|
||||
|
||||
{FOREACH units_to_dehydrate i}
|
||||
{VARIABLE units_to_dehydrate[$i].variables.dehydrated 1}
|
||||
|
||||
{FOREACH units_to_dehydrate[$i].attack j}
|
||||
[if]
|
||||
[variable]
|
||||
name=units_to_dehydrate[$i].attack[$j].range
|
||||
equals=melee
|
||||
[/variable]
|
||||
|
||||
[then]
|
||||
[if]
|
||||
[variable]
|
||||
name=units_to_dehydrate[$i].attack[$j].damage
|
||||
greater_than=1
|
||||
[/variable]
|
||||
|
||||
[then]
|
||||
[if]
|
||||
[variable]
|
||||
name=units_to_dehydrate[$i].variables.attack[$j].real_damage
|
||||
greater_than=0
|
||||
[/variable]
|
||||
|
||||
[else]
|
||||
{VARIABLE units_to_dehydrate[$i].variables.attack[$j].real_damage $units_to_dehydrate[$i].attack[$j].damage}
|
||||
[/else]
|
||||
[/if]
|
||||
|
||||
{ADD units_to_dehydrate[$i].attack[$j].damage -1}
|
||||
[/then]
|
||||
[/if]
|
||||
[/then]
|
||||
[/if]
|
||||
{NEXT j}
|
||||
|
||||
[unstore_unit]
|
||||
variable=units_to_dehydrate[$i]
|
||||
find_vacant=no
|
||||
{COLOR_HARM}
|
||||
text= _ "Dehydrated"
|
||||
[/unstore_unit]
|
||||
{NEXT i}
|
||||
|
||||
{CLEAR_VARIABLE units_to_dehydrate}
|
||||
variable=affected_unit
|
||||
[/store_unit]
|
||||
{APPLY_HYDRATION_EFFECT 1}
|
||||
[/event]
|
||||
|
||||
[event]
|
||||
name=new turn
|
||||
first_time_only=no
|
||||
|
||||
[store_unit]
|
||||
[filter]
|
||||
[not]
|
||||
|
@ -2022,45 +2340,10 @@
|
|||
terrain=Ww
|
||||
[/filter_location]
|
||||
[/filter]
|
||||
|
||||
kill=no
|
||||
variable=units_to_rehydrate
|
||||
variable=affected_unit
|
||||
[/store_unit]
|
||||
|
||||
{FOREACH units_to_rehydrate i}
|
||||
[if]
|
||||
[variable]
|
||||
name=units_to_rehydrate[$i].variables.dehydrated
|
||||
equals=1
|
||||
[/variable]
|
||||
|
||||
[then]
|
||||
{VARIABLE units_to_rehydrate[$i].variables.dehydrated 0}
|
||||
|
||||
{FOREACH units_to_rehydrate[$i].attack j}
|
||||
[if]
|
||||
[variable]
|
||||
name=units_to_rehydrate[$i].attack[$j].range
|
||||
equals=melee
|
||||
[/variable]
|
||||
|
||||
[then]
|
||||
{VARIABLE units_to_rehydrate[$i].attack[$j].damage $units_to_rehydrate[$i].variables.attack[$j].real_damage}
|
||||
[/then]
|
||||
[/if]
|
||||
{NEXT j}
|
||||
|
||||
[unstore_unit]
|
||||
variable=units_to_rehydrate[$i]
|
||||
find_vacant=no
|
||||
{COLOR_HEAL}
|
||||
text= _ "Rehydrated"
|
||||
[/unstore_unit]
|
||||
[/then]
|
||||
[/if]
|
||||
{NEXT i}
|
||||
|
||||
{CLEAR_VARIABLE units_to_rehydrate}
|
||||
{APPLY_HYDRATION_EFFECT -1}
|
||||
[/event]
|
||||
|
||||
{@campaigns/Under_the_Burning_Suns/utils/deaths.cfg}
|
||||
|
|
Loading…
Add table
Reference in a new issue