parent
6d7736e6e6
commit
866420adf8
2 changed files with 97 additions and 131 deletions
|
@ -534,79 +534,33 @@
|
|||
[/and]
|
||||
[/filter_condition]
|
||||
|
||||
[foreach]
|
||||
array=unit.attack
|
||||
[do]
|
||||
[if]
|
||||
#This is to mute a warning message about retrieving a member of non-existant wml container.
|
||||
[variable]
|
||||
name=this_item.specials.length
|
||||
greater_than=0
|
||||
[/variable]
|
||||
|
||||
[variable]
|
||||
name=this_item.specials.chance_to_hit.length
|
||||
greater_than=0
|
||||
[/variable]
|
||||
|
||||
[then]
|
||||
[set_variables]
|
||||
name=this_item.specials.original_chance_to_hit
|
||||
to_variable=this_item.specials.chance_to_hit
|
||||
[/set_variables]
|
||||
|
||||
{CLEAR_VARIABLE this_item.specials.chance_to_hit}
|
||||
[/then]
|
||||
[/if]
|
||||
|
||||
[set_variables]
|
||||
name=this_item.specials.chance_to_hit
|
||||
|
||||
[value]
|
||||
[object]
|
||||
id=forced_cth
|
||||
[filter]
|
||||
id=$unit.id
|
||||
[/filter]
|
||||
silent=yes
|
||||
duration=turn end
|
||||
take_only_once=no
|
||||
[effect]
|
||||
apply_to=new_ability
|
||||
[abilities]
|
||||
[chance_to_hit]
|
||||
id=forced_cth
|
||||
value={CTH_NUMBER}
|
||||
cumulative=no
|
||||
affect_self=yes
|
||||
[filter_opponent]
|
||||
{SECOND_FILTER}
|
||||
[/filter_opponent]
|
||||
[/value]
|
||||
[/set_variables]
|
||||
[/do]
|
||||
[/foreach]
|
||||
|
||||
[unstore_unit]
|
||||
variable=unit
|
||||
find_vacant=no
|
||||
[/unstore_unit]
|
||||
|
||||
[/chance_to_hit]
|
||||
[/abilities]
|
||||
[/effect]
|
||||
[/object]
|
||||
[event]
|
||||
name=attack end
|
||||
delayed_variable_substitution=yes
|
||||
|
||||
[filter_condition]
|
||||
[have_unit]
|
||||
id=$unit.id
|
||||
[/have_unit]
|
||||
[/filter_condition]
|
||||
|
||||
[foreach]
|
||||
array=unit.attack
|
||||
[do]
|
||||
{CLEAR_VARIABLE this_item.specials.chance_to_hit}
|
||||
|
||||
[set_variables]
|
||||
name=this_item.specials.chance_to_hit
|
||||
to_variable=this_item.specials.original_chance_to_hit
|
||||
[/set_variables]
|
||||
|
||||
{CLEAR_VARIABLE this_item.specials.original_chance_to_hit}
|
||||
[/do]
|
||||
[/foreach]
|
||||
|
||||
[unstore_unit]
|
||||
variable=unit
|
||||
find_vacant=no
|
||||
[/unstore_unit]
|
||||
[remove_object]
|
||||
object_id=forced_cth
|
||||
[/remove_object]
|
||||
[/event]
|
||||
[/event]
|
||||
|
||||
|
@ -631,80 +585,59 @@
|
|||
[/and]
|
||||
[/filter_condition]
|
||||
|
||||
[foreach]
|
||||
array=second_unit.attack
|
||||
[do]
|
||||
[if]
|
||||
[variable]
|
||||
name=this_item.specials.length
|
||||
greater_than=0
|
||||
[/variable]
|
||||
|
||||
[variable]
|
||||
name=this_item.specials.chance_to_hit.length
|
||||
greater_than=0
|
||||
[/variable]
|
||||
|
||||
[then]
|
||||
[set_variables]
|
||||
name=this_item.specials.original_chance_to_hit
|
||||
to_variable=this_item.specials.chance_to_hit
|
||||
[/set_variables]
|
||||
|
||||
{CLEAR_VARIABLE this_item.specials.chance_to_hit}
|
||||
[/then]
|
||||
[/if]
|
||||
|
||||
[set_variables]
|
||||
name=this_item.specials.chance_to_hit
|
||||
|
||||
[value]
|
||||
[object]
|
||||
id=forced_cth
|
||||
[filter]
|
||||
id=$second_unit.id
|
||||
[/filter]
|
||||
silent=yes
|
||||
duration=turn end
|
||||
take_only_once=no
|
||||
[effect]
|
||||
apply_to=new_ability
|
||||
[abilities]
|
||||
[chance_to_hit]
|
||||
id=forced_cth
|
||||
value={CTH_NUMBER}
|
||||
cumulative=no
|
||||
affect_self=yes
|
||||
[filter_opponent]
|
||||
{SECOND_FILTER}
|
||||
[/filter_opponent]
|
||||
[/value]
|
||||
[/set_variables]
|
||||
[/do]
|
||||
[/foreach]
|
||||
|
||||
[unstore_unit]
|
||||
variable=second_unit
|
||||
find_vacant=no
|
||||
[/unstore_unit]
|
||||
|
||||
[/chance_to_hit]
|
||||
[/abilities]
|
||||
[/effect]
|
||||
[/object]
|
||||
[event]
|
||||
name=attack end
|
||||
delayed_variable_substitution=yes
|
||||
|
||||
[filter_condition]
|
||||
[have_unit]
|
||||
id=$second_unit.id
|
||||
[/have_unit]
|
||||
[/filter_condition]
|
||||
|
||||
[foreach]
|
||||
array=second_unit.attack
|
||||
[do]
|
||||
{CLEAR_VARIABLE this_item.specials.chance_to_hit}
|
||||
|
||||
[set_variables]
|
||||
name=this_item.specials.chance_to_hit
|
||||
to_variable=this_item.specials.original_chance_to_hit
|
||||
[/set_variables]
|
||||
|
||||
{CLEAR_VARIABLE this_item.specials.original_chance_to_hit}
|
||||
[/do]
|
||||
[/foreach]
|
||||
|
||||
[unstore_unit]
|
||||
variable=second_unit
|
||||
find_vacant=no
|
||||
[/unstore_unit]
|
||||
[remove_object]
|
||||
object_id=forced_cth
|
||||
[/remove_object]
|
||||
[/event]
|
||||
[/event]
|
||||
[event]
|
||||
name=unit placed
|
||||
first_time_only=no
|
||||
|
||||
[filter]
|
||||
ability=forced_cth
|
||||
[/filter]
|
||||
|
||||
[remove_object]
|
||||
object_id=forced_cth
|
||||
[/remove_object]
|
||||
[/event]
|
||||
[event]
|
||||
name=prestart,start,victory
|
||||
[filter_condition]
|
||||
[have_unit]
|
||||
ability=forced_cth
|
||||
[/have_unit]
|
||||
[/filter_condition]
|
||||
|
||||
[remove_object]
|
||||
object_id=forced_cth
|
||||
[/remove_object]
|
||||
[/event]
|
||||
#enddef
|
||||
|
||||
#define LOOT AMOUNT SIDE
|
||||
|
|
|
@ -4056,6 +4056,39 @@ unplagueable: $wml_unit.status.unplagueable"
|
|||
{CLEAR_VARIABLE x_len}
|
||||
{CLEAR_VARIABLE xy_len}
|
||||
[/event]
|
||||
{FORCE_CHANCE_TO_HIT (type=Elvish Champion) (type=Lich) 80 ()}
|
||||
{FORCE_CHANCE_TO_HIT (type=Elvish Champion) (type=Elvish Marksman) 90 ()}
|
||||
[event]
|
||||
name=attack
|
||||
first_time_only=yes
|
||||
|
||||
[filter]
|
||||
type=Elvish Champion
|
||||
[/filter]
|
||||
|
||||
[filter_second]
|
||||
type=Lich
|
||||
[/filter_second]
|
||||
|
||||
[store_unit]
|
||||
[filter]
|
||||
id=$unit.id
|
||||
side=1
|
||||
[/filter]
|
||||
variable=store_cth
|
||||
kill=yes
|
||||
mode=replace
|
||||
[/store_unit]
|
||||
[/event]
|
||||
[event]
|
||||
name=turn 2
|
||||
|
||||
[unstore_unit]
|
||||
variable=store_cth
|
||||
find_vacant=no
|
||||
advance=false
|
||||
[/unstore_unit]
|
||||
[/event]
|
||||
[/test]
|
||||
|
||||
[units]
|
||||
|
|
Loading…
Add table
Reference in a new issue