#define WEAPON_SPECIAL_NOVA
[damage]
id=nova
name= _ "nova"
description= _ "Nova: This attack does not only hit the intended target, but also all foes adjacent to the attacker."
[/damage]
[/abilities]
[event]
name=attacker_hits
first_time_only=no
id=nova_cast
[filter_attack]
special=nova
[/filter_attack]
# Harm units (other than the defender) next to the attacker.
[harm_unit]
[filter]
[filter_adjacent]
x,y=$x1,$y1
[/filter_adjacent]
# We do not hurt our own units.
[not]
side=$unit.side
[/not]
# The defender was already damaged.
[not]
x,y=$x2,$y2
[/not]
[/filter]
[filter_second]
x,y=$x1,$y1
[/filter_second]
amount=$weapon.damage
damage_type=arcane
fire_event=yes
experience=no
animate=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
# The nova cannot go through walls.
[filter_radius]
terrain=!,X*,X*^*,*^X*
[/filter_radius]
[/and]
[/filter_location]
# We do not hurt our own units.
[not]
side=$unit.side
[/not]
[/filter]
[filter_second]
x,y=$x1,$y1
[/filter_second]
amount="$($weapon.damage/2)"
damage_type=arcane
fire_event=yes
experience=no
animate=no
[/harm_unit]
[/event]
[+abilities]
#enddef
Inspire Frenzy (Berserker): All adjacent allied dwarves gain melee berserk.
#define ABILITY_BERSERK_LEADERSHIP
[dummy]
id=berserk leadership
name= _ "fanaticism aura"
female_name= _ "female^fanaticism aura"
description=_ "Fanaticism aura:
This unit can inspire adjacent dwarves to attack with the berserker frenzy when in melee combat."
[/dummy]
#enddef
This is the part that all units that can benefit from it have.
#define WEAPON_SPECIAL_LATENT_BERSERK
[berserk]
id=berserk forced
name= _ "berserk"
description= _ "Berserk:
Whether used offensively or defensively, this attack presses the engagement until one of the combatants is slain, or 30 rounds of attacks have occurred."
value=30
active_on=offense
[filter_self]
[filter_adjacent]
ability=berserk leadership
[/filter_adjacent]
[/filter_self]
[/berserk]
#enddef
Mind Raid (Saurian mages): Will drain an amount of exp proportional to damage and it will be added into the attacker's exp bar.
#define WEAPON_SPECIAL_SHOCKWAVE
[slow]
id=shockwave
name= _ "shockwave"
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, slows them too and damages them for 10 impact damage. Works only offensively."
[/slow]
[/specials]
[/attack]
[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]
[not]
side=$harmer.side
[/not]
[not]
x,y=$x2,$y2
[/not]
[/filter]
[filter_second]
x,y=$x1,$y1
[/filter_second]
amount=10
slowed=yes
damage_type=impact
fire_event=yes
experience=no
animate=no
[/harm_unit] #Damages units, slowing them
[store_unit]
[filter]
[filter_adjacent]
x,y=$x2,$y2
[/filter_adjacent]
[not]
side=$harmer.side
[/not]
[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]
[+attack]
[+specials]
#enddef
Disintegrate (a possible weapon upgrade): 5% chance to kill regardless of the unit's hp
#define WEAPON_SPECIAL_FOCUSED
[chance_to_hit]
id=focused
name= _ "focused"
description= _ "Focused:
This attack always has at least a 80% chance to hit."
value=80
cumulative=yes
[/chance_to_hit]
#enddef
#define WEAPON_SPECIAL_GUIDED
[chance_to_hit]
id=guided
name= _ "guided"
description= _ "Guided:
This attack always has an 90% chance to hit, regardless of the defensive ability of the defending unit."
value=90
cumulative=no
[/chance_to_hit]
#enddef
Lavaflow (can be used only once per scenario): The attack will transform the terrain under the unit and also a few tiles behind it into lava, dealing damage to everything that stood on it.
#define ABILITY_MARKSMAN_LEADERSHIP
[dummy]
id=marksman leadership
name= _ "revelation"
female_name= _ "female^revelation"
description=_ "revelation:
This unit can reveal all enemies' prepared defensive tricks, making all adjacent elves gain the marksman weapon special on their bows."
[/dummy]
#enddef
#define WEAPON_SPECIAL_LATENT_MARKSMAN
[chance_to_hit]
id=marksman forced
name= _ "marksman"
description= _ "Marksman:
When used offensively, this attack always has at least a 60% chance to hit."
value=60
cumulative=yes
active_on=offense
[filter_self]
[filter_adjacent]
ability=marksman leadership
[/filter_adjacent]
[/filter_self]
[/chance_to_hit]
#enddef
Lawful, chaotic: A weapon special makes this particular attack affected by the time of day, so that it is possible that a unit has one attack that works at night and another one that works during the day.
#define WEAPON_SPECIAL_CHAOTIC
[damage]
id=chaotic
name= _ "chaotic"
description= _ "Chaotic:
This attack is 25% better at night and 25% worse at day."
[/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
#define WEAPON_SPECIAL_LAWFUL
[damage]
id=lawful
name= _ "lawful"
description= _ "Lawful:
This attack is 25% better at day and 25% worse at night."
[/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
Duel (Master at Arms, Nagas, Deathblade): Like berserk, but the attack is repeated only twice (or four times).
Spoiler:
Please keep on mind that the number of repeats of the fight is an argument to this, so {WEAPON_SPECIAL_DUEL 2} means two fights, {WEAPON_SPECIAL_DUEL 4} means four fights,...
#define WEAPON_SPECIAL_DUEL DURATION
[berserk]
id=duel
name= _ "duel"
description= _ "Duel:
Whether used offensively or defensively, this attack presses the engagement until one of the combatants is slain, or {DURATION} rounds of attacks have occurred."
value={DURATION}
[/berserk]
#enddef
Burning Aura (granted by an item): All adjacent enemies take damage at the beginning of their turn.
Spoiler:
The damage of the aura is an argument, so write {ABILITY_BURNING_AURA 10} for 10 damage etc...
#define ABILITY_BURNING_AURA POWER
[heals]
value=-{POWER}
id=burning_aura
affect_enemies=yes
name= _ "burns foes"
female_name= _ "female^burns foes"
description= _ "Burns foes:
Allows the unit to damage adjacent enemies at the beginning of our turn. The damage depends on the skill in this aura. Because it specialises on lesser forms of life, it may help a poisoned enemy, or the poison will protect it from the aura, taking only 8 hp.
This ability ignores any resistances or weaknesses of enemies, so it`s very powerful against spirits. It never kills, because it always leaves 1hp at least. If the enemy is poisoned, it doesn't cumulate."
affect_self=no
[affect_adjacent]
adjacent=n,ne,se,s,sw,nw
[/affect_adjacent]
[/heals]
#enddef
Freezing aura (from an item): All adjacent enemies are slowed at the beginning of their turn.
Spoiler:
#define ABILITY_FREEZING_AURA
[dummy]
id=freezing aura
name= _ "freezing aura"
female_name= _ "female^freezing aura"
description= _ "Freezing Aura:
All adjacent units except units of the same side as this unit will be slowed at the beginning of their turn."
affect_self=no
[/dummy]
[/abilities]
[event]
name=side turn
first_time_only=no
id=freezing_aura_use
[if]
[variable]
name=side_number
greater_than=1
[/variable]
[then]
[harm_unit]
[filter]
[filter_adjacent]
ability=freezing aura
[/filter_adjacent]
side=$side_number
[/filter]
amount=2
damage_type=cold
slowed=yes
fire_event=yes
experience=no
kill=yes
animate=no
[/harm_unit]
[/then]
[/if]
[/event]
[+abilities]
#enddef
Dark aura (from an item): All adjacent enemies are poisoned at the beginning of their turn.
Spoiler:
#define ABILITY_DARK_AURA
[dummy]
id=dark aura
name= _ "dark aura"
female_name= _ "female^dark aura"
description= _ "Dark Aura:
All adjacent units except units of the same side as this unit will be poisoned at the beginning of their turn."
affect_self=no
[/dummy]
[/abilities]
[event]
name=side turn
first_time_only=no
id=dark_aura_use
[if]
[variable]
name=side_number
greater_than=1
[/variable]
[then]
[harm_unit]
[filter]
[filter_adjacent]
ability=dark aura
[/filter_adjacent]
side=$side_number
[/filter]
amount=2
damage_type=arcane
poisoned=yes
fire_event=yes
experience=no
kill=yes
animate=no
[/harm_unit]
[/then]
[/if]
[/event]
[+abilities]
#enddef
Reflect (Saurian Flanker): All attackers take 1/4 or 1/2 of the damage they caused to Saurian.
Spoiler:
In this case, it is for 1/2 of the damage. It is easy to alter.
#define ABILITY_SUMMONING
[dummy]
id=summoning
name= _ "summoning"
female_name= _ "female^summoning"
description=_ "Summoning:
By left-clicking on this unit, you can recruit units around it, also outside the keep, but for 50% more gold."
[/dummy]
#enddef
This has to be placed into scenarios where the unit can appear.
#define ABILITY_MASTERGUARD
[resistance]
id=masterguard
multiply=3
max_value=75
[filter_base_value]
greater_than=0
less_than=75
[/filter_base_value]
name= _ "masterguard"
female_name= _ "female^masterguard"
description= _ "Masterguard:
This unit's resistances are tripled, up to a maximum of 75%, when defending. Vulnerabilities are not affected."
affect_self=yes
active_on=defense
[/resistance]
#enddef
That method is utterly useless. When you enter a unit's ZoC, that is done almost anytime when you attack a unit, you lose all movement. It would be rather hit before you run, because you can actually use it when the unit stands next to the enemy unit, to attack and flee then, but the conception of hit and run was based on arriving, attacking and running away, not attacking, getting attacked, and then being allowed to attack again before running (will work like designed on Walking Corpses and Vampire Bats).
# Weapon special: Flare
[event]
name = attacker hits
first_time_only = no
[filter_attack]
special = Flare
[/filter_attack]
[if]
{VARIABLE_CONDITIONAL second_unit.abilities.illuminates.length equals 0}
[then]
[set_variables]
name = combat_events_temp
mode = replace
[value]
{ABILITY_ILLUMINATES}
[/value]
[/set_variables]
[set_variables]
name = second_unit.abilities
mode = append
[insert_tag]
name = value
variable = combat_events_temp
[/insert_tag]
[/set_variables]
{VARIABLE second_unit.halo halo/illuminates-aura.png}
[unstore_unit]
variable = second_unit
find_vacant = no
[/unstore_unit]
{CLEAR_VARIABLE combat_events_temp}
[/then]
[/if]
[/event]
[event]
name = defender hits
first_time_only = no
[filter_second_attack]
special = Flare
[/filter_second_attack]
[if]
{VARIABLE_CONDITIONAL second_unit.abilities.illuminates.length equals 0}
[then]
[set_variables]
name = combat_events_temp
mode = replace
[value]
{ABILITY_ILLUMINATES}
[/value]
[/set_variables]
[set_variables]
name = unit.abilities
mode = append
[insert_tag]
name = value
variable = combat_events_temp
[/insert_tag]
[/set_variables]
{VARIABLE unit.halo halo/illuminates-aura.png}
[unstore_unit]
variable = unit
find_vacant = no
[/unstore_unit]
{CLEAR_VARIABLE combat_events_temp}
[/then]
[/if]
[/event]
Weapon special: Cloud
This weapon emit cloud of deadly substance. It will always hits enemy behind your target.
Considers additional enemy resistance. Gives experience if additional enemy gets killed.
#define WEAPON_SPECIAL_CLOUD
[dummy]
id = Cloud
name = "Cloud"
description = "Cloud: This weapon emit cloud of deadly substance. It will always hits enemy behind your target."
[/dummy]
#enddef
unit ability
inspiring/inspire/valiant (goblin [impaler?whichever one is the leader one])
this valiant goblins pure willpower is enough to inspire units of all levels around it.
#define ABILITY_VALIANT
[leadership]
id=valiant
name=_"valiant"
description=_"put your description here"
# also needs female and inactive variants of name and description?
value=25 # or whatever percentage bonus you want the unit to give
cumulative=no
affect_self=no
[/leadership]
#enddef
(I called it "valiant" because "inspire" is already used for a leadership++ ability in Hammer of Thursagan (which works exactly like normal leadership except that it affects units of equal level as well.)
I'm just noting here to adament that I am using your water-only ability for EoFM.
Thank you for creating it.
"There are two kinds of old men in the world. The kind who didn't go to war and who say that they should have lived fast died young and left a handsome corpse and the old men who did go to war and who say that there is no such thing as a handsome corpse."