-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathStruct Spell Neck Stone.j
More file actions
44 lines (33 loc) · 1.44 KB
/
Copy pathStruct Spell Neck Stone.j
File metadata and controls
44 lines (33 loc) · 1.44 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
33
34
35
36
37
38
39
40
41
42
43
44
/// Item
library StructSpellsSpellNeckStone requires Asl, StructGameClasses, StructSpellsSpellMetamorphosis
struct SpellNeckStone extends SpellMetamorphosis
// Called with .evaluate()
public stub method canMorph takes nothing returns boolean
return true
endmethod
/// Called after unit has morphed.
public stub method onMorph takes nothing returns nothing
endmethod
public stub method canRestore takes nothing returns boolean
// seems to work wrongly
if (IsTerrainPathable(GetUnitX(this.character().unit()), GetUnitY(this.character().unit()), PATHING_TYPE_WALKABILITY)) then
call this.character().displayMessage(ACharacter.messageTypeError, tre("Charakter muss sich außerhalb des Wassers befinden.", "Character must be located outside of water."))
return false
endif
return true
endmethod
/// Called after unit has been restored.
public stub method onRestore takes nothing returns nothing
endmethod
public static method create takes Character character, integer abilityId, integer morphAbiliyId, integer unmorphAbilityId returns thistype
local thistype this = thistype.allocate(character, abilityId, morphAbiliyId, unmorphAbilityId)
call this.setDisableGrimoire(false)
call this.setDisableInventory(false)
// don't show equipment
call this.setEnableOnlyRucksack(true)
return this
endmethod
public method onDestroy takes nothing returns nothing
endmethod
endstruct
endlibrary