forked from ParadiseSS13/Paradise
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathdevil.dm
243 lines (216 loc) · 8.1 KB
/
devil.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
/obj/effect/proc_holder/spell/targeted/conjure_item/pitchfork
name = "Summon Pitchfork"
desc = "A devil's weapon of choice. Use this to summon/unsummon your pitchfork."
item_type = /obj/item/twohanded/pitchfork/demonic
action_icon_state = "pitchfork"
action_background_icon_state = "bg_demon"
/obj/effect/proc_holder/spell/targeted/conjure_item/pitchfork/greater
item_type = /obj/item/twohanded/pitchfork/demonic/greater
/obj/effect/proc_holder/spell/targeted/conjure_item/pitchfork/ascended
item_type = /obj/item/twohanded/pitchfork/demonic/ascended
/obj/effect/proc_holder/spell/targeted/conjure_item/violin
item_type = /obj/item/instrument/violin/golden
desc = "A devil's instrument of choice. Use this to summon/unsummon your golden violin."
invocation_type = "whisper"
invocation = "I ain't have this much fun since Georgia."
action_icon_state = "golden_violin"
name = "Summon golden violin"
action_background_icon_state = "bg_demon"
/obj/effect/proc_holder/spell/targeted/summon_contract
name = "Summon infernal contract"
desc = "Skip making a contract by hand, just do it by magic."
invocation_type = "whisper"
invocation = "Just sign on the dotted line."
include_user = 0
range = 5
clothes_req = FALSE
school = "conjuration"
charge_max = 150
cooldown_min = 10
action_icon_state = "spell_default"
action_background_icon_state = "bg_demon"
/obj/effect/proc_holder/spell/targeted/summon_contract/cast(list/targets, mob/user = usr)
for(var/mob/living/carbon/C in targets)
if(C.mind && user.mind)
if(C.stat == DEAD)
if(user.drop_item())
var/obj/item/paper/contract/infernal/revive/contract = new(user.loc, C.mind, user.mind)
user.put_in_hands(contract)
else
var/obj/item/paper/contract/infernal/contract
var/contractTypeName = input(user, "What type of contract?") in list (CONTRACT_POWER, CONTRACT_WEALTH, CONTRACT_PRESTIGE, CONTRACT_MAGIC, CONTRACT_KNOWLEDGE, CONTRACT_FRIENDSHIP) //TODO: Refactor this to be less boilerplate-y
switch(contractTypeName)
if(CONTRACT_POWER)
contract = new /obj/item/paper/contract/infernal/power(C.loc, C.mind, user.mind)
if(CONTRACT_WEALTH)
contract = new /obj/item/paper/contract/infernal/wealth(C.loc, C.mind, user.mind)
if(CONTRACT_PRESTIGE)
contract = new /obj/item/paper/contract/infernal/prestige(C.loc, C.mind, user.mind)
if(CONTRACT_MAGIC)
contract = new /obj/item/paper/contract/infernal/magic(C.loc, C.mind, user.mind)
if(CONTRACT_KNOWLEDGE)
contract = new /obj/item/paper/contract/infernal/knowledge(C.loc, C.mind, user.mind)
if(CONTRACT_FRIENDSHIP)
contract = new /obj/item/paper/contract/infernal/friendship(C.loc, C.mind, user.mind)
C.put_in_hands(contract)
else
to_chat(user,"<span class='notice'>[C] seems to not be sentient. You are unable to summon a contract for them.</span>")
/obj/effect/proc_holder/spell/fireball/hellish
name = "Hellfire"
desc = "This spell launches hellfire at the target."
school = "evocation"
charge_max = 80
clothes_req = FALSE
invocation = "Your very soul will catch fire!"
invocation_type = "shout"
fireball_type = /obj/item/projectile/magic/fireball/infernal
action_background_icon_state = "bg_demon"
/obj/effect/proc_holder/spell/fireball/hellish/cast(list/targets, mob/living/user = usr)
msg_admin_attack("[key_name_admin(usr)] has fired a fireball.", ATKLOG_FEW)
.=..()
/obj/effect/proc_holder/spell/targeted/infernal_jaunt
name = "Infernal Jaunt"
desc = "Use hellfire to phase out of existence."
charge_max = 200
clothes_req = FALSE
selection_type = "range"
range = -1
cooldown_min = 0
overlay = null
include_user = TRUE
action_icon_state = "jaunt"
action_background_icon_state = "bg_demon"
/obj/effect/proc_holder/spell/targeted/infernal_jaunt/cast(list/targets, mob/living/user = usr)
if(istype(user))
if(istype(user.loc, /obj/effect/dummy/slaughter))
var/continuing = 0
if(istype(get_area(user), /area/shuttle)) // Can always phase in in a shuttle.
continuing = TRUE
else
for(var/mob/living/C in orange(2, get_turf(user.loc))) //Can also phase in when nearby a potential buyer.
if (C.mind && C.mind.soulOwner == C.mind)
continuing = TRUE
break
if(continuing)
to_chat(user,"<span class='warning'>You are now phasing in.</span>")
if(do_mob(user,user,150))
user.infernalphasein()
else
to_chat(user,"<span class='warning'>You can only re-appear near a potential signer or on a shuttle.</span>")
revert_cast()
return ..()
else
user.notransform = TRUE
user.fakefire()
to_chat(user,"<span class='warning'>You begin to phase back into sinful flames.</span>")
if(do_mob(user,user,150))
user.infernalphaseout()
else
to_chat(user,"<span class='warning'>You must remain still while exiting.</span>")
user.ExtinguishMob()
start_recharge()
return
revert_cast()
/mob/living/proc/infernalphaseout()
dust_animation()
visible_message("<span class='warning'>[src] disappears in a flashfire!</span>")
playsound(get_turf(src), 'sound/misc/enter_blood.ogg', 100, 1, -1)
var/obj/effect/dummy/slaughter/s_holder = new(loc)
ExtinguishMob()
forceMove(s_holder)
holder = s_holder
notransform = FALSE
fakefireextinguish()
/mob/living/proc/infernalphasein()
if(notransform)
to_chat(src,"<span class='warning'>You're too busy to jaunt in.</span>")
return 0
fakefire()
forceMove(get_turf(src))
reset_perspective()
visible_message("<span class='warning'><B>[src] appears in a firey blaze!</B></span>")
playsound(get_turf(src), 'sound/misc/exit_blood.ogg', 100, 1, -1)
spawn(15)
fakefireextinguish(TRUE)
/obj/effect/proc_holder/spell/targeted/sintouch
name = "Sin Touch"
desc = "Subtly encourage someone to sin."
charge_max = 1800
clothes_req = FALSE
selection_type = "range"
range = 2
cooldown_min = 0
overlay = null
include_user = FALSE
action_icon_state = "sintouch"
action_background_icon_state = "bg_demon"
random_target = TRUE
random_target_priority = TARGET_RANDOM
max_targets = 3
invocation = "TASTE SIN AND INDULGE!!"
invocation_type = "shout"
/obj/effect/proc_holder/spell/targeted/sintouch/ascended
name = "Greater sin touch"
charge_max = 100
range = 7
max_targets = 10
/obj/effect/proc_holder/spell/targeted/sintouch/cast(list/targets, mob/living/user = usr)
for(var/mob/living/carbon/human/H in targets)
if(!H.mind)
continue
for(var/datum/objective/sintouched/A in H.mind.objectives)
continue
H.influenceSin()
H.Weaken(2)
H.Stun(2)
/obj/effect/proc_holder/spell/targeted/summon_dancefloor
name = "Summon Dancefloor"
desc = "When what a Devil really needs is funk."
include_user = TRUE
range = -1
clothes_req = FALSE
school = "conjuration"
charge_max = 10
cooldown_min = 50 //5 seconds, so the smoke can't be spammed
action_icon_state = "funk"
action_background_icon_state = "bg_demon"
var/list/dancefloor_turfs
var/list/dancefloor_turfs_types
var/dancefloor_exists = FALSE
// var/datum/effect_system/smoke_spread/transparent/dancefloor_devil/smoke
/obj/effect/proc_holder/spell/targeted/summon_dancefloor/cast(list/targets, mob/user = usr)
LAZYINITLIST(dancefloor_turfs)
LAZYINITLIST(dancefloor_turfs_types)
/*
if(!smoke)
smoke = new()
smoke.set_up(0, get_turf(user))
smoke.start()
*/
if(dancefloor_exists)
dancefloor_exists = FALSE
for(var/i in 1 to dancefloor_turfs.len)
var/turf/T = dancefloor_turfs[i]
T.ChangeTurf(dancefloor_turfs_types[i])
else
var/list/funky_turfs = RANGE_TURFS(1, user)
for(var/turf/T in funky_turfs)
if(T.density)
to_chat(user, "<span class='warning'>You're too close to a wall.</span>")
return
dancefloor_exists = TRUE
var/i = 1
dancefloor_turfs.len = funky_turfs.len
dancefloor_turfs_types.len = funky_turfs.len
for(var/t in funky_turfs)
var/turf/T = t
dancefloor_turfs[i] = T
dancefloor_turfs_types[i] = T.type
T.ChangeTurf((i % 2 == 0) ? /turf/simulated/floor/light/colour_cycle/dancefloor_a : /turf/simulated/floor/light/colour_cycle/dancefloor_b)
i++
/*
/datum/effect_system/smoke_spread/transparent/dancefloor_devil
effect_type = /obj/effect/particle_effect/smoke/transparent/dancefloor_devil
/obj/effect/particle_effect/smoke/transparent/dancefloor_devil
lifetime = 2
*/