-
-
Notifications
You must be signed in to change notification settings - Fork 444
/
Copy pathgeneral_heretic_magic.dm
302 lines (247 loc) · 10.8 KB
/
general_heretic_magic.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
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
/*
THIS FILE IS FOR ALL HERETIC SPELLS THAT DO NOT CONFER TO A PATH'S THEME OR YOU JUST DONT KNOW WHERE TO PUT IT.
*/
/datum/action/cooldown/spell/touch/mansus_grasp
name = "Mansus Grasp"
desc = "A powerful combat initiation spell that deals massive stamina damage. It may have other effects if you continue your research..."
background_icon_state = "bg_heretic"
overlay_icon_state = "bg_heretic_border"
button_icon = 'icons/mob/actions/actions_ecult.dmi'
button_icon_state = "mansus_grasp"
sound = 'sound/items/welder.ogg'
school = SCHOOL_EVOCATION
cooldown_time = 10 SECONDS
invocation = "R'CH T'H TR'TH!"
invocation_type = INVOCATION_SHOUT
// Mimes can cast it. Chaplains can cast it. Anyone can cast it, so long as they have a hand.
spell_requirements = SPELL_CASTABLE_WITHOUT_INVOCATION | SPELL_REQUIRES_NO_ANTIMAGIC
hand_path = /obj/item/melee/touch_attack/mansus_fist
/datum/action/cooldown/spell/touch/mansus_grasp/is_valid_target(atom/cast_on)
return TRUE // This baby can hit anything
/datum/action/cooldown/spell/touch/mansus_grasp/can_cast_spell(feedback = TRUE)
return ..() && !!IS_HERETIC(owner)
/datum/action/cooldown/spell/touch/mansus_grasp/on_antimagic_triggered(obj/item/melee/touch_attack/hand, atom/victim, mob/living/carbon/caster)
victim.visible_message(
span_danger("The spell bounces off of [victim]!"),
span_danger("The spell bounces off of you!"),
)
/datum/action/cooldown/spell/touch/mansus_grasp/cast_on_hand_hit(obj/item/melee/touch_attack/hand, atom/victim, mob/living/carbon/caster)
// if(!isliving(victim)) for now, makes heretic hand hit everything but it's for the best
// return FALSE
if(SEND_SIGNAL(caster, COMSIG_HERETIC_MANSUS_GRASP_ATTACK, victim) & COMPONENT_BLOCK_HAND_USE)
return FALSE
if(isliving(victim))
var/mob/living/living_hit = victim
living_hit.apply_damage(10, BRUTE, wound_bonus = CANT_WOUND)
if(iscarbon(victim))
var/mob/living/carbon/carbon_hit = victim
carbon_hit.adjust_timed_status_effect(4 SECONDS, /datum/status_effect/speech/slurring/heretic)
carbon_hit.AdjustKnockdown(5 SECONDS)
carbon_hit.adjustStaminaLoss(80)
return TRUE
/obj/item/melee/touch_attack/mansus_fist
name = "Mansus Grasp"
desc = "A sinister looking aura that distorts the flow of reality around it. \
Causes knockdown, minor bruises, and major stamina damage. \
It gains additional beneficial effects as you expand your knowledge of the Mansus."
icon_state = "mansus"
item_state = "mansus"
/obj/item/melee/touch_attack/mansus_fist/ignition_effect(atom/A, mob/user)
. = span_notice("[user] effortlessly snaps [user.p_their()] fingers near [A], igniting it with eldritch energies. Fucking badass!")
remove_hand_with_no_refund(user)
/obj/item/melee/touch_attack/mansus_fist/mind //ranged
weapon_stats = list(SWING_SPEED = 1, ENCUMBRANCE = 0, ENCUMBRANCE_TIME = 0, REACH = 3, DAMAGE_LOW = 0, DAMAGE_HIGH = 0)
/obj/item/melee/touch_attack/mansus_fist/mind/upgraded //more ranged
weapon_stats = list(SWING_SPEED = 1, ENCUMBRANCE = 0, ENCUMBRANCE_TIME = 0, REACH = 4, DAMAGE_LOW = 0, DAMAGE_HIGH = 0)
/datum/action/cooldown/spell/jaunt/ethereal_jaunt/basic
name = "Mansus Passage"
desc = "A short range spell that allows you to pass unimpeded through walls."
background_icon_state = "bg_heretic"
overlay_icon_state = "bg_heretic_border"
sound = null
school = SCHOOL_FORBIDDEN
cooldown_time = 15 SECONDS
spell_requirements = SPELL_CASTABLE_WITHOUT_INVOCATION | SPELL_REQUIRES_NO_ANTIMAGIC
exit_jaunt_sound = null
jaunt_duration = 1.5 SECONDS
jaunt_in_time = 0.5 SECONDS
jaunt_out_time = 0.5 SECONDS
// Currently unused.
/datum/action/cooldown/spell/touch/mad_touch
name = "Touch of Madness"
desc = "Strange energies engulf your hand, you feel even the sight of them would cause a headache if you didn't understand them."
background_icon_state = "bg_heretic"
overlay_icon_state = "bg_heretic_border"
button_icon = 'icons/mob/actions/actions_ecult.dmi'
button_icon_state = "mad_touch"
school = SCHOOL_FORBIDDEN
cooldown_time = 15 SECONDS
invocation_type = INVOCATION_NONE
spell_requirements = SPELL_CASTABLE_WITHOUT_INVOCATION | SPELL_REQUIRES_NO_ANTIMAGIC
antimagic_flags = MAGIC_RESISTANCE|MAGIC_RESISTANCE_MIND
/datum/action/cooldown/spell/touch/mad_touch/cast_on_hand_hit(obj/item/melee/touch_attack/hand, atom/victim, mob/living/carbon/caster)
if(!ishuman(victim))
return FALSE
var/mob/living/carbon/human/human_victim = victim
if(!human_victim.mind || IS_HERETIC(human_victim))
return FALSE
if(human_victim.can_block_magic(antimagic_flags))
victim.visible_message(
span_danger("The spell bounces off of [victim]!"),
span_danger("The spell bounces off of you!"),
)
return FALSE
to_chat(caster, span_warning("[human_victim.name] has been cursed!"))
SEND_SIGNAL(target, COMSIG_ADD_MOOD_EVENT, "gates_of_mansus", /datum/mood_event/gates_of_mansus)
return TRUE
/datum/action/cooldown/spell/shapeshift/eldritch
name = "Shapechange"
desc = "A spell that allows you to take on the form of another creature, gaining their abilities. \
After making your choice, you will be unable to change to another."
background_icon_state = "bg_heretic"
overlay_icon_state = "bg_heretic_border"
school = SCHOOL_FORBIDDEN
invocation = "SH'PE"
invocation_type = INVOCATION_WHISPER
spell_requirements = SPELL_CASTABLE_WITHOUT_INVOCATION | SPELL_REQUIRES_NO_ANTIMAGIC
possible_shapes = list(
/mob/living/simple_animal/mouse,\
/mob/living/simple_animal/pet/dog/corgi,\
/mob/living/simple_animal/hostile/carp/megacarp,\
/mob/living/simple_animal/pet/fox,\
/mob/living/simple_animal/hostile/netherworld/migo,\
/mob/living/simple_animal/bot/medbot,\
/mob/living/simple_animal/pet/cat
)
/datum/action/cooldown/spell/emp/eldritch
name = "Entropic Pulse"
desc = "A spell that causes a large EMP around you, disabling electronics."
background_icon_state = "bg_heretic"
overlay_icon_state = "bg_heretic_border"
school = SCHOOL_FORBIDDEN
cooldown_time = 30 SECONDS
invocation = "E'P"
invocation_type = INVOCATION_WHISPER
spell_requirements = SPELL_CASTABLE_WITHOUT_INVOCATION | SPELL_REQUIRES_NO_ANTIMAGIC
radius = 10
/datum/action/cooldown/spell/list_target/telepathy/eldritch
name = "Eldritch Telepathy"
school = SCHOOL_FORBIDDEN
background_icon_state = "bg_heretic"
overlay_icon_state = "bg_heretic_border"
spell_requirements = SPELL_CASTABLE_WITHOUT_INVOCATION | SPELL_REQUIRES_NO_ANTIMAGIC
antimagic_flags = MAGIC_RESISTANCE|MAGIC_RESISTANCE_MIND
/datum/action/cooldown/spell/pointed/manse_link
name = "Manse Link"
desc = "This spell allows you to pierce through reality and connect minds to one another \
via your Mansus Link. All minds connected to your Mansus Link will be able to communicate discreetly across great distances."
background_icon_state = "bg_heretic"
button_icon = 'icons/mob/actions/actions_ecult.dmi'
button_icon_state = "mansus_link"
ranged_mousepointer = 'icons/effects/mouse_pointers/throw_target.dmi'
school = SCHOOL_FORBIDDEN
cooldown_time = 20 SECONDS
invocation = "PI'RC' TH' M'ND."
invocation_type = INVOCATION_SHOUT
spell_requirements = SPELL_CASTABLE_WITHOUT_INVOCATION | SPELL_REQUIRES_NO_ANTIMAGIC
cast_range = 7
/// The time it takes to link to a mob.
var/link_time = 6 SECONDS
/datum/action/cooldown/spell/pointed/manse_link/New(Target)
. = ..()
if(!istype(Target, /datum/component/mind_linker))
stack_trace("[name] ([type]) was instantiated on a non-mind_linker target, this doesn't work.")
qdel(src)
/datum/action/cooldown/spell/pointed/manse_link/is_valid_target(atom/cast_on)
. = ..()
if(!.)
return FALSE
return isliving(cast_on)
/datum/action/cooldown/spell/pointed/manse_link/before_cast(mob/living/cast_on)
. = ..()
if(. & SPELL_CANCEL_CAST)
return
// If we fail to link, cancel the spell.
if(!do_linking(cast_on))
return . | SPELL_CANCEL_CAST
/**
* The actual process of linking [linkee] to our network.
*/
/datum/action/cooldown/spell/pointed/manse_link/proc/do_linking(mob/living/linkee)
var/datum/component/mind_linker/linker = target
if(linkee.stat == DEAD)
to_chat(owner, span_warning("They're dead!"))
return FALSE
to_chat(owner, span_notice("You begin linking [linkee]'s mind to yours..."))
to_chat(linkee, span_warning("You feel your mind being pulled somewhere... connected... intertwined with the very fabric of reality..."))
if(!do_after(owner, link_time, linkee))
to_chat(owner, span_warning("You fail to link to [linkee]'s mind."))
to_chat(linkee, span_warning("The foreign presence leaves your mind."))
return FALSE
if(QDELETED(src) || QDELETED(owner) || QDELETED(linkee))
return FALSE
if(!linker.link_mob(linkee))
to_chat(owner, span_warning("You can't seem to link to [linkee]'s mind."))
to_chat(linkee, span_warning("The foreign presence leaves your mind."))
return FALSE
return TRUE
// Given to heretic monsters.
/datum/action/cooldown/spell/pointed/blind/eldritch
name = "Eldritch Blind"
background_icon_state = "bg_heretic"
overlay_icon_state = "bg_heretic_border"
school = SCHOOL_FORBIDDEN
invocation = "E'E'S"
spell_requirements = SPELL_CASTABLE_WITHOUT_INVOCATION | SPELL_REQUIRES_NO_ANTIMAGIC
cast_range = 10
/obj/effect/temp_visual/dir_setting/entropic
icon = 'icons/effects/160x160.dmi'
icon_state = "entropic_plume"
duration = 3 SECONDS
/obj/effect/temp_visual/dir_setting/entropic/setDir(dir)
. = ..()
switch(dir)
if(NORTH)
pixel_x = -64
if(SOUTH)
pixel_x = -64
pixel_y = -128
if(EAST)
pixel_y = -64
if(WEST)
pixel_y = -64
pixel_x = -128
/obj/effect/glowing_rune
icon = 'icons/effects/eldritch.dmi'
icon_state = "small_rune_1"
layer = LOW_SIGIL_LAYER
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
/obj/effect/glowing_rune/Initialize(mapload)
. = ..()
pixel_y = rand(-6,6)
pixel_x = rand(-6,6)
icon_state = "small_rune_[rand(12)]"
update_appearance(UPDATE_ICON)
// Action for Raw Prophets that boosts up or shrinks down their sight range.
/datum/action/innate/expand_sight
name = "Expand Sight"
desc = "Boosts your sight range considerably, allowing you to see enemies from much further away."
background_icon = 'icons/mob/actions/actions_ecult.dmi'
button_icon_state = "eye"
background_icon_state = "bg_heretic"
overlay_icon_state = "bg_heretic_border"
/// How far we expand the range to.
var/boost_to = 5
/// A cooldown for the last time we toggled it, to prevent spam.
COOLDOWN_DECLARE(last_toggle)
/datum/action/innate/expand_sight/IsAvailable(feedback = FALSE)
return ..() && COOLDOWN_FINISHED(src, last_toggle)
/datum/action/innate/expand_sight/Activate()
active = TRUE
owner.client?.view_size.setTo(boost_to)
playsound(owner, pick('sound/hallucinations/i_see_you1.ogg', 'sound/hallucinations/i_see_you2.ogg'), 50, TRUE, ignore_walls = FALSE)
COOLDOWN_START(src, last_toggle, 8 SECONDS)
/datum/action/innate/expand_sight/Deactivate()
active = FALSE
owner.client?.view_size.resetToDefault()
COOLDOWN_START(src, last_toggle, 4 SECONDS)