-
-
Notifications
You must be signed in to change notification settings - Fork 444
/
Copy pathteleport.dm
52 lines (39 loc) · 1.52 KB
/
teleport.dm
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
45
46
47
48
49
50
51
52
/// The wizard's teleport SPELL
/datum/action/cooldown/spell/teleport/area_teleport/wizard
name = "Teleport"
desc = "This spell teleports you to an area of your selection."
button_icon_state = "teleport"
sound = 'sound/magic/teleport_diss.ogg'
school = SCHOOL_TRANSLOCATION
cooldown_time = 1 MINUTES
cooldown_reduction_per_rank = 10 SECONDS
invocation = "SCYAR NILA"
invocation_type = INVOCATION_SHOUT
smoke_type = /datum/effect_system/fluid_spread/smoke
smoke_amt = 2
post_teleport_sound = 'sound/magic/teleport_app.ogg'
// Santa's teleport, themed as such
/datum/action/cooldown/spell/teleport/area_teleport/wizard/santa
name = "Santa Teleport"
invocation = "HO HO HO!"
spell_requirements = NONE
antimagic_flags = NONE
invocation_says_area = FALSE // Santa moves in mysterious ways
/// Used by the wizard's teleport scroll
/datum/action/cooldown/spell/teleport/area_teleport/wizard/scroll
name = "Teleport (scroll)"
cooldown_time = 0 SECONDS
invocation = null
invocation_type = INVOCATION_NONE
spell_requirements = NONE
invocation_says_area = FALSE
/datum/action/cooldown/spell/teleport/area_teleport/wizard/scroll/IsAvailable(feedback = FALSE)
var/obj/item/teleportation_scroll/scroll = target
return ..() && owner.is_holding(scroll) && scroll.uses
/datum/action/cooldown/spell/teleport/area_teleport/wizard/scroll/before_cast(atom/cast_on)
. = ..()
if(. & SPELL_CANCEL_CAST)
return
var/mob/living/carbon/caster = cast_on
if(caster.incapacitated() || !caster.is_holding(target))
return . | SPELL_CANCEL_CAST