UtBS: fixed bug and heat/lava damage is now displayed
This commit is contained in:
parent
24ec1b48e2
commit
8aacff3663
4 changed files with 140 additions and 118 deletions
|
@ -331,6 +331,7 @@ name=start
|
|||
[/then]
|
||||
[/if]
|
||||
|
||||
# if ally dies in the final battle
|
||||
[if]
|
||||
[variable]
|
||||
name=ally_dead
|
||||
|
@ -376,6 +377,7 @@ name=start
|
|||
[/then]
|
||||
[/if]
|
||||
|
||||
# if nym doesn't die
|
||||
[if]
|
||||
[variable]
|
||||
name=nym_dead
|
||||
|
@ -393,6 +395,7 @@ name=start
|
|||
[/then]
|
||||
[/if]
|
||||
|
||||
# if zhul doesn't die
|
||||
[if]
|
||||
[variable]
|
||||
name=zhul_dead
|
||||
|
@ -410,7 +413,7 @@ name=start
|
|||
[/then]
|
||||
[/if]
|
||||
|
||||
|
||||
# if ally doesn't die
|
||||
[if]
|
||||
[variable]
|
||||
name=ally_dead
|
||||
|
@ -451,6 +454,7 @@ name=start
|
|||
[/then]
|
||||
[/if]
|
||||
|
||||
# if ally died before the final battle
|
||||
[if]
|
||||
[variable]
|
||||
name=ally_dead
|
||||
|
@ -514,6 +518,7 @@ name=start
|
|||
message= _ "It has been several years since the events that I chronicle here, and I'm not quite as spry and limber as I used to be, so I decided it was about time that I write this all down lest something happen to me. My one wish is that our descendants do not forget all those who made the ultimate sacrifice so that there might be a future for our people. Looking at the ruins of the ancient empires, I know that time erases all things. We have forgotten so much about the Golden Age. Do not let our story suffer the same fate. For as long as the tales of those now departed are still told, in some sense they are still alive and still with us. Honor those who have died. Remember our mistakes so you will not repeat them. And most of all, treasure every day, for it is a gift, from us to you."
|
||||
[/message]
|
||||
|
||||
# if both Nym and Zhul survived, then play special bonus conclusion
|
||||
[if]
|
||||
[variable]
|
||||
name=nym_dead
|
||||
|
|
|
@ -551,11 +551,23 @@ description=Nym
|
|||
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]
|
||||
|
||||
[set_variable]
|
||||
name=temp_damage
|
||||
value=$desert_damage
|
||||
[/set_variable]
|
||||
|
||||
[set_variable]
|
||||
name=temp_damage]
|
||||
multiply=-1
|
||||
[/set_variable]
|
||||
|
||||
[message]
|
||||
speaker=narrator
|
||||
message= _ "During the daytime (Dawn, Morning, Mid-day, Afternoon, and Dusk) at the end of each your turns, every unit in a sand, road, rubble or sand dune hex will take $desert_damage damage. While dehydration can severely damage your units, it will never lower them below 1 hit point. Also, at the start of your turn, each unit in an oasis (shallow water) hex will gain 8 hit points."
|
||||
message= _ "During the daytime (Dawn, Morning, Mid-day, Afternoon, and Dusk) at the end of each your turns, every unit in a sand, road, rubble or sand dune hex will take $temp_damage damage. While dehydration can severely damage your units, it will never lower them below 1 hit point. Also, at the start of your turn, each unit in an oasis (shallow water) hex will gain 8 hit points."
|
||||
[/message]
|
||||
|
||||
{CLEAR_VARIABLE temp_damage}
|
||||
|
||||
[message]
|
||||
description=Zhul
|
||||
message= _ "The other shamans and I can provide minor healing to ease the exhaustion and dehydration of the desert journey. But oases like the one next to us are the key to our survival, their fresh water will heal our people much faster and better than any of our powers."
|
||||
|
@ -3218,7 +3230,8 @@ name=time over
|
|||
#These events happen continually throughout the scenario
|
||||
|
||||
# The unit who carries the traveler's ring is immune to heat damage
|
||||
# So they heal 4,5,6 damage to negate the damage they will take
|
||||
# all other units taje 4/5/6 non-lethal damage (depending on difficulty)
|
||||
# if they are standing in a desert or desert hills hex during the day
|
||||
|
||||
[event]
|
||||
name=side turn
|
||||
|
@ -3226,25 +3239,25 @@ first_time_only=no
|
|||
|
||||
[if]
|
||||
[variable]
|
||||
name=daytime
|
||||
numerical_equals=1
|
||||
name=daytime
|
||||
numerical_equals=1
|
||||
[/variable]
|
||||
|
||||
[variable]
|
||||
name=side_number
|
||||
numerical_equals=2
|
||||
name=side_number
|
||||
numerical_equals=2
|
||||
[/variable]
|
||||
|
||||
[then]
|
||||
|
||||
[set_variable]
|
||||
name=damage_msg
|
||||
format=$desert_damage
|
||||
name=damage_msg
|
||||
format=$desert_damage
|
||||
[/set_variable]
|
||||
|
||||
[set_variable]
|
||||
name=damage_msg
|
||||
multiply=-1
|
||||
name=damage_msg
|
||||
multiply=-1
|
||||
[/set_variable]
|
||||
|
||||
[redraw]
|
||||
|
@ -3285,13 +3298,12 @@ first_time_only=no
|
|||
variable=unitstats
|
||||
[/store_unit]
|
||||
|
||||
|
||||
[set_variable]
|
||||
name=unitstats.hitpoints
|
||||
add=$desert_damage
|
||||
name=unitstats.hitpoints
|
||||
add=$desert_damage
|
||||
[/set_variable]
|
||||
|
||||
#if unitstats.hitpoints is < 1, kill unit
|
||||
#if unitstats.hitpoints is < 1 then set hitpoints to 1
|
||||
[if]
|
||||
[variable]
|
||||
name=unitstats.hitpoints
|
||||
|
@ -3308,16 +3320,19 @@ first_time_only=no
|
|||
[/then]
|
||||
|
||||
[/if]
|
||||
|
||||
[unstore_unit]
|
||||
variable=unitstats
|
||||
[/unstore_unit]
|
||||
|
||||
[unstore_unit]
|
||||
variable=unitstats
|
||||
text=$damage_msg
|
||||
{COLOR_HARM}
|
||||
[/unstore_unit]
|
||||
|
||||
{CLEAR_VARIABLE unitstats}
|
||||
|
||||
{NEXT i}
|
||||
|
||||
{CLEAR_VARIABLE locs}
|
||||
{CLEAR_VARIABLE damage_msg}
|
||||
|
||||
[/then]
|
||||
|
||||
|
|
|
@ -1096,12 +1096,18 @@ variable=dwarfstats
|
|||
name=new turn
|
||||
first_time_only=no
|
||||
|
||||
[redraw]
|
||||
[/redraw]
|
||||
|
||||
[store_locations]
|
||||
x=1-33
|
||||
y=11-27
|
||||
terrain=y
|
||||
[filter]
|
||||
side=1,3,7
|
||||
side=1,3,7
|
||||
[not]
|
||||
description=Zhul Shyde, Zhul Star, Desert Shyde, Desert Star
|
||||
[/not]
|
||||
[/filter]
|
||||
variable=locs
|
||||
[/store_locations]
|
||||
|
@ -1124,70 +1130,8 @@ first_time_only=no
|
|||
[/filter]
|
||||
variable=unitstats
|
||||
[/store_unit]
|
||||
|
||||
[if]
|
||||
[or]
|
||||
[variable]
|
||||
name=unitstats.type
|
||||
equals="Zhul Shyde"
|
||||
[/variable]
|
||||
[/or]
|
||||
|
||||
[or]
|
||||
[variable]
|
||||
name=unitstats.type
|
||||
equals="Zhul Star"
|
||||
[/variable]
|
||||
[/or]
|
||||
|
||||
[or]
|
||||
[variable]
|
||||
name=unitstats.type
|
||||
equals="Desert Shyde"
|
||||
[/variable]
|
||||
[/or]
|
||||
|
||||
[or]
|
||||
[variable]
|
||||
name=unitstats.type
|
||||
equals="Desert Star"
|
||||
[/variable]
|
||||
[/or]
|
||||
|
||||
[then]
|
||||
# take no damage
|
||||
[/then]
|
||||
|
||||
[else]
|
||||
|
||||
[set_variable]
|
||||
name=unitstats.hitpoints
|
||||
add=$lava_damage
|
||||
[/set_variable]
|
||||
|
||||
[/else]
|
||||
|
||||
[/if]
|
||||
|
||||
#if unitstats.hitpoints is < 1, kill unit
|
||||
[if]
|
||||
[variable]
|
||||
name=unitstats.hitpoints
|
||||
less_than=1
|
||||
[/variable]
|
||||
|
||||
[then]
|
||||
|
||||
[kill]
|
||||
x,y=$temp_x,$temp_y
|
||||
fire_event=yes
|
||||
animate=yes
|
||||
[/kill]
|
||||
|
||||
[/then]
|
||||
|
||||
[/if]
|
||||
|
||||
|
||||
# this code makes sure Kaleh stays unslowed
|
||||
[if]
|
||||
[variable]
|
||||
name=unslow_kaleh
|
||||
|
@ -1208,30 +1152,66 @@ first_time_only=no
|
|||
|
||||
[/then]
|
||||
[/if]
|
||||
|
||||
[set_variable]
|
||||
name=unitstats.hitpoints
|
||||
add=$lava_damage
|
||||
[/set_variable]
|
||||
|
||||
[set_variable]
|
||||
name=damage_msg
|
||||
format=$lava_damage
|
||||
[/set_variable]
|
||||
|
||||
# if unit in lava has not been killed, then replace it with new
|
||||
# damaged version
|
||||
[set_variable]
|
||||
name=damage_msg
|
||||
multiply=-1
|
||||
[/set_variable]
|
||||
|
||||
# if unitstats.hitpoints is < 1, unstore unit and kill it,
|
||||
# else just unstore it
|
||||
|
||||
[if]
|
||||
[have_unit]
|
||||
x,y=$temp_x,$temp_y
|
||||
[/have_unit]
|
||||
[variable]
|
||||
name=unitstats.hitpoints
|
||||
less_than=1
|
||||
[/variable]
|
||||
|
||||
[then]
|
||||
|
||||
|
||||
[unstore_unit]
|
||||
variable=unitstats
|
||||
text=$damage_msg
|
||||
{COLOR_HARM}
|
||||
[/unstore_unit]
|
||||
|
||||
[/then]
|
||||
[/if]
|
||||
[kill]
|
||||
x,y=$temp_x,$temp_y
|
||||
fire_event=yes
|
||||
animate=yes
|
||||
[/kill]
|
||||
|
||||
[/then]
|
||||
|
||||
[else]
|
||||
|
||||
[unstore_unit]
|
||||
variable=unitstats
|
||||
text=$damage_msg
|
||||
{COLOR_HARM}
|
||||
[/unstore_unit]
|
||||
|
||||
[/else]
|
||||
|
||||
[/if]
|
||||
|
||||
{CLEAR_VARIABLE unitstats}
|
||||
|
||||
{NEXT i}
|
||||
|
||||
{CLEAR_VARIABLE locs}
|
||||
{CLEAR_VARIABLE damage_msg}
|
||||
|
||||
[/event]
|
||||
|
||||
|
||||
|
@ -1243,6 +1223,9 @@ first_time_only=no
|
|||
name=new turn
|
||||
first_time_only=no
|
||||
|
||||
[redraw]
|
||||
[/redraw]
|
||||
|
||||
[store_locations]
|
||||
x=15-32,23-29,12-16
|
||||
y=12-24,25-26,15-22
|
||||
|
@ -1271,30 +1254,8 @@ first_time_only=no
|
|||
[/filter]
|
||||
variable=unitstats
|
||||
[/store_unit]
|
||||
|
||||
[set_variable]
|
||||
name=unitstats.hitpoints
|
||||
add=$heat_damage
|
||||
[/set_variable]
|
||||
|
||||
#if unitstats.hitpoints is < 1, kill unit
|
||||
[if]
|
||||
[variable]
|
||||
name=unitstats.hitpoints
|
||||
less_than=1
|
||||
[/variable]
|
||||
|
||||
[then]
|
||||
|
||||
[set_variable]
|
||||
name=unitstats.hitpoints
|
||||
value=1
|
||||
[/set_variable]
|
||||
|
||||
[/then]
|
||||
|
||||
[/if]
|
||||
|
||||
|
||||
# this code makes sure Kaleh stays unslowed
|
||||
[if]
|
||||
[variable]
|
||||
name=unslow_kaleh
|
||||
|
@ -1315,17 +1276,52 @@ first_time_only=no
|
|||
|
||||
[/then]
|
||||
[/if]
|
||||
|
||||
[set_variable]
|
||||
name=unitstats.hitpoints
|
||||
add=$heat_damage
|
||||
[/set_variable]
|
||||
|
||||
[set_variable]
|
||||
name=damage_msg
|
||||
format=$heat_damage
|
||||
[/set_variable]
|
||||
|
||||
[set_variable]
|
||||
name=damage_msg
|
||||
multiply=-1
|
||||
[/set_variable]
|
||||
|
||||
|
||||
#if unitstats.hitpoints is < 1, then set hitpoints to 1
|
||||
[if]
|
||||
[variable]
|
||||
name=unitstats.hitpoints
|
||||
less_than=1
|
||||
[/variable]
|
||||
|
||||
[then]
|
||||
|
||||
[set_variable]
|
||||
name=unitstats.hitpoints
|
||||
value=1
|
||||
[/set_variable]
|
||||
|
||||
[/then]
|
||||
[/if]
|
||||
|
||||
[unstore_unit]
|
||||
variable=unitstats
|
||||
text=$damage_msg
|
||||
{COLOR_HARM}
|
||||
variable=unitstats
|
||||
[/unstore_unit]
|
||||
|
||||
|
||||
{CLEAR_VARIABLE unitstats}
|
||||
|
||||
{NEXT i}
|
||||
|
||||
{CLEAR_VARIABLE locs}
|
||||
{CLEAR_VARIABLE damage_msg}
|
||||
|
||||
[/event]
|
||||
|
||||
|
|
|
@ -138,6 +138,12 @@ name=die
|
|||
|
||||
[/else]
|
||||
[/if]
|
||||
|
||||
[set_variable]
|
||||
name=ally_dead
|
||||
value=1
|
||||
[/set_variable]
|
||||
|
||||
[/event]
|
||||
|
||||
# Esanoo's death
|
||||
|
|
Loading…
Add table
Reference in a new issue