-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathStruct Spell Elemental Mage Damage Spell.j
More file actions
executable file
·32 lines (24 loc) · 2.05 KB
/
Copy pathStruct Spell Elemental Mage Damage Spell.j
File metadata and controls
executable file
·32 lines (24 loc) · 2.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/// Elemental Mage
library StructSpellsSpellElementalMageDamageSpell requires Asl, StructGameClasses, StructGameSpell
struct SpellElementalMageDamageSpell extends Spell
private real m_damageBonusFactor
public method addDamageBonusFactor takes real damageBonusFactor returns nothing
set this.m_damageBonusFactor = this.m_damageBonusFactor + damageBonusFactor
endmethod
public method removeDamageBonusFactor takes real damageBonusFactor returns nothing
set this.m_damageBonusFactor = RMaxBJ(this.m_damageBonusFactor - damageBonusFactor, 0.0)
endmethod
public method damageBonusFactor takes nothing returns real
return this.m_damageBonusFactor
endmethod
public static method spellIsDamageSpell takes ASpell spell returns boolean
return spell.ability() == SpellBlaze.abilityId or spell.ability() == SpellIceAge.abilityId or spell.ability() == SpellFireMissile.abilityId or spell.ability() == SpellIceMissile.abilityId or spell.ability() == SpellInferno.abilityId or spell.ability() == SpellPureEnergy.abilityId or spell.ability() == SpellLightning.abilityId
endmethod
public static method create takes Character character, integer spellType, integer maxLevel, integer abilityId, integer favouriteAbilityId, AUnitSpellUpgradeAction upgradeAction, AUnitSpellCastCondition castCondition, AUnitSpellCastAction castAction returns thistype
return thistype.allocate(character, Classes.elementalMage(), spellType, maxLevel, abilityId, favouriteAbilityId, upgradeAction, castCondition, castAction)
endmethod
public static method createWithEventDamageSpell takes Character character, integer spellType, integer maxLevel, integer abilityId, integer favouriteAbilityId, AUnitSpellUpgradeAction upgradeAction, AUnitSpellCastCondition castCondition, AUnitSpellCastAction castAction, playerunitevent unitEvent returns thistype
return thistype.createWithEvent(character, Classes.elementalMage(), spellType, maxLevel, abilityId, favouriteAbilityId, upgradeAction, castCondition, castAction, unitEvent)
endmethod
endstruct
endlibrary