mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-07 10:51:11 +00:00
Rehydrate everyone quietly upon victory; fixes bug #19655.
This commit is contained in:
parent
33af8de754
commit
c2e8b5caad
@ -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]
|
||||
|
Loading…
x
Reference in New Issue
Block a user