-
-
Notifications
You must be signed in to change notification settings - Fork 452
/
magic_missile.dm
48 lines (36 loc) · 1.57 KB
/
magic_missile.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
/datum/action/cooldown/spell/aoe/magic_missile
name = "Magic Missile"
desc = "This spell fires several, slow moving, magic projectiles at nearby targets."
button_icon_state = "magicm"
sound = 'sound/magic/magic_missile.ogg'
school = SCHOOL_EVOCATION
cooldown_time = 20 SECONDS
cooldown_reduction_per_rank = 3.5 SECONDS
invocation = "FORTI GY AMA"
invocation_type = INVOCATION_SHOUT
aoe_radius = 7
/// The projectile type fired at all people around us
var/obj/projectile/projectile_type = /obj/projectile/magic/aoe/magic_missile
/datum/action/cooldown/spell/aoe/magic_missile/get_things_to_cast_on(atom/center)
var/list/things = list()
for(var/mob/living/nearby_mob in view(aoe_radius, center))
if(nearby_mob == owner || nearby_mob == center)
continue
things += nearby_mob
return things
/datum/action/cooldown/spell/aoe/magic_missile/cast_on_thing_in_aoe(mob/living/victim, atom/caster)
fire_projectile(victim, caster)
/datum/action/cooldown/spell/aoe/magic_missile/proc/fire_projectile(atom/victim, mob/caster)
var/obj/projectile/to_fire = new projectile_type()
to_fire.preparePixelProjectile(victim, caster)
to_fire.fire()
/datum/action/cooldown/spell/aoe/magic_missile/lesser
name = "Lesser Magic Missile"
desc = "This spell fires several, slow moving, magic projectiles at nearby targets."
background_icon_state = "bg_demon"
overlay_icon_state = "bg_demon_border"
cooldown_time = 40 SECONDS
invocation_type = INVOCATION_NONE
spell_requirements = SPELL_REQUIRES_NO_ANTIMAGIC
max_targets = 6
projectile_type = /obj/projectile/magic/aoe/magic_missile/lesser