mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 13:37:58 +01:00
Adds summon supermatter, a new wizard spell (#21096)
* Devious intent * bam * also this * Update code/game/gamemodes/wizard/spellbook.dm Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> * now a shard * Update code/datums/spells/summon_supermatter.dm Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * Update code/game/gamemodes/wizard/spellbook.dm Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * improved code * log name removal * good enough * conflict * sprite by mcramon --------- Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>
This commit is contained in:
co-authored by
Contrabang
Henri215
parent
094ca3c733
commit
b05e27bb17
@@ -202,6 +202,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
|
||||
#define TRAIT_UNREVIVABLE "unrevivable" // Prevents changeling revival
|
||||
#define TRAIT_CULT_IMMUNITY "cult_immunity"
|
||||
#define TRAIT_FLATTENED "flattened"
|
||||
#define SM_HALLUCINATION_IMMUNE "supermatter_hallucination_immune"
|
||||
|
||||
//***** ITEM AND MOB TRAITS *****//
|
||||
/// Show what machine/door wires do when held.
|
||||
|
||||
@@ -74,7 +74,8 @@ GLOBAL_LIST_INIT(traits_by_type, list(
|
||||
"TRAIT_CULT_IMMUNITY" = TRAIT_CULT_IMMUNITY,
|
||||
"TRAIT_SHOW_WIRE_INFO" = TRAIT_SHOW_WIRE_INFO,
|
||||
"TRAIT_CAN_BE_EATEN_BY_LIZARDS" = TRAIT_EDIBLE_BUG,
|
||||
"TRAIT_FLATTENED" = TRAIT_FLATTENED
|
||||
"TRAIT_FLATTENED" = TRAIT_FLATTENED,
|
||||
"TRAIT_SM_HALLUCINATION_IMMUNE" = SM_HALLUCINATION_IMMUNE
|
||||
),
|
||||
/obj/item = list(
|
||||
"TRAIT_SHOW_WIRE_INFO" = TRAIT_SHOW_WIRE_INFO,
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
return targeting
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe/conjure/cast(list/targets,mob/living/user = usr)
|
||||
var/list/what_conjure_summoned = list()
|
||||
playsound(get_turf(user), cast_sound, 50,1)
|
||||
for(var/turf/T in targets)
|
||||
if(T.density && !summon_ignore_density)
|
||||
@@ -41,6 +42,7 @@
|
||||
O.ChangeTurf(N)
|
||||
else
|
||||
var/atom/summoned_object = new summoned_object_type(spawn_place)
|
||||
what_conjure_summoned += summoned_object
|
||||
|
||||
for(var/varName in newVars)
|
||||
if(varName in summoned_object.vars)
|
||||
@@ -53,7 +55,7 @@
|
||||
cooldown_handler.start_recharge(0.5 SECONDS)
|
||||
|
||||
|
||||
return
|
||||
return what_conjure_summoned
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe/conjure/summonEdSwarm //test purposes
|
||||
name = "Dispense Wizard Justice"
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
/obj/effect/proc_holder/spell/aoe/conjure/summon_supermatter
|
||||
name = "Summon Supermatter Crystal"
|
||||
desc = "Summons an active supermatter crystal. Imbues you with some supermatter, giving you resistance to it's hallucinations and radiation immunity."
|
||||
base_cooldown = 5 MINUTES
|
||||
cooldown_min = 60 SECONDS
|
||||
summon_type = list(/obj/machinery/atmospherics/supermatter_crystal/shard)
|
||||
action_icon_state = "summon_supermatter"
|
||||
summon_amt = 1
|
||||
aoe_range = 0
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe/conjure/summon_supermatter/cast(list/targets, mob/living/user = usr)
|
||||
var/list/summoned_objects = ..()
|
||||
to_chat(world, "[length(summoned_objects)]")
|
||||
for(var/obj/machinery/atmospherics/supermatter_crystal/our_crystal in summoned_objects)
|
||||
addtimer(CALLBACK(our_crystal, TYPE_PROC_REF(/obj/machinery/atmospherics/supermatter_crystal, manual_start), 3000), 3 SECONDS)
|
||||
@@ -222,6 +222,24 @@
|
||||
REMOVE_TRAIT(user, TRAIT_RESISTHIGHPRESSURE, MAGIC_TRAIT)
|
||||
return ..()
|
||||
|
||||
/datum/spellbook_entry/summon_supermatter
|
||||
name = "Summon Supermatter Crystal"
|
||||
spell_type = /obj/effect/proc_holder/spell/aoe/conjure/summon_supermatter
|
||||
cost = 3
|
||||
category = "Defensive"
|
||||
|
||||
/datum/spellbook_entry/summon_supermatter/LearnSpell(mob/living/carbon/human/user, obj/item/spellbook/book, obj/effect/proc_holder/spell/newspell)
|
||||
to_chat(user, "<span class='notice'>You feel a little bit of supermatter enter your body.</span>")
|
||||
ADD_TRAIT(user, TRAIT_RADIMMUNE, MAGIC_TRAIT)
|
||||
ADD_TRAIT(user, SM_HALLUCINATION_IMMUNE, MAGIC_TRAIT)
|
||||
return ..()
|
||||
|
||||
/datum/spellbook_entry/summon_supermatter/Refund(mob/living/carbon/human/user, obj/item/spellbook/book)
|
||||
to_chat(user, "<span class='warning'>A little bit of supermatter leaves your body. So does that metallic taste in your mouth.</span>")
|
||||
REMOVE_TRAIT(user, TRAIT_RADIMMUNE, MAGIC_TRAIT)
|
||||
REMOVE_TRAIT(user, SM_HALLUCINATION_IMMUNE, MAGIC_TRAIT)
|
||||
return ..()
|
||||
|
||||
//Mobility
|
||||
/datum/spellbook_entry/knock
|
||||
name = "Knock"
|
||||
|
||||
@@ -545,7 +545,7 @@
|
||||
|
||||
//Makes em go mad and accumulate rads.
|
||||
for(var/mob/living/carbon/human/l in view(src, HALLUCINATION_RANGE(power))) // If they can see it without mesons on. Bad on them.
|
||||
if(!istype(l.glasses, /obj/item/clothing/glasses/meson) && !HAS_TRAIT(l, TRAIT_MESON_VISION))
|
||||
if(!istype(l.glasses, /obj/item/clothing/glasses/meson) && !HAS_TRAIT(l, TRAIT_MESON_VISION) && !HAS_TRAIT(l, SM_HALLUCINATION_IMMUNE))
|
||||
var/D = sqrt(1 / max(1, get_dist(l, src)))
|
||||
var/hallucination_amount = power * hallucination_power * D
|
||||
l.AdjustHallucinate(hallucination_amount, 0, 200 SECONDS)
|
||||
@@ -1129,6 +1129,11 @@
|
||||
targets_hit = targets_hit.Copy() //Pass by ref begone
|
||||
supermatter_zap(target, new_range, zap_str, zap_flags, targets_hit)
|
||||
|
||||
/obj/machinery/atmospherics/supermatter_crystal/proc/manual_start(amount)
|
||||
has_been_powered = TRUE
|
||||
power += amount
|
||||
message_admins("[src] has been activated and given an increase EER of [amount] at [ADMIN_JMP(src)]")
|
||||
|
||||
#undef HALLUCINATION_RANGE
|
||||
#undef GRAVITATIONAL_ANOMALY
|
||||
#undef FLUX_ANOMALY
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 138 KiB After Width: | Height: | Size: 138 KiB |
@@ -517,6 +517,7 @@
|
||||
#include "code\datums\spells\sentient_sword_lunge.dm"
|
||||
#include "code\datums\spells\shapeshift.dm"
|
||||
#include "code\datums\spells\spacetime_dist.dm"
|
||||
#include "code\datums\spells\summon_supermatter.dm"
|
||||
#include "code\datums\spells\summonitem.dm"
|
||||
#include "code\datums\spells\touch_attacks.dm"
|
||||
#include "code\datums\spells\trigger.dm"
|
||||
|
||||
Reference in New Issue
Block a user