Rehydrate everyone quietly upon victory; fixes bug #19655.

This commit is contained in:
Steven Panek 2012-04-23 00:07:54 +00:00
parent 33af8de754
commit c2e8b5caad

View File

@ -296,11 +296,44 @@ Hd, Dd*, Rd #enddef
name=victory
# Rehydrate all units for the next scenario
{APPLY_HYDRATION_EFFECT (
side=1
{EVERYWHERE}
)}
# Do this more quietly than usual...
[store_unit]
[filter]
side=1
[/filter]
# Clear related variable
kill=no
variable=hydrating_units
[/store_unit]
{FOREACH hydrating_units i}
[if]
[variable]
name=hydrating_units[$i].status.dehydrated
equals=yes
[/variable]
[then]
{FOREACH hydrating_units[$i].attack j}
{VARIABLE hydrating_units[$i].attack[$j].damage $hydrating_units[$i].variables.original_attack[$j].damage}
{NEXT j}
[/then]
[/if]
{VARIABLE hydrating_units[$i].status.dehydrated no}
[unstore_unit]
variable=hydrating_units[$i]
find_vacant=no
[/unstore_unit]
[remove_unit_overlay]
id=$hydrating_units[$i].id
image=misc/dehydration-icon.png
[/remove_unit_overlay]
{NEXT i}
# Clear related variables
{CLEAR_VARIABLE hydrating_units}
{CLEAR_VARIABLE dehydration_loss}
[/event]