THoT: Reimplement inspire ability using the new $other_unit variable

Bonus: It can now be used on units of level 0, 4, or 5.
(Might be useful for others copying this code.)
This commit is contained in:
Celtic Minstrel 2016-03-03 16:09:23 -05:00
parent 21bda20859
commit e2c4bc6e53
4 changed files with 15 additions and 60 deletions

View file

@ -20,7 +20,7 @@
advances_to=Dwarvish Loremaster
description= _ "Dwarvish Annalists are the historians of this ancient and proud race. They are few in number, and their very existence is not generally known to the other peoples of the Great Continent. To the abilities of the Witness they add, through the study of herb and mineral lore, the ability to cure poison."+{SPECIAL_NOTES}+{SPECIAL_NOTES_SLOW}+{SPECIAL_NOTES_UNPOISON}+{SPECIAL_NOTES_INSPIRE}+{SPECIAL_NOTES_MAGICAL}
[abilities]
{ABILITY_INSPIRE_LEVEL_2}
{ABILITY_INSPIRE}
{ABILITY_UNPOISON}
[/abilities]
die_sound={SOUND_LIST:DWARF_DIE}

View file

@ -22,7 +22,7 @@
{AMLA_DEFAULT}
description= _ "Loremasters are the sages of the dwarvish race. Their counsel is greatly valued by war-leaders and chieftains, and they are viewed with awe by ordinary dwarves, for they alone have plumbed the deepest and most closely-held secrets of dwarven knowledge. It is said that where a loremaster stands, there is the soul of the dwarves. To the abilities of the Annalist they add a limited ability to heal."+{SPECIAL_NOTES}+{SPECIAL_NOTES_SLOW}+{SPECIAL_NOTES_UNPOISON}+{SPECIAL_NOTES_INSPIRE}+{SPECIAL_NOTES_MAGICAL}+{SPECIAL_NOTES_HEALS}
[abilities]
{ABILITY_INSPIRE_LEVEL_3}
{ABILITY_INSPIRE}
{ABILITY_UNPOISON}
{ABILITY_HEALS}
[/abilities]

View file

@ -26,7 +26,7 @@
advances_to=Dwarvish Annalist
description= _ "A Witness functions as the eyes of the dwarves history, a deep lore that they never share with outsiders. The presence of a Witness inspires dwarvish warriors with the knowledge that their deeds (and their deaths) will not go unrecorded. They learn a fighting style deliberately unlike that of their fellows, one designed to turn the vaunted strength of the dwarves against itself. The person of a Witness is considered sacred, and Witnesses are often used as envoys between dwarvish clans."+{SPECIAL_NOTES}+{SPECIAL_NOTES_INSPIRE}+{SPECIAL_NOTES_MAGICAL}+{SPECIAL_NOTES_SLOW}
[abilities]
{ABILITY_INSPIRE_LEVEL_1}
{ABILITY_INSPIRE}
[/abilities]
die_sound={SOUND_LIST:DWARF_DIE}

View file

@ -3,88 +3,43 @@
#define SPECIAL_NOTES_INSPIRE
_" The presence of this unit inspires own units next to it to deal more damage in combat, though this only applies to units of lower or equal level."#enddef
#define ABILITY_INSPIRE_LEVEL_1
# Canned definition of the Inspire (level 1) ability to be included in an
#define ABILITY_INSPIRE
# Canned definition of the Inspire ability to be included in an
# [abilities] clause.
# Note: Works only on units of level 0-5
[leadership]
id=inspire
value=50
value=150
cumulative=no
name= _ "inspire"
female_name= _ "female^inspire"
description= _ "This unit can inspire own units that are next to it, making them fight better. Adjacent own units of lower or equal level will deal 25% more damage plus 25% for each level they are below the inspiring unit."
affect_self=no
[affect_adjacent]
[filter]
level=0
level=$($other_unit.level - 5)
[/filter]
[/affect_adjacent]
[/leadership]
[leadership]
id=inspire
value=25
value=125
cumulative=no
affect_self=no
[affect_adjacent]
[filter]
level=1
level=$($other_unit.level - 4)
[/filter]
[/affect_adjacent]
[/leadership]
#enddef
#define ABILITY_INSPIRE_LEVEL_2
# Canned definition of the Inspire (level 2) ability to be included in an
# [abilities] clause.
[leadership]
id=inspire
value=75
cumulative=no
name= _ "inspire"
description= _ "This unit can inspire own units that are next to it, making them fight better. Adjacent own units of lower or equal level will deal 25% more damage plus 25% for each level they are below the inspiring unit."
affect_self=no
[affect_adjacent]
[filter]
level=0
[/filter]
[/affect_adjacent]
[/leadership]
[leadership]
id=inspire
value=50
cumulative=no
affect_self=no
[affect_adjacent]
[filter]
level=1
[/filter]
[/affect_adjacent]
[/leadership]
[leadership]
id=inspire
value=25
cumulative=no
affect_self=no
[affect_adjacent]
[filter]
level=2
[/filter]
[/affect_adjacent]
[/leadership]
#enddef
#define ABILITY_INSPIRE_LEVEL_3
# Canned definition of the Inspire (level 3) ability to be included in an
# [abilities] clause.
[leadership]
id=inspire
value=100
cumulative=no
name= _ "inspire"
description= _ "This unit can inspire own units that are next to it, making them fight better. Adjacent own units of lower or equal level will deal 25% more damage plus 25% for each level they are below the inspiring unit."
affect_self=no
[affect_adjacent]
[filter]
level=0
level=$($other_unit.level - 3)
[/filter]
[/affect_adjacent]
[/leadership]
@ -95,7 +50,7 @@ _" The presence of this unit inspires own units next to it to deal more damage i
affect_self=no
[affect_adjacent]
[filter]
level=1
level=$($other_unit.level - 2)
[/filter]
[/affect_adjacent]
[/leadership]
@ -106,7 +61,7 @@ _" The presence of this unit inspires own units next to it to deal more damage i
affect_self=no
[affect_adjacent]
[filter]
level=2
level=$($other_unit.level - 1)
[/filter]
[/affect_adjacent]
[/leadership]
@ -117,7 +72,7 @@ _" The presence of this unit inspires own units next to it to deal more damage i
affect_self=no
[affect_adjacent]
[filter]
level=3
level=$other_unit.level
[/filter]
[/affect_adjacent]
[/leadership]