diff --git a/code/__HELPERS/trait_helpers.dm b/code/__HELPERS/trait_helpers.dm index 6d165280232..387fdae5c68 100644 --- a/code/__HELPERS/trait_helpers.dm +++ b/code/__HELPERS/trait_helpers.dm @@ -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. diff --git a/code/_globalvars/traits.dm b/code/_globalvars/traits.dm index a6b2bc9abca..ddf721f7632 100644 --- a/code/_globalvars/traits.dm +++ b/code/_globalvars/traits.dm @@ -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, diff --git a/code/datums/spells/conjure.dm b/code/datums/spells/conjure.dm index 14577ff7c01..6c32400744a 100644 --- a/code/datums/spells/conjure.dm +++ b/code/datums/spells/conjure.dm @@ -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" diff --git a/code/datums/spells/summon_supermatter.dm b/code/datums/spells/summon_supermatter.dm new file mode 100644 index 00000000000..f489b2c4e9a --- /dev/null +++ b/code/datums/spells/summon_supermatter.dm @@ -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) diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm index 673e827ad34..d7b06253437 100644 --- a/code/game/gamemodes/wizard/spellbook.dm +++ b/code/game/gamemodes/wizard/spellbook.dm @@ -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, "You feel a little bit of supermatter enter your body.") + 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, "A little bit of supermatter leaves your body. So does that metallic taste in your mouth.") + REMOVE_TRAIT(user, TRAIT_RADIMMUNE, MAGIC_TRAIT) + REMOVE_TRAIT(user, SM_HALLUCINATION_IMMUNE, MAGIC_TRAIT) + return ..() + //Mobility /datum/spellbook_entry/knock name = "Knock" diff --git a/code/modules/power/engines/supermatter/supermatter.dm b/code/modules/power/engines/supermatter/supermatter.dm index 9870359be57..7bd21a5bc23 100644 --- a/code/modules/power/engines/supermatter/supermatter.dm +++ b/code/modules/power/engines/supermatter/supermatter.dm @@ -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 diff --git a/icons/mob/actions/actions.dmi b/icons/mob/actions/actions.dmi index 12c05652a3a..e52e343bf03 100644 Binary files a/icons/mob/actions/actions.dmi and b/icons/mob/actions/actions.dmi differ diff --git a/paradise.dme b/paradise.dme index 1d8ab963f1b..5d6210011b7 100644 --- a/paradise.dme +++ b/paradise.dme @@ -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"