Fix unwanted reapplication of rod effects...
...and optimize the type changing event a bit.
This commit is contained in:
parent
0569b943d6
commit
7216a96ca8
1 changed files with 19 additions and 111 deletions
|
@ -269,85 +269,29 @@
|
|||
kill=yes
|
||||
[/store_unit]
|
||||
|
||||
# Rewrite the if statements to slightly more compact and elegant form
|
||||
[if]
|
||||
[variable]
|
||||
name=typechange.type
|
||||
equals=Peasant
|
||||
name=typechange.level
|
||||
greater_than=2
|
||||
[/variable]
|
||||
[or]
|
||||
[variable]
|
||||
name=typechange.type
|
||||
equals=Spearman
|
||||
[/variable]
|
||||
[/or]
|
||||
[or]
|
||||
[variable]
|
||||
name=typechange.type
|
||||
equals=Bowman
|
||||
[/variable]
|
||||
[/or]
|
||||
[then]
|
||||
[set_variable]
|
||||
name=typechange.type
|
||||
value=Sergeant
|
||||
[/set_variable]
|
||||
[/then]
|
||||
[/if]
|
||||
|
||||
[if]
|
||||
[variable]
|
||||
name=typechange.type
|
||||
equals=Longbowman
|
||||
[/variable]
|
||||
[or]
|
||||
[variable]
|
||||
name=typechange.type
|
||||
equals=Swordsman
|
||||
[/variable]
|
||||
[/or]
|
||||
[or]
|
||||
[variable]
|
||||
name=typechange.type
|
||||
equals=Pikeman
|
||||
[/variable]
|
||||
[/or]
|
||||
[or]
|
||||
[variable]
|
||||
name=typechange.type
|
||||
equals=Javelineer
|
||||
[/variable]
|
||||
[/or]
|
||||
[then]
|
||||
[set_variable]
|
||||
name=typechange.type
|
||||
value=Lieutenant
|
||||
[/set_variable]
|
||||
[/then]
|
||||
[/if]
|
||||
|
||||
[if]
|
||||
[variable]
|
||||
name=typechange.type
|
||||
equals=Master Bowman
|
||||
[/variable]
|
||||
[or]
|
||||
[variable]
|
||||
name=typechange.type
|
||||
equals=Royal Guard
|
||||
[/variable]
|
||||
[/or]
|
||||
[or]
|
||||
[variable]
|
||||
name=typechange.type
|
||||
equals=Halberdier
|
||||
[/variable]
|
||||
[/or]
|
||||
[then]
|
||||
[set_variable]
|
||||
name=typechange.type
|
||||
value=General
|
||||
[/set_variable]
|
||||
{VARIABLE typechange.type General}
|
||||
[/then]
|
||||
[else]
|
||||
[if]
|
||||
[variable]
|
||||
name=typechange.level
|
||||
greater_than=1
|
||||
[/variable]
|
||||
[then]
|
||||
{VARIABLE typechange.type Lieutenant}
|
||||
[/then]
|
||||
[else]
|
||||
{VARIABLE typechange.type Sergeant}
|
||||
[/else]
|
||||
[/if]
|
||||
[/else]
|
||||
[/if]
|
||||
|
||||
[unstore_unit]
|
||||
|
@ -359,43 +303,7 @@
|
|||
|
||||
[event]
|
||||
name=start
|
||||
|
||||
[if]
|
||||
[variable]
|
||||
name=tallin_gotta_stick
|
||||
numerical_equals=1
|
||||
[/variable]
|
||||
|
||||
[then]
|
||||
[object]
|
||||
silent=yes
|
||||
[filter]
|
||||
description=Tallin
|
||||
[/filter]
|
||||
duration=forever
|
||||
|
||||
[effect]
|
||||
apply_to=movement
|
||||
increase=2
|
||||
[/effect]
|
||||
[effect]
|
||||
apply_to=attack
|
||||
range=melee
|
||||
increase_damage=2
|
||||
[/effect]
|
||||
[effect]
|
||||
apply_to=hitpoints
|
||||
increase_total=10
|
||||
heal_full=yes
|
||||
[/effect]
|
||||
[effect]
|
||||
apply_to=max_experience
|
||||
increase=-20%
|
||||
[/effect]
|
||||
[/object]
|
||||
[/then]
|
||||
[/if]
|
||||
|
||||
# Remove reaplying of object, if they are permanent they get stored and unstored with the unit
|
||||
{CLEAR_VARIABLE tallin_gotta_stick}
|
||||
|
||||
[role]
|
||||
|
|
Loading…
Add table
Reference in a new issue