Skip to content

Instantly share code, notes, and snippets.

@justinzane
Created December 7, 2014 02:06
Show Gist options
  • Save justinzane/07b1ddd3403a3ce3ba3d to your computer and use it in GitHub Desktop.
Save justinzane/07b1ddd3403a3ce3ba3d to your computer and use it in GitHub Desktop.
#textdomain wesnoth-loti
# "plague"
#define WEAPON_SPECIAL_PLAGUE_TYPE_LOTI TYPE LANGUAGE_TYPE
[plague]
id=plague({TYPE})
name= _ "plague ("+{LANGUAGE_TYPE}+_")"
description= _ "Plague:
When a unit is killed by a Plague attack, that unit is replaced with a unit identical to and on the same side as the unit with the Plague attack. This doesn’t work on Undead or units in villages."
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "When a unit is killed by a Plague attack, that unit is replaced with a unit identical to and on the same side as the unit with the Plague attack. This doesn’t work on Undead or units in villages."
#else
description= _ "Plague:
When a unit is killed by a Plague attack, that unit is replaced with a unit identical to and on the same side as the unit with the Plague attack. This doesn’t work on Undead or units in villages."
#endif
type={TYPE}
[/plague]
#enddef
# "adamant"
#define ABILITY_ADAMANT
[resistance]
id=adamant
multiply=3
max_value=80
[filter_base_value]
greater_than=0
less_than=80
[/filter_base_value]
name= _ "adamant"
female_name= _ "female^adamant"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "This unit’s resistances are tripled, up to a maximum of 80%, when defending. Vulnerabilities are not affected."
#else
description= _ "Adamant:
This unit’s resistances are tripled, up to a maximum of 80%, when defending. Vulnerabilities are not affected."
#endif
affect_self=yes
active_on=defense
[/resistance]
#enddef
# "ambush[snow]"
#define ABILITY_SNOW_AMBUSH
[hides]
id=
name= _ "snow ambush"
female_name= _ "female^snow ambush"
name_inactive= _ "snow ambush"
female_name_inactive= _ "female^snow ambush"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "This unit can hide on frozen terrains, and remain undetected by its enemies. Enemy units cannot see this unit while it is in snow/ice, except if they have units next to it. Any enemy unit that first discovers this unit immediately loses all its remaining movement."
description_inactive= _ "This unit can hide on frozen terrains, and remain undetected by its enemies. Enemy units cannot see this unit while it is in snow/ice, except if they have units next to it. Any enemy unit that first discovers this unit immediately loses all its remaining movement."
#else
description= _ "Snow ambush:
This unit can hide on frozen terrains, and remain undetected by its enemies. Enemy units cannot see this unit while it is in snow/ice, except if they have units next to it. Any enemy unit that first discovers this unit immediately loses all its remaining movement."
description_inactive= _ "Snow ambush:
This unit can hide on frozen terrains, and remain undetected by its enemies. Enemy units cannot see this unit while it is in snow/ice, except if they have units next to it. Any enemy unit that first discovers this unit immediately loses all its remaining movement."
#endif
affect_self=yes
[filter_self]
[filter_location]
terrain=A*,Ai^*,Ha,Ha^*,Ms
[/filter_location]
[/filter_self]
[/hides]
#enddef
# "ambush[weak]"
#define ABILITY_WEAK_AMBUSH
[hides]
id=weak_ambush
name= _ "ambush"
female_name= _ "female^ambush"
name_inactive= _ "ambush"
female_name_inactive= _ "female^ambush"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "This unit can hide in forest, and remain undetected by its enemies. But only in deciduous forest. Enemy units cannot see this unit while it is in forest, except if they have units next to it. Any enemy unit that first discovers this unit immediately loses all its remaining movement."
description_inactive= _ "This unit can hide in forest, and remain undetected by its enemies. But only in deciduous forest. Enemy units cannot see this unit while it is in forest, except if they have units next to it. Any enemy unit that first discovers this unit immediately loses all its remaining movement."
#else
description= _ "Ambush:
This unit can hide in forest, and remain undetected by its enemies. But only in deciduous forest. Enemy units cannot see this unit while it is in forest, except if they have units next to it. Any enemy unit that first discovers this unit immediately loses all its remaining movement."
description_inactive= _ "Ambush:
This unit can hide in forest, and remain undetected by its enemies. But only in deciduous forest. Enemy units cannot see this unit while it is in forest, except if they have units next to it. Any enemy unit that first discovers this unit immediately loses all its remaining movement."
#endif
affect_self=yes
[filter_self]
[filter_location]
terrain=*^Fds
[/filter_location]
[/filter_self]
[/hides]
#enddef
# "aura[burning]"
#define ABILITY_BURNING_AURA POWER
[heals]
value=-{POWER}
id=burning_aura {POWER}
affect_enemies=yes
name= _ "burns foes ("+{POWER}+_")"
female_name= _ "female^burns foes ("+{POWER}+_")"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "Allows the unit to damage adjacent enemies at the beginning of our turn for "+{POWER}+_" damage. This ability ignores any resistances or weaknesses of enemies, so it`s very powerful against spirits. It never kills, only leaves 1hp."
#else
description= _ "Burns foes ("+{POWER}+_"):
Allows the unit to damage adjacent enemies at the beginning of our turn for "+{POWER}+_" damage. This ability ignores any resistances or weaknesses of enemies, so it`s very powerful against spirits. It never kills, only leaves 1hp."
#endif
affect_self=no
affect_allies=no
poison=slowed
[affect_adjacent]
adjacent=n,ne,se,s,sw,nw
[/affect_adjacent]
[/heals]
#enddef
# "aura[death]"
#define ABILITY_DEATHAURA INTENSITY
[heals]
value=-{INTENSITY}
id=deathaura
affect_enemies=yes
affect_allies=no
name= _ "Deathaura"
female_name= _ "female^Deathaura"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "This item allows the unit to hurt adjacent enemy units at the beginning of your turn ("+{INTENSITY}+_" damage). Does not affect poisoned enemies."
#else
description= _ "Deathaura:
This item allows the unit to hurt adjacent enemy units at the beginning of your turn ("+{INTENSITY}+_" damage). Does not affect poisoned enemies."
#endif
affect_self=no
poison=slowed
[affect_adjacent]
adjacent=n,ne,se,s,sw,nw
[/affect_adjacent]
[/heals]
#enddef
# aura[freezing]
#define ABILITY_FREEZING_AURA
[dummy]
id=freezing
name= _ "freezing aura"
female_name= _ "female^freezing aura"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "All adjacent units except units of the same side as this unit will be slowed at the beginning of their turn."
#else
description= _ "Freezing Aura:
All adjacent units except units of the same side as this unit will be slowed at the beginning of their turn."
#endif
[/dummy]
#enddef
# aura[northfrost]
#define ABILITY_NORTHFROST_AURA
[dummy]
id=northfrost aura
name= _ "northfrost aura"
female_name= _ "female^northfrost aura"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "All enemies in the range of two hexes from this unit will be slowed at the beginning of their turn."
#else
description= _ "Northfrost Aura:
All enemies in the range of two hexes from this unit will be slowed at the beginning of their turn."
#endif
[/dummy]
#enddef
# "aura[resistance]"
#define ABILITY_INCREASE_RESISTANCE_AURA NAME POWER
[resistance]
id={NAME} {POWER}
add={POWER}
max_value=80
name={NAME}+_" ("+{POWER}+_")"
female_name={NAME}+_" ("+{POWER}+_")"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "This unit can rally the adjacent allied units to ignore damage taken better, increasing their resistances by "+{POWER}+_"%, up to a maximum of 80%."
#else
description={NAME}+_" ("+{POWER}+_")
This unit can rally the adjacent allied units to ignore damage taken better, increasing their resistances by "+{POWER}+_"%, up to a maximum of 80%."
#endif
affect_self=no
affect_allies=yes
[filter_base_value]
less_than=80
[/filter_base_value]
[affect_adjacent]
adjacent=n,ne,se,s,sw,nw
[/affect_adjacent]
[/resistance]
#enddef
# aura[toxic]
#define ABILITY_TOXIC_AURA
[dummy]
id=dark aura
name= _ "dark aura"
female_name= _ "female^dark aura"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "All adjacent units except units of the same side as this unit will be poisoned at the beginning of their turn."
#else
description= _ "Dark Aura:
All adjacent units except units of the same side as this unit will be poisoned at the beginning of their turn."
#endif
[/dummy]
#enddef
# "careful"
#define ABILITY_CAREFUL INTENSITY
[resistance]
id=careful
add={INTENSITY}
max_value=80
name= _ "careful"
female_name= _ "female^careful"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "This unit’s resistances are increased by "+{INTENSITY}+_", up to a maximum of 80%, when defending. Vulnerabilities are not affected."
#else
description= _ "careful:
This unit’s resistances increased by "+{INTENSITY}+_", up to a maximum of 80%, when defending. Vulnerabilities are not affected."
#endif
affect_self=yes
active_on=defense
[/resistance]
#enddef
# "shield"
#define ABILITY_SHIELD INTENSITY
[resistance]
id=shield
add={INTENSITY}
cumulative=yes
max_value=60
name= _ "shield ("+{INTENSITY}+_")"
female_name= _ "female^shield ("+{INTENSITY}+_")"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "This unit's presence is so glorious that all adjacent allies are hounoured and inspired by them, increasing their resistances by "+{INTENSITY}+_"%, up to a maximum of 60%."
#else
description= _ "Shield:
This unit's presence is so glorious that all adjacent allies are hounoured and inspired by them, increasing their resistances by "+{INTENSITY}+_"%, up to a maximum of 60%."
#endif
affect_self=no
affect_allies=yes
affect_enemies=no
[affect_adjacent]
adjacent=n,ne,se,s,sw,nw
[/affect_adjacent]
[filter_base_value]
less_than=60
[/filter_base_value]
[/resistance]
#enddef
# "charging"
#define WEAPON_SPECIAL_CHARGING POWER
[damage]
id=charge
name= _ "charge"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "When used offensively, this attack deals multiplied damage to the target. It also causes this unit to take multiplied damage from the target's counterattack."
#else
description= _ "Charge:
When used offensively, this attack deals multiplied damage to the target. It also causes this unit to take multiplied damage from the target's counterattack."
#endif
multiply={POWER}
apply_to=both
active_on=offense
[/damage]
#enddef
# "antisocial"
#define ABILITY_ANTISOCIAL
[leadership]
id=antisocial
value=-20
cumulative=no
name= _ "antisocial"
female_name= _ "female^antisocial"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "This unit's manners are incredibly bad, and other units hate fighting near this unit. Allies adjacent to this unit deal 20% less damage."
#else
description= _ "Antisocial:
This unit's manners are incredibly bad, and other units hate fighting near this unit. Allies adjacent to this unit deal 20% less damage."
#endif
affect_self=no
affect_allies=yes
affect_enemies=no
[affect_adjacent]
adjacent=n,ne,se,s,sw,nw
[/affect_adjacent]
[/leadership]
#enddef
# "antisocial[lesser]"
#define ABILITY_LESSER_ANTISOCIAL
[leadership]
id=lesser antisocial
value=-10
cumulative=no
name= _ "lesser antisocial"
female_name= _ "female^lesser antisocial"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "This unit's manners are very bad, and other units hate fighting near this unit. Allies adjacent to this unit deal 10% less damage."
#else
description= _ "Antisocial:
This unit's manners are very bad, and other units hate fighting near this unit. Allies adjacent to this unit deal 10% less damage."
#endif
affect_self=no
affect_allies=yes
affect_enemies=no
[affect_adjacent]
adjacent=n,ne,se,s,sw,nw
[/affect_adjacent]
[/leadership]
#enddef
# "despair"
#define ABILITY_DESPAIR INTENSITY
[leadership]
id=despair
value=-{INTENSITY}
cumulative=no
name= _ "despair ("+{INTENSITY}+_")"
female_name= _ "female^despair ("+{INTENSITY}+_")"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "This unit's presence is so darkly ominous that all adjacent enemies struggle with despair, dealing "+{INTENSITY}+_"% less damage."
#else
description= _ "Despair:
This unit's presence is so darkly ominous that all adjacent enemies struggle with despair, dealing "+{INTENSITY}+_"% less damage."
#endif
affect_self=no
affect_allies=no
affect_enemies=yes
[affect_adjacent]
adjacent=n,ne,se,s,sw,nw
[/affect_adjacent]
[/leadership]
#enddef
# "conviction"
#define ABILITY_CONVICTION INTENSITY
[resistance]
id=conviction
sub={INTENSITY}
max_value=80
cumulative=yes
name= _ "conviction ("+{INTENSITY}+_")"
female_name= _ "female^conviction ("+{INTENSITY}+_")"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "This unit's presence is so darkly ominous that all adjacent enemies struggle with the guilt of their evil deeds, reducing their resistances by "+{INTENSITY}+_"%."
#else
description= _ "Conviction:
This unit's presence is so darkly ominous that all adjacent enemies struggle with the guilt of their evil deeds, reducing their resistances by "+{INTENSITY}+_"%."
#endif
affect_self=no
affect_allies=no
affect_enemies=yes
[affect_adjacent]
adjacent=n,ne,se,s,sw,nw
[/affect_adjacent]
[/resistance]
#enddef
# "berserk[lesser]"
#define WEAPON_SPECIAL_LESSER_BERSERK COUNT
[berserk]
id=lesser berserk {COUNT}
name= _ "lesser berserk ("+{COUNT}+_")"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "Whether used offensively or defensively, this attack presses the engagement until one of the combatants is slain, or "+{COUNT}+_" rounds of attacks have occurred."
#else
description= _ "Lesser Berserk:
Whether used offensively or defensively, this attack presses the engagement until one of the combatants is slain, or "+{COUNT}+_"rounds of attacks have occurred."
#endif
value={COUNT}
[/berserk]
#enddef
# "darken"
#define ABILITY_DARKENS
[illuminates]
id=darkens
value=-25
min_value=-25
max_value=25
cumulative=no
affect_self=yes
name= _ "darkens"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "This unit darkens the surrounding area, making chaotic units fight better, and lawful units fight worse. Any units adjacent to this unit will fight as if it were dusk when it is day, and as if it were night when it is dusk."
#else
description= _ "Darkens:
This unit darkens the surrounding area, making chaotic units fight better, and lawful units fight worse. Any units adjacent to this unit will fight as if it were dusk when it is day, and as if it were night when it is dusk."
#endif
[/illuminates]
#enddef
# "darken[improved]"
#define ABILITY_DARKENS_IMPROVED
[illuminates]
id=darkens badly
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "This unit darkens the surrounding area, making chaotic units fight better, and lawful units fight worse. Any units adjacent to this unit will fight as if it were dusk when it is day, as if it were night when it is dusk and the improvement of the chaotic units during the night is incredible."
#else
description= _ "Darkens badly:
This unit darkens the surrounding area, making chaotic units fight better, and lawful units fight worse. Any units adjacent to this unit will fight as if it were dusk when it is day, as if it were night when it is dusk and the improvement of the chaotic units during the night is incredible."
#endif
female_name=_"female^darkens badly"
name= _ "darkens badly"
id=darkens
value=-25
min_value=-50
max_value=25
cumulative=no
affect_self=yes
[/illuminates]
#enddef
# "darken[great]"
#define ABILITY_DARKENS_GREAT
[illuminates]
id=darkens severely
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "This unit darkens the surrounding area, making chaotic units fight better, and lawful units fight worse. Any units adjacent to this unit will fight almost as if it were night when it is day, as if it were darker than the darkest night when it is dusk and the improvement of the chaotic units during the night is incredible."
#else
description= _ "Darkens severely:
This unit darkens the surrounding area, making chaotic units fight better, and lawful units fight worse. Any units adjacent to this unit will fight almost as if it were night when it is day, as if it were darker than the darkest night when it is dusk and the improvement of the chaotic units during the night is incredible."
#endif
female_name=_"female^darkens severely"
id=darkens
name= _ "darkens severely"
value=-40
min_value=-50
max_value=25
cumulative=no
affect_self=yes
[/illuminates]
#enddef
# "illuminate[improved]"
#define ABILITY_ILLUMINATES_IMPROVED
[illuminates]
id=improved illumination
value=25
max_value=50
cumulative=no
name= _ "improved illumination"
female_name= _ "female^improved illumination"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "This unit illuminates the surrounding area, making lawful units fight better, and chaotic units fight worse. Any units adjacent to this unit will fight as if it were dusk when it is night, as if it were day when it is dusk, and even better during the day (worse if they are chaotic or liminal)."
#else
description= _ "Improved illumination:
This unit illuminates the surrounding area, making lawful units fight better, and chaotic units fight worse. Any units adjacent to this unit will fight as if it were dusk when it is night, as if it were day when it is dusk, and even better during the day (worse if they are chaotic or liminal)."
#endif
affect_self=yes
[/illuminates]
#enddef
# "illuminate[great]"
#define ABILITY_ILLUMINATES_GREAT
[illuminates]
id=great illumination
value=40
max_value=50
cumulative=no
name= _ "great illumination"
female_name= _ "female^great illumination"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "This unit illuminates the surrounding area, making lawful units fight better, and chaotic units fight worse. Any units adjacent to this unit will fight as if it were almost day when it is night, better than if it were day when it is dusk, and far better during the day (worse if they are chaotic or liminal)."
#else
description= _ "Great illumination:
This unit illuminates the surrounding area, making lawful units fight better, and chaotic units fight worse. Any units adjacent to this unit will fight as if it were almost day when it is night, better than if it were day when it is dusk, and far better during the day (worse if they are chaotic or liminal)."
#endif
affect_self=yes
[/illuminates]
#enddef
# "charging backstab"
#define WEAPON_SPECIAL_CHARGING_BACKSTAB
[damage]
id=charging backstab
name= _ "charging backstab"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "When used offensively, this attack deals double damage to the target if the target is facing backwards to the attacker. It also causes this unit to take double damage from the target’s counterattack."
#else
description= _ "Charging backstab:
When used offensively, this attack deals double damage to the target if the target is facing backwards to the attacker. It also causes this unit to take double damage from the target’s counterattack."
#endif
multiply=2
apply_to=both
active_on=offense
backstab=yes
[filter_self]
[not]
[filter_adjacent] # In this case, backstab from murderous presence will be a better alternative
ability=murderous presence
is_enemy=no
[/filter_adjacent]
[/not]
[/filter_self]
[/damage]
#enddef
# "twilightstalk"
#define ABILITY_TWILIGHTSTALK
[hides]
id=twilightstalk
name= _ "twilightstalk"
female_name= _ "twilightstalk"
description= _ "Twilightstalk:
The unit becomes invisible during dawn of dusk, hiding in long shadows created by the sun near the horizon. Enemy units cannot see this unit during dawn or dusk, except if they have units next to it. Any enemy unit that first discovers this unit immediately loses all its remaining movement."
name_inactive= _ "twilightstalk"
female_name_inactive= _ "female^twilightstalk"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "The unit becomes invisible during dawn of dusk, hiding in long shadows created by the sun near the horizon. Enemy units cannot see this unit during dawn or dusk, except if they have units next to it. Any enemy unit that first discovers this unit immediately loses all its remaining movement."
description_inactive= _ "The unit becomes invisible during dawn of dusk, hiding in long shadows created by the sun near the horizon. Enemy units cannot see this unit during dawn or dusk, except if they have units next to it. Any enemy unit that first discovers this unit immediately loses all its remaining movement."
#else
description= _ "Twilightstalk:
The unit becomes invisible during dawn of dusk, hiding in long shadows created by the sun near the horizon. Enemy units cannot see this unit during dawn or dusk, except if they have units next to it. Any enemy unit that first discovers this unit immediately loses all its remaining movement."
description_inactive= _ "Twilightstalk:
The unit becomes invisible during dawn of dusk, hiding in long shadows created by the sun near the horizon. Enemy units cannot see this unit during dawn or dusk, except if they have units next to it. Any enemy unit that first discovers this unit immediately loses all its remaining movement."
#endif
affect_self=yes
[filter_self]
[filter_location]
time_of_day=neutral
[/filter_location]
[/filter_self]
[/hides]
#enddef
# "chaotic"
#define WEAPON_SPECIAL_CHAOTIC
[damage]
id=chaotic
name= _ "chaotic"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "This attack is 25% better at night and 25% worse at day."
#else
description= _ "Chaotic:
This attack is 25% better at night and 25% worse at day."
#endif
[/damage]
[damage]
id=chaotic
multiply=1.25
[filter_self]
[filter_location]
time_of_day=chaotic
[/filter_location]
[/filter_self]
[/damage]
[damage]
id=chaotic
multiply=0.75
[filter_self]
[filter_location]
time_of_day=lawful
[/filter_location]
[/filter_self]
[/damage]
#enddef
# "lawful"
#define WEAPON_SPECIAL_LAWFUL
[damage]
id=lawful
name= _ "lawful"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "This attack is 25% better at day and 25% worse at night."
#else
description= _ "Lawful:
This attack is 25% better at day and 25% worse at night."
#endif
[/damage]
[damage]
id=lawful
multiply=1.25
[filter_self]
[filter_location]
time_of_day=lawful
[/filter_location]
[/filter_self]
[/damage]
[damage]
id=lawful
multiply=0.75
[filter_self]
[filter_location]
time_of_day=chaotic
[/filter_location]
[/filter_self]
[/damage]
#enddef
# "chaotic_and_lawful"
#define WEAPON_SPECIAL_CHAOTIC_AND_LAWFUL
[damage]
id=chaotic
name= _ "chaotic"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "This attack is 25% better at night."
#else
description= _ "Chaotic:
This attack is 25% better at nigh."
#endif
multiply=1.25
[filter_self]
[filter_location]
time_of_day=chaotic
[/filter_location]
[/filter_self]
[/damage]
[damage]
id=lawful
name= _ "lawful"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "This attack is 25% better at day."
#else
description= _ "Lawful:
This attack is 25% better at day."
#endif
multiply=1.25
[filter_self]
[filter_location]
time_of_day=lawful
[/filter_location]
[/filter_self]
[/damage]
#enddef
# "backstab[greater]"
#define WEAPON_SPECIAL_GREATER_BACKSTAB
[damage]
id=greater backstab
name= _ "greater backstab"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "When used offensively, this attack deals 2.5 times more damage if there is an enemy of the target on the opposite side of the target, and that unit is not incapacitated (turned to stone or otherwise paralyzed)."
#else
description= _ "Greater backstab:
When used offensively, this attack deals 2.5 times more damage if there is an enemy of the target on the opposite side of the target, and that unit is not incapacitated (turned to stone or otherwise paralyzed)."
#endif
multiply=2.5
backstab=yes
active_on=offense
[/damage]
#enddef
# "backstab[uber]"
#define WEAPON_SPECIAL_UBER_BACKSTAB
[damage]
id=uber backstab
name= _ "uber backstab"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "When used offensively, this attack deals triple damage if there is an enemy of the target on the opposite side of the target, and that unit is not incapacitated (turned to stone or otherwise paralyzed)."
#else
description= _ "Uber backstab:
When used offensively, this attack deals triple damage if there is an enemy of the target on the opposite side of the target, and that unit is not incapacitated (turned to stone or otherwise paralyzed)."
#endif
multiply=3
backstab=yes
active_on=offense
[/damage]
#enddef
# aura[damage]
#define ABILITY_EXTRA_DAMAGE_AURA NAME INTENSITY
[leadership]
id={NAME} {INTENSITY}
value={INTENSITY}
cumulative=yes
name={NAME}+_" ("+{INTENSITY}+_")"
female_name={NAME}+_" ("+{INTENSITY}+_")"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "Adjacent own units will do "+{INTENSITY}+_"% more damage."
#else
description= _ "{NAME}:
This unit can lead our own units that are next to it, making them fight better. Adjacent own units will do "+{INTENSITY}+_"% more damage."
#endif
affect_self=no
[affect_adjacent]
adjacent=n,ne,se,s,sw,nw
[/affect_adjacent]
[/leadership]
#enddef
# "regenerates[lesser]
#define ABILITY_REGENERATES_LESSER
[regenerate]
value=4
id=regenerates slightly
name= _ "regenerates slightly"
female_name= _ "female^regenerates slightly"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "The unit will heal itself 4 HP per turn. If it is poisoned, these two effects will negate themselves."
#else
description= _ "Regenerates slightly:
The unit will heal itself 4 HP per turn. If it is poisoned, these two effects will negate themselves."
#endif
affect_self=yes
poison=slowed
[/regenerate]
#enddef
# "leadership[6]"
#define ABILITY_LEADERSHIP_LEVEL_6
# Canned definition of the Leadership (level 5) ability to be included in an
# [abilities] clause.
[leadership]
id=leadership
value=150
cumulative=no
name= _ "leadership"
female_name= _ "female^leadership"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "This unit can lead our own units that are next to it, making them fight better.
Adjacent own units of lower level will do more damage in battle. When a unit adjacent to, of a lower level than, and on the same side as a unit with Leadership engages in combat, its attacks do 25% more damage times the difference in their levels."
#else
description= _ "Leadership:
This unit can lead our own units that are next to it, making them fight better.
Adjacent own units of lower level will do more damage in battle. When a unit adjacent to, of a lower level than, and on the same side as a unit with Leadership engages in combat, its attacks do 25% more damage times the difference in their levels."
#endif
affect_self=no
[affect_adjacent]
adjacent=n,ne,se,s,sw,nw
[filter]
level=0
[/filter]
[/affect_adjacent]
[/leadership]
[leadership]
id=leadership
value=125
cumulative=no
affect_self=no
[affect_adjacent]
adjacent=n,ne,se,s,sw,nw
[filter]
level=1
[/filter]
[/affect_adjacent]
[/leadership]
[leadership]
id=leadership
value=100
cumulative=no
affect_self=no
[affect_adjacent]
adjacent=n,ne,se,s,sw,nw
[filter]
level=2
[/filter]
[/affect_adjacent]
[/leadership]
[leadership]
id=leadership
value=75
cumulative=no
affect_self=no
[affect_adjacent]
adjacent=n,ne,se,s,sw,nw
[filter]
level=3
[/filter]
[/affect_adjacent]
[/leadership]
[leadership]
id=leadership
value=50
cumulative=no
affect_self=no
[affect_adjacent]
adjacent=n,ne,se,s,sw,nw
[filter]
level=4
[/filter]
[/affect_adjacent]
[/leadership]
[leadership]
id=leadership
value=25
cumulative=no
affect_self=no
[affect_adjacent]
adjacent=n,ne,se,s,sw,nw
[filter]
level=5
[/filter]
[/affect_adjacent]
[/leadership]
#enddef
# "marksman[focused]"
#define WEAPON_SPECIAL_FOCUSED
[chance_to_hit]
id=focused
name= _ "focused"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "This attack always has at least a 80% chance to hit."
#else
description= _ "Focused:
This attack always has at least a 80% chance to hit."
#endif
value=80
cumulative=yes
[/chance_to_hit]
#enddef
# "marksman[guided]"
#define WEAPON_SPECIAL_GUIDED
[chance_to_hit]
id=guided
name= _ "guided"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "This attack always has an 90% chance to hit, regardless of the defensive ability of the defending unit."
#else
description= _ "Guided:
This attack always has an 90% chance to hit, regardless of the defensive ability of the defending unit."
#endif
value=90
cumulative=no
[/chance_to_hit]
#enddef
# "struggle"
#define WEAPON_SPECIAL_STRUGGLE
[chance_to_hit]
id=struggle
name= _ "struggle"
name_inactive= _ "struggle"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "This attack causes the opponent to have a 10% lower chance to hit."
description_inactive= _ "This attack causes the opponent to have a 10% lower chance to hit."
#else
description= _ "Struggle:
This attack causes the opponent to have a 10% lower chance to hit."
description_inactive= _ "Struggle:
This attack causes the opponent to have a 10% lower chance to hit."
#endif
sub=10
apply_to=opponent
cumulative=yes
[/chance_to_hit]
#enddef
# "regenerate[other]"
#define ABILITY_REGENERATES_OTHER VALUE
[regenerate]
value={VALUE}
id=regenerates {VALUE}
name= _ "regenerates ("+{VALUE}+_")"
female_name= _ "female^regenerates ("+{VALUE}+_")"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "The unit will heal itself "+{VALUE}+_" HP per turn. If it is poisoned, it will remove the poison instead of healing."
#else
description= _ "Regenerates:
The unit will heal itself "+{VALUE}+_" HP per turn. If it is poisoned, it will remove the poison instead of healing."
#endif
affect_self=yes
poison=cured
[/regenerate]
#enddef
# "spiritual attack"
#define WEAPON_SPECIAL_SPIRITUAL_ATTACK
[damage]
id=spiritual attack
name= _ "spiritual attack"
name_inactive=_ "spiritual attack"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "When this attack is used, the damage of physical retaliation attacks is divided by 3."
#else
description= _ "Spiritual attack:
When this attack is used, the damage of physical retaliation attacks is divided by 3."
#endif
multiply=0.33
apply_to=defender
active_on=offense
[filter_opponent]
[filter_weapon]
type=blade,pierce,impact
[/filter_weapon]
[/filter_opponent]
[/damage]
#enddef
# doom
#define WEAPON_SPECIAL_DOOM
[dummy]
id=doom
name= _ "doom"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "If this attack hits, opponent's resistances will drop by 5% until he advances."
#else
description= _ "Doom: If this attack hits, opponent's resistances will drop by 5% until he advances."
#endif
[/dummy]
#enddef
# "horrid"
#define WEAPON_SPECIAL_HORRID
[damage]
id=horrid
multiply=0.66
apply_to=defender
active_on=offense
[/damage]
[dummy]
id=horrid_dummy
name= _ "horrid"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "When this attack is used offensively, the damage of retaliation attacks is decreased by 33%."
#else
description= _ "Horrid:
When this attack is used offensively, the damage of retaliation attacks is decreased by 33%."
#endif
apply_to=both
[/dummy]
#enddef
# "horror"
#define WEAPON_SPECIAL_HORROR
[damage]
id=horror
multiply=0.5
apply_to=defender
active_on=offense
[/damage]
[dummy]
id=horror_dummy
name= _ "horrid"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "When this attack is used offensively, the damage of retaliation attacks is halved."
#else
description= _ "Horrid:
When this attack is used offensively, the damage of retaliation attacks is halved."
#endif
apply_to=both
[/dummy]
#enddef
# "heals[other]"
#define ABILITY_HEALS_OTHER VALUE
[heals]
value={VALUE}
id=healing
affect_allies=yes
name= _ "heals +"+{VALUE}
female_name= _ "female^heals +"+{VALUE}
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "This unit combines herbal remedies with magic to heal units more quickly than is normally possible on the battlefield. A unit cared for by this healer may heal up to "+{VALUE}+_" HP per turn, or be cured of poisoning."
#else
description= _ "Heals +{VALUE}:
This unit combines herbal remedies with magic to heal units more quickly than is normally possible on the battlefield. A unit cared for by this healer may heal up to "+{VALUE}+_" HP per turn, or be cured of poisoning."
#endif
affect_self=no
poison=cured
[affect_adjacent]
adjacent=n,ne,se,s,sw,nw
[/affect_adjacent]
[/heals]
#enddef
# "unholybane (weapon)"
#define ABILITY_UNHOLYBANE INTENSITY
[heals]
value=-{INTENSITY}
id=unholybane
affect_enemies=yes
affect_allies=no
name= _ "unholybane ("+{INTENSITY}+_")"
female_name= _ "female^unholybane ("+{INTENSITY}+_")"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "Allows the unit to damage adjacent undead enemies at the beginning of our turn. It cannot kill an enemy, it can only lower its health to 1hp. This ability lowers enemies' health by "+{INTENSITY}+_", ignoring any resistances or weaknesses of enemies, so it's very powerful against spirits."
#else
description= _ "Unholybane:
Allows the unit to damage adjacent undead enemies at the beginning of our turn. It cannot kill an enemy, it can only lower its health to 1hp. This ability lowers enemies' health by "+{INTENSITY}+_", ignoring any resistances or weaknesses of enemies, so it's very powerful against spirits."
#endif
affect_self=no
[affect_adjacent]
adjacent=n,ne,se,s,sw,nw
[filter]
race=undead
[/filter]
[/affect_adjacent]
[/heals]
#enddef
# "unholybane (ability)"
#define WEAPON_SPECIAL_UNHOLYBANE
[damage]
id=unholybane
name= _ "unholybane"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "This attack does triple damage to undead (also other non-monster creations of magic)."
#else
description= _ "Unholybane:
This attack does triple damage to undead (also other non-monster creations of magic)."
#endif
multiply=3
[filter_opponent]
race=undead
[or]
race=demon-loti
[/or]
[or]
race=black soul-loti
[/or]
[or]
race=burning soul-loti
[/or]
[/filter_opponent]
[/damage]
#enddef
# "misanthropia"
#define WEAPON_SPECIAL_MISANTHROPIA
[damage]
id=misanthropia
name= _ "misanthropia"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "This attack does double damage to humans."
#else
description= _ "Misanthropia:
This attack does double damage to humans."
#endif
multiply=2
[filter_opponent]
race=human
[/filter_opponent]
[/damage]
#enddef
# "misnania"
#define WEAPON_SPECIAL_MISNANIA
[damage]
id=misnania
name= _ "misnania"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "This attack does double damage to dwarves."
#else
description= _ "Misnania:
This attack does double damage to dwarves."
#endif
multiply=2
[filter_opponent]
race=dwarf
[/filter_opponent]
[/damage]
#enddef
# "misorcia"
#define WEAPON_SPECIAL_MISORCIA
[damage]
id=misorcia
name= _ "misorcia"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "This attack does double damage to orcs."
#else
description= _ "Misorcia:
This attack does double damage to orcs."
#endif
multiply=2
[filter_opponent]
race=orc
[/filter_opponent]
[/damage]
#enddef
# "misdryadia"
#define WEAPON_SPECIAL_MISDRYADIA
[damage]
id=misdryadia
name= _ "misdryadia"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "This attack does double damage to elves."
#else
description= _ "Misdryadia:
This attack does double damage to elves."
#endif
multiply=2
[filter_opponent]
race=elf
[/filter_opponent]
[/damage]
#enddef
# "misdraconia"
#define WEAPON_SPECIAL_MISDRACONIA
[damage]
id=misdraconia
name= _ "misdraconia"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "This attack does double damage to drakes and dragons."
#else
description= _ "Misdraconia:
This attack does double damage to drakes and dragons."
#endif
multiply=2
[filter_opponent]
race=drake
[or]
type=Fire Dragon LotI
[/or]
[or]
type=Ice Dragon
[/or]
[or]
type=Dark Dragon
[/or]
[/filter_opponent]
[/damage]
#enddef
# "nightstalk[lesser]"
#define ABILITY_LESSER_NIGHTSTALK
[hides]
id=lesser nightstalk
name= _ "lesser nightstalk"
female_name= _ "lesser nightstalk"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "The unit becomes invisible during night, but only in forests, hills, mountains and villages. Enemy units cannot see this unit at night, except if they have units next to it. Any enemy unit that first discovers this unit immediately loses all its remaining movement."
description_inactive= _ "The unit becomes invisible during night, but only in forests, hills, mountains and villages. Enemy units cannot see this unit at night, except if they have units next to it. Any enemy unit that first discovers this unit immediately loses all its remaining movement."
#else
description= _ "Lesser nightstalk:
The unit becomes invisible during night, but only in forests, hills, mountains and villages. Enemy units cannot see this unit at night, except if they have units next to it. Any enemy unit that first discovers this unit immediately loses all its remaining movement."
description_inactive= _ "Lesser nightstalk:
The unit becomes invisible during night, but only in forests, hills, mountains and villages. Enemy units cannot see this unit at night, except if they have units next to it. Any enemy unit that first discovers this unit immediately loses all its remaining movement."
#endif
affect_self=yes
[filter_self]
[filter_location]
time_of_day=chaotic
terrain=*^Fp,*^Fet,*^Ft,*^Fpa,*^Fd*,*^Fm*,*^V*,H*,M*,C*
[/filter_location]
[/filter_self]
[/hides]
#enddef
# "ambush[nocturnal]"
#define ABILITY_NOCTURNAL_AMBUSH
[hides]
id=nocturnal ambush
name= _ "nocturnal ambush"
female_name= _ "nocturnal ambush"
name_inactive= _ "nocturnal ambush"
female_name_inactive= _ "female^nocturnal ambush"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "The unit becomes invisible in forests, but only at night. Enemy units cannot see this unit at night, except if they have units next to it. Any enemy unit that first discovers this unit immediately loses all its remaining movement."
description_inactive= _ "The unit becomes invisible in forests, but only at night. Enemy units cannot see this unit at night, except if they have units next to it. Any enemy unit that first discovers this unit immediately loses all its remaining movement."
#else
description= _ "Nocturnal ambush:
The unit becomes invisible in forests, but only at night. Enemy units cannot see this unit at night, except if they have units next to it. Any enemy unit that first discovers this unit immediately loses all its remaining movement."
description_inactive= _ "Nocturnal ambush:
The unit becomes invisible in forests, but only at night. Enemy units cannot see this unit at night, except if they have units next to it. Any enemy unit that first discovers this unit immediately loses all its remaining movement."
#endif
affect_self=yes
[filter_self]
[filter_location]
time_of_day=chaotic
terrain=*^Fp,*^Fet,*^Ft,*^Fpa,*^Fd*,*^Fm*
[/filter_location]
[/filter_self]
[/hides]
#enddef
# "distant attack"
#define WEAPON_SPECIAL_DISTANT_ATTACK
[attacks]
id=distant attack
name= _ "distant attack"
name_inactive= _ "distant attack"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "When this attack is used, the enemy will not counter."
description_inactive= _ "When this attack is used, the enemy will not counter."
#else
description= _ "Distant attack: When this attack is used, the enemy will not counter."
description_inactive= _ "Distant attack: When this attack is used, the enemy will not counter."
#endif
value=0
apply_to=opponent
[/attacks]
#enddef
# "anger"
#define WEAPON_SPECIAL_ANGER
[attacks]
id=anger
name= _ "anger"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "When used offensively, this attack doubles the attacks done by both attacker and defender."
#else
description= _ "Anger:
When used offensively, this attack doubles the attacks done by both attacker and defender."
#endif
multiply=2
apply_to=both
active_on=offense
[/attacks]
#enddef
# "quickstrike"
#define WEAPON_SPECIAL_QUICKSTRIKE
# This ability is just to notice that the attack uses no movement.
[attacks]
id=quickstrike
name= _ "quickstrike"
name_inactive= _ "quickstrike"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "When this attack is used, the attacker loses no movement. However, this does not give back the movement lost due to entering a unit's ZoC."
#else
description= _ "Quickstrike: When this attack is used, the attacker loses no movement. However, this does not give back the movement lost due to entering a unit's ZoC."
#endif
[/attacks]
#enddef
# These abilities are useless alone. There are events attached to them,
# without them, they are useless. The events can be found in global_events.cfg.
# "dazzle"
#define WEAPON_SPECIAL_DAZZLE
[dummy]
id=dazzle
name= _ "dazzle"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "This weapon special limits the target's chance to hit to 50% for one turn."
#else
description= _ "Dazzle: This weapon special limits the target's chance to hit to 50% for one turn."
#endif
[/dummy]
#enddef
# "mind raid"
#define WEAPON_SPECIAL_MIND_RAID
[dummy]
id=mind raid
name= _ "mind raid"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "This weapon special steals 1 experience from the opponent, increasing the user's experience. It does not work if the target has no experience."
#else
description= _ "Mind Raid: This weapon special steals 1 experience from the opponent, increasing the user's experience. It does not work if the target has no experience."
#endif
[/dummy]
#enddef
# "storm"
#define WEAPON_SPECIAL_STORM
[dummy]
id=storm
name= _ "storm"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "The damage of this attack will affect also a lot of other enemy units around the caster, and will also deal some impact damage."
#else
description= _ "Storm: The damage of this attack will affect also a lot of other enemy units around the caster, and will also deal some impact damage."
#endif
[/dummy]
#enddef
# "infect"
#define WEAPON_SPECIAL_INFECT
[poison]
id=infect
name= _ "infect"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "The target of this weapon specials becomes poisoned in a special way, so that if it dies from the poison, it becomes a Walking Corpse."
#else
description= _ "Infect: The target of this weapon specials becomes poisoned in a special way, so that if it dies from the poison, it becomes a Walking Corpse."
#endif
[/poison]
#enddef
# "infect[greater]"
#define WEAPON_SPECIAL_GREATER_INFECT
[poison]
id=greater infect
name= _ "greater infect"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "The target of this weapon specials becomes poisoned in a special way, so that if it dies from the poison, it becomes a Soulless."
#else
description= _ "Greater infect: The target of this weapon specials becomes poisoned in a special way, so that if it dies from the poison, it becomes a Soulless."
#endif
[/poison]
#enddef
# "knockback"
#define WEAPON_SPECIAL_KNOCKBACK
[damage]
id=knockback
name= _ "knockback"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "When this attack is used offensively, at the end of the fight the enemy will be knocked back."
#else
description= _ "Knockback: When this attack is used offensively, at the end of the fight the enemy will be knocked back."
#endif
[/damage]
#enddef
# "necromancy"
#define ABILITY_NECROMANCY
[dummy]
id=necromancy
name= _ "necromancy"
female_name= _ "female^necromancy"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "If this unit dies, it becomes a lich."
#else
description= _ "necromancy:
If this unit dies, it becomes a lich."
#endif
[/dummy]
#enddef
# "wrath"
#define ABILITY_WRATH
[dummy]
id=wrath
name= _ "wrath"
female_name= _ "female^wrath"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "When this unit hits an enemy when attacking, its damage when attacking increases by 1. The damage increased this way halves each turn (rounded down)."
#else
description= _ "Wrath:
When this unit hits an enemy when attacking, its damage when attacking increases by 1. The damage increased this way halves each turn (rounded down)."
#endif
[/dummy]
#enddef
# "hate speech"
#define ABILITY_HATE_SPEECH
[dummy]
id=hate speech
name= _ "hate speech"
female_name= _ "female^hate speech"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "When a unit adjacent to this unit hits an enemy when attacking, its damage when attacking increases by 1. The damage increased this way halves each turn (rounded down)."
#else
description= _ "Hate Speech:
When a unit adjacent to this unit hits an enemy when attacking, its damage when attacking increases by 1. The damage increased this way halves each turn (rounded down)."
#endif
[/dummy]
#enddef
# "unholy anger"
#define ABILITY_UNHOLY_HUNGER
[dummy]
id=unholy hunger
name= _ "unholy hunger"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "This unit craves for the souls of living beings. When it kills a living unit, it will heal 8 hp and its maximum hp will increase by 2. When it is not fed continually, it starts to starve, and loses 1 point of maximum hp more for each turn it did not kill something at the beginning of each turn. The hunger has no effect if the unit is cared by a healer or standing in a village."
#else
description= _ "unholy hunger:
This unit craves for the souls of living beings. When it kills a living unit, it will heal 8 hp and its maximum hp will increase by 2. When it is not fed continually, it starts to starve, and loses 1 point of maximum hp more for each turn it did not kill something at the beginning of each turn. The hunger has no effect if the unit is cared by a healer or standing in a village."
#endif
[/dummy]
#enddef
# "incinerate"
#define WEAPON_SPECIAL_INCINERATE
[dummy]
id=incinerate
name= _ "incinerate"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "This attack incinerates its targets. Burning units lose 16 HP every turn until they are cured. Flames can kill a unit, the attacker that incinerated the unit gets the experience."
#else
description= _ "Incinerate:
This attack incinerates its targets. Burning units lose 16 HP every turn until they are cured. Flames can kill a unit, the attacker that incinerated the unit gets the experience."
#endif
[/dummy]
#enddef
# "hit and run"
#define WEAPON_SPECIAL_HIT_AND_RUN
[dummy]
id=hit and run
name= _ "hit and run"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "When this attack us used, the unit gets back a half of its maximum movement."
#else
description= _ "Hit and Run: When this attack us used, the unit gets back a half of its maximum movement."
#endif
[/dummy]
#enddef
# "parry"
#define WEAPON_SPECIAL_PARRY
[dummy]
id=parry
name= _ "parry"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "When the target misses, the attacker will hit him without any checks."
#else
description= _ "Parry: When the target misses, the attacker will hit him without any checks."
#endif
[/dummy]
#enddef
# "pierce"
#define WEAPON_SPECIAL_PIERCE
[dummy]
id=pierce
name= _ "pierce"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "If this attack is used, the enemy behind the target is hurt as well, for 1/2 of the damage."
#else
description= _ "Pierce: If this attack is used, the enemy behind the target is hurt as well, for 1/2 of the damage."
#endif
[/dummy]
#enddef
# "mayhem"
#define WEAPON_SPECIAL_MAYHEM
[dummy]
id=mayhem
name= _ "mayhem"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "If this attack hits, opponent's damage is lowered by 1, until he advances."
#else
description= _ "Mayhem: If this attack hits, opponent's damage is lowered by 1, until he advances."
#endif
[/dummy]
#enddef
# "trickery"
#define WEAPON_SPECIAL_TRICKERY
[dummy]
id=trickery
name= _ "trickery"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "If this attack hits, opponent's defence on all terrains is lowered by 5%, until he advances."
#else
description= _ "Trickery: If this attack hits, opponent's defence on all terrains is lowered by 5%, until he advances."
#endif
[/dummy]
#enddef
# cone
#define WEAPON_SPECIAL_CONE
[dummy]
id=cone
name= _ "cone"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "If this attack us used, the enemy behind the target and enemies next to both the attacker and defender are hurt as well, for 1/2 of the damage."
#else
description= _ "Cone: If this attack us used, the enemy behind the target and enemies next to both the attacker and defender are hurt as well, for 1/2 of the damage."
#endif
[/dummy]
#enddef
# hose
#define WEAPON_SPECIAL_HOSE
[dummy]
id=hose
name= _ "hose"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "If this attack us used, many enemies behind and around the original target are hit."
#else
description= _ "Hose: If this attack us used, many enemies behind and around the original target are hit."
#endif
[/dummy]
#enddef
# impact+5
#define WEAPON_SPECIAL_EXTRA_5_IMPACT_DAMAGE
[dummy]
id=extra damage 5 impact
name= _ "extra damage (5; impact)"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "After that the damage with this weapon is dealt, the target takes 5 points of impact damage, that is unaffected by charge or slow."
#else
description= _ "Extra damage: After that the damage with this weapon is dealt, the target takes 5 points of impact damage, that is unaffected by charge or slow."
#endif
[/dummy]
#enddef
# penetrate[leadership]
#define ABILITY_PENETRATE_LEADERSHIP
[dummy]
id=push
name= _ "push"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "When a unit standing next to this unit finishes attacking, it gains one movement point."
#else
description= _ "Push:
When a unit standing next to this unit finishes attacking, it gains one movement point."
#endif
[/dummy]
#enddef
# thorns
#define ABILITY_THORNS
[dummy]
id=thorns
name= _ "thorns"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "Any unit that attacks this unit in melee suffers two points of piercing damage. Unlike reflect, it can kill."
#else
description= _ "Thorns:
Any unit that attacks this unit in melee suffers two points of piercing damage. Unlike reflect, it can kill."
#endif
[/dummy]
#enddef
# redeem
#define ABILITY_LESSER_REDEEM
[dummy]
id=lesser redeem
name= _ "lesser redeem"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "When this unit attacks another unit, there is a chance that the target will be absorbed, inversely proportional to enemy level. When the redeem count reaches a certain level, the unit's properties will improve."
#else
description= _ "Lesser redeem:
When this unit attacks another unit, there is a reason that the target will be absorbed, inversely proportional to enemy level. When the redeem count reaches a certain level, the unit's properties will improve."
#endif
[/dummy]
#enddef
# murderlust
#define ABILITY_MURDERLUST
[dummy]
id=murderlust
name= _ "murderlust"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "When this unit kills another unit, he/she heals 8 hp."
#else
description= _ "Murderlust:
When this unit kills another unit, he/she heals 8 hp."
#endif
[/dummy]
#enddef
# killhunger
#define ABILITY_KILLHUNGER
[dummy]
id=killhunger
name= _ "killhunger"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "When this unit kills another unit, it heals 4 hp, and is ridden of poison and slow."
#else
description= _ "Killhunger:
When this unit kills another unit, it heals 4 hp, and is ridden of poison and slow."
#endif
[/dummy]
#enddef
# evisceration[lesser]
#define ABILITY_LESSER_EVISCERATION
[dummy]
id=lesser evisceration
name= _ "lesser evisceration"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "When this unit kills another unit, nearby units heal 4 hp, and are ridden of poison and slow."
#else
description= _ "Lesser evisceration:
When this unit kills another unit, nearby units heal 4 hp, and are ridden of poison and slow."
#endif
[/dummy]
#enddef
# evisceration
#define ABILITY_EVISCERATION
[dummy]
id=evisceration
name= _ "evisceration"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "When this unit kills another unit, nearby units heal 10 hp, and are ridden of poison and slow."
#else
description= _ "Evisceration:
When this unit kills another unit, nearby units heal 10 hp, and are ridden of poison and slow."
#endif
[/dummy]
#enddef
# evisceration[greater]
#define ABILITY_GREATER_EVISCERATION
[dummy]
id=greater evisceration
name= _ "greater evisceration"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "When this unit kills another unit, nearby units heal 16 hp, and are ridden of poison and slow."
#else
description= _ "Greater evisceration:
When this unit kills another unit, nearby units heal 16 hp, and are ridden of poison and slow."
#endif
[/dummy]
#enddef
# immune[poison]
#define ABILITY_IMMUNE_TO_POISON
[dummy]
id=immune to poison
name= _ "immune to poison"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "This unit is immune to poison."
#else
description= _ "Immune to poison: This unit is immune to poison."
#endif
[/dummy]
#enddef
# immune[drain]
#define ABILITY_IMMUNE_TO_DRAIN
[dummy]
id=immune to drain
name= _ "immune to drain"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "This unit is immune to drain."
#else
description= _ "Immune to drain: This unit is immune to drain."
#endif
[/dummy]
#enddef
# immune[slow]
#define ABILITY_IMMUNE_TO_SLOW
[dummy]
id=resistant to slow
name= _ "resistant to slow"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "This unit has so much life energy in it, that it will break through any slowing effect almost instantly."
#else
description= _ "Immune to slow: This unit has so much life energy in it, that it will break through any slowing effect almost instantly."
#endif
[/dummy]
#enddef
# shockwave
#define WEAPON_SPECIAL_SHOCKWAVE
[slow]
id=shockwave
name= _ "shockwave"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "This attack is so strong that it slows the target, and creates a shock wave that knocks all units adjacent to the attacker back, and damages them for 8 impact damage. When used defensively, it only slows the attacker."
#else
description= _ "Shockwave:
This attack is so strong that it slows the target, and creates a shock wave that knocks all units adjacent to the attacker back, and damages them for 8 impact damage. When used defensively, it only slows the attacker."
#endif
[/slow]
#enddef
# cleave
#define WEAPON_SPECIAL_CLEAVE
[damage]
id=cleave
name= _ "cleave"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "On a melee attack, whatever hits the target will also hit enemies in the two hexes that are adjacent to both the attacker and defender, in a crescent moon shape, for 50% of the original damage."
#else
description= _ "Cleave:
On a melee attack, whatever hits the target will also hit enemies in the two hexes that are adjacent to both the attacker and defender, in a crescent moon shape, for 50% of the original damage."
#endif
[/damage]
#enddef
# kamikaze sprint
#define WEAPON_SPECIAL_KAMIKAZE_SPRINT
[damage]
id=kamikaze sprint
name= _ "kamikaze sprint"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "If this attack hits offensively, the attacker takes the damage of all the opponent's attacks. Then, the enemy behind the target takes a half of this attack's damage, the enemy behind him takes a quarter of the initial damage etc, until there are no more enemies in the row, and the attacker will appear there."
#else
description= _ "Kamikaze Sprint:
If this attack hits offensively, the attacker takes the damage of all the opponent's attacks. Then, the enemy behind the target takes a half of this attack's damage, the enemy behind him takes a quarter of the initial damage etc, until there are no more enemies in the row, and the attacker will appear there."
#endif
[/damage]
#enddef
# disintegrate
#define WEAPON_SPECIAL_DISINTEGRATE
[damage]
id=disintegrate
name= _ "disintegrate"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "Every blow with this weapon has a 2% chance to kill an enemy without any checks."
#else
description= _ "Disintegrate: Every blow with this weapon has a 2% chance to kill an enemy without any checks."
#endif
[/damage]
#enddef
# nosferatu gorge
#define WEAPON_SPECIAL_NOSFERATU_GORGE
[damage]
id=nosferatu gorge
name= _ "nosferatu gorge"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "Every blow with this attack has a chance to kill an enemy, adding all the victims' hitpoints to the user's hitpoints. The chance depends on victim's level. Works only in offence."
#else
description= _ "Nosferatu gorge: Every blow with this attack has a chance to kill an enemy, adding all the victims' hitpoints to the user's hitpoints. The chance depends on victim's level. Works only in offence."
#endif
[/damage]
#enddef
# raijers saloon
#define WEAPON_SPECIAL_RAIJERS_SALOON
[damage]
id=raijers saloon
name= _ "Raijer's saloon"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "Every blow with this attack has a chance to kill an enemy, adding all the victims' hitpoints to the hitpoints of user and nearby allies (divided by the number of healed units). The chance depends on victim's level. Works only in offence."
#else
description= _ "Raijer's saloon: Every blow with this attack has a chance to kill an enemy, adding all the victims' hitpoints to the hitpoints of user and nearby allies (divided by the number of healed units). The chance depends on victim's level. Works only in offence."
#endif
[/damage]
#enddef
# absorb[1]
#define ABILITY_ABSORB_1
[dummy]
id=absorb 1
name= _ "absorbs (1)"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "When this unit is hit, it takes its regular damage, but heals 1 hp after it."
#else
description= _ "Absorb: When this unit is hit, it takes its regular damage, but heals 1 hp after it."
#endif
[/dummy]
#enddef
# absorb[2]
#define ABILITY_ABSORB_2
[dummy]
id=absorb 2
name= _ "absorbs (2)"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "When this unit is hit, it takes its regular damage, but heals 2 hp after it."
#else
description= _ "Absorb: When this unit is hit, it takes its regular damage, but heals 2 hp after it."
#endif
[/dummy]
#enddef
# absorb[3]
#define ABILITY_ABSORB_3
[dummy]
id=absorb 3
name= _ "absorbs (3)"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "When this unit is hit, it takes its regular damage, but heals 3 hp after it."
#else
description= _ "Absorb: When this unit is hit, it takes its regular damage, but heals 3 hp after it."
#endif
[/dummy]
#enddef
# absorb[4]
#define ABILITY_ABSORB_4
[dummy]
id=absorb 4
name= _ "absorbs (4)"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "When this unit is hit, it takes its regular damage, but heals 4 hp after it."
#else
description= _ "Absorb: When this unit is hit, it takes its regular damage, but heals 4 hp after it."
#endif
[/dummy]
#enddef
# chaos
#define WEAPON_SPECIAL_CHAOS
[chance_to_hit]
id=chaos
name= _ "chaos"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "When used defensively, this attacks damages all surrounding units for a half of the damage, and it always has a 70% chance to hit regardless of the defensive ability of the attacking unit."
description_inactive= _ "When used defensively, this attacks damages all surrounding units for a half of the damage, and it always has a 70% chance to hit regardless of the defensive ability of the attacking unit."
#else
description= _ "Chaos:
When used defensively, this attacks damages all surrounding units for a half of the damage, and it always has a 70% chance to hit regardless of the defensive ability of the attacking unit."
description_inactive= _ "Chaos:
When used defensively, this attacks damages all surrounding units for a half of the damage, and it always has a 70% chance to hit regardless of the defensive ability of the attacking unit."
#endif
#This is partially coded elsewhere.
value=70
cumulative=no
active_on=defense
[/chance_to_hit]
#enddef
# explosive[leech]
#define WEAPON_SPECIAL_EXPLOSIVE_LEECH
[damage]
id=explosive leech
name= _ "explosive leech"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "When this attack is used, all enemies next to the target take 1/4 of the damage the target was dealt and the life is added to the caster's health."
#else
description= _ "Explosive leech: When this attack is used, all enemies next to the target take 1/4 of the damage the target was dealt and the life is added to the caster's health."
#endif
[/damage]
#enddef
# explosive[slow]
#define WEAPON_SPECIAL_EXPLOSIVE_SLOW
[damage]
id=explosive slow
name= _ "explosive slow"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "When this attack is used, all units adjacent to a target are slowed."
#else
description= _ "Explosive slow: When this attack is used, all units adjacent to a target are slowed."
#endif
[/damage]
#enddef
# explosive
#define WEAPON_SPECIAL_EXPLOSIVE
[damage]
id=explosive
name= _ "explosive"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "When this attack is used, all units adjacent to the target take 75% of the damage, and even those behind them will take a few if the damage is sufficiently high."
#else
description= _ "Explosive damage:
When this attack is used, all units adjacent to the target take 75% of the damage, and even those behind them will take a few if the damage is sufficiently high."
#endif
[/damage]
#enddef
# explosive[unprotected]
#define WEAPON_SPECIAL_EXPLOSIVE_UNPROTECTED
[damage]
id=explosive unprotected
name= _ "explosive unprotected"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "When this attack is used, all units adjacent to the target take 75% of the damage, including allies."
#else
description= _ "Explosive damage (unprotected):
When this attack is used, all units adjacent to the target take 75% of the damage, including allies."
#endif
[/damage]
#enddef
# feeding[easy]
#define ABILITY_FEEDING_EASY
[dummy]
id=feeding_easy
name= _ "feeding"
female_name= _ "female^feeding"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "This unit gains 1 hitpoint added to its maximum whenever it kills a living unit."
#else
description= _ "Feeding:
This unit gains 1 hitpoint added to its maximum whenever it kills a living unit."
#endif
[/dummy]
#enddef
# leech(ability)
#define ABILITY_LEECH
[dummy]
id=leech
name= _ "leeches"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "All adjacent enemy units to a unit with this ability lose 2 hitpoints at the beginning of this unit's turn. The damage dealt heals the unit. It cannot kill."
#else
description= _ "Leeches: All adjacent enemy units to a unit with this ability lose 2 hitpoints at the beginning of this unit's turn. The damage dealt heals the unit. It cannot kill."
#endif
[/dummy]
#enddef
# leech(weapon)
#define WEAPON_SPECIAL_LEECH
[damage]
id=leeches
name= _ "leeches"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "This is similar to the drains ability, but it drains only 1/10 of the damage inflicted but it can leech also the magic bound in the undeath of non-living foes."
#else
description= _ "Leeches: This is similar to the drains ability, but it drains only 1/10 of the damage inflicted but it can leech also the magic bound in the undeath of non-living foes."
#endif
[/damage]
#enddef
# purify
#define WEAPON_SPECIAL_PURIFY
[dummy]
id=purify
name= _ "purify"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "When an undead unit is killed by this attack, it becomes living again."
#else
description= _ "Purify:
When an undead unit is killed by this attack, it becomes living again."
#endif
[/dummy]
#enddef
# penetrate
#define ABILITY_PENETRATE
[dummy]
id=penetrate
name= _ "penetrates"
female_name= _ "female^penetrates"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "This unit gains 1 movement after attacking, allowing it to slowly progress through ranks of enemies if they can survive their attacks."
#else
description= _ "Penetrates:
This unit gains 1 movement after attacking, allowing it to slowly progress through ranks of enemies if they can survive their attacks."
#endif
[/dummy]
#enddef
# retribution
#define ABILITY_RETRIBUTION
[dummy]
id=retribution
name= _ "retribution"
female_name= _ "female^retribution"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "When this unit is hit, an amount of fire damage equal to a quarter of the damage dealt hurts the attacker."
#else
description= _ "Retribution:
When this unit is hit, an amount of fire damage equal to a quarter of the damage dealt hurts the attacker."
#endif
[/dummy]
#enddef
# reflect[weak]
#define ABILITY_WEAK_REFLECT
[dummy]
id=weak reflect
name= _ "weak reflect"
female_name= _ "female^weak reflect"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "When this unit is hit, an quarter of the damage it took is dealt also to the attacker. It cannot kill, unlike thorns."
#else
description= _ "Weak reflect:
When this unit is hit, an quarter of the damage it took is dealt also to the attacker. It cannot kill, unlike thorns."
#endif
[/dummy]
#enddef
# reflect
#define ABILITY_REFLECT
[dummy]
id=reflect
name= _ "reflect"
female_name= _ "female^reflect"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "When this unit is hit, an half of the damage it took is dealt also to the attacker. It cannot kill, unlike thorns."
#else
description= _ "Reflect:
When this unit is hit, an half of the damage it took is dealt also to the attacker. It cannot kill, unlike thorns."
#endif
[/dummy]
#enddef
# soul eater
#define ABILITY_SOUL_EATER
[dummy]
id=soul eater
name= _ "soul eater"
female_name= _ "female^soul eater"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "When this unit kills a certain amount of beings, it obtains special advancements."
#else
description= _ "Soul eater:
When this unit kills a certain amount of beings, it obtains special advancements."
#endif
[/dummy]
#enddef
# soul annihilation
#define WEAPON_SPECIAL_SOUL_ANNIHILATION
[damage]
id=soul annihilation
name= _ "soul annihilation"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "Every blow with this attack has a 1% chance to kill an enemy, damaging nearby enemies by the amount of health remaining the unit had divided by the number of nearby enemies with arcane damage."
#else
description= _ "Soul Annihilation: Every blow with this attack has a 1% chance to kill an enemy, damaging nearby enemies by the amount of health remaining the unit had divided by the number of nearby enemies with arcane damage."
#endif
[/damage]
#enddef
# soul thrash
#define WEAPON_SPECIAL_SOUL_THRASH
[damage]
id=soul thrash
name= _ "soul thrash"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "Every blow with this attack has a 1% chance to kill an enemy, adding the victims' level to the attacker's wrath (increasing the damage temporarily, the increase is halved every turn). Works only offensively."
#else
description= _ "Soul Thrash: Every blow with this attack has a 1% chance to kill an enemy, adding the victims' level to the attacker's wrath (increasing the damage temporarily, the increase is halved every turn). Works only offensively."
#endif
[/damage]
#enddef
# soul extraction
#define WEAPON_SPECIAL_SOUL_EXTRACTION
[damage]
id=soul extraction
name= _ "soul extraction"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "Every blow with this attack has a 1% chance to kill an enemy, summoning a Ghost in the process."
#else
description= _ "Soul Extraction: Every blow with this attack has a 1% chance to kill an enemy, summoning a Ghost in the process."
#endif
[/damage]
#enddef
# temptation
#define ABILITY_TEMPTATION
[dummy]
id=temptation
name= _ "temptation"
female_name= _ "female^temptation"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "This unit makes its enemies of opposite gender infatuated at the beginning of their turn, making them unable to attack, but able to break this charm by fleeing."
#else
description= _ "Temptation:
This unit makes its enemies of opposite gender infatuated at the beginning of their turn, making them unable to attack, but able to break this charm by fleeing."
#endif
[/dummy]
#enddef
# "unyielding"
#define ABILITY_UNYIELDING
[resistance]
id=unyielding
multiply=2
max_value=70
[filter_base_value]
greater_than=0
less_than=70
[/filter_base_value]
name= _ "unyielding"
female_name= _ "female^unyielding"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "This unit’s resistances are doubled, up to a maximum of 70%, when defending. Vulnerabilities are not affected."
#else
description= _ "Unyielding:
This unit’s resistances are doubled, up to a maximum of 70%, when defending. Vulnerabilities are not affected."
#endif
affect_self=yes
active_on=defense
[/resistance]
#enddef
# whirlwind
#define WEAPON_SPECIAL_WHIRLWIND
[attacks]
id=whirlwind
name= _ "whirlwind"
name_inactive= _ "whirlwind"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "When this attack is used, all units adjacent the attacker take the damage, and cannot be countered."
description_inactive= _ "When this attack is used, all units adjacent the attacker take the damage, and cannot be countered."
#else
description= _ "Whirlwind: When this attack is used, all units adjacent the attacker take the damage, and cannot be countered."
description_inactive= _ "Whirlwind: When this attack is used, all units adjacent the attacker take the damage, and cannot be countered."
#endif
value=0
apply_to=opponent
[/attacks]
#enddef
# These abilities are just keys that activate weapon specials almost identical
# to the regular weapon specials (these weapon specials are on every single attack
# of every unit, but they are appear only if a unit with these abilities is next
# to it). The weapon specials are added by some events, and are never visible
# otherwise. Generally, this is far more complex than the abilities above.
# leadership[berserk]
#define ABILITY_BERSERK_LEADERSHIP
[dummy]
id=berserk_leadership
name= _ "radiating insanity"
female_name= _ "female^radiating insanity"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "All nearby allies fight with a bloodlust equal to the dwarvish berserk."
#else
description= _ "Radiating insanity:
All nearby allies fight with a bloodlust equal to the dwarvish berserk."
#endif
[/dummy]
#enddef
# leadership[charge]
#define ABILITY_CHARGE_LEADERSHIP
[dummy]
id=charge_leadership
name= _ "warlord's rule"
female_name= _ "female^warlord's rule"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "All nearby allies get melee charge."
#else
description= _ "Warlord's rule:
All nearby allies get melee charge."
#endif
[/dummy]
#enddef
# leadership[poison]
#define ABILITY_POISON_LEADERSHIP
[dummy]
id=poison_leadership
name= _ "radiation"
female_name= _ "female^radiation"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "All nearby allies get poisonous attacks."
#else
description= _ "Radiation:
All nearby allies get poisonous attacks."
#endif
[/dummy]
#enddef
# leadership[firststrike]
#define ABILITY_FIRSTSTRIKE_LEADERSHIP
[dummy]
id=firststrike_leadership
name= _ "zeal aura"
female_name= _ "female^zeal aura"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "All nearby allies get firststrike."
#else
description= _ "Zeal aura:
All nearby allies get firststrike."
#endif
[/dummy]
#enddef
# leadership[backstab]
#define ABILITY_BACKSTAB_LEADERSHIP
[dummy]
id=backstab_leadership
name= _ "murderous presence"
female_name= _ "female^murderous presence"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "All nearby allies get melee backstab."
#else
description= _ "Murderous presence:
All nearby allies get melee backstab."
#endif
[/dummy]
#enddef
# leadership[marksman]
#define ABILITY_MARKSMAN_LEADERSHIP
[dummy]
id=marksman_leadership
name= _ "cantor"
female_name= _ "female^cantor"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "This unit grants marksman to all ranged attacks of all adjacent allies."
#else
description= _ "Cantor:
This unit grants marksman to all ranged attacks of all adjacent allies."
#endif
[/dummy]
#enddef
# leadership[drain]
#define ABILITY_DRAIN_LEADERSHIP
[dummy]
id=drain_leadership
name= _ "aura of hunger"
female_name= _ "female^aura of hunger"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "All adjacent allies gain melee drain."
#else
description= _ "Aura of Hunger:
All adjacent allies gain melee drain."
#endif
[/dummy]
#enddef
# ARCANE ENSLAVEMENT
# This is modeled after the power of the Mord-Sith from the *Sword of Truth*
# series of novels by ???. The basic concept is that whenever an enemy tries
# to use magic or magical weapons against a Mord-Sith, their power is captured
# and they become enslaved for life.
#define ABILITY_ARCANE_ENSLAVEMENT
[dummy]
id=arcane enslavement
name= _ "arcane enslavement"
female_name= _ "arcane enslavement"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "This unit has the highly special power to enslave anyone who attacks them using magic or magical weapons. The enslavement is permanent for the life of the Master. Should this unit die, it's slaves will become their old selves, which just might be dangerous."
#else
description= _ "Arcane enslavement:
This unit has the highly special power to enslave anyone who attacks them using magic or magical weapons. The enslavement is permanent for the life of the Master. Should this unit die, it's slaves will become their old selves, which just might be dangerous."
#endif
affect_self=yes
# affect_allies=no
# affect_enemies=no
# cumulative=no
[/dummy]
#enddef
#textdomain wesnoth-loti
#define ABSORB_EVENT VALUE
[event]
name=attacker hits
first_time_only=no
[filter_second]
ability=absorb {VALUE}
[/filter_second]
[if]
[variable]
name=second_unit.hitpoints
greater_than=0
[/variable]
[then]
[heal_unit]
animate=no
[filter]
x,y=$x2,$y2
[/filter]
amount={VALUE}
restore_statuses=no
[/heal_unit]
[/then]
[/if]
[/event]
[event]
name=defender hits
first_time_only=no
[filter]
ability=absorb {VALUE}
[/filter]
[if]
[variable]
name=unit.hitpoints
greater_than=0
[/variable]
[then]
[heal_unit]
animate=no
[filter]
x,y=$x1,$y1
[/filter]
amount={VALUE}
restore_statuses=no
[/heal_unit]
[/then]
[/if]
[/event]
#enddef
#define INCORPORATE_EFFECTS
{VARIABLE damage $damage_inflicted}
{VARIABLE_OP damage multiply 100}
[set_variable]
name=resistance
to_variable=second_unit.resistance.$weapon.type
[/set_variable]
[if]
[variable]
name=resistance
greater_than=0
[/variable]
[else]
{VARIABLE resistance 100}
[/else]
[/if]
{VARIABLE_OP damage divide $resistance}
{CLEAR_VARIABLE resistance}
#enddef
#define INCORPORATE_EFFECTS_RETALIATION
{VARIABLE damage $damage_inflicted}
{VARIABLE_OP damage multiply 100}
[set_variable]
name=resistance
to_variable=unit.resistance.$weapon.type
[/set_variable]
[if]
[variable]
name=resistance
greater_than=0
[/variable]
[else]
{VARIABLE resistance 100}
[/else]
[/if]
{VARIABLE_OP damage divide $resistance}
{CLEAR_VARIABLE resistance}
#enddef
#define ABILITIES_EVENTS
# "necromancy - last breath"
[event]
name=last breath
[filter]
ability=necromancy
[not]
race=undead
[/not]
[not]
race=black soul-loti
[/not]
[/filter]
[message]
speaker=unit
message= _ "Tharrr marr grath'elekort-esto!"
[/message]
{VARIABLE unit.hitpoints 20}
{CLEAR_VARIABLE unit.modifications.advance}
{FOREACH unit.modifications.object i}
[if]
[variable]
name=unit.modifications.object[$i].sort
equals=limited
[/variable]
[then]
{CLEAR_VARIABLE unit.modifications.object[$i]}
{VARIABLE_OP i sub 1}
[/then]
[/if]
{NEXT i}
[unstore_unit]
variable=unit
find_vacant=no
[/unstore_unit]
{ADVANCE_UNIT x,y=$x1,$y1 "Lich"}
{UPDATE_STATS}
[/event]
# "freeze - side turn"
[event]
name=side turn
first_time_only=no
[harm_unit]
[filter]
[filter_adjacent]
ability=freezing
is_enemy=yes
[/filter_adjacent]
[/filter]
amount=2
damage_type=cold
slowed=yes
fire_event=yes
experience=no
kill=no
animate=no
[/harm_unit]
[/event]
# "temptation - turn refresh"
[event]
name=turn refresh
first_time_only=no
[store_unit]
[filter]
gender=male
[filter_adjacent]
[filter_side]
[enemy_of]
side=$side_number
[/enemy_of]
[/filter_side]
ability=temptation
is_enemy=yes
gender=female
[/filter_adjacent]
[or]
gender=female
[filter_adjacent]
[filter_side]
[enemy_of]
side=$side_number
[/enemy_of]
[/filter_side]
ability=temptation
is_enemy=yes
gender=male
[/filter_adjacent]
[/or]
[not]
race=undead
[/not]
side=$side_number
[/filter]
kill=no
variable=tempting_store_youll_want_to_be_there
[/store_unit]
{FOREACH tempting_store_youll_want_to_be_there i}
{VARIABLE tempting_store_youll_want_to_be_there[$i].attacks_left 0}
[unstore_unit]
variable=tempting_store_youll_want_to_be_there[$i]
find_vacant=no
[/unstore_unit]
{NEXT i}
{CLEAR_VARIABLE tempting_store_youll_want_to_be_there}
[/event]
# "leech - side turn"
[event]
name=side turn
first_time_only=no
[store_unit]
[filter]
ability=leech
side=$side_number
[/filter]
variable=leechers
kill=no
[/store_unit]
{FOREACH leechers i}
[store_unit]
[filter]
[filter_adjacent]
id=$leechers[$i].id
[/filter_adjacent]
[filter_side]
[enemy_of]
side=$side_number
[/enemy_of]
[/filter_side]
[/filter]
variable=leeched
kill=no
[/store_unit]
{VARIABLE amount 0}
{FOREACH leeched j}
[harm_unit]
[filter]
id=$leeched[$j].id
[/filter]
amount=2
fire_event=yes
experience=no
kill=no
animate=no
[/harm_unit]
{VARIABLE_OP amount add 2}
{NEXT j}
{CLEAR_VARIABLE leeched}
[heal_unit]
[filter]
id=$leechers[$i].id
[/filter]
amount=$amount
animate=yes
restore_statuses=no
[/heal_unit]
{CLEAR_VARIABLE amount}
{NEXT i}
{CLEAR_VARIABLE leechers}
[/event]
# "dark aura - side turn"
[event]
name=side turn
first_time_only=no
[harm_unit]
[filter]
[filter_adjacent]
ability=dark aura
side=$side_number
[/filter_adjacent]
side=$enemy_sides
[/filter]
amount=2
damage_type=arcane
poisoned=yes
fire_event=yes
experience=no
kill=no
animate=no
[/harm_unit]
[/event]
# "unholy hunger - die"
[event] #For the Foul Potion
name=die
first_time_only=no
[filter]
[not]
[filter_wml]
[status]
not_living="yes"
[/status]
[/filter_wml]
[/not]
[/filter]
[filter_second]
ability=unholy hunger
[/filter_second]
{CLEAR_VARIABLE second_unit.variables.starving}
[unstore_unit]
variable=second_unit
{COLOR_HEAL}
text= _ "+3 max HP"
find_vacant=no
[/unstore_unit]
[object]
silent=yes
duration=forever
sort=potion_like
[filter]
x,y=$x2,$y2
[/filter]
[effect]
apply_to=hitpoints
increase_total=2
increase=10
[/effect]
[/object]
[/event]
# "unholy hunger - side turn"
[event] #For the Foul Potion
name=side turn
first_time_only=no
[store_unit]
[filter]
side=$side_number
ability=unholy hunger
[not]
[filter_adjacent]
ability=healing
[/filter_adjacent]
[/not]
[not]
[filter_location]
terrain=*^V*
[/filter_location]
[/not]
[/filter]
variable=starving
kill=no
[/store_unit]
{FOREACH starving i}
[if]
[variable]
name=starving[$i].variables.starving
greater_than_equal_to=1
[/variable]
[then]
{VARIABLE_OP starving[$i].variables.starving add 1}
[unstore_unit]
variable=starving[$i]
{COLOR_HARM}
text= _ "-$starving[$i].variables.starving max HP"
find_vacant=no
[/unstore_unit]
[object]
silent=yes
duration=forever
sort=potion_like
[filter]
x,y=$starving[$i].x,$starving[$i].y
[/filter]
[effect]
apply_to=hitpoints
increase_total=-$starving[$i].variables.starving
increase=-$starving[$i].variables.starving
[/effect]
[/object]
[/then]
[else]
{VARIABLE starving[$i].variables.starving 1}
[unstore_unit]
variable=starving[$i]
find_vacant=no
[/unstore_unit]
[/else]
[/if]
{NEXT i}
[/event]
# "knockback - attack end"
[event]
name=attack end
first_time_only=no
[filter_attack]
special=knockback
[/filter_attack]
[if]
[variable]
# It ruins the plague weapon special, so make it do nothing if it
# would result in a plague kill
name=weapon.specials.plague.length
greater_than=0
[/variable]
[and]
[variable]
name=second_unit.hitpoints
less_than_equal_to=1
[/variable]
[/and]
[else]
[store_unit]
[filter]
x,y=$x2,$y2
[/filter]
variable=knockbacked
kill=yes
[/store_unit]
{VARIABLE knock_x $x2}
{VARIABLE knock_y $y2}
{VARIABLE_OP knock_x sub $x1}
{VARIABLE_OP knock_y sub $y1}
{VARIABLE_OP knockbacked.x add $knock_x}
{VARIABLE_OP knockbacked.y add $knock_y}
[unstore_unit]
variable=knockbacked
find_vacant=yes
check_passability=yes
[/unstore_unit]
[if]
[variable]
name=knockbacked.hitpoints
less_than_equal_to=1
[/variable]
[then]
[kill]
id=$knockbacked.id
animate=no
experience=yes
fire_event=yes
[filter_second]
x,y=$x1,$y1
[/filter_second]
[/kill]
[fire_event]
name=force respec
[primary_unit]
id=$unit.id
[/primary_unit]
[/fire_event]
[/then]
[/if]
{CLEAR_VARIABLE knock_x,knock_y,knockbacked}
[/else]
[/if]
[/event]
# "storm - attacker hits"
[event]
name=attacker_hits
first_time_only=no
[filter_attack]
special=storm
[/filter_attack]
{VARIABLE has_poison no}
{VARIABLE has_slow no}
{INCORPORATE_EFFECTS}
[if]
[variable]
name=weapon.specials.poison.id
equals=poison
[/variable]
[then]
{VARIABLE has_poison yes}
[/then]
[/if]
[if]
[variable]
name=weapon.specials.slow.id
equals=slow
[/variable]
[then]
{VARIABLE has_slow yes}
[/then]
[/if]
[harm_unit]
[filter]
[filter_adjacent]
x,y=$x1,$y1
[/filter_adjacent]
# We do not hurt our own units.
[filter_side]
[enemy_of]
side=$side_number
[/enemy_of]
[/filter_side]
# The defender was already damaged.
[not]
x,y=$x2,$y2
[/not]
[/filter]
[filter_second]
x,y=$x1,$y1
[/filter_second]
amount=$($damage/1.5)
damage_type=$weapon.type
poisoned=$has_poison
slowed=$has_slow
fire_event=yes
experience=no
[/harm_unit]
[harm_unit]
[filter]
[filter_adjacent]
x,y=$x1,$y1
[/filter_adjacent]
# We do not hurt our own units.
[filter_side]
[enemy_of]
side=$side_number
[/enemy_of]
[/filter_side]
# The defender was already damaged.
[not]
x,y=$x2,$y2
[/not]
[/filter]
[filter_second]
x,y=$x1,$y1
[/filter_second]
amount=8
damage_type=impact
fire_event=yes
experience=no
[/harm_unit]
# Harm units two hexes away from the attacker (half damage).
[harm_unit]
[filter]
[filter_location]
# Exclude the units that just received full damage.
[not]
x,y=$x1,$y1
radius=1
[/not]
# Include the remaining units within two hexes.
[and]
x,y=$x1,$y1
radius=2
[/and]
[filter_side]
[enemy_of]
side=$side_number
[/enemy_of]
[/filter_side]
[/filter_location]
# We do not hurt our own units.
[not]
side=$unit.side
[/not]
[/filter]
[filter_second]
x,y=$x1,$y1
[/filter_second]
amount=4
damage_type=impact
fire_event=yes
experience=no
[/harm_unit]
[harm_unit]
[filter]
[filter_location]
# Exclude the units that just received full damage.
[not]
x,y=$x1,$y1
radius=1
[/not]
# Include the remaining units within two hexes.
[and]
x,y=$x1,$y1
radius=2
[/and]
[filter_side]
[enemy_of]
side=$side_number
[/enemy_of]
[/filter_side]
[/filter_location]
# We do not hurt our own units.
[not]
side=$unit.side
[/not]
[/filter]
[filter_second]
x,y=$x1,$y1
[/filter_second]
amount=$($damage/2)
damage_type=$weapon.type
poisoned=$has_poison
slowed=$has_slow
fire_event=yes
experience=no
[/harm_unit]
[/event]
# "soul thrash - attacker hits"
[event]
name=attacker hits
first_time_only=no
[filter_attack]
special=soul thrash
[/filter_attack]
{VARIABLE_OP did_kill rand (1..100)}
[if]
[variable]
name=did_kill
equals=1
[/variable]
[not]
[variable]
name=bosses
contains=second_unit.id
[/variable]
[/not]
[then]
[harm_unit]
[filter]
x,y=$x2,$y2
[/filter]
[filter_second]
x,y=$x1,$y1
[/filter_second]
amount=10000
fire_event=yes
experience=yes
animate=no
kill=yes
[/harm_unit]
[if]
[variable]
name=unit.variables.wrath
equals=yes
[/variable]
[then]
{VARIABLE_OP unit.variables.wrath_intensity add $second_unit.level}
[/then]
[else]
{VARIABLE unit.variables.wrath yes}
{VARIABLE unit.variables.wrath_intensity $second_unit.level}
[/else]
[/if]
#
{FOREACH unit.attack i}
{FOREACH unit.attack[$i].specials.damage j}
[if]
[variable]
name=unit.attack[$i].specials.damage[$j].id
equals=latent_wrath
[/variable]
[then]
{VARIABLE unit.attack[$i].specials.damage[$j].add $unit.variables.wrath_intensity}
[/then]
[/if]
{NEXT j}
{NEXT i}
#
[unstore_unit]
variable=unit
find_vacant=no
[/unstore_unit]
[fire_event]
name=force respec
[primary_unit]
id=$unit.id
[/primary_unit]
[/fire_event]
[/then]
[/if]
{CLEAR_VARIABLE did_kill}
[/event]
# "soul extraction - attacker hits"
[event]
name=attacker hits
first_time_only=no
[filter_attack]
special=soul extraction
[/filter_attack]
{VARIABLE_OP did_kill rand (1..100)}
[if]
[variable]
name=did_kill
equals=1
[/variable]
[not]
[variable]
name=bosses
contains=second_unit.id
[/variable]
[/not]
[then]
[harm_unit]
[filter]
x,y=$x2,$y2
[/filter]
[filter_second]
x,y=$x1,$y1
[/filter_second]
amount=10000
fire_event=yes
experience=yes
animate=no
kill=yes
[/harm_unit]
[unit]
type=Ghost
name=$second_unit.name
side=$unit.side
x,y=$second_unit.x,$second_unit.y
[/unit]
[fire_event]
name=force respec
[primary_unit]
id=$unit.id
[/primary_unit]
[/fire_event]
[/then]
[/if]
{CLEAR_VARIABLE did_kill}
[/event]
# "soul extraction - defender hits"
[event]
name=defender hits
first_time_only=no
[filter_second_attack]
special=soul extraction
[/filter_second_attack]
{VARIABLE_OP did_kill rand (1..100)}
[if]
[variable]
name=did_kill
equals=1
[/variable]
[not]
[variable]
name=bosses
contains=unit.id
[/variable]
[/not]
[then]
[harm_unit]
[filter]
x,y=$x1,$y1
[/filter]
[filter_second]
x,y=$x2,$y2
[/filter_second]
amount=10000
fire_event=yes
experience=yes
kill=yes
[/harm_unit]
[unit]
type=Ghost
name=$unit.name
side=$second_unit.side
x,y=$unit.x,$unit.y
[/unit]
[store_unit]
[filter]
id=$second_unit.id
[/filter]
variable=respecer
[/store_unit]
{VARIABLE respecer.variables.may_need_respec yes}
[unstore_unit]
variable=respecer
find_vacant=no
[/unstore_unit]
[/then]
[/if]
{CLEAR_VARIABLE did_kill}
[/event]
# "raijers saloon - attacker hits"
[event]
name=attacker hits
first_time_only=no
[filter_attack]
special=raijers saloon
[/filter_attack]
{VARIABLE_OP did_kill rand (1..50)}
{VARIABLE_OP did_kill add $second_unit.level}
[if]
[variable]
name=did_kill
less_than=5
[/variable]
[not]
[variable]
name=bosses
contains=second_unit.id
[/variable]
[/not]
[and]
[variable]
name=second_unit.hitpoints
greater_than=1
[/variable]
[/and]
[then]
[store_unit]
[filter]
[filter_adjacent]
x,y=$x1,$y1
[/filter_adjacent]
[filter_side]
[allied_with]
side=$side_number
[/allied_with]
[/filter_side]
[or]
x,y=$x1,$y1
[/or]
[/filter]
variable=nearby
kill=no
[/store_unit]
{VARIABLE amount $second_unit.hitpoints}
{VARIABLE_OP amount divide $nearby.length}
[harm_unit]
[filter]
x,y=$x2,$y2
[/filter]
[filter_second]
x,y=$x1,$y1
[/filter_second]
amount=10000
fire_event=yes
experience=yes
animate=no
kill=yes
[/harm_unit]
#
{FOREACH nearby i}
[heal_unit]
[filter]
id=$nearby[$i].id
[/filter]
amount=$amount
animate=yes
restore_statuses=yes
[/heal_unit]
{NEXT i}
#
[fire_event]
name=force respec
[primary_unit]
id=$unit.id
[/primary_unit]
[/fire_event]
[/then]
[/if]
{CLEAR_VARIABLE did_kill,amount,nearby}
[/event]
# "nosferatu gorge - attacker hits"
[event]
name=attacker hits
first_time_only=no
[filter_attack]
special=nosferatu gorge
[/filter_attack]
{VARIABLE_OP did_kill rand (1..50)}
{VARIABLE_OP did_kill add $second_unit.level}
[if]
[variable]
name=did_kill
less_than=5
[/variable]
[not]
[variable]
name=bosses
contains=second_unit.id
[/variable]
[/not]
[and]
[variable]
name=second_unit.hitpoints
greater_than=1
[/variable]
[/and]
[then]
{VARIABLE amount $second_unit.hitpoints}
[harm_unit]
[filter]
x,y=$x2,$y2
[/filter]
[filter_second]
x,y=$x1,$y1
[/filter_second]
amount=10000
fire_event=yes
experience=yes
animate=no
kill=yes
[/harm_unit]
[heal_unit]
[filter]
x,y=$x1,$y1
[/filter]
amount=$amount
animate=yes
restore_statuses=yes
[/heal_unit]
[fire_event]
name=force respec
[primary_unit]
id=$unit.id
[/primary_unit]
[/fire_event]
[/then]
[/if]
{CLEAR_VARIABLE did_kill,amount}
[/event]
# "soul annihilation - attacker hits"
[event]
name=attacker hits
first_time_only=no
[filter_attack]
special=soul annihilation
[/filter_attack]
{VARIABLE_OP did_kill rand (1..100)}
[if]
[variable]
name=did_kill
equals=1
[/variable]
[not]
[variable]
name=bosses
contains=second_unit.id
[/variable]
[/not]
[then]
[store_unit]
[filter]
[filter_adjacent]
x,y=$x2,$y2
[/filter_adjacent]
[filter_side]
[enemy_of]
side=$side_number
[/enemy_of]
[/filter_side]
[/filter]
variable=nearby
kill=no
[/store_unit]
{VARIABLE damage_to_deal "$($second_unit.hitpoints/$nearby.length)"}
[harm_unit]
[filter]
x,y=$x2,$y2
[/filter]
[filter_second]
x,y=$x1,$y1
[/filter_second]
amount=10000
fire_event=yes
experience=yes
animate=no
kill=yes
[/harm_unit]
[harm_unit]
[filter]
[filter_adjacent]
x,y=$x2,$y2
[/filter_adjacent]
[filter_side]
[enemy_of]
side=$side_number
[/enemy_of]
[/filter_side]
[/filter]
[filter_second]
x,y=$x1,$y1
[/filter_second]
amount=$damage_to_deal
type=arcane
fire_event=yes
experience=yes
animate=no
kill=yes
[/harm_unit]
[fire_event]
name=force respec
[primary_unit]
id=$unit.id
[/primary_unit]
[/fire_event]
[/then]
[/if]
{CLEAR_VARIABLE did_kill,damage_to_deal,nearby}
[/event]
# "soul annihilation - defender hits"
[event]
name=defender hits
first_time_only=no
[filter_second_attack]
special=soul annihilation
[/filter_second_attack]
{VARIABLE_OP did_kill rand (1..50)}
[if]
[variable]
name=did_kill
equals=1
[/variable]
[not]
[variable]
name=bosses
contains=unit.id
[/variable]
[/not]
[then]
[store_unit]
[filter]
[filter_adjacent]
x,y=$x1,$y1
[/filter_adjacent]
[filter_side]
[allied_with]
side=$side_number
[/allied_with]
[/filter_side]
[/filter]
variable=nearby
kill=no
[/store_unit]
{VARIABLE damage_to_deal "$($unit.hitpoints/$nearby.length)"}
[harm_unit]
[filter]
x,y=$x1,$y1
[/filter]
[filter_second]
x,y=$x2,$y2
[/filter_second]
amount=10000
fire_event=yes
experience=yes
animate=no
kill=yes
[/harm_unit]
[harm_unit]
[filter_adjacent]
x,y=$x1,$y1
[/filter_adjacent]
[filter_side]
[allied_with]
side=$side_number
[/allied_with]
[/filter_side]
[filter_second]
x,y=$x2,$y2
[/filter_second]
amount=$damage_to_deal
type=arcane
fire_event=yes
experience=yes
animate=no
kill=yes
[/harm_unit]
[store_unit]
[filter]
id=$second_unit.id
[/filter]
variable=respecer
[/store_unit]
{VARIABLE respecer.variables.may_need_respec yes}
[unstore_unit]
variable=respecer
find_vacant=no
[/unstore_unit]
[/then]
[/if]
{CLEAR_VARIABLE did_kill,damage_to_deal,nearby}
[/event]
# "disintegrate - attacker hits"
[event]
name=attacker hits
first_time_only=no
[filter_attack]
special=disintegrate
[/filter_attack]
{VARIABLE_OP did_kill rand (1..50)}
[if]
[variable]
name=did_kill
equals=1
[/variable]
[not]
[variable]
name=bosses
contains=second_unit.id
[/variable]
[/not]
[then]
[harm_unit]
[filter]
x,y=$x2,$y2
[/filter]
[filter_second]
x,y=$x1,$y1
[/filter_second]
amount=10000
fire_event=yes
experience=yes
animate=no
kill=yes
[/harm_unit]
[fire_event]
name=force respec
[primary_unit]
id=$unit.id
[/primary_unit]
[/fire_event]
[/then]
[/if]
{CLEAR_VARIABLE did_kill}
[/event]
# "disintegrate - defender hits"
[event]
name=defender hits
first_time_only=no
[filter_second_attack]
special=disintegrate
[/filter_second_attack]
{VARIABLE_OP did_kill rand (1..50)}
[if]
[variable]
name=did_kill
equals=1
[/variable]
[not]
[variable]
name=bosses
contains=unit.id
[/variable]
[/not]
[then]
[harm_unit]
[filter]
x,y=$x1,$y1
[/filter]
[filter_second]
x,y=$x2,$y2
[/filter_second]
amount=10000
fire_event=yes
experience=yes
kill=yes
[/harm_unit]
[store_unit]
[filter]
id=$second_unit.id
[/filter]
variable=respecer
[/store_unit]
{VARIABLE respecer.variables.may_need_respec yes}
[unstore_unit]
variable=respecer
find_vacant=no
[/unstore_unit]
[/then]
[/if]
{CLEAR_VARIABLE did_kill}
[/event]
# "devastating blow - attacker hits"
[event]
name=attacker_hits
first_time_only=no
[filter_attack]
special=devastating_blow
[/filter_attack]
#
{FOREACH weapon.specials.dummy i}
[if]
[variable]
name=weapon.specials.dummy[$i].id
equals=devastating_blow
[/variable]
[then]
{VARIABLE_OP random rand (1..100)}
[if]
[variable]
name=random
less_than=$weapon.specials.dummy[$i].devastating_blow
[/variable]
[then]
{VARIABLE_OP second_unit.hitpoints divide 1.2}
[unstore_unit]
variable=second_unit
find_vacant=no
[/unstore_unit]
[/then]
[/if]
[/then]
[/if]
{NEXT i}
[/event]
# "shockwave - attacker hits"
[event]
name=attacker_hits
first_time_only=no
[filter_attack]
special=shockwave
[/filter_attack]
[store_unit]
[filter]
x,y=$x1,$y1
[/filter]
variable=harmer
kill=no
[/store_unit]
[store_unit]
[filter]
x,y=$x2,$y2
[/filter]
variable=primary_target
kill=no
[/store_unit]
# Stores the information about units to know their positions. Other
# targets are stored a bit lower, we need to damage them first.
[harm_unit]
[filter]
[filter_adjacent]
x,y=$x2,$y2
[/filter_adjacent]
[filter_side]
[enemy_of]
side=$side_number
[/enemy_of]
[/filter_side]
[not]
x,y=$x1,$y1
[/not]
[/filter]
[filter_second]
x,y=$x1,$y1
[/filter_second]
amount=8
damage_type=impact
fire_event=yes
experience=no
animate=no
[/harm_unit]
[store_unit]
[filter]
[filter_adjacent]
x,y=$x2,$y2
[/filter_adjacent]
[filter_side]
[enemy_of]
side=$side_number
[/enemy_of]
[/filter_side]
[not]
x,y=$x2,$y2
[/not]
[/filter]
variable=other_targets
kill=yes #We don't want to duplicate them.
[/store_unit]
#
{FOREACH other_targets i}
{VARIABLE move_x $other_targets[$i].x}
{VARIABLE move_y $other_targets[$i].y}
{VARIABLE_OP move_x sub $primary_target.x}
{VARIABLE_OP move_y sub $primary_target.y}
{VARIABLE_OP other_targets[$i].x add $move_x}
{VARIABLE_OP other_targets[$i].y add $move_y}
# Get the directions from the primary targets to others, and move them into them.
[unstore_unit]
variable=other_targets[$i]
find_vacant=yes
check_passability=yes
# We don't want them to be knocked into walls, do we?
[/unstore_unit]
{NEXT i}
#
{CLEAR_VARIABLE harmer}
{CLEAR_VARIABLE primary_target}
{CLEAR_VARIABLE other_targets}
{CLEAR_VARIABLE move_x}
{CLEAR_VARIABLE move_y}
[/event]
# "theft - attacher hits"
[event] #Thieves can steal.
name=attacker hits
first_time_only=no
[filter]
type=Thief
[or]
type=Rogue
[/or]
[or]
type=Assassin
[/or]
[or]
type=Exterminator
[/or]
[/filter]
[filter_attack]
range=melee
[/filter_attack]
{VARIABLE_OP gold_stolen rand (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,2,3)}
[gold]
side=$unit.side
amount=$gold_stolen
[/gold]
{CLEAR_VARIABLE gold_stolen}
[/event]
# "theft - defender hits"
[event]
name=defender hits
first_time_only=no
[filter_second]
type=Thief
[or]
type=Rogue
[/or]
[or]
type=Assassin
[/or]
[or]
type=Shadowalker
[/or]
[/filter_second]
[filter_second_attack]
range=melee
[/filter_second_attack]
{VARIABLE_OP gold_stolen rand (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,2,3)}
[gold]
side=$second_unit.side
amount=$gold_stolen
[/gold]
{CLEAR_VARIABLE gold_stolen}
[/event]
# "parry - defender misses"
[event]
name=defender misses
first_time_only=no
[filter_attack]
special=parry
[/filter_attack]
{VARIABLE has_leech 0}
{VARIABLE has_drain no}
{VARIABLE has_slow no}
{VARIABLE has_poison no}
#
{FOREACH weapon.specials.damage i}
[if]
[variable]
name=weapon.specials.damage[$i].id
equals=leeches
[/variable]
[then]
{VARIABLE has_leech 1}
[/then]
[/if]
{NEXT i}
#
[if]
[variable]
name=weapon.specials.poison.id
equals=poison
[/variable]
[then]
{VARIABLE has_poison yes}
[/then]
[/if]
[if]
[variable]
name=weapon.specials.drain.id
equals=drain
[/variable]
[then]
{VARIABLE has_drain yes}
[/then]
[/if]
[if]
[variable]
name=weapon.specials.slow.id
equals=slow
[/variable]
[then]
{VARIABLE has_slow yes}
[/then]
[/if]
[animate_unit]
flag=attack
[filter]
id=$unit.id
[/filter]
[filter_second]
id=$second_unit.id
[/filter_second]
[primary_attack]
range=melee
[/primary_attack]
hits=yes
[/animate_unit]
[set_variable]
name=resistance
to_variable="second_unit.resistance.$weapon.type"
[/set_variable]
{VARIABLE damage_dealt "$($($weapon.damage*$resistance)/100)"}
[if]
[variable]
name=damage_dealt
less_than=$second_unit.hitpoints
[/variable]
[then]
[harm_unit]
[filter]
x,y=$x2,$y2
[/filter]
amount=$weapon.damage
damage_type=$weapon.type
poisoned=$has_poison
slowed=$has_slow
fire_event=yes
experience=no
[/harm_unit]
[/then]
[else]
[harm_unit]
[filter]
x,y=$x2,$y2
[/filter]
[filter_second]
x,y=$x1,$y1
[/filter_second]
amount=$weapon.damage
damage_type=$weapon.type
poisoned=$has_poison
slowed=$has_slow
fire_event=yes
experience=yes
[/harm_unit]
[fire_event]
name=force respec
[primary_unit]
id=$unit.id
[/primary_unit]
[/fire_event]
[/else]
[/if]
{CLEAR_VARIABLE has_slow}
{CLEAR_VARIABLE has_poison}
{VARIABLE_OP damage_dealt divide 100}
{VARIABLE healed 0}
[if]
[variable]
name=has_drain
equals=1
[/variable]
[not]
[variable]
name=second_unit.status.non_living
equals=yes
[/variable]
[/not]
[then]
{VARIABLE_OP healed add "$($damage_dealt/2)"}
[/then]
[/if]
[if]
[variable]
name=has_leech
equals=1
[/variable]
[then]
{VARIABLE_OP healed add "$($damage_dealt/10)"}
[/then]
[/if]
{FOREACH weapon.specials.dummy i}
[if]
[variable]
name=weapon.specials.dummy[$i].id
equals=suck
[/variable]
[then]
[if]
[variable]
name=weapon.specials.dummy[$i].suck
less_than=$weapon.damage
[/variable]
[then]
{VARIABLE_OP healed add $weapon.specials.dummy[$i].suck}
[/then]
[else]
{VARIABLE_OP healed add $damage_dealt}
[/else]
[/if]
[/then]
[/if]
{NEXT i}
[if]
[variable]
name=healed
greater_than=0
[/variable]
[then]
[heal_unit]
[filter]
x,y=$x1,$y1
[/filter]
amount=$healed
animate=yes
restore_statuses=no
[/heal_unit]
[/then]
[/if]
{CLEAR_VARIABLE has_leech,has_drain,healed,damage_dealt}
[/event]
# "frost aura - side turn"
[event]
name=side turn
first_time_only=no
[harm_unit]
[filter]
[filter_location]
[filter]
ability=northfrost aura
[filter_side]
[enemy_of]
side=$side_number
[/enemy_of]
[/filter_side]
[/filter]
radius=2
[/filter_location]
side=$side_number
[/filter]
amount=4
damage_type=cold
slowed=yes
fire_event=yes
experience=no
kill=no
animate=no
[/harm_unit]
[/event]
# "cleave - attacker hits"
[event]
name=attacker_hits
first_time_only=no
[filter_attack]
special=cleave
[not]
special=whirlwind
[/not]
[/filter_attack]
{INCORPORATE_EFFECTS}
{VARIABLE has_poison no}
{VARIABLE has_slow no}
[if]
[variable]
name=weapon.specials.poison.id
equals=poison
[/variable]
[then]
{VARIABLE has_poison yes}
[/then]
[/if]
[if]
[variable]
name=weapon.specials.slow.id
equals=slow
[/variable]
[then]
{VARIABLE has_slow yes}
[/then]
[/if]
[harm_unit]
[filter]
[filter_location]
x,y=$x2,$y2
radius=1
[/filter_location]
[and]
[filter_adjacent]
x,y=$x1,$y1
[/filter_adjacent]
[/and]
[not]
x,y=$x2,$y2
[/not]
[filter_side]
[enemy_of]
side=$unit.side
[/enemy_of]
[/filter_side]
[/filter]
[filter_second]
x,y=$x1,$y1
[/filter_second]
amount=$($damage/2)
damage_type=$weapon.type
poisoned=$has_poison
slowed=$has_slow
fire_event=yes
experience=no
[/harm_unit]
{CLEAR_VARIABLE has_slow}
{CLEAR_VARIABLE has_poison}
{CLEAR_VARIABLE damage}
[/event]
# "suck - attacker hits"
[event]
name=attacker_hits
first_time_only=no
[filter_attack]
type=blade
[or]
type=pierce
[/or]
[or]
type=impact
[/or]
[and]
special=suck
[/and]
[/filter_attack]
#
{FOREACH weapon.specials.dummy i}
[if]
[variable]
name=weapon.specials.dummy[$i].id
equals=suck
[/variable]
[then]
[if]
[variable]
name=weapon.specials.dummy[$i].suck
less_than=$damage_inflicted
[/variable]
[then]
[heal_unit]
[filter]
x,y=$x1,$y1
[/filter]
amount=$weapon.specials.dummy[$i].suck
animate=yes
restore_statuses=no
[/heal_unit]
[/then]
[else]
[heal_unit]
[filter]
x,y=$x1,$y1
[/filter]
amount=$damage_inflicted
animate=yes
restore_statuses=no
[/heal_unit]
[/else]
[/if]
[/then]
[/if]
{NEXT i}
[/event]
# "suck - defender hits"
[event]
name=defender_hits
first_time_only=no
[filter_second_attack]
type=blade
[or]
type=pierce
[/or]
[or]
type=impact
[/or]
[and]
special=suck
[/and]
[/filter_second_attack]
#
{FOREACH second_weapon.specials.dummy i}
[if]
[variable]
name=second_weapon.specials.dummy[$i].id
equals=suck
[/variable]
[then]
[if]
[variable]
name=second_weapon.specials.dummy[$i].suck
less_than=$damage_inflicted
[/variable]
[then]
[heal_unit]
[filter]
x,y=$x2,$y2
[/filter]
amount=$second_weapon.specials.dummy[$i].suck
animate=yes
restore_statuses=no
[/heal_unit]
[/then]
[else]
[heal_unit]
[filter]
x,y=$x2,$y2
[/filter]
amount=$damage_inflicted
animate=yes
restore_statuses=no
[/heal_unit]
[/else]
[/if]
[/then]
[/if]
{NEXT i}
[/event]
# "pierce - attacker hits"
[event]
name=attacker hits
first_time_only=no
[filter_attack]
special=pierce
[/filter_attack]
{INCORPORATE_EFFECTS}
{VARIABLE has_poison no}
{VARIABLE has_slow no}
[if]
[variable]
name=weapon.specials.poison.id
equals=poison
[/variable]
[then]
{VARIABLE has_poison yes}
[/then]
[/if]
[if]
[variable]
name=weapon.specials.slow.id
equals=slow
[/variable]
[then]
{VARIABLE has_slow yes}
[/then]
[/if]
[store_locations]
[filter_adjacent_location]
x,y=$x2,$y2
adjacent=-$unit.facing
[/filter_adjacent_location]
variable=pierce_target_hex
[/store_locations]
[harm_unit]
[filter]
x,y=$pierce_target_hex.x,$pierce_target_hex.y
[filter_side]
[enemy_of]
side=$unit.side
[/enemy_of]
[/filter_side]
[/filter]
amount="$($damage/2)"
damage_type=pierce
fire_event=yes
experience=no
animate=no
poisoned=$has_poison
slowed=$has_slow
[/harm_unit]
{CLEAR_VARIABLE pierce_target_hex,has_slow,has_poison,damage}
[/event]
# "cone - attacker hits"
[event]
name=attacker hits
first_time_only=no
[filter_attack]
special=cone
[/filter_attack]
{VARIABLE has_poison no}
{VARIABLE has_slow no}
{INCORPORATE_EFFECTS}
[if]
[variable]
name=weapon.specials.poison.id
equals=poison
[/variable]
[then]
{VARIABLE has_poison yes}
[/then]
[/if]
[if]
[variable]
name=weapon.specials.slow.id
equals=slow
[/variable]
[then]
{VARIABLE has_slow yes}
[/then]
[/if]
[store_locations]
[filter_adjacent_location]
x,y=$x2,$y2
adjacent=-$unit.facing
[/filter_adjacent_location]
variable=pierce_target_hex
[/store_locations]
[harm_unit]
[filter]
[filter_adjacent]
x,y=$x2,$y2
[/filter_adjacent]
[and]
[filter_adjacent]
x,y=$pierce_target_hex.x,$pierce_target_hex.y
[/filter_adjacent]
[/and]
[filter_side]
[enemy_of]
side=$unit.side
[/enemy_of]
[/filter_side]
[/filter]
amount=$($damage/4)
damage_type=$weapon.type
fire_event=yes
experience=no
animate=no
poisoned=$has_poison
slowed=$has_slow
[/harm_unit]
[harm_unit]
[filter]
[filter_adjacent]
x,y=$x2,$y2
[/filter_adjacent]
[and]
[filter_adjacent]
x,y=$x1,$y1
[/filter_adjacent]
[/and]
[filter_side]
[enemy_of]
side=$unit.side
[/enemy_of]
[/filter_side]
[/filter]
[filter_second]
x,y=$x1,$y1
[/filter_second]
amount=$($damage/2)
damage_type=$weapon.type
poisoned=$has_poison
slowed=$has_slow
fire_event=yes
experience=no
[/harm_unit]
[harm_unit]
[filter]
x,y=$pierce_target_hex.x,$pierce_target_hex.y
[filter_side]
[enemy_of]
side=$unit.side
[/enemy_of]
[/filter_side]
[/filter]
amount=$($damage/2)
damage_type=$weapon.type
fire_event=yes
experience=no
animate=no
poisoned=$has_poison
slowed=$has_slow
[/harm_unit]
{CLEAR_VARIABLE pierce_direction,pierce_target_hex,has_slow,has_poison,damage}
[/event]
# "hose - attacker hits"
[event]
name=attacker hits
first_time_only=no
[filter_attack]
special=hose
[/filter_attack]
{VARIABLE has_poison no}
{VARIABLE has_slow no}
{INCORPORATE_EFFECTS}
[if]
[variable]
name=weapon.specials.poison.id
equals=poison
[/variable]
[then]
{VARIABLE has_poison yes}
[/then]
[/if]
[if]
[variable]
name=weapon.specials.slow.id
equals=slow
[/variable]
[then]
{VARIABLE has_slow yes}
[/then]
[/if]
[harm_unit]
[filter]
[filter_adjacent]
x,y=$x2,$y2
[/filter_adjacent]
[and]
[filter_adjacent]
x,y=$x1,$y1
[/filter_adjacent]
[/and]
[filter_side]
[enemy_of]
side=$unit.side
[/enemy_of]
[/filter_side]
[/filter]
[filter_second]
x,y=$x1,$y1
[/filter_second]
amount=$($damage*0.75)
damage_type=$weapon.type
poisoned=$has_poison
slowed=$has_slow
fire_event=yes
experience=no
[/harm_unit]
[store_locations]
[filter_adjacent_location]
x,y=$x2,$y2
adjacent=-$unit.facing
[/filter_adjacent_location]
variable=pierce_target_hex
[/store_locations]
[harm_unit]
[filter]
x,y=$pierce_target_hex.x,$pierce_target_hex.y
[filter_side]
[enemy_of]
side=$unit.side
[/enemy_of]
[/filter_side]
[/filter]
amount=$($damage*0.75)
damage_type=$weapon.type
fire_event=yes
experience=no
animate=no
poisoned=$has_poison
slowed=$has_slow
[/harm_unit]
[harm_unit]
[filter]
[filter_adjacent]
x,y=$x2,$y2
[/filter_adjacent]
[and]
[filter_adjacent]
x,y=$pierce_target_hex.x,$pierce_target_hex.y
[/filter_adjacent]
[/and]
[filter_side]
[enemy_of]
side=$unit.side
[/enemy_of]
[/filter_side]
[/filter]
amount=$($damage/2)
damage_type=$weapon.type
fire_event=yes
experience=no
animate=no
poisoned=$has_poison
slowed=$has_slow
[/harm_unit]
[store_locations]
[filter_adjacent_location]
x,y=$pierce_target_hex.x,$pierce_target_hex.y
adjacent=-$unit.facing
[/filter_adjacent_location]
variable=second_pierce_target_hex
[/store_locations]
[harm_unit]
[filter]
x,y=$second_pierce_target_hex.x,$second_pierce_target_hex.y
[filter_side]
[enemy_of]
side=$unit.side
[/enemy_of]
[/filter_side]
[/filter]
amount=$($damage/2)
damage_type=$weapon.type
fire_event=yes
experience=no
animate=no
poisoned=$has_poison
slowed=$has_slow
[/harm_unit]
[harm_unit]
[filter]
[filter_adjacent]
x,y=$second_pierce_target_hex.x,$second_pierce_target_hex.y
[/filter_adjacent]
[and]
[filter_adjacent]
x,y=$pierce_target_hex.x,$pierce_target_hex.y
[/filter_adjacent]
[/and]
[filter_side]
[enemy_of]
side=$unit.side
[/enemy_of]
[/filter_side]
[/filter]
amount=$($damage/3)
damage_type=$weapon.type
fire_event=yes
experience=no
animate=no
poisoned=$has_poison
slowed=$has_slow
[/harm_unit]
{CLEAR_VARIABLE pierce_direction,pierce_target_hex,has_slow,has_poison,damage,second_pierce_target_hex}
[/event]
# "infect - attacker hits"
[event]
name=attacker_hits
first_time_only=no
[filter_attack]
special=infect
[/filter_attack]
[filter_second]
[not]
[filter_wml]
[status]
not_living=yes
[/status]
[/filter_wml]
[/not]
[/filter_second]
[modify_unit]
[filter]
id=$second_unit.id
[/filter]
[status]
infected=yes
[/status]
[variables]
infected_by_side=$unit.side
infected_type=Walking Corpse
canrecruit=no
[/variables]
[/modify_unit]
[/event]
# "infect - defender hits"
[event]
name=defender_hits
first_time_only=no
[filter_second_attack]
special=infect
[/filter_second_attack]
[filter]
[not]
[filter_wml]
[status]
not_living=yes
[/status]
[/filter_wml]
[/not]
[/filter]
[modify_unit]
[filter]
id=$unit.id
[/filter]
[status]
infected=yes
[/status]
[variables]
infected_by_side=$second_unit.side
infected_type=Walking Corpse
canrecruit=no
[/variables]
[/modify_unit]
[/event]
# "greater infect - attacker hits"
[event]
name=attacker_hits
first_time_only=no
[filter_attack]
special=greater infect
[/filter_attack]
[filter_second]
[not]
[filter_wml]
[status]
not_living=yes
[/status]
[/filter_wml]
[/not]
[/filter_second]
[modify_unit]
[filter]
id=$second_unit.id
[/filter]
[status]
infected=yes
[/status]
[variables]
infected_by_side=$unit.side
infected_type=Soulless
canrecruit=no
[/variables]
[/modify_unit]
[/event]
# "greater infect - defender hits"
[event]
name=defender_hits
first_time_only=no
[filter_second_attack]
special=greater infect
[/filter_second_attack]
[filter]
[not]
[filter_wml]
[status]
not_living=yes
[/status]
[/filter_wml]
[/not]
[/filter]
[modify_unit]
[filter]
id=$unit.id
[/filter]
[status]
infected=yes
[/status]
[variables]
infected_by_side=$second_unit.side
infected_type=Soulless
canrecruit=no
[/variables]
[/modify_unit]
[/event]
# "infect - turn refresh"
[event]
name=turn refresh
first_time_only=no
[store_unit]
[filter]
[filter_wml]
[status]
infected=yes
[/status]
[/filter_wml]
[and]
[filter_side]
side=$side_number
[/filter_side]
[/and]
[and]
[filter_wml]
hitpoints=1
[/filter_wml]
[/and]
[/filter]
variable=zombie_store
kill=yes
[/store_unit]
#
{FOREACH zombie_store i}
[unit]
side=$zombie_store[$i].variables.infected_by_side
x=$zombie_store[$i].x
y=$zombie_store[$i].y
variation=$zombie_store[$i].undead_variation
type=$zombie_store[$i].variables.infected_type
moves=0
facing=$zombie_store[$i].facing
attacks_left=0
animate=no
[/unit]
[fire_event]
name=last_breath
[primary_unit]
x,y=$zombie_store[$i].x,$zombie_store[$i].y
[/primary_unit]
[/fire_event]
[fire_event]
name=die
[primary_unit]
x,y=$zombie_store[$i].x,$zombie_store[$i].y
[/primary_unit]
[/fire_event]
{NEXT i}
{CLEAR_VARIABLE zombie_store}
#
[store_unit]
[filter]
[filter_wml]
[status]
infected=yes
[/status]
[/filter_wml]
[and]
[filter_side]
side=$side_number
[/filter_side]
[/and]
[and]
[filter_adjacent]
ability=healing
[/filter_adjacent]
[/and]
[or]
[filter_wml]
[status]
infected=yes
[/status]
[/filter_wml]
[and]
[filter_side]
side=$side_number
[/filter_side]
[/and]
[and]
[filter_location]
terrain=*^V*
[/filter_location]
[/and]
[/or]
[/filter]
variable=unzombie_store
kill=yes
[/store_unit]
#
{FOREACH unzombie_store i}
{CLEAR_VARIABLE unzombie_store[$i].status.infected}
{CLEAR_VARIABLE unzombie_store[$i].variables.infected_by_side}
{CLEAR_VARIABLE unzombie_store[$i].variables.infected_type}
[unstore_unit]
variable=unzombie_store[$i]
find_vacant=no
[/unstore_unit]
{NEXT i}
{CLEAR_VARIABLE unzombie_store}
#
[/event]
# "infect - die"
[event]
name=die
first_time_only=no
[filter]
[filter_wml]
[status]
infected=yes
[/status]
[/filter_wml]
[/filter]
[store_unit]
[filter]
id=$unit.id
[/filter]
variable=zombie_store
kill=yes
[/store_unit]
[unit]
side=$zombie_store.variables.infected_by_side
x=$zombie_store.x
y=$zombie_store.y
variation=$zombie_store.undead_variation
type=$zombie_store.variables.infected_type
moves=0
facing=$zombie_store.facing
attacks_left=0
animate=no
[/unit]
{CLEAR_VARIABLE zombie_store}
[/event]
# "incinerate - attacker hits"
[event]
name=attacker_hits
first_time_only=no
[filter_attack]
special=incinerate
[/filter_attack]
{VARIABLE second_unit.status.incinerated yes}
{VARIABLE second_unit.variables.incinerator $unit.id}
[unstore_unit]
variable=second_unit
find_vacant=no
[/unstore_unit]
[object]
silent=yes
sort=potion-like
[filter]
find_in=second_unit
[/filter]
[effect]
apply_to=image_mod
replace="CS(100,50,0)"
[/effect]
[/object]
[/event]
# "incinerate - defender hits"
[event]
name=defender_hits
first_time_only=no
[filter_second_attack]
special=incinerate
[/filter_second_attack]
{VARIABLE unit.status.incinerated yes}
{VARIABLE unit.variables.incinerator $second_unit.id}
[unstore_unit]
variable=unit
find_vacant=no
[/unstore_unit]
[object]
silent=yes
sort=potion-like
[filter]
find_in=unit
[/filter]
[effect]
apply_to=image_mod
replace="CS(100,50,0)"
[/effect]
[/object]
[/event]
# "incinerate - turn refresh"
[event]
name=turn refresh
first_time_only=no
[store_unit]
[filter]
[filter_wml]
[status]
incinerated=yes
[/status]
[/filter_wml]
[and]
[filter_side]
side=$side_number
[/filter_side]
[/and]
[and]
[filter_adjacent]
ability=healing
[/filter_adjacent]
[/and]
[or]
[filter_wml]
[status]
incinerated=yes
[/status]
[/filter_wml]
[and]
[filter_side]
side=$side_number
[/filter_side]
[/and]
[and]
[filter_location]
terrain=*^V*
[/filter_location]
[/and]
[/or]
[/filter]
variable=unburn_store
kill=yes
[/store_unit]
#
{FOREACH unburn_store i}
{CLEAR_VARIABLE unburn_store[$i].status.incinerated}
{CLEAR_VARIABLE unburn_store[$i].variables.incinerator}
[unstore_unit]
variable=unburn_store[$i]
find_vacant=no
[/unstore_unit]
[object]
silent=yes
sort=potion-like
[filter]
find_in=unburn_store[$i]
[/filter]
[effect]
apply_to=image_mod
replace="CS(0,0,0)"
[/effect]
[/object]
{NEXT i}
{CLEAR_VARIABLE unburn_store}
#
[store_unit]
[filter]
[filter_wml]
[status]
incinerated=yes
[/status]
[/filter_wml]
[and]
[filter_side]
side=$side_number
[/filter_side]
[/and]
[/filter]
variable=burn_store
kill=no
[/store_unit]
#
{FOREACH burn_store i}
[harm_unit]
[filter]
id=$burn_store[$i].id
[/filter]
amount=16
damage_type=fire
fire_event=yes
kill=no
animate=no
[/harm_unit]
{NEXT i}
{CLEAR_VARIABLE burn_store}
#
[store_unit]
[filter]
[filter_wml]
[status]
incinerated=yes
[/status]
[/filter_wml]
[and]
[filter_side]
side=$side_number
[/filter_side]
[/and]
[and]
[filter_wml]
hitpoints=1
[/filter_wml]
[/and]
[/filter]
variable=burn_store
kill=no
[/store_unit]
#
{FOREACH burn_store i}
[kill]
id=$burn_store[$i].id
animate=yes
fire_event=yes
[/kill]
[fire_event]
name=last breath
[primary_unit]
x,y=$burn_store[$i].x,$burn_store[$i].y
[/primary_unit]
[/fire_event]
[if]
[variable]
name=$burn_store[$i].level
equals=0
[/variable]
[then]
[store_unit]
[filter]
id=$burn_store[$i].variables.incinerator
[/filter]
variable=burner
kill=no
[/store_unit]
{VARIABLE_OP burner.experience add 4}
[unstore_unit]
variable=burner
find_vacant=no
[/unstore_unit]
[/then]
[else]
[store_unit]
[filter]
id=$burn_store[$i].variables.incinerator
[/filter]
variable=burner
kill=no
[/store_unit]
{VARIABLE_OP burner.experience add "$(8*$burn_store[$i].level)"}
[unstore_unit]
variable=burner
find_vacant=no
[/unstore_unit]
[/else]
[/if]
[fire_event]
name=die
[primary_unit]
x,y=$burn_store[$i].x,$burn_store[$i].y
[/primary_unit]
[/fire_event]
{NEXT i}
{CLEAR_VARIABLE burner}
{CLEAR_VARIABLE burn_store}
#
[/event]
# "unburn_store - victory"
[event]
name=victory
[store_unit]
[filter]
[filter_wml]
[status]
incinerated=yes
[/status]
[/filter_wml]
[/filter]
variable=unburn_store
kill=yes
[/store_unit]
#
{FOREACH unburn_store i}
{CLEAR_VARIABLE unburn_store[$i].status.incinerated}
{CLEAR_VARIABLE unburn_store[$i].variables.incinerator}
[unstore_unit]
variable=unburn_store[$i]
find_vacant=no
[/unstore_unit]
[object]
silent=yes
sort=potion-like
[filter]
find_in=unburn_store[$i]
[/filter]
[effect]
apply_to=image_mod
replace="CS(0,0,0)"
[/effect]
[/object]
{NEXT i}
#
{CLEAR_VARIABLE unburn_store}
[/event]
# "feeding_easy - die"
[event]
name=die
first_time_only=no
[filter]
[not]
[filter_wml]
[status]
not_living="yes"
[/status]
[/filter_wml]
[/not]
[/filter]
[filter_second]
ability=feeding_easy
[/filter_second]
[unstore_unit]
variable=second_unit
{COLOR_HEAL}
text= _ "+1 max HP"
find_vacant=no
[/unstore_unit]
[object]
silent=yes
duration=forever
[filter]
x,y=$x2,$y2
[/filter]
[effect]
apply_to=hitpoints
increase_total=1
increase=1
[/effect]
[/object]
[/event]
# "impact+5 - attacker hits"
[event]
name=attacker hits
first_time_only=no
[filter_attack]
special=extra damage 5 impact
[/filter_attack]
[if]
[variable]
name=second_unit.hitpoints
less_than="$(5*$($second_unit.resistance.impact)/100)"
[/variable]
[then]
[harm_unit]
[filter]
x,y=$x2,$y2
[/filter]
[filter_second]
x,y=$x1,$y1
[/filter_second]
amount=5
damage_type=impact
fire_event=yes
experience=yes
kill=yes
animate=no
[/harm_unit]
[fire_event]
name=force respec
[primary_unit]
id=$unit.id
[/primary_unit]
[/fire_event]
[/then]
[else]
[harm_unit]
[filter]
x,y=$x2,$y2
[/filter]
[filter_second]
x,y=$x1,$y1
[/filter_second]
amount=5
damage_type=impact
fire_event=yes
experience=no
kill=yes
animate=no
[/harm_unit]
[/else]
[/if]
[/event]
# "impact+5 - defender hits"
[event]
name=defender hits
first_time_only=no
[filter_second_attack]
special=extra damage 5 impact
[/filter_second_attack]
[if]
[variable]
name=unit.hitpoints
less_than="$(5*$($unit.resistance.impact)/100)"
[/variable]
[then]
[harm_unit]
[filter]
x,y=$x1,$y1
[/filter]
[filter_second]
x,y=$x2,$y2
[/filter_second]
amount=5
damage_type=impact
fire_event=yes
experience=yes
kill=yes
animate=no
[/harm_unit]
[store_unit]
[filter]
id=$second_unit.id
[/filter]
variable=respecer
[/store_unit]
{VARIABLE respecer.variables.may_need_respec yes}
[unstore_unit]
variable=respecer
find_vacant=no
[/unstore_unit]
[/then]
[else]
[harm_unit]
[filter]
x,y=$x1,$y1
[/filter]
[filter_second]
x,y=$x2,$y2
[/filter_second]
amount=5
damage_type=impact
fire_event=yes
experience=no
kill=yes
animate=no
[/harm_unit]
[/else]
[/if]
[/event]
# "mayhem - attacker hits"
[event]
name=attacker hits
first_time_only=no
[filter_attack]
special=mayhem
[/filter_attack]
[object]
silent=yes
duration=forever
sort=potion_like
[filter]
x,y=$x2,$y2
[/filter]
[effect]
apply_to=attack
increase_damage=-1
[/effect]
[/object]
[floating_text]
x,y=$x2,$y2
text="<span color='red'>" + _ "-1 damage" + "</span>"
[/floating_text]
[/event]
# "trickery - attacker hits"
[event]
name=attacker hits
first_time_only=no
[filter_attack]
special=trickery
[/filter_attack]
[object]
silent=yes
duration=forever
sort=potion_like
[filter]
x,y=$x2,$y2
[/filter]
[effect]
apply_to=defense
replace=false
[defense]
frozen=5
castle=5
sand=5
village=5
flat=5
hills=5
mountains=5
swamp_water=5
cave=5
shallow_water=5
reef=5
forest=5
fungus=5
unwalkable=5
[/defense]
[/effect]
[/object]
[floating_text]
x,y=$x2,$y2
text="<span color='red'>" + _ "-5 defence" + "</span>"
[/floating_text]
[/event]
# "doom - attacker hits"
[event]
name=attacker hits
first_time_only=no
[filter_attack]
special=doom
[/filter_attack]
[object]
silent=yes
duration=forever
sort=potion_like
[filter]
x,y=$x2,$y2
[/filter]
[effect]
apply_to=resistance
replace=false
[resistance]
fire=5
cold=5
arcane=5
impact=5
blade=5
pierce=5
[/resistance]
[/effect]
[/object]
[floating_text]
x,y=$x2,$y2
text="<span color='red'>" + _ "-5% all resistances" + "</span>"
[/floating_text]
[/event]
# "whirlwind - attacker hits"
[event]
name=attacker hits
first_time_only=no
[filter_attack]
special=whirlwind
[/filter_attack]
{INCORPORATE_EFFECTS}
{VARIABLE has_leech 0}
{VARIABLE has_drain 0}
{VARIABLE has_slow no}
{VARIABLE has_poison no}
#
{FOREACH weapon.specials.damage i}
[if]
[variable]
name=weapon.specials.damage[$i].id
equals=leeches
[/variable]
[then]
{VARIABLE has_leech 1}
[/then]
[/if]
{NEXT i}
#
[if]
[variable]
name=weapon.specials.poison.id
equals=poison
[/variable]
[then]
{VARIABLE has_poison yes}
[/then]
[/if]
[if]
[variable]
name=weapon.specials.drain.id
equals=drain
[/variable]
[then]
{VARIABLE has_drain yes}
[/then]
[/if]
[if]
[variable]
name=weapon.specials.slow.id
equals=slow
[/variable]
[then]
{VARIABLE has_slow yes}
[/then]
[/if]
[if]
[variable]
name=has_leech
equals=0
[/variable]
[else]
[store_unit]
#We need to know how many units were leeched, and what were their resistances
[filter]
[filter_adjacent]
x,y=$x1,$y1
[/filter_adjacent]
[not]
x,y=$x2,$y2
[/not]
[filter_side]
[enemy_of]
side=$unit.side
[/enemy_of]
[/filter_side]
[/filter]
variable=units
[/store_unit]
{VARIABLE healed_amount 0}
#
{FOREACH units i}
[switch]
variable=weapon.type
[case]
value=arcane
{VARIABLE_OP healed_amount add "$($units[$i].resistance.arcane*$damage)"}
[/case]
[case]
value=fire
{VARIABLE_OP healed_amount add "$($units[$i].resistance.fire*$damage)"}
[/case]
[case]
value=cold
{VARIABLE_OP healed_amount add "$($units[$i].resistance.cold*$damage)"}
[/case]
[case]
value=blade
{VARIABLE_OP healed_amount add "$($units[$i].resistance.blade*$damage)"}
[/case]
[case]
value=pierce
{VARIABLE_OP healed_amount add "$($units[$i].resistance.pierce*$damage)"}
[/case]
[case]
value=impact
{VARIABLE_OP healed_amount add "$($units[$i].resistance.impact*$damage)"}
[/case]
[/switch]
{NEXT i}
#
[floating_text]
x,y=$x1,$y1
text="<span color='#00FF00'>$($healed_amount/1000)</span>"
[/floating_text]
{VARIABLE_OP unit.hitpoints add "$($healed_amount/1000)"}
[if]
[variable]
name=unit.hitpoints
greater_than=$unit.max_hitpoints
[/variable]
[then]
{VARIABLE unit.hitpoints $unit.max_hitpoints}
[/then]
[/if]
[unstore_unit]
variable=unit
find_vacant=no
{COLOR_HEAL}
text= _ "$($healed_amount/1000)"
[/unstore_unit]
# [heal_unit] #Frikkin bug in wesnoth
# [filter]
# x,y=$x1,$y1
# [/filter]
# amount=$($healed_amount/400)
# animate=no
# restore_statuses=no
# [/heal_unit]
{CLEAR_VARIABLE units}
{CLEAR_VARIABLE healed_amount}
[/else]
[/if]
[if]
[variable]
name=has_drain
equals=0
[/variable]
[else]
[store_unit]
#We need to know how many units were drained, and what were their resistances
[filter]
[filter_adjacent]
x,y=$x1,$y1
[/filter_adjacent]
[not]
x,y=$x2,$y2
[/not]
[filter_side]
[enemy_of]
side=$unit.side
[/enemy_of]
[/filter_side]
[/filter]
variable=units
[/store_unit]
{VARIABLE healed_amount 0}
#
{FOREACH units i}
[switch]
variable=weapon.type
[case]
value=arcane
{VARIABLE_OP healed_amount add "$($units[$i].resistance.arcane*$damage)"}
[/case]
[case]
value=fire
{VARIABLE_OP healed_amount add "$($units[$i].resistance.fire*$damage)"}
[/case]
[case]
value=cold
{VARIABLE_OP healed_amount add "$($units[$i].resistance.cold*$damage)"}
[/case]
[case]
value=blade
{VARIABLE_OP healed_amount add "$($units[$i].resistance.blade*$damage)"}
[/case]
[case]
value=pierce
{VARIABLE_OP healed_amount add "$($units[$i].resistance.pierce*$damage)"}
[/case]
[case]
value=impact
{VARIABLE_OP healed_amount add "$($units[$i].resistance.impact*$damage)"}
[/case]
[/switch]
{NEXT i}
#
[floating_text]
x,y=$x1,$y1
text="<span color='#00FF00'>$($healed_amount/200)</span>"
[/floating_text]
[heal_unit]
[filter]
x,y=$x1,$y1
[/filter]
amount=$($healed_amount/200)
animate=no
[/heal_unit]
{CLEAR_VARIABLE units}
{CLEAR_VARIABLE healed_amount}
[/else]
[/if]
[harm_unit]
[filter]
[filter_adjacent]
x,y=$x1,$y1
[/filter_adjacent]
[not]
x,y=$x2,$y2
[/not]
[filter_side]
[enemy_of]
side=$unit.side
[/enemy_of]
[/filter_side]
[/filter]
[filter_second]
x,y=$x1,$y1
[/filter_second]
amount=$damage
damage_type=$weapon.type
fire_event=yes
experience=no
poisoned=$has_poison
slowed=$has_slow
[/harm_unit]
{CLEAR_VARIABLE has_slow}
{CLEAR_VARIABLE has_poison}
{CLEAR_VARIABLE has_leech}
{CLEAR_VARIABLE has_drain,damage}
[/event]
# "chaos - defender hits"
[event]
name=defender hits
first_time_only=no
[filter_second_attack]
special=chaos
[/filter_second_attack]
{INCORPORATE_EFFECTS_RETALIATION}
{VARIABLE has_leech 0}
{VARIABLE has_drain 0}
{VARIABLE has_slow no}
{VARIABLE has_poison no}
#
{FOREACH second_weapon.specials.damage i}
[if]
[variable]
name=second_weapon.specials.damage[$i].id
equals=leeches
[/variable]
[then]
{VARIABLE has_leech 1}
[/then]
[/if]
{NEXT i}
#
[if]
[variable]
name=second_weapon.specials.poison.id
equals=poison
[/variable]
[then]
{VARIABLE has_poison yes}
[/then]
[/if]
[if]
[variable]
name=second_weapon.specials.drain.id
equals=drain
[/variable]
[then]
{VARIABLE has_drain yes}
[/then]
[/if]
[if]
[variable]
name=second_weapon.specials.slow.id
equals=slow
[/variable]
[then]
{VARIABLE has_slow yes}
[/then]
[/if]
[if]
[variable]
name=has_leech
equals=0
[/variable]
[else]
[store_unit] #We need to know how many units were leeched, and what were their resistances
[filter]
[filter_adjacent]
x,y=$x2,$y2
[/filter_adjacent]
[not]
x,y=$x1,$y1
[/not]
side=$enemy_sides
[/filter]
variable=units
[/store_unit]
{VARIABLE healed_amount 0}
#
{FOREACH units i}
[switch]
variable=second_weapon.type
[case]
value=arcane
{VARIABLE_OP healed_amount add "$($units[$i].resistance.arcane*$damage)"}
[/case]
[case]
value=fire
{VARIABLE_OP healed_amount add "$($units[$i].resistance.fire*$damage)"}
[/case]
[case]
value=cold
{VARIABLE_OP healed_amount add "$($units[$i].resistance.cold*$damage)"}
[/case]
[case]
value=blade
{VARIABLE_OP healed_amount add "$($units[$i].resistance.blade*$damage)"}
[/case]
[case]
value=pierce
{VARIABLE_OP healed_amount add "$($units[$i].resistance.pierce*$damage)"}
[/case]
[case]
value=impact
{VARIABLE_OP healed_amount add "$($units[$i].resistance.impact*$damage)"}
[/case]
[/switch]
{NEXT i}
#
[heal_unit]
[filter]
x,y=$x2,$y2
[/filter]
amount=$($healed_amount/2000)
animate=no
restore_statuses=no
[/heal_unit]
{CLEAR_VARIABLE units}
{CLEAR_VARIABLE healed_amount}
[/else]
[/if]
[if]
[variable]
name=has_drain
equals=0
[/variable]
[else]
[store_unit] #We need to know how many units were drained, and what were their resistances
[filter]
[filter_adjacent]
x,y=$x2,$y2
[/filter_adjacent]
[not]
x,y=$x1,$y1
[/not]
side=$enemy_sides
[/filter]
variable=units
[/store_unit]
#
{VARIABLE healed_amount 0}
{FOREACH units i}
[switch]
variable=second_weapon.type
[case]
value=arcane
{VARIABLE_OP healed_amount add "$($units[$i].resistance.arcane*$damage)"}
[/case]
[case]
value=fire
{VARIABLE_OP healed_amount add "$($units[$i].resistance.fire*$damage)"}
[/case]
[case]
value=cold
{VARIABLE_OP healed_amount add "$($units[$i].resistance.cold*$damage)"}
[/case]
[case]
value=blade
{VARIABLE_OP healed_amount add "$($units[$i].resistance.blade*$damage)"}
[/case]
[case]
value=pierce
{VARIABLE_OP healed_amount add "$($units[$i].resistance.pierce*$damage)"}
[/case]
[case]
value=impact
{VARIABLE_OP healed_amount add "$($units[$i].resistance.impact*$damage)"}
[/case]
[/switch]
{NEXT i}
#
[floating_text]
x,y=$x2,$y2
text="<span color='#00FF00'>$($healed_amount/400)</span>"
[/floating_text]
[heal_unit]
[filter]
x,y=$x2,$y2
[/filter]
amount=$($healed_amount/400)
animate=no
[/heal_unit]
{CLEAR_VARIABLE units}
{CLEAR_VARIABLE healed_amount}
[/else]
[/if]
[harm_unit]
[filter]
[filter_adjacent]
x,y=$x2,$y2
[/filter_adjacent]
[not]
x,y=$x1,$y1
[/not]
side=$enemy_sides
[/filter]
[filter_second]
x,y=$x2,$y2
[/filter_second]
amount=$($damage/2)
damage_type=$second_weapon.type
fire_event=yes
experience=no
poisoned=$has_poison
slowed=$has_slow
[/harm_unit]
{CLEAR_VARIABLE has_slow}
{CLEAR_VARIABLE has_poison}
{CLEAR_VARIABLE has_leech}
{CLEAR_VARIABLE has_drain,damage}
[/event]
# "kamikaze sprint - attacker hits"
[event]
name=attacker_hits
first_time_only=no
[filter_attack]
special=kamikaze sprint
[/filter_attack]
{INCORPORATE_EFFECTS}
{VARIABLE opponent_damage $second_weapon.damage}
{VARIABLE_OP opponent_damage multiply $second_weapon.number}
[if]
[variable]
name=unit.hitpoints
greater_than=$opponent_damage
[/variable]
[then]
[harm_unit]
[filter]
x,y=$x1,$y1
[/filter]
amount=$opponent_damage
damage_type=$second_weapon.type
fire_event=no
experience=no
[/harm_unit]
[store_unit]
[filter]
find_in=unit
[/filter]
variable=attacker
kill=yes
[/store_unit]
[store_locations]
[filter_adjacent_location]
x,y=$second_unit.x,$second_unit.y
adjacent=-$attacker.facing
[/filter_adjacent_location]
variable=pierce_target_hex
[/store_locations]
[while]
[have_unit]
x,y=$pierce_target_hex.x,$pierce_target_hex.y
[/have_unit]
[do]
{VARIABLE_OP damage divide 2}
[harm_unit]
[filter]
x,y=$pierce_target_hex.x,$pierce_target_hex.y
[filter_side]
[enemy_of]
side=$unit.side
[/enemy_of]
[/filter_side]
[/filter]
amount=$damage
damage_type=$weapon.type
fire_event=yes
kill=yes
experience=no
[/harm_unit]
[store_locations]
[filter_adjacent_location]
x,y=$pierce_target_hex.x,$pierce_target_hex.y
adjacent=-$attacker.facing
[/filter_adjacent_location]
variable=pierce_target_hex
[/store_locations]
[/do]
[/while]
{VARIABLE attacker.x $pierce_target_hex.x}
{VARIABLE attacker.y $pierce_target_hex.y}
[unstore_unit]
variable=attacker
find_vacant=yes
check_passability=yes
[/unstore_unit]
[/then]
[/if]
{CLEAR_VARIABLE damage}
[/event]
# "explosive leech - attacker hits"
[event]
name=attacker hits
first_time_only=no
[filter_attack]
special=explosive leech
[/filter_attack]
{INCORPORATE_EFFECTS}
[store_unit] #We need to know how many units are leeched, and what are their resistances
[filter]
[filter_adjacent]
x,y=$x2,$y2
[/filter_adjacent]
side=$enemy_sides
[/filter]
variable=units
[/store_unit]
{VARIABLE healed_amount 0}
{FOREACH units i}
[switch]
variable=weapon.type
[case]
value=arcane
{VARIABLE_OP healed_amount add "$($units[$i].resistance.arcane*$damage)"}
[/case]
[case]
value=fire
{VARIABLE_OP healed_amount add "$($units[$i].resistance.fire*$damage)"}
[/case]
[case]
value=cold
{VARIABLE_OP healed_amount add "$($units[$i].resistance.cold*$damage)"}
[/case]
[case]
value=blade
{VARIABLE_OP healed_amount add "$($units[$i].resistance.blade*$damage)"}
[/case]
[case]
value=pierce
{VARIABLE_OP healed_amount add "$($units[$i].resistance.pierce*$damage)"}
[/case]
[case]
value=impact
{VARIABLE_OP healed_amount add "$($units[$i].resistance.impact*$damage)"}
[/case]
[/switch]
{NEXT i}
[floating_text]
x,y=$x1,$y1
text="<span color='#00FF00'>$($healed_amount/400)</span>"
[/floating_text]
[heal_unit]
[filter]
x,y=$x1,$y1
[/filter]
amount=$($healed_amount/400)
animate=no
restore_statuses=no
[/heal_unit]
{CLEAR_VARIABLE units}
{CLEAR_VARIABLE healed_amount}
[harm_unit]
[filter]
[filter_adjacent]
x,y=$x2,$y2
[/filter_adjacent]
side=$enemy_sides
[/filter]
[filter_second]
x,y=$x1,$y1
[/filter_second]
amount=$($damage/4)
damage_type=$weapon.type
fire_event=yes
experience=no
[/harm_unit]
{CLEAR_VARIABLE damage}
[/event]
# "explosive - attacker hits"
[event]
name=attacker_hits
first_time_only=no
[filter_attack]
special=explosive
[/filter_attack]
{INCORPORATE_EFFECTS}
[harm_unit]
[filter]
[filter_adjacent]
x,y=$x2,$y2
[/filter_adjacent]
[not]
x,y=$x2,$y2
[/not]
[filter_side]
[enemy_of]
side=$unit.side
[/enemy_of]
[/filter_side]
[/filter]
[filter_second]
x,y=$x1,$y1
[/filter_second]
amount=$($($damage*3)/4-4)
damage_type=$weapon.type
fire_event=yes
experience=no
[/harm_unit]
[if]
[variable]
name=damage
greater_than=24 # If the damage is high enough, the range is increased.
[/variable]
[then]
[harm_unit]
[filter]
[filter_location]
# Exclude the units that just received the damage.
[not]
x,y=$x2,$y2
radius=1
[/not]
# Include the remaining units within two hexes.
[and]
x,y=$x2,$y2
radius=2
# The blaze cannot go through walls.
[filter_radius]
terrain=!,X*,X*^*,*^X*
[/filter_radius]
[/and]
[/filter_location]
[filter_side]
[enemy_of]
side=$unit.side
[/enemy_of]
[/filter_side]
[/filter]
[filter_second]
x,y=$x1,$y1
[/filter_second]
amount=$($($damage*3)/4-18)
damage_type=$weapon.type
fire_event=yes
experience=no
animate=no
[/harm_unit]
[/then]
[/if]
[if]
[variable]
name=damage
greater_than=48 # If the damage is extremely high, the range is increased even more.
[/variable]
[then]
[harm_unit]
[filter]
[filter_location]
# Exclude the units that just received the damage.
[not]
x,y=$x2,$y2
radius=2
[/not]
# Include the remaining units within two hexes.
[and]
x,y=$x2,$y2
radius=3
# The blaze cannot go through walls.
[filter_radius]
terrain=!,X*,X*^*,*^X*
[/filter_radius]
[/and]
[/filter_location]
[filter_side]
[enemy_of]
side=$unit.side
[/enemy_of]
[/filter_side]
[/filter]
[filter_second]
x,y=$x1,$y1
[/filter_second]
amount=$($($damage)/2-24)
damage_type=$weapon.type
fire_event=yes
experience=no
animate=no
[/harm_unit]
[/then]
[/if]
[if]
[variable]
name=damage
greater_than=108 # If the damage is higher than most common attacks can get, the range is increased even even more.
[/variable]
[then]
[harm_unit]
[filter]
[filter_location]
# Exclude the units that just received the damage.
[not]
x,y=$x2,$y2
radius=3
[/not]
# Include the remaining units within two hexes.
[and]
x,y=$x2,$y2
radius=4
# The blaze cannot go through walls.
[filter_radius]
terrain=!,X*,X*^*,*^X*
[/filter_radius]
[/and]
[/filter_location]
[filter_side]
[enemy_of]
side=$unit.side
[/enemy_of]
[/filter_side]
[/filter]
[filter_second]
x,y=$x1,$y1
[/filter_second]
amount=$($($damage)/3-36)
damage_type=$weapon.type
fire_event=yes
experience=no
animate=no
[/harm_unit]
[/then]
[/if]
{CLEAR_VARIABLE damage}
[/event]
# "explosive - attacker hits"
[event]
name=attacker_hits
first_time_only=no
[filter_attack]
special=explosive unprotected
[/filter_attack]
{INCORPORATE_EFFECTS}
[harm_unit]
[filter]
[filter_adjacent]
x,y=$x2,$y2
[/filter_adjacent]
[not]
x,y=$x2,$y2
[/not]
[not]
x,y=$x1,$y1
[/not]
[/filter]
[filter_second]
x,y=$x1,$y1
[/filter_second]
amount=$($($damage*3)/4-4)
damage_type=$weapon.type
fire_event=yes
experience=no
[/harm_unit]
{CLEAR_VARIABLE damage}
[/event]
# "mind raid -attacker hits"
[event]
name=attacker_hits
first_time_only=no
[filter_attack]
special=mind raid
[/filter_attack]
[if]
[variable]
name=second_unit.experience
greater_than_equal_to=1
[/variable]
[then]
{VARIABLE_OP second_unit.experience sub 1}
{VARIABLE_OP unit.experience add 1}
[unstore_unit]
variable=unit
find_vacant=no
[/unstore_unit]
[if]
[variable]
name=unit.experience
greater_than=$unit.max_experience
[/variable]
[then]
[fire_event]
name=force respec
[primary_unit]
id=$unit.id
[/primary_unit]
[/fire_event]
[/then]
[/if]
[unstore_unit]
variable=second_unit
find_vacant=no
[/unstore_unit]
[/then]
[/if]
[/event]
# "mind raid - defender hits"
[event]
name=defender_hits
first_time_only=no
[filter_attack]
special=mind raid
[/filter_attack]
[if]
[variable]
name=unit.experience
greater_than_equal_to=1
[/variable]
[then]
{VARIABLE_OP unit.experience sub 1}
{VARIABLE_OP second_unit.experience add 1}
[unstore_unit]
variable=unit
find_vacant=no
[/unstore_unit]
[unstore_unit]
variable=second_unit
find_vacant=no
[/unstore_unit]
[/then]
[/if]
[/event]
# "leeches - attacker hits"
[event]
name=attacker hits
first_time_only=no
[filter_attack]
special=leeches
[/filter_attack]
[set_variable]
name=damage_dealt
value=$damage_inflicted
[/set_variable]
[set_variable]
name=damage_dealt
divide=10
round=top
[/set_variable]
{VARIABLE_OP unit.hitpoints add $damage_dealt}
[if]
[variable]
name=unit.hitpoints
greater_than=$unit.max_hitpoints
[/variable]
[then]
{VARIABLE unit.hitpoints $unit.max_hitpoints}
[/then]
[/if]
[unstore_unit]
variable=unit
find_vacant=no
{COLOR_HEAL}
text= _ "$damage_dealt"
[/unstore_unit]
{CLEAR_VARIABLE damage_dealt}
[inspect]
name=leech_att_hits
[/inspect]
[/event]
# "leeches - defender hits"
[event]
name=defender hits
first_time_only=no
[filter_second_attack]
special=leeches
[/filter_second_attack]
[set_variable]
name=damage_dealt
value=$damage_inflicted
[/set_variable]
[set_variable]
name=damage_dealt
divide=10
round=top
[/set_variable]
{VARIABLE_OP second_unit.hitpoints add $damage_dealt}
[if]
[variable]
name=second_unit.hitpoints
greater_than=$second_unit.max_hitpoints
[/variable]
[then]
{VARIABLE second_unit.hitpoints $second_unit.max_hitpoints}
[/then]
[/if]
[unstore_unit]
variable=second_unit
find_vacant=no
{COLOR_HEAL}
text= _ "$damage_dealt"
[/unstore_unit]
{CLEAR_VARIABLE damage_dealt}
[/event]
# "explosive slow - attacker hits"
[event]
name=attacker_hits
first_time_only=no
[filter_attack]
special=explosive slow
[/filter_attack]
[harm_unit]
[filter]
[filter_adjacent]
x,y=$x2,$y2
[/filter_adjacent]
[not]
side=$side_number
[/not]
[not]
x,y=$x2,$y2
[/not]
side=$enemy_sides
[/filter]
[filter_second]
x,y=$x1,$y1
[/filter_second]
amount=2
slowed=yes
damage_type=$weapon.type
fire_event=yes
experience=no
[/harm_unit]
[/event]
# "murderlust - die"
[event]
name=die
first_time_only=no
[filter_second]
ability=murderlust
[/filter_second]
[heal_unit]
[filter]
id=$second_unit.id
[/filter]
amount=8
animate=yes
restore_statuses=no
[/heal_unit]
[/event]
# "killhunger - die"
[event]
name=die
first_time_only=no
[filter_second]
ability=killhunger
[/filter_second]
[heal_unit]
[filter]
id=$second_unit.id
[/filter]
amount=4
animate=yes
[/heal_unit]
[/event]
# "lesser evisceration - die"
[event]
name=die
first_time_only=no
[filter_second]
ability=lesser evisceration
[/filter_second]
[heal_unit]
[filter]
[filter_adjacent]
id=$second_unit.id
is_enemy=no
[/filter_adjacent]
[/filter]
amount=4
animate=yes
[/heal_unit]
[/event]
# "evisceration - die"
[event]
name=die
first_time_only=no
[filter_second]
ability=evisceration
[/filter_second]
[heal_unit]
[filter]
[filter_adjacent]
id=$second_unit.id
is_enemy=no
[/filter_adjacent]
[/filter]
amount=10
animate=yes
[/heal_unit]
[/event]
# "greater evisceration - die"
[event]
name=die
first_time_only=no
[filter_second]
ability=greater evisceration
[/filter_second]
[heal_unit]
[filter]
[filter_adjacent]
id=$second_unit.id
is_enemy=no
[/filter_adjacent]
[/filter]
amount=16
animate=yes
[/heal_unit]
[/event]
# "purify - last breath"
[event]
name=last breath
first_time_only=no
[filter]
race=undead
[/filter]
[filter_second_attack]
special=purify
[/filter_second_attack]
{VARIABLE transform_type null}
[if]
[variable]
name=unit.type
contains=Skeleton
[/variable]
[or]
[variable]
name=unit.type
contains=Deathblade
[/variable]
[/or]
[or]
[variable]
name=unit.type
contains=Revenant
[/variable]
[/or]
[or]
[variable]
name=unit.type
contains=Revenant LotI
[/variable]
[/or]
[or]
[variable]
name=unit.type
contains=Walking Corpse
[/variable]
[/or]
[or]
[variable]
name=unit.type
contains=Soulless
[/variable]
[/or]
[or]
[variable]
name=unit.type
contains=Death Knight LotI
[/variable]
[/or]
[or]
[variable]
name=unit.type
contains=Draug
[/variable]
[/or]
[or]
[variable]
name=unit.type
contains=Grim Knight
[/variable]
[/or]
[or]
[variable]
name=unit.type
contains=Death Knight
[/variable]
[/or]
[or]
[variable]
name=unit.type
contains=Deathlord
[/variable]
[/or]
[or]
[variable]
name=unit.type
contains=Lich King
[/variable]
[/or]
[or]
[variable]
name=unit.type
contains=Phantom
[/variable]
[/or]
[or]
[variable]
name=unit.type
contains=Ghoul
[/variable]
[/or]
[or]
[variable]
name=unit.type
contains=Ghast
[/variable]
[/or]
[or]
[variable]
name=unit.type
contains=Necrophage
[/variable]
[/or]
[or]
[variable]
name=unit.type
contains=Monstrosity
[/variable]
[/or]
[then]
{VARIABLE_OP transform_type rand (Spearman,Heavy Infantryman,Elvish Fighter,Fencer,Thug,Footpad)}
[/then]
[/if]
[if]
[variable]
name=unit.type
contains=Chocobone
[/variable]
[or]
[variable]
name=unit.type
contains=Grim Knight
[/variable]
[/or]
[or]
[variable]
name=unit.type
contains=Chocobone LotI
[/variable]
[/or]
[then]
{VARIABLE_OP transform_type rand (Cavalryman,Horseman,Elvish Scout)}
[/then]
[/if]
[if]
[variable]
name=unit.type
contains=Bone Shooter
[/variable]
[or]
[variable]
name=unit.type
contains=Skeleton Archer
[/variable]
[/or]
[or]
[variable]
name=unit.type
contains=Soul Shooter
[/variable]
[/or]
[or]
[variable]
name=unit.type
contains=Soul Shooter LotI
[/variable]
[/or]
[or]
[variable]
name=unit.type
contains=Banebow
[/variable]
[/or]
[then]
{VARIABLE_OP transform_type rand (Bowman,Elvish Archer,Poacher)}
[/then]
[/if]
[if]
[variable]
name=unit.type
contains=Lich
[/variable]
[or]
[variable]
name=unit.type
contains=Ancient Lich
[/variable]
[/or]
[or]
[variable]
name=unit.type
contains=Ancient Lich LotI
[/variable]
[/or]
[then]
{VARIABLE_OP transform_type rand (Mage,Elvish Shaman)}
[/then]
[/if]
[if]
[variable]
name=unit.type
contains=Ghost
[/variable]
[or]
[variable]
name=unit.type
contains=Wraith
[/variable]
[/or]
[or]
[variable]
name=unit.type
contains=Spectre
[/variable]
[/or]
[or]
[variable]
name=unit.type
contains=Shadow
[/variable]
[/or]
[or]
[variable]
name=unit.type
contains=Nightgaunt
[/variable]
[/or]
[or]
[variable]
name=unit.type
contains=Reaper
[/variable]
[/or]
[or]
[variable]
name=unit.type
contains=Dark Shade
[/variable]
[/or]
[then]
{VARIABLE_OP transform_type rand (Spearman,Heavy Infantryman,Elvish Fighter,Fencer,Thug,Footpad,Cavalryman,Horseman,Elvish Scout,Bowman,Elvish Archer,Poacher,Mage,Elvish Shaman)}
[/then]
[/if]
[if]
[variable]
name=transform_type
not_equals=null
[/variable]
[then]
[fire_event]
name=die
[primary_unit]
find_in=unit
[/primary_unit]
[secondary_unit]
find_in=second_unit
[/secondary_unit]
[/fire_event]
{CLEAR_VARIABLE unit.modifications.trait}
{CLEAR_VARIABLE unit.modifications.object}
{CLEAR_VARIABLE unit.modifications.advance}
{VARIABLE unit.hitpoints $unit.max_hitpoints}
{VARIABLE unit.type $transform_type}
{VARIABLE unit.side $second_unit.side}
[if]
[variable]
variable=transform_type
equals=Elvish Shaman
[/variable]
[then]
{VARIABLE unit.gender female}
[/then]
[/if]
[unstore_unit]
variable=unit
find_vacant=no
[/unstore_unit]
{UPDATE_STATS}
[delay]
time=800
[/delay]
[floating_text]
text=_"What happened to me...?"
x,y=$x1,$y1
[/floating_text]
[delay]
time=500
[/delay]
[floating_text]
text=_"I have put an end to your unlife."
x,y=$x2,$y2
[/floating_text]
[delay]
time=500
[/delay]
[floating_text]
text=_"Thank you."
x,y=$x1,$y1
[/floating_text]
[/then]
[/if]
{CLEAR_VARIABLE transform_type}
[/event]
# "push - attack end"
[event]
name=attack end
first_time_only=no
[filter]
[filter_adjacent]
ability=push
is_enemy=no
[/filter_adjacent]
[/filter]
{VARIABLE_OP unit.moves add 1}
[unstore_unit]
variable=unit
find_vacant=no
[/unstore_unit]
[/event]
# "penetrate - attack end"
[event]
name=attack end
first_time_only=no
[filter]
ability=penetrate
[/filter]
{VARIABLE_OP unit.moves add 1}
[unstore_unit]
variable=unit
find_vacant=no
[/unstore_unit]
[/event]
# "hit and run - attack end"
[event]
name=attack end
first_time_only=no
[filter_attack]
special=hit and run
[/filter_attack]
{VARIABLE_OP unit.moves add "$($unit.max_moves/2)"}
[unstore_unit]
variable=unit
find_vacant=no
[/unstore_unit]
[/event]
{ABSORB_EVENT 1}
{ABSORB_EVENT 2}
{ABSORB_EVENT 3}
{ABSORB_EVENT 4}
# "wrath - attacker hits"
[event]
name=attacker hits
first_time_only=no
[filter]
ability=wrath
[or]
[filter_adjacent]
ability=hate speech
is_enemy=no
[/filter_adjacent]
[/or]
[/filter]
[if]
[variable]
name=unit.variables.wrath
equals=yes
[/variable]
[then]
{VARIABLE_OP unit.variables.wrath_intensity add 1}
[/then]
[else]
{VARIABLE unit.variables.wrath yes}
{VARIABLE unit.variables.wrath_intensity 1}
[/else]
[/if]
{FOREACH unit.attack i}
{FOREACH unit.attack[$i].specials.damage j}
[if]
[variable]
name=unit.attack[$i].specials.damage[$j].id
equals=latent_wrath
[/variable]
[then]
{VARIABLE unit.attack[$i].specials.damage[$j].add $unit.variables.wrath_intensity}
[/then]
[/if]
{NEXT j}
{NEXT i}
[unstore_unit]
variable=unit
find_vacant=no
[/unstore_unit]
[/event]
# "wrath - turn refresh"
[event]
name=turn refresh
first_time_only=no
[store_unit]
[filter]
side=$side_number
[filter_wml]
[variables]
wrath=yes
[/variables]
[/filter_wml]
[/filter]
variable=wrathful
[/store_unit]
{FOREACH wrathful h}
[if]
[variable]
name=wrathful[$h].variables.wrath_intensity
greater_than=1
[/variable]
[then]
[set_variable]
name=wrathful[$h].variables.wrath_intensity
divide=2
round=bottom
[/set_variable]
[/then]
[else]
{CLEAR_VARIABLE wrathful[$h].variables.wrath,wrathful[$h].variables.wrath_intensity}
[/else]
[/if]
{FOREACH wrathful[$h].attack i}
{FOREACH wrathful[$h].attack[$i].specials.damage j}
[if]
[variable]
name=wrathful[$h].attack[$i].specials.damage[$j].id
equals=latent_wrath
[/variable]
[then]
{VARIABLE wrathful[$h].attack[$i].specials.damage[$j].add $wrathful[$h].variables.wrath_intensity}
[/then]
[/if]
{NEXT j}
{NEXT i}
[unstore_unit]
variable=wrathful[$h]
find_vacant=no
[/unstore_unit]
{NEXT h}
[/event]
# "retribution - attacker hits"
[event] #For the Cloak of Burning Retribution
name=attacker hits
first_time_only=no
[filter_second]
ability=retribution
[/filter_second]
[harm_unit]
[filter]
x,y=$x1,$y1
[/filter]
amount=$($damage_inflicted/4)
damage_type=fire
fire_event=yes
experience=no
animate=no
kill=yes
[/harm_unit]
[if]
[variable]
name=second_unit.hitpoints
less_than="$($($damage_inflicted/4)*$($second_unit.resistance.fire/100))"
[/variable]
[then]
[harm_unit]
[filter]
x,y=$x1,$y1
[/filter]
[filter_second]
x,y=$x2,$y2
[/filter_second]
amount=$($damage_inflicted/4)
damage_type=fire
fire_event=yes
experience=yes
animate=no
kill=yes
[/harm_unit]
[fire_event]
name=force respec
[primary_unit]
id=$unit.id
[/primary_unit]
[/fire_event]
[/then]
[else]
[harm_unit]
[filter]
x,y=$x1,$y1
[/filter]
amount=$($damage_inflicted/4)
damage_type=fire
fire_event=yes
experience=no
animate=no
kill=yes
[/harm_unit]
[/else]
[/if]
[/event]
# "retribution - defender hits"
[event]
name=defender hits
first_time_only=no
[filter]
ability=retribution
[/filter]
[harm_unit]
[filter]
x,y=$x2,$y2
[/filter]
amount=$($damage_inflicted/4)
damage_type=fire
fire_event=yes
experience=no
animate=no
kill=yes
[/harm_unit]
[if]
[variable]
name=unit.hitpoints
less_than="$($($damage_inflicted/4)*$($unit.resistance.fire/100))"
[/variable]
[then]
[harm_unit]
[filter]
x,y=$x2,$y2
[/filter]
[filter_second]
x,y=$x1,$y1
[/filter_second]
amount=$($damage_inflicted/4)
damage_type=fire
fire_event=yes
experience=yes
animate=no
kill=yes
[/harm_unit]
[fire_event]
name=force respec
[primary_unit]
id=$second_unit.id
[/primary_unit]
[/fire_event]
[/then]
[else]
[harm_unit]
[filter]
x,y=$x2,$y2
[/filter]
amount=$($damage_inflicted/4)
damage_type=fire
fire_event=yes
experience=no
animate=no
kill=yes
[/harm_unit]
[/else]
[/if]
[/event]
# "weak reflect - attacker hits"
[event]
name=attacker hits
first_time_only=no
[filter_second]
ability=weak reflect
[/filter_second]
[harm_unit]
[filter]
x,y=$x1,$y1
[/filter]
amount=$($damage_inflicted/4)
damage_type=$weapon.type
fire_event=yes
experience=no
animate=no
kill=no
[/harm_unit]
[/event]
# "weak reflect - defender hits"
[event]
name=defender hits
first_time_only=no
[filter]
ability=weak reflect
[/filter]
[harm_unit]
[filter]
x,y=$x2,$y2
[/filter]
amount=$($damage_inflicted/4)
damage_type=$second_weapon.type
fire_event=yes
experience=no
animate=no
kill=no
[/harm_unit]
[/event]
# "reflect - attacker hits"
[event]
name=attacker hits
first_time_only=no
[filter_second]
ability=reflect
[/filter_second]
[harm_unit]
[filter]
x,y=$x1,$y1
[/filter]
amount=$($damage_inflicted/2)
damage_type=$weapon.type
fire_event=yes
experience=no
animate=no
kill=no
[/harm_unit]
[/event]
# "reflect - defender hits"
[event]
name=defender hits
first_time_only=no
[filter]
ability=reflect
[/filter]
[harm_unit]
[filter]
x,y=$x2,$y2
[/filter]
amount=$($damage_inflicted/2)
damage_type=$second_weapon.type
fire_event=yes
experience=no
animate=no
kill=no
[/harm_unit]
[/event]
# "lesser redeem - attack"
[event]
name=attack
first_time_only=no
[filter]
ability=lesser redeem
[/filter]
[set_variables]
name=random_code
[value]
rand=0..$second_unit.level
name=did_succeed
[/value]
mode=replace
[/set_variables]
[insert_tag]
name=set_variable
variable=random_code
[/insert_tag]
{CLEAR_VARIABLE random_code}
[if]
[variable]
name=did_succeed
greater_than=0
[/variable]
[else]
[animate_unit]
flag=redeem_anim
[filter]
id=$unit.id
[/filter]
[facing]
x,y=$second_unit.x,$second_unit.y
[/facing]
hits=yes
[/animate_unit]
[kill]
id=$second_unit.id
animate=no
fire_event=yes
[/kill]
[if]
[variable]
name=unit.variables.lesser_redeem_count
greater_than=0
[/variable]
[then]
{VARIABLE_OP unit.variables.lesser_redeem_count add 1}
[/then]
[else]
{VARIABLE unit.variables.lesser_redeem_count 1}
[/else]
[/if]
[if]
[variable]
name=unit.variables.lesser_redeem_level
greater_than=0
[/variable]
[else]
{VARIABLE unit.variables.lesser_redeem_level 1}
[/else]
[/if]
[if]
[variable]
name=unit.variables.max_lesser_redeem_count
greater_than=0
[/variable]
[else]
{VARIABLE unit.variables.max_lesser_redeem_count 5}
{VARIABLE count $unit.variables.lesser_redeem_level}
[while]
[variable]
name=count
greater_than=1
[/variable]
[do]
{VARIABLE_OP unit.variables.max_lesser_redeem_count multiply 3}
{VARIABLE_OP unit.variables.max_lesser_redeem_count divide 2}
{VARIABLE_OP count sub 1}
[/do]
[/while]
{CLEAR_VARIABLE count}
[/else]
[/if]
[if]
[variable]
name=unit.variables.lesser_redeem_count
greater_than_equal_to=$unit.variables.max_lesser_redeem_count
[/variable]
[then]
{VARIABLE_OP unit.variables.lesser_redeem_level add 1}
{VARIABLE unit.variables.lesser_redeem_count 0}
{VARIABLE upgrade yes}
{VARIABLE unit.variables.max_lesser_redeem_count 0}
[/then]
[/if]
[unstore_unit]
variable=unit
find_vacant=no
{COLOR_HEAL}
text="$unit.variables.lesser_redeem_count|/$unit.variables.max_lesser_redeem_count"
[/unstore_unit]
[if]
[variable]
name=upgrade
equals=yes
[/variable]
[then]
[if]
[variable]
name=unit.variables.lesser_redeem_level
equals=2
[/variable]
[then]
[object]
silent=yes
[filter]
id=$unit.id
[/filter]
[effect]
apply_to=hitpoints
increase_total=5
increase=5
[/effect]
[effect]
apply_to=attack
increase_damage=1
[/effect]
[/object]
[/then]
[/if]
[if]
[variable]
name=unit.variables.lesser_redeem_level
equals=3
[/variable]
[then]
[object]
silent=yes
[filter]
id=$unit.id
[/filter]
[effect]
apply_to=hitpoints
increase_total=3
increase=3
[/effect]
[effect]
apply_to=resistance
replace=false
[resistance]
blade=-3
pierce=-3
impact=-3
arcane=-3
fire=-3
cold=-3
[/resistance]
[/effect]
[/object]
[/then]
[/if]
[if]
[variable]
name=unit.variables.lesser_redeem_level
equals=4
[/variable]
[then]
[object]
silent=yes
[filter]
id=$unit.id
[/filter]
[effect]
apply_to=hitpoints
increase_total=2
increase=2
[/effect]
[effect]
apply_to=resistance
replace=false
[resistance]
blade=-2
pierce=-2
impact=-2
arcane=-2
fire=-2
cold=-2
[/resistance]
[/effect]
[effect]
apply_to=movement
increase=1
[/effect]
[/object]
[/then]
[/if]
[if]
[variable]
name=unit.variables.lesser_redeem_level
equals=5
[/variable]
[then]
[object]
silent=yes
[filter]
id=$unit.id
[/filter]
[effect]
apply_to=attack
increase_damage=1
[/effect]
[effect]
apply_to=resistance
replace=false
[resistance]
blade=-2
pierce=-2
impact=-2
arcane=-2
fire=-2
cold=-2
[/resistance]
[/effect]
blade_penetrate=5
arcane_penetrate=5
pierce_penetrate=5
[/object]
[/then]
[/if]
[if]
[variable]
name=unit.variables.lesser_redeem_level
equals=6
[/variable]
[then]
[object]
silent=yes
[filter]
id=$unit.id
[/filter]
[effect]
apply_to=hitpoints
increase_total=3
increase=3
[/effect]
fire_penetrate=5
impact_penetrate=5
cold_penetrate=5
[/object]
[/then]
[/if]
[if]
[variable]
name=unit.variables.lesser_redeem_level
greater_than=6
[/variable]
[then]
[object]
silent=yes
[filter]
id=$unit.id
[/filter]
[effect]
apply_to=hitpoints
increase_total=1
increase=1
[/effect]
[effect]
apply_to=resistance
replace=false
[resistance]
blade=-1
pierce=-1
impact=-1
arcane=-1
fire=-1
cold=-1
[/resistance]
[/effect]
fire_penetrate=2
impact_penetrate=2
cold_penetrate=2
fire_penetrate=2
impact_penetrate=2
cold_penetrate=2
[/object]
[/then]
[/if]
[/then]
[/if]
{CLEAR_VARIABLE upgrade}
[/else]
[/if]
[/event] # end of "lesser redeem - attack"
# "poison - attack"
[event] #For the poison immunity
name=attack
first_time_only=no
[filter_attack]
special=poison
[/filter_attack]
[filter_second]
ability=immune to poison
[/filter_second]
[modify_unit]
[filter]
x,y=$x2,$y2
[/filter]
[status]
not_living=yes
[/status]
[/modify_unit]
[/event]
# "poison - attack end"
[event]
name=attack_end
first_time_only=no
[filter_attack]
special=poison
[/filter_attack]
[filter_second]
ability=immune to poison
[/filter_second]
[if]
[variable]
name=second_unit.race
equals=undead
[/variable]
[then]
[modify_unit]
[filter]
x,y=$x2,$y2
[/filter]
[status]
not_living=no
[/status]
[/modify_unit]
[/then]
[/if]
[/event]
# "drain - attack"
[event] #For the drain immunity
name=attack
first_time_only=no
[filter_attack]
special=drain
[/filter_attack]
[filter_second]
ability=immune to drain
[/filter_second]
[modify_unit]
[filter]
x,y=$x2,$y2
[/filter]
[status]
not_living=yes
[/status]
[/modify_unit]
[/event]
# "immune to drain - attack end"
[event]
name=attack_end
first_time_only=no
[filter_attack]
special=drain
[/filter_attack]
[filter_second]
ability=immune to drain
[/filter_second]
[if]
[variable]
name=second_unit.race
equals=undead
[/variable]
[then]
[modify_unit]
[filter]
x,y=$x2,$y2
[/filter]
[status]
not_living=no
[/status]
[/modify_unit]
[/then]
[/if]
[/event]
# "immune to drain - attack"
[event]
name=attack
first_time_only=no
[filter]
ability=immune to drain
[/filter]
[filter_second_attack]
special=drain
[/filter_second_attack]
[modify_unit]
[filter]
x,y=$x1,$y1
[/filter]
[status]
not_living=yes
[/status]
[/modify_unit]
[/event]
# "immune to drain - attack end"
[event]
name=attack_end
first_time_only=no
[filter]
ability=immune to drain
[/filter]
[filter_second_attack]
special=drain
[/filter_second_attack]
[if]
[variable]
name=second_unit.race
equals=undead
[/variable]
[then]
[modify_unit]
[filter]
x,y=$x1,$y1
[/filter]
[status]
not_living=no
[/status]
[/modify_unit]
[/then]
[/if]
[/event]
# "resist slow - attack end"
[event] #For the slow immunity
name=attack end
first_time_only=no
[filter_attack]
special=slow
[/filter_attack]
[filter_second]
ability=resistant to slow
[/filter_second]
{CLEAR_VARIABLE second_unit.status.slowed}
[unstore_unit]
variable=second_unit
find_vacant=no
[/unstore_unit]
[/event]
# "resist slow - attack end"
[event]
name=attack end
first_time_only=no
[filter_second_attack]
special=slow
[/filter_second_attack]
[filter]
ability=resistant to slow
[/filter]
{CLEAR_VARIABLE unit.status.slowed}
[unstore_unit]
variable=unit
find_vacant=no
[/unstore_unit]
[/event]
# "immune to poison - attack"
[event]
name=attack
first_time_only=no
[filter_second_attack]
special=poison
[/filter_second_attack]
[filter]
ability=immune to poison
[/filter]
[modify_unit]
[filter]
x,y=$x1,$y1
[/filter]
[status]
not_living=yes
[/status]
[/modify_unit]
[/event]
# "immune to poison - "
[event]
name=attack_end
first_time_only=no
[filter_second_attack]
special=poison
[/filter_second_attack]
[filter]
ability=immune to poison
[/filter]
[if]
[variable]
name=unit.race
equals=undead
[/variable]
[then]
[modify_unit]
[filter]
x,y=$x1,$y1
[/filter]
[status]
not_living=no
[/status]
[/modify_unit]
[/then]
[/if]
[/event]
# "???"
[event]
name=attack
first_time_only=no
[filter_second]
ability=immune to poison
[/filter_second]
[filter_attack]
special=poison
[/filter_attack]
[modify_unit]
[filter]
x,y=$x2,$y2
[/filter]
[status]
not_living=yes
[/status]
[/modify_unit]
[/event]
# "?undead? - ?poison?"
[event]
name=attack_end
first_time_only=no
[filter_second]
ability=immune to poison
[/filter_second]
[filter_attack]
special=poison
[/filter_attack]
[if]
[variable]
name=unit.race
equals=undead
[/variable]
[then]
[modify_unit]
[filter]
x,y=$x2,$y2
[/filter]
[status]
not_living=no
[/status]
[/modify_unit]
[/then]
[/if]
[/event]
# "thorns - attacker hits"
[event] #For the Thorned Armour
name=attacker hits
first_time_only=no
[filter_second]
ability=thorns
[/filter_second]
[if]
[variable]
name=unit.hitpoints
less_than="$(2*$($second_unit.resistance.pierce/100))"
[/variable]
[then]
[harm_unit]
[filter]
x,y=$x1,$y1
[/filter]
[filter_second]
x,y=$x2,$y2
[/filter_second]
amount=2
damage_type=pierce
fire_event=yes
experience=yes
animate=no
kill=no
[/harm_unit]
[store_unit]
[filter]
id=unit.id
[/filter]
variable=respecer
[/store_unit]
{VARIABLE respecer.variables.may_need_respec yes}
[unstore_unit]
variable=respecer
find_vacant=no
[/unstore_unit]
[/then]
[else]
[harm_unit]
[filter]
x,y=$x1,$y1
[/filter]
amount=2
damage_type=pierce
fire_event=yes
experience=no
animate=no
kill=no
[/harm_unit]
[/else]
[/if]
[/event]
# "thorns - defenders hits"
[event]
name=defender hits
first_time_only=no
[filter]
ability=thorns
[/filter]
[if]
[variable]
name=second_unit.hitpoints
less_than="$(2*$($second_unit.resistance.pierce/100))"
[/variable]
[then]
[harm_unit]
[filter]
x,y=$x2,$y2
[/filter]
amount=2
damage_type=pierce
fire_event=yes
experience=yes
animate=no
kill=no
[/harm_unit]
[fire_event]
name=force respec
[primary_unit]
id=$unit.id
[/primary_unit]
[/fire_event]
[/then]
[else]
[harm_unit]
[filter]
x,y=$x2,$y2
[/filter]
amount=2
damage_type=pierce
fire_event=yes
experience=no
animate=no
kill=no
[/harm_unit]
[/else]
[/if]
[/event]
# "dazzle - attacker hits"
# This was taken from wesnoth forums, author was dixie, slightly modified by
# Dugi to fit the interface
[event]
name=attacker hits
first_time_only=no
[filter_second]
[not]
[filter_wml]
[status]
dazzled=yes
[/status]
[/filter_wml]
[/not]
[/filter_second]
[filter_attack]
special=dazzle
[/filter_attack]
[set_variable]
name=second_unit.variables.turn_dazzled
value=$turn_number
[/set_variable]
[set_variable]
name=second_unit.variables.side_turn_dazzled
value=$side_number
[/set_variable]
[unstore_unit]
variable=second_unit
{COLOR_HARM}
text= _ "dazzled"
[/unstore_unit]
[object]
silent=yes
sort=potion_like
[filter]
find_in=second_unit
[/filter]
[effect]
apply_to=status
add=dazzled
[/effect]
[effect]
apply_to=image_mod
replace="CS(50,50,80)"
[/effect]
[effect]
apply_to=attack
remove_specials=dazzled
[/effect]
[effect]
apply_to=attack
[set_specials]
mode=append
[chance_to_hit]
id=dazzled
name= _ "dazzled"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "Still feeling dizzy from a blinding flash of light, this unit's chances to hit will be set to a maximum of 50% until a whole turn has passed. The effect will then vanish by itself afterwards."
#else
description= _ "Dazzled:
Still feeling dizzy from a blinding flash of light, this unit's chances to hit will be set to a maximum of 50% until a whole turn has passed. The effect will then vanish by itself afterwards."
#endif
value=50
[filter_base_value]
greater_than=50
[/filter_base_value]
[/chance_to_hit]
[/set_specials]
[/effect]
[/object]
[/event]
# "dazzle - defender hits"
[event]
name=defender hits
first_time_only=no
[filter_second_attack]
special=dazzle
[/filter_second_attack]
[filter]
[not]
[filter_wml]
[status]
dazzled=yes
[/status]
[/filter_wml]
[/not]
[/filter]
[filter_attack]
special=dazzle
[/filter_attack]
[set_variable]
name=unit.variables.turn_dazzled
value=$turn_number
[/set_variable]
[set_variable]
name=unit.variables.side_turn_dazzled
value=$side_number
[/set_variable]
[unstore_unit]
variable=unit
{COLOR_HARM}
text= _ "dazzled"
[/unstore_unit]
[object]
silent=yes
sort=potion_like
[filter]
find_in=unit
[/filter]
[effect]
apply_to=status
add=dazzled
[/effect]
[effect]
apply_to=image_mod
replace="CS(50,50,80)"
[/effect]
[effect]
apply_to=attack
remove_specials=dazzled
[/effect]
[effect]
apply_to=attack
[set_specials]
mode=append
[chance_to_hit]
id=dazzled
name= _ "dazzled"
#ifver WESNOTH_VERSION >= 1.11.2
description= _ "Still feeling dizzy from a blinding flash of light, this unit's chances to hit will be set to a maximum of 50% until a whole turn has passed. The effect will then vanish by itself afterwards."
#else
description= _ "Dazzled: Still feeling dizzy from a blinding flash of light, this unit's chances to hit will be set to a maximum of 50% until a whole turn has passed. The effect will then vanish by itself afterwards."
#endif
value=50
[filter_base_value]
greater_than=50
[/filter_base_value]
[/chance_to_hit]
[/set_specials]
[/effect]
[/object]
[/event]
# "dazzle - side turn"
[event]
name=side turn
first_time_only=no
[store_unit]
[filter]
[filter_wml]
[status]
dazzled=yes
[/status]
[/filter_wml]
[/filter]
variable=undazzle
[/store_unit]
#
{FOREACH undazzle i}
[if]
# AND
[variable]
name=undazzle[$i].variables.side_turn_dazzled
equals=$side_number
[/variable]
[and]
[variable]
name=undazzle[$i].variables.turn_dazzled
less_than=$turn_number
[/variable]
[/and]
[then]
[unstore_unit]
variable=undazzle[$i]
[/unstore_unit]
[object]
silent=yes
sort=potion_like
[filter]
find_in=undazzle[$i]
[/filter]
[effect]
apply_to=status
remove=dazzled
[/effect]
[effect]
apply_to=image_mod
replace="CS(0,0,0)"
[/effect]
[effect]
apply_to=attack
remove_specials=dazzled
[/effect]
[/object]
{CLEAR_VARIABLE undazzle[$i].variables.side_turn_dazzled}
{CLEAR_VARIABLE undazzle[$i].variables.turn_dazzled}
[/then]
[/if]
{NEXT i}
{CLEAR_VARIABLE undazzle}
[/event]
# ARCANE ENSLAVEMENT
# This is modeled after the power of the Mord-Sith from the *Sword of Truth*
# series of novels by ???. The basic concept is that whenever an enemy tries
# to use magic or magical weapons against a Mord-Sith, their power is captured
# and they become enslaved for life.
# "arcane enslavement - defender hits"
[event]
name=defender hits
first_time_only=no
[filter]
ability=arcane enslavement
[/filter]
# Only works on arcane attacks by defender OR attacks with magical weapons.
[filter_second_attack]
type="arcane"
[or]
special=chaos
[/or]
[or]
special=cleave
[/or]
[or]
special=cone
[/or]
[or]
special=corruption
[/or]
[or]
special=dazzle
[/or]
[or]
special=devastating_blow
[/or]
[or]
special=disintegrate
[/or]
[or]
special=doom
[/or]
[or]
special=drain
[/or]
[or]
special=explosive
[/or]
[or]
special=explosive damage enemy
[/or]
[or]
special=explosive leech
[/or]
[or]
special=explosive slow
[/or]
[or]
special=explosive unprotected
[/or]
[or]
special=extra damage 5 impact
[/or]
[or]
special=greater infect
[/or]
[or]
special=guardian
[/or]
[or]
special=hit and run
[/or]
[or]
special=hose
[/or]
[or]
special=incinerate
[/or]
[or]
special=infect
[/or]
[or]
special=kamikaze sprint
[/or]
[or]
special=knockback
[/or]
[or]
special=leeches
[/or]
[or]
special=mayhem
[/or]
[or]
special=mind raid
[/or]
[or]
special=nosferatu gorge
[/or]
[or]
special=parry
[/or]
[or]
special=pierce
[/or]
[or]
special=plague
[/or]
[or]
special=poison
[/or]
[or]
special=purify
[/or]
[or]
special=raijers saloon
[/or]
[or]
special=shockwave
[/or]
[or]
special=slow
[/or]
[or]
special=soul annihilation
[/or]
[or]
special=soul extraction
[/or]
[or]
special=soul thrash
[/or]
[or]
special=storm
[/or]
[or]
special=storm_demon
[/or]
[or]
special=storm_lilith
[/or]
[or]
special=suck
[/or]
[or]
special=trickery
[/or]
[or]
special=whirlwind
[/or]
[/filter_second_attack]
# Setup a unique id for this master/slave pair.
# id=_"master-" + $unit.id + "slave-" + $second_unit.id
# Store master and slave to make changes
[store_unit]
[filter]
id=$unit.id
[/filter]
variable=master
[/store_unit]
[store_unit]
[filter]
id=$second_unit.id
[/filter]
variable=slave
[/store_unit]
# Add slave id to master so slave can be freed upon master's death.
[set_variable]
name=master.variables.slaves[$master.variables.slaves.length].id
value=$slave.id
[/set_variable]
# Record old side, then change newly enslaved unit's side.
[set_variable]
name=slave.variables.old_side
value=$slave.side
[/set_variable]
[set_variable]
name=slave.side
value=$master.side
[/set_variable]
# Record old loyalty, make sure slave is "loyal" to new side.
[set_variable]
name=slave.variables.old_loyalty
value=$slave.loyalty
[/set_variable]
[set_variable]
name=slave.loyalty
value=true
[/set_variable]
# unstore units back to game
[unstore_unit]
variable=master
[/unstore_unit]
[unstore_unit]
variable=slave
[/unstore_unit]
[/event]
# "arcane enslavement - attacker hits"
[event]
name=attacker hits
first_time_only=no
[filter_second]
ability=arcane enslavement
[/filter_second]
# Only works on arcane attacks by defender OR attacks with magical weapons.
[filter_attack]
type="arcane"
[or]
special=chaos
[/or]
[or]
special=cleave
[/or]
[or]
special=cone
[/or]
[or]
special=corruption
[/or]
[or]
special=dazzle
[/or]
[or]
special=devastating_blow
[/or]
[or]
special=disintegrate
[/or]
[or]
special=doom
[/or]
[or]
special=drain
[/or]
[or]
special=explosive
[/or]
[or]
special=explosive damage enemy
[/or]
[or]
special=explosive leech
[/or]
[or]
special=explosive slow
[/or]
[or]
special=explosive unprotected
[/or]
[or]
special=extra damage 5 impact
[/or]
[or]
special=greater infect
[/or]
[or]
special=guardian
[/or]
[or]
special=hit and run
[/or]
[or]
special=hose
[/or]
[or]
special=incinerate
[/or]
[or]
special=infect
[/or]
[or]
special=kamikaze sprint
[/or]
[or]
special=knockback
[/or]
[or]
special=leeches
[/or]
[or]
special=mayhem
[/or]
[or]
special=mind raid
[/or]
[or]
special=nosferatu gorge
[/or]
[or]
special=parry
[/or]
[or]
special=pierce
[/or]
[or]
special=plague
[/or]
[or]
special=poison
[/or]
[or]
special=purify
[/or]
[or]
special=raijers saloon
[/or]
[or]
special=shockwave
[/or]
[or]
special=slow
[/or]
[or]
special=soul annihilation
[/or]
[or]
special=soul extraction
[/or]
[or]
special=soul thrash
[/or]
[or]
special=storm
[/or]
[or]
special=storm_demon
[/or]
[or]
special=storm_lilith
[/or]
[or]
special=suck
[/or]
[or]
special=trickery
[/or]
[or]
special=whirlwind
[/or]
[/filter_attack]
# Setup a unique id for this master/slave pair.
# id=_"master-" + $second_unit.id + "slave-" + $unit.id
# Store master and slave to make changes
[store_unit]
[filter]
id=$second_unit.id
[/filter]
variable=master
[/store_unit]
[store_unit]
[filter]
id=$unit.id
[/filter]
variable=slave
[/store_unit]
# Add slave id to master so slave can be freed upon master's death.
[set_variable]
name=master.variables.slaves[$master.variables.slaves.length].id
value=$slave.id
[/set_variable]
# Record old side, then change newly enslaved unit's side.
[set_variable]
name=slave.variables.old_side
value=$slave.side
[/set_variable]
[set_variable]
name=slave.side_number
value=$master.side
[/set_variable]
# Record old loyalty, make sure slave is "loyal" to new side.
[set_variable]
name=slave.variables.old_loyalty
value=$slave.loyalty
[/set_variable]
[set_variable]
name=slave.loyalty
value=true
[/set_variable]
# unstore units back to game
[unstore_unit]
variable=master
[/unstore_unit]
[unstore_unit]
variable=slave
[/unstore_unit]
[/event]
# arcane enslavement - die
[event]
name=die
[filter]
ability=arcane enslavement
[/filter]
# Get all slave ids
# Remove associated events
# Free slaves
[/event]
#enddef
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment