forked from tdauth/dmdf
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStruct Spell Living Will.j
More file actions
executable file
·32 lines (26 loc) · 1.35 KB
/
Struct Spell Living Will.j
File metadata and controls
executable file
·32 lines (26 loc) · 1.35 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
/// Knight
library StructSpellsSpellLivingWill requires Asl, StructGameClasses, StructGameSpell
/// Der Ritter kann 5 Sekunden nach seinem Tod mit 50% seiner Lebensnenergie wiederauferstehen. 15 Minuten Abklingzeit.
struct SpellLivingWill extends Spell
public static constant integer abilityId = 'A01N'
public static constant integer favouriteAbilityId = 'A03R'
public static constant integer classSelectionAbilityId = 'A1M3'
public static constant integer classSelectionGrimoireAbilityId = 'A1M4'
public static constant integer maxLevel = 1
private static constant real spellTime = 5.0
private static constant real hitPointsPercentageAmount = 50.0
private method action takes nothing returns nothing
local unit target = GetSpellTargetUnit()
call TriggerSleepAction(5.0)
call SetUnitLifePercentBJ(target, thistype.hitPointsPercentageAmount)
set target = null
endmethod
public static method create takes ACharacter character returns SpellLivingWill
local thistype this = thistype.allocate(character, Classes.knight(), Spell.spellTypeUltimate0, thistype.maxLevel, thistype.abilityId, thistype.favouriteAbilityId, 0, 0, thistype.action)
call this.addGrimoireEntry('A1M3', 'A1M4')
call this.addGrimoireEntry('A0LJ', 'A0LK')
call this.setIsPassive(true)
return this
endmethod
endstruct
endlibrary