Healing + strengthening all units of a side at once
Moderator: Forum Moderators
Forum rules
- Please use [code] BBCode tags in your posts for embedding WML snippets.
- To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
- Celtic_Minstrel
- Developer
- Posts: 2209
- Joined: August 3rd, 2012, 11:26 pm
- Location: Canada
- Contact:
Re: Healing + strengthening all units of a side at once
If you mean the
[foreach]
version, yes, of course that will also work.- IIIO_METAL
- Posts: 202
- Joined: January 18th, 2017, 5:03 pm
- Location: japan
Re: Healing + strengthening all units of a side at once
In this case, the method proposed by Celtic_Minstrel is the simplest.
The number of lines of code has been significantly reduced.
The number of lines of code has been significantly reduced.
Code: Select all
[event]
name=cast_spell
first_time_only=no
[modify_unit]
[filter]
side=1,3,5,6
[/filter]
[object]
id=ascendant_spells
duration=forever
[effect]
apply_to=resistance
replace=no
[resistance]
blade=-50
pierce=-50
impact=-50
[/resistance]
[/effect]
[effect]
apply_to=attack
increase_damage=25%
[/effect]
[effect]
apply_to=hitpoints
increase=10
violate_maximum=no
[/effect]
[/object]
[/modify_unit]
[/event]
[event]
name=new turn
first_time_only=no
[if]
[variable]
name=ascendant_spells
not_equals=1
[/variable]
[then]
[remove_object]
side = 1
object_id = ascendant_spells
[/remove_object]
[/then]
[/if]
[/event]
Creator of "Mountain Witch" & "Castle of evil spirit"