diff --git a/code/game/gamemodes/technomancer/core_obj.dm b/code/game/gamemodes/technomancer/core_obj.dm index 48c45f3f06..fc89f5ce69 100644 --- a/code/game/gamemodes/technomancer/core_obj.dm +++ b/code/game/gamemodes/technomancer/core_obj.dm @@ -86,6 +86,8 @@ if(wearer && wearer.mind) if(!(technomancers.is_antagonist(wearer.mind))) // In case someone tries to wear a stolen core. wearer.adjust_instability(20) + if(!wearer || wearer.stat == DEAD) // Unlock if we're dead or not worn. + canremove = TRUE /obj/item/weapon/technomancer_core/proc/regenerate() energy = min(max(energy + regen_rate, 0), max_energy) @@ -287,4 +289,12 @@ /obj/item/weapon/technomancer_core/summoner/pay_dues() if(summoned_mobs.len) - pay_energy( round(summoned_mobs.len) ) \ No newline at end of file + pay_energy( round(summoned_mobs.len) ) + +/obj/item/weapon/technomancer_core/verb/toggle_lock() + set name = "Toggle Core Lock" + set category = "Object" + set desc = "Toggles the locking mechanism on your manipulation core." + + canremove = !canremove + to_chat(usr, "You [canremove ? "de" : ""]activate the locking mechanism on \the [src].") \ No newline at end of file diff --git a/code/game/gamemodes/technomancer/equipment.dm b/code/game/gamemodes/technomancer/equipment.dm index 54cae5670e..97978086b3 100644 --- a/code/game/gamemodes/technomancer/equipment.dm +++ b/code/game/gamemodes/technomancer/equipment.dm @@ -139,6 +139,7 @@ icon = 'icons/obj/technomancer.dmi' icon_state = "scepter" force = 15 + slot_flags = SLOT_BELT /obj/item/weapon/scepter/attack_self(mob/living/carbon/human/user) var/obj/item/item_to_test = user.get_other_hand(src) diff --git a/code/game/gamemodes/technomancer/instability.dm b/code/game/gamemodes/technomancer/instability.dm index 0de94cba7a..8f9eebeb17 100644 --- a/code/game/gamemodes/technomancer/instability.dm +++ b/code/game/gamemodes/technomancer/instability.dm @@ -5,15 +5,15 @@ // Proc: adjust_instability() // Parameters: 0 // Description: Does nothing, because inheritence. -/mob/living/proc/adjust_instability() - return +/mob/living/proc/adjust_instability(var/amount) + instability = min(max(instability + amount, 0), 200) // Proc: adjust_instability() // Parameters: 1 (amount - how much instability to give) // Description: Adds or subtracks instability to the mob, then updates the hud. /mob/living/carbon/human/adjust_instability(var/amount) - instability = min(max(instability + amount, 0), 200) instability_update_hud() + ..() // Proc: instability_update_hud() // Parameters: 0 @@ -35,7 +35,7 @@ // Proc: Life() // Parameters: 0 // Description: Makes instability tick along with Life(). -/mob/living/carbon/human/Life() +/mob/living/Life() . = ..() handle_instability() @@ -43,9 +43,8 @@ // Parameters: 0 // Description: Makes instability decay. instability_effects() handles the bad effects for having instability. It will also hold back // from causing bad effects more than one every ten seconds, to prevent sudden death from angry RNG. -/mob/living/carbon/human/proc/handle_instability() +/mob/living/proc/handle_instability() instability = round(Clamp(instability, 0, 200)) - instability_update_hud() //This should cushon against really bad luck. if(instability && last_instability_event < (world.time - 10 SECONDS) && prob(20)) instability_effects() @@ -65,6 +64,10 @@ if(101 to 200) adjust_instability(-40) +/mob/living/carbon/human/handle_instability() + ..() + instability_update_hud() + /* [16:18:08] Sparks [16:18:10] Wormholes @@ -78,17 +81,85 @@ // Parameters: 0 // Description: Does a variety of bad effects to the entity holding onto the instability, with more severe effects occuring if they have // a lot of instability. -/mob/living/carbon/human/proc/instability_effects() +/mob/living/proc/instability_effects() + last_instability_event = world.time + spawn(1) + var/image/instability_flash = image('icons/obj/spells.dmi',"instability") + overlays |= instability_flash + sleep(4) + overlays.Remove(instability_flash) + qdel(instability_flash) + radiate_instability() + +/mob/living/silicon/instability_effects() if(instability) var/rng = 0 - last_instability_event = world.time - spawn(1) - var/image/instability_flash = image('icons/obj/spells.dmi',"instability") - overlays |= instability_flash - sleep(4) - overlays.Remove(instability_flash) - qdel(instability_flash) - radiate_instability() + ..() + switch(instability) + if(1 to 10) //Harmless + return + if(11 to 30) //Minor + rng = rand(0,1) + switch(rng) + if(0) + var/datum/effect/effect/system/spark_spread/sparks = PoolOrNew(/datum/effect/effect/system/spark_spread) + sparks.set_up(5, 0, src) + sparks.attach(loc) + sparks.start() + visible_message("Electrical sparks manifest from nowhere around \the [src]!") + qdel(sparks) + if(1) + return + + if(31 to 50) //Moderate + rng = rand(0,4) + switch(rng) + if(0) + electrocute_act(instability * 0.3, "unstable energies") + if(1) + adjustFireLoss(instability * 0.15) //7.5 burn @ 50 instability + src << "Your chassis alerts you to overheating from an unknown external force!" + if(2) + adjustBruteLoss(instability * 0.15) //7.5 brute @ 50 instability + src << "Your chassis makes the sound of metal groaning!" + if(3) + safe_blink(src, range = 6) + src << "You're teleported against your will!" + if(4) + emp_act(2) + + if(51 to 100) //Severe + rng = rand(0,3) + switch(rng) + if(0) + electrocute_act(instability * 0.5, "extremely unstable energies") + if(1) + emp_act(2) + if(2) + adjustFireLoss(instability * 0.3) //30 burn @ 100 instability + src << "Your chassis alerts you to extreme overheating from an unknown external force!" + if(3) + adjustBruteLoss(instability * 0.3) //30 brute @ 100 instability + src << "Your chassis makes the sound of metal groaning and tearing!" + + if(101 to 200) //Lethal + rng = rand(0,4) + switch(rng) + if(0) + electrocute_act(instability, "extremely unstable energies") + if(1) + emp_act(1) + if(2) + adjustFireLoss(instability * 0.4) //40 burn @ 100 instability + src << "Your chassis alerts you to extreme overheating from an unknown external force!" + if(3) + adjustBruteLoss(instability * 0.4) //40 brute @ 100 instability + src << "Your chassis makes the sound of metal groaning and tearing!" + +/mob/living/carbon/human/instability_effects() + if(instability) + var/rng = 0 + ..() switch(instability) if(1 to 10) //Harmless return @@ -194,7 +265,7 @@ if(7) adjustToxLoss(instability * 0.40) //25 tox @ 100 instability -/mob/living/carbon/human/proc/radiate_instability() +/mob/living/proc/radiate_instability() var/distance = round(sqrt(instability / 2)) if(instability <= 30) distance = 0 @@ -210,6 +281,8 @@ var/armor = getarmor(null, "energy") var/armor_factor = abs( (armor - 100) / 100) outgoing_instability = outgoing_instability * armor_factor + if(outgoing_instability) + to_chat(H, "The purple glow makes you feel strange...") H.adjust_instability(outgoing_instability) set_light(distance, distance * 2, l_color = "#C26DDE") diff --git a/code/game/gamemodes/technomancer/spells/aspect_aura.dm b/code/game/gamemodes/technomancer/spells/aspect_aura.dm index 36b2a7c344..577f356229 100644 --- a/code/game/gamemodes/technomancer/spells/aspect_aura.dm +++ b/code/game/gamemodes/technomancer/spells/aspect_aura.dm @@ -73,7 +73,7 @@ var/turf/location = get_turf(H) location.hotspot_expose(1000, 50, 1) - owner.adjust_instability(1) + adjust_instability(1) /obj/item/weapon/spell/aura/frost name = "chilling aura" @@ -95,7 +95,7 @@ var/turf/location = get_turf(H) location.hotspot_expose(1, 50, 1) - owner.adjust_instability(1) + adjust_instability(1) @@ -128,7 +128,7 @@ for(var/mob/living/L in mobs_to_heal) L.adjustBruteLoss(-5) L.adjustFireLoss(-5) - owner.adjust_instability(2) + adjust_instability(2) /obj/item/weapon/spell/aura/biomed/on_use_cast(mob/living/user) heal_allies_only = !heal_allies_only diff --git a/code/game/gamemodes/technomancer/spells/audible_deception.dm b/code/game/gamemodes/technomancer/spells/audible_deception.dm index 17a1d9db20..832714f202 100644 --- a/code/game/gamemodes/technomancer/spells/audible_deception.dm +++ b/code/game/gamemodes/technomancer/spells/audible_deception.dm @@ -76,10 +76,10 @@ var/turf/T = get_turf(hit_atom) if(selected_sound && pay_energy(200)) playsound(T, selected_sound, 80, 1, -1) - owner.adjust_instability(1) + adjust_instability(1) // Air Horn time. if(selected_sound == 'sound/items/AirHorn.ogg' && pay_energy(3800)) - owner.adjust_instability(49) // Pay for your sins. + adjust_instability(49) // Pay for your sins. for(var/mob/living/carbon/M in ohearers(6, T)) if(M.get_ear_protection() >= 2) continue diff --git a/code/game/gamemodes/technomancer/spells/aura/biomed_aura.dm b/code/game/gamemodes/technomancer/spells/aura/biomed_aura.dm index 024002814e..7eee612b8f 100644 --- a/code/game/gamemodes/technomancer/spells/aura/biomed_aura.dm +++ b/code/game/gamemodes/technomancer/spells/aura/biomed_aura.dm @@ -12,7 +12,7 @@ icon_state = "generic" cast_methods = null aspect = ASPECT_BIOMED - glow_color = "#0000FF" + glow_color = "#33CC33" var/regen_tick = 0 var/heal_allies_only = 1 @@ -23,16 +23,16 @@ if(regen_tick % 5 == 0) var/list/nearby_mobs = range(4,owner) var/list/mobs_to_heal = list() - if(heal_allies_only) - for(var/mob/living/L in nearby_mobs) + for(var/mob/living/L in nearby_mobs) + if(heal_allies_only) if(is_ally(L)) mobs_to_heal |= L - else - mobs_to_heal = nearby_mobs //Heal everyone! + else + mobs_to_heal |= L // Heal everyone! for(var/mob/living/L in mobs_to_heal) L.adjustBruteLoss(-2) L.adjustFireLoss(-2) - owner.adjust_instability(2) + adjust_instability(2) /obj/item/weapon/spell/aura/biomed/on_use_cast(mob/living/user) heal_allies_only = !heal_allies_only diff --git a/code/game/gamemodes/technomancer/spells/aura/fire_aura.dm b/code/game/gamemodes/technomancer/spells/aura/fire_aura.dm index 5e1028192b..431828ed54 100644 --- a/code/game/gamemodes/technomancer/spells/aura/fire_aura.dm +++ b/code/game/gamemodes/technomancer/spells/aura/fire_aura.dm @@ -47,4 +47,4 @@ T.hotspot_expose(1000, 50, 1) T.create_fire(fire_power) - owner.adjust_instability(1) \ No newline at end of file + adjust_instability(1) \ No newline at end of file diff --git a/code/game/gamemodes/technomancer/spells/aura/frost_aura.dm b/code/game/gamemodes/technomancer/spells/aura/frost_aura.dm index 610702646d..4ed1a469c1 100644 --- a/code/game/gamemodes/technomancer/spells/aura/frost_aura.dm +++ b/code/game/gamemodes/technomancer/spells/aura/frost_aura.dm @@ -36,4 +36,4 @@ var/cold_factor = abs(protection - 1) H.bodytemperature = max( (H.bodytemperature - temp_change) * cold_factor, temp_cap) - owner.adjust_instability(1) \ No newline at end of file + adjust_instability(1) \ No newline at end of file diff --git a/code/game/gamemodes/technomancer/spells/aura/shock_aura.dm b/code/game/gamemodes/technomancer/spells/aura/shock_aura.dm index 70ae416ec0..b4c6027d9d 100644 --- a/code/game/gamemodes/technomancer/spells/aura/shock_aura.dm +++ b/code/game/gamemodes/technomancer/spells/aura/shock_aura.dm @@ -39,4 +39,4 @@ L.electrocute_act(power, src, 1.0, BP_TORSO) - owner.adjust_instability(3) \ No newline at end of file + adjust_instability(3) \ No newline at end of file diff --git a/code/game/gamemodes/technomancer/spells/aura/unstable_aura.dm b/code/game/gamemodes/technomancer/spells/aura/unstable_aura.dm index 15aae46ad3..726e7d87b1 100644 --- a/code/game/gamemodes/technomancer/spells/aura/unstable_aura.dm +++ b/code/game/gamemodes/technomancer/spells/aura/unstable_aura.dm @@ -40,4 +40,4 @@ L << "You feel almost like you're melting from the inside!" - owner.adjust_instability(2) \ No newline at end of file + adjust_instability(2) \ No newline at end of file diff --git a/code/game/gamemodes/technomancer/spells/control.dm b/code/game/gamemodes/technomancer/spells/control.dm index 17fb821d35..0cee9a9350 100644 --- a/code/game/gamemodes/technomancer/spells/control.dm +++ b/code/game/gamemodes/technomancer/spells/control.dm @@ -150,7 +150,7 @@ attack \the [L]." //This is to stop someone from controlling beepsky and getting him to stun someone 5 times a second. user.setClickCooldown(8) - owner.adjust_instability(controlled_mobs.len) + adjust_instability(controlled_mobs.len) else if(isturf(hit_atom)) var/turf/T = hit_atom @@ -159,7 +159,7 @@ return 0 if(pay_energy(50 * controlled_mobs.len)) move_all(T) - owner.adjust_instability(controlled_mobs.len) + adjust_instability(controlled_mobs.len) user << "You command your [controlled_mobs.len > 1 ? "entities" : "[controlled_mobs[1]]"] to move \ towards \the [T]." diff --git a/code/game/gamemodes/technomancer/spells/flame_tongue.dm b/code/game/gamemodes/technomancer/spells/flame_tongue.dm index 923cde0b9d..79e613aa0f 100644 --- a/code/game/gamemodes/technomancer/spells/flame_tongue.dm +++ b/code/game/gamemodes/technomancer/spells/flame_tongue.dm @@ -46,7 +46,7 @@ visible_message("\The [user] reaches out towards \the [L] with the flaming hand, and they ignite!") L << "You ignite!" L.fire_act() - owner.adjust_instability(12) + adjust_instability(12) else //This is needed in order for the welder to work, and works similarly to grippers. welder.loc = user @@ -54,7 +54,7 @@ if(!resolved && welder && hit_atom) if(pay_energy(500)) welder.attack(hit_atom, user, def_zone) - owner.adjust_instability(4) + adjust_instability(4) if(welder && user && (welder.loc == user)) welder.loc = src else diff --git a/code/game/gamemodes/technomancer/spells/insert/mend_burns.dm b/code/game/gamemodes/technomancer/spells/insert/mend_burns.dm index 6588f1617f..ff6d3dfdd6 100644 --- a/code/game/gamemodes/technomancer/spells/insert/mend_burns.dm +++ b/code/game/gamemodes/technomancer/spells/insert/mend_burns.dm @@ -1,7 +1,6 @@ /datum/technomancer/spell/mend_burns name = "Mend Burns" - desc = "Heals minor burns, such as from exposure to flame, electric shock, or lasers. \ - Instability is split between the target and technomancer, if seperate." + desc = "Heals minor burns, such as from exposure to flame, electric shock, or lasers." cost = 50 obj_path = /obj/item/weapon/spell/insert/mend_burns ability_icon_state = "tech_mendburns" @@ -20,10 +19,10 @@ spawn(1) if(ishuman(host)) var/mob/living/carbon/human/H = host + var/heal_power = host == origin ? 10 : 30 + origin.adjust_instability(10) for(var/i = 0, i<5,i++) if(H) - H.adjustFireLoss(-5) - H.adjust_instability(2.5) - origin.adjust_instability(2.5) - sleep(10) + H.adjustFireLoss(-heal_power / 5) + sleep(1 SECOND) on_expire() \ No newline at end of file diff --git a/code/game/gamemodes/technomancer/spells/insert/mend_metal.dm b/code/game/gamemodes/technomancer/spells/insert/mend_metal.dm index 7ad6976b54..5b3f1bdc2b 100644 --- a/code/game/gamemodes/technomancer/spells/insert/mend_metal.dm +++ b/code/game/gamemodes/technomancer/spells/insert/mend_metal.dm @@ -1,6 +1,6 @@ /datum/technomancer/spell/mend_metal name = "Mend Metal" - desc = "Restores integrity to external robotic components. Instability is split between the target and technomancer, if seperate." + desc = "Restores integrity to external robotic components." cost = 50 obj_path = /obj/item/weapon/spell/insert/mend_metal ability_icon_state = "tech_mendwounds" @@ -19,14 +19,13 @@ spawn(1) if(ishuman(host)) var/mob/living/carbon/human/H = host + var/heal_power = host == origin ? 10 : 30 + origin.adjust_instability(10) for(var/i = 0, i<5,i++) if(H) for(var/obj/item/organ/external/O in H.organs) if(O.robotic < ORGAN_ROBOT) // Robot parts only. continue - O.heal_damage(5, 0, internal = 1, robo_repair = 1) - - H.adjust_instability(2.5) - origin.adjust_instability(2.5) + O.heal_damage(heal_power / 5, 0, internal = 1, robo_repair = 1) sleep(1 SECOND) on_expire() \ No newline at end of file diff --git a/code/game/gamemodes/technomancer/spells/insert/mend_organs.dm b/code/game/gamemodes/technomancer/spells/insert/mend_organs.dm index a43bb7611d..294393cbb4 100644 --- a/code/game/gamemodes/technomancer/spells/insert/mend_organs.dm +++ b/code/game/gamemodes/technomancer/spells/insert/mend_organs.dm @@ -1,15 +1,15 @@ /datum/technomancer/spell/mend_organs - name = "Mend Organs" - desc = "Heals the target's internal organs, both organic and robotic. Instability is split between the target \ - and technomancer, if seperate." - cost = 50 + name = "Great Mend Wounds" + desc = "Greatly heals the target's wounds, both external and internal. Restores internal organs to functioning states, even if \ + robotic, reforms bones, patches internal bleeding, and restores missing blood." + cost = 100 obj_path = /obj/item/weapon/spell/insert/mend_organs ability_icon_state = "tech_mendwounds" category = SUPPORT_SPELLS /obj/item/weapon/spell/insert/mend_organs - name = "mend organs" - desc = "Now nobody will ever need surgery." + name = "great mend wounds" + desc = "A walking medbay is now you!" icon_state = "mend_wounds" cast_methods = CAST_MELEE aspect = ASPECT_BIOMED @@ -20,13 +20,33 @@ spawn(1) if(ishuman(host)) var/mob/living/carbon/human/H = host + var/heal_power = host == origin ? 2 : 5 + origin.adjust_instability(15) + for(var/i = 0, i<5,i++) if(H) for(var/obj/item/organ/O in H.internal_organs) - if(O.damage > 0) - O.damage = max(O.damage - 1, 0) + if(O.damage > 0) // Fix internal damage + O.damage = max(O.damage - (heal_power / 5), 0) + if(O.damage <= 5 && O.organ_tag == O_EYES) // Fix eyes + H.sdisabilities &= ~BLIND + + for(var/obj/item/organ/external/O in H.organs) // Fix limbs + if(!O.robotic < ORGAN_ROBOT) // No robot parts for this. + continue + O.heal_damage(0, heal_power / 5, internal = 1, robo_repair = 0) + + for(var/obj/item/organ/E in H.bad_external_organs) // Fix bones + var/obj/item/organ/external/affected = E + if((affected.damage < affected.min_broken_damage * config.organ_health_multiplier) && (affected.status & ORGAN_BROKEN)) + affected.status &= ~ORGAN_BROKEN + + for(var/datum/wound/W in affected.wounds) // Fix IB + if(istype(W, /datum/wound/internal_bleeding)) + affected.wounds -= W + affected.update_damages() + + H.restore_blood() // Fix bloodloss - H.adjust_instability(2.5) - origin.adjust_instability(2.5) sleep(1 SECOND) on_expire() \ No newline at end of file diff --git a/code/game/gamemodes/technomancer/spells/insert/mend_wires.dm b/code/game/gamemodes/technomancer/spells/insert/mend_wires.dm index fbafb7c044..089a02152c 100644 --- a/code/game/gamemodes/technomancer/spells/insert/mend_wires.dm +++ b/code/game/gamemodes/technomancer/spells/insert/mend_wires.dm @@ -1,7 +1,6 @@ /datum/technomancer/spell/mend_wires name = "Mend Wires" - desc = "Binds the internal wiring of robotic limbs and components over time. \ - Instability is split between the target and technomancer, if seperate." + desc = "Binds the internal wiring of robotic limbs and components over time." cost = 50 obj_path = /obj/item/weapon/spell/insert/mend_wires ability_icon_state = "tech_mendwounds" @@ -20,14 +19,13 @@ spawn(1) if(ishuman(host)) var/mob/living/carbon/human/H = host + var/heal_power = host == origin ? 10 : 30 + origin.adjust_instability(10) for(var/i = 0, i<5,i++) if(H) for(var/obj/item/organ/external/O in H.organs) if(O.robotic < ORGAN_ROBOT) // Robot parts only. continue - O.heal_damage(0, 5, internal = 1, robo_repair = 1) - - H.adjust_instability(2.5) - origin.adjust_instability(2.5) - sleep(10) + O.heal_damage(0, heal_power / 5, internal = 1, robo_repair = 1) + sleep(1 SECOND) on_expire() \ No newline at end of file diff --git a/code/game/gamemodes/technomancer/spells/insert/mend_wounds.dm b/code/game/gamemodes/technomancer/spells/insert/mend_wounds.dm index c1c507b552..60e334cb39 100644 --- a/code/game/gamemodes/technomancer/spells/insert/mend_wounds.dm +++ b/code/game/gamemodes/technomancer/spells/insert/mend_wounds.dm @@ -20,10 +20,10 @@ spawn(1) if(ishuman(host)) var/mob/living/carbon/human/H = host + var/heal_power = host == origin ? 10 : 30 + origin.adjust_instability(10) for(var/i = 0, i<5,i++) if(H) - H.adjustBruteLoss(-5) - H.adjust_instability(2.5) - origin.adjust_instability(2.5) + H.adjustBruteLoss(-heal_power / 5) sleep(1 SECOND) on_expire() diff --git a/code/game/gamemodes/technomancer/spells/insert/purify.dm b/code/game/gamemodes/technomancer/spells/insert/purify.dm index 7ca94f78e6..dc0003f802 100644 --- a/code/game/gamemodes/technomancer/spells/insert/purify.dm +++ b/code/game/gamemodes/technomancer/spells/insert/purify.dm @@ -1,7 +1,6 @@ /datum/technomancer/spell/purify name = "Purify" - desc = "Clenses the body of harmful impurities, such as toxins, radiation, viruses, genetic damage, and such. \ - Instability is split between the target and technomancer, if seperate." + desc = "Clenses the body of harmful impurities, such as toxins, radiation, viruses, genetic damage, and such." cost = 25 obj_path = /obj/item/weapon/spell/insert/purify ability_icon_state = "tech_purify" @@ -24,12 +23,12 @@ H.disabilities = 0 // for(var/datum/disease/D in H.viruses) // D.cure() + var/heal_power = host == origin ? 10 : 30 + origin.adjust_instability(10) for(var/i = 0, i<5,i++) if(H) - H.adjustToxLoss(-5) - H.adjustCloneLoss(-5) - H.radiation = max(host.radiation - 10, 0) - H.adjust_instability(2.5) - origin.adjust_instability(2.5) + H.adjustToxLoss(-heal_power / 5) + H.adjustCloneLoss(-heal_power / 5) + H.radiation = max(host.radiation - ( (heal_power * 2) / 5), 0) sleep(1 SECOND) on_expire() diff --git a/code/game/gamemodes/technomancer/spells/instability_tap.dm b/code/game/gamemodes/technomancer/spells/instability_tap.dm index 8ad52f3b3f..ea1e9ff2e4 100644 --- a/code/game/gamemodes/technomancer/spells/instability_tap.dm +++ b/code/game/gamemodes/technomancer/spells/instability_tap.dm @@ -20,8 +20,8 @@ /obj/item/weapon/spell/instability_tap/on_use_cast(mob/user) if(check_for_scepter()) core.give_energy(7500) - owner.adjust_instability(40) + adjust_instability(40) else core.give_energy(5000) - owner.adjust_instability(50) + adjust_instability(50) qdel(src) \ No newline at end of file diff --git a/code/game/gamemodes/technomancer/spells/mark_recall.dm b/code/game/gamemodes/technomancer/spells/mark_recall.dm index 528b860094..e47b62c031 100644 --- a/code/game/gamemodes/technomancer/spells/mark_recall.dm +++ b/code/game/gamemodes/technomancer/spells/mark_recall.dm @@ -37,7 +37,7 @@ else mark_spell_ref.forceMove(get_turf(user)) user << "Your mark is moved from its old position to \the [get_turf(user)] under you." - owner.adjust_instability(5) + adjust_instability(5) return 1 else user << "You can't afford the energy cost!" @@ -99,7 +99,7 @@ playsound(old_turf, 'sound/effects/sparks2.ogg', 50, 1) - owner.adjust_instability(25) + adjust_instability(25) qdel(src) return 1 else diff --git a/code/game/gamemodes/technomancer/spells/oxygenate.dm b/code/game/gamemodes/technomancer/spells/oxygenate.dm index f1edc635c1..67451c8c39 100644 --- a/code/game/gamemodes/technomancer/spells/oxygenate.dm +++ b/code/game/gamemodes/technomancer/spells/oxygenate.dm @@ -20,7 +20,7 @@ var/mob/living/carbon/human/H = hit_atom if(pay_energy(1500)) H.adjustOxyLoss(-35) - owner.adjust_instability(10) + adjust_instability(10) return else if(isturf(hit_atom)) var/turf/T = hit_atom @@ -28,4 +28,4 @@ T.assume_gas("oxygen", 200) T.assume_gas("nitrogen", 800) playsound(src.loc, 'sound/effects/spray.ogg', 50, 1, -3) - owner.adjust_instability(10) \ No newline at end of file + adjust_instability(10) \ No newline at end of file diff --git a/code/game/gamemodes/technomancer/spells/phase_shift.dm b/code/game/gamemodes/technomancer/spells/phase_shift.dm index a571d6789d..02cbb6e2bf 100644 --- a/code/game/gamemodes/technomancer/spells/phase_shift.dm +++ b/code/game/gamemodes/technomancer/spells/phase_shift.dm @@ -15,6 +15,7 @@ /obj/item/weapon/spell/phase_shift/New() ..() set_light(3, 2, l_color = "#FA58F4") + processing_objects |= src /obj/effect/phase_shift name = "rift" @@ -32,8 +33,13 @@ /obj/effect/phase_shift/Destroy() for(var/atom/movable/AM in contents) //Eject everything out. AM.forceMove(get_turf(src)) + processing_objects -= src ..() +/obj/effect/phase_shift/process() + for(var/mob/living/L in contents) + L.adjust_instability(2) + /obj/effect/phase_shift/relaymove(mob/user as mob) if(user.stat) return diff --git a/code/game/gamemodes/technomancer/spells/projectile/overload.dm b/code/game/gamemodes/technomancer/spells/projectile/overload.dm index 90bf50e7d6..de4506924d 100644 --- a/code/game/gamemodes/technomancer/spells/projectile/overload.dm +++ b/code/game/gamemodes/technomancer/spells/projectile/overload.dm @@ -36,7 +36,7 @@ P.damage = round(energy_before_firing * 0.004) // 4% of their current energy pool. else P.damage = round(energy_before_firing * 0.003) // 3% of their current energy pool. - owner.adjust_instability(instability_per_shot) + adjust_instability(instability_per_shot) return 1 diff --git a/code/game/gamemodes/technomancer/spells/projectile/projectile.dm b/code/game/gamemodes/technomancer/spells/projectile/projectile.dm index ea2f0db4e3..3c9fe6017c 100644 --- a/code/game/gamemodes/technomancer/spells/projectile/projectile.dm +++ b/code/game/gamemodes/technomancer/spells/projectile/projectile.dm @@ -13,9 +13,10 @@ if(set_up(hit_atom, user)) var/obj/item/projectile/new_projectile = new spell_projectile(get_turf(user)) new_projectile.launch(hit_atom) + log_and_message_admins("has casted [src] at \the [hit_atom].") if(fire_sound) playsound(get_turf(src), fire_sound, 75, 1) - owner.adjust_instability(instability_per_shot) + adjust_instability(instability_per_shot) return 1 return 0 @@ -28,5 +29,8 @@ user.Stun(pre_shot_delay / 10) sleep(pre_shot_delay) qdel(target_image) - return 1 - return 0 \ No newline at end of file + if(owner) + return TRUE + return FALSE // We got dropped before the firing occured. + return TRUE // No delay, no need to check. + return FALSE \ No newline at end of file diff --git a/code/game/gamemodes/technomancer/spells/radiance.dm b/code/game/gamemodes/technomancer/spells/radiance.dm index 7cd7694122..d94b064197 100644 --- a/code/game/gamemodes/technomancer/spells/radiance.dm +++ b/code/game/gamemodes/technomancer/spells/radiance.dm @@ -42,4 +42,4 @@ var/radius = max(get_dist(L, src), 1) var/rads = (power / 10) * ( 1 / (radius**2) ) L.apply_effect(rads, IRRADIATE) - owner.adjust_instability(2) + adjust_instability(2) diff --git a/code/game/gamemodes/technomancer/spells/resurrect.dm b/code/game/gamemodes/technomancer/spells/resurrect.dm index dcdcbb1f18..8d7eca3393 100644 --- a/code/game/gamemodes/technomancer/spells/resurrect.dm +++ b/code/game/gamemodes/technomancer/spells/resurrect.dm @@ -37,7 +37,7 @@ dead_mob_list -= SM living_mob_list += SM SM.icon_state = SM.icon_living - owner.adjust_instability(30) + adjust_instability(30) else if(ishuman(L)) var/mob/living/carbon/human/H = L @@ -57,7 +57,7 @@ H.timeofdeath = null visible_message("\The [H]'s eyes open!") user << "It's alive!" - owner.adjust_instability(100) + adjust_instability(100) else user << "The body of \the [H] doesn't seem to respond, perhaps you could try again?" - owner.adjust_instability(10) \ No newline at end of file + adjust_instability(10) \ No newline at end of file diff --git a/code/game/gamemodes/technomancer/spells/shared_burden.dm b/code/game/gamemodes/technomancer/spells/shared_burden.dm index 95523d99ff..7c3e7447a8 100644 --- a/code/game/gamemodes/technomancer/spells/shared_burden.dm +++ b/code/game/gamemodes/technomancer/spells/shared_burden.dm @@ -24,5 +24,5 @@ if(pay_energy(500)) var/instability_to_drain = min(H.instability, 25) user << "You draw instability away from \the [H] and towards you." - owner.adjust_instability(instability_to_drain) + adjust_instability(instability_to_drain) H.adjust_instability(-instability_to_drain) \ No newline at end of file diff --git a/code/game/gamemodes/technomancer/spells/spawner/darkness.dm b/code/game/gamemodes/technomancer/spells/spawner/darkness.dm index ecb18b3481..eafb167dd4 100644 --- a/code/game/gamemodes/technomancer/spells/spawner/darkness.dm +++ b/code/game/gamemodes/technomancer/spells/spawner/darkness.dm @@ -15,7 +15,7 @@ /obj/item/weapon/spell/spawner/darkness/on_ranged_cast(atom/hit_atom, mob/user) if(pay_energy(500)) - owner.adjust_instability(4) + adjust_instability(4) ..() /obj/item/weapon/spell/spawner/darkness/New() diff --git a/code/game/gamemodes/technomancer/spells/spawner/fire_blast.dm b/code/game/gamemodes/technomancer/spells/spawner/fire_blast.dm index 50ed504b40..1890bfd320 100644 --- a/code/game/gamemodes/technomancer/spells/spawner/fire_blast.dm +++ b/code/game/gamemodes/technomancer/spells/spawner/fire_blast.dm @@ -16,7 +16,7 @@ /obj/item/weapon/spell/spawner/fire_blast/on_ranged_cast(atom/hit_atom, mob/user) if(pay_energy(2000)) - owner.adjust_instability(12) + adjust_instability(12) ..() // Makes the booms happen. /obj/effect/temporary_effect/fire_blast diff --git a/code/game/gamemodes/technomancer/spells/spawner/pulsar.dm b/code/game/gamemodes/technomancer/spells/spawner/pulsar.dm index c1b016116a..78711b2942 100644 --- a/code/game/gamemodes/technomancer/spells/spawner/pulsar.dm +++ b/code/game/gamemodes/technomancer/spells/spawner/pulsar.dm @@ -19,7 +19,7 @@ /obj/item/weapon/spell/spawner/pulsar/on_ranged_cast(atom/hit_atom, mob/user) if(pay_energy(4000)) - owner.adjust_instability(8) + adjust_instability(8) ..() /obj/item/weapon/spell/spawner/pulsar/on_throw_cast(atom/hit_atom, mob/user) diff --git a/code/game/gamemodes/technomancer/spells/summon/summon.dm b/code/game/gamemodes/technomancer/spells/summon/summon.dm index 4565dcd816..01321c8cb0 100644 --- a/code/game/gamemodes/technomancer/spells/summon/summon.dm +++ b/code/game/gamemodes/technomancer/spells/summon/summon.dm @@ -19,16 +19,17 @@ E.icon_state = "anom" sleep(5 SECONDS) qdel(E) - var/mob/living/L = new summoned_mob_type(T) - core.summoned_mobs |= L - L.summoned = 1 - var/image/summon_underlay = image('icons/obj/objects.dmi',"anom") - summon_underlay.alpha = 127 - L.underlays |= summon_underlay - on_summon(L) - user << "You've successfully teleported \a [L] to you!" - visible_message("\A [L] appears from no-where!") - user.adjust_instability(instability_cost) + if(owner) // We might've been dropped. + var/mob/living/L = new summoned_mob_type(T) + core.summoned_mobs |= L + L.summoned = 1 + var/image/summon_underlay = image('icons/obj/objects.dmi',"anom") + summon_underlay.alpha = 127 + L.underlays |= summon_underlay + on_summon(L) + user << "You've successfully teleported \a [L] to you!" + visible_message("\A [L] appears from no-where!") + user.adjust_instability(instability_cost) /obj/item/weapon/spell/summon/on_use_cast(mob/living/user) if(summon_options.len) diff --git a/code/game/gamemodes/technomancer/spells/summon/summon_ward.dm b/code/game/gamemodes/technomancer/spells/summon/summon_ward.dm index e4154eddf2..f6b6b87dfe 100644 --- a/code/game/gamemodes/technomancer/spells/summon/summon_ward.dm +++ b/code/game/gamemodes/technomancer/spells/summon/summon_ward.dm @@ -32,15 +32,24 @@ response_help = "pets the" response_disarm = "swats away" response_harm = "punches" + min_oxy = 0 + max_oxy = 0 + min_tox = 0 + max_tox = 0 + min_co2 = 0 + max_co2 = 0 + min_n2 = 0 + max_n2 = 0 + minbodytemp = 0 + maxbodytemp = 0 + unsuitable_atoms_damage = 0 + heat_damage_per_tick = 0 + cold_damage_per_tick = 0 + var/true_sight = 0 // If true, detects more than what the Technomancer normally can't. var/mob/living/carbon/human/creator = null var/list/seen_mobs = list() -/mob/living/simple_animal/ward/New() - ..() - spawn(6 MINUTES) - expire() - /mob/living/simple_animal/ward/death() if(creator) creator << "Your ward inside [get_area(src)] was killed!" diff --git a/code/game/gamemodes/technomancer/spells/warp_strike.dm b/code/game/gamemodes/technomancer/spells/warp_strike.dm index 11b3ba032e..539277031f 100644 --- a/code/game/gamemodes/technomancer/spells/warp_strike.dm +++ b/code/game/gamemodes/technomancer/spells/warp_strike.dm @@ -49,7 +49,7 @@ var/new_dir = get_dir(user, chosen_target) user.dir = new_dir sparks.start() - owner.adjust_instability(12) + adjust_instability(12) //Finally, we handle striking the victim with whatever's in the user's offhand. var/obj/item/I = user.get_inactive_hand() diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm index 26fe14d7d1..9dacf9924c 100644 --- a/code/modules/mob/living/silicon/robot/life.dm +++ b/code/modules/mob/living/silicon/robot/life.dm @@ -11,6 +11,7 @@ clamp_values() handle_regular_status_updates() handle_actions() + handle_instability() if(client) handle_regular_hud_updates() diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index ef6b1c7872..d2bd9210bb 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -76,17 +76,16 @@ return //immune /mob/living/silicon/electrocute_act(var/shock_damage, var/obj/source, var/siemens_coeff = 1.0) - - if (istype(source, /obj/machinery/containment_field)) + if(shock_damage > 0) var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread s.set_up(5, 1, loc) s.start() shock_damage *= 0.75 //take reduced damage take_overall_damage(0, shock_damage) - visible_message("\red [src] was shocked by \the [source]!", \ - "\red Energy pulse detected, system damaged!", \ - "\red You hear an electrical crack") + visible_message("[src] was shocked by \the [source]!", \ + "Energy pulse detected, system damaged!", \ + "You hear an electrical crack.") if(prob(20)) Stun(2) return diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 3971b90df5..ae9622d305 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -398,6 +398,9 @@ /mob/living/simple_animal/adjustBruteLoss(damage) health = Clamp(health - damage, 0, maxHealth) +/mob/living/simple_animal/adjustFireLoss(damage) + health = Clamp(health - damage, 0, maxHealth) + /mob/living/simple_animal/proc/SA_attackable(target_mob) if (isliving(target_mob)) var/mob/living/L = target_mob @@ -636,4 +639,16 @@ if(!target_mob || enroute) spawn(10) if(!src.stat) - horde() \ No newline at end of file + horde() + +/mob/living/simple_animal/electrocute_act(var/shock_damage, var/obj/source, var/siemens_coeff = 1.0, var/def_zone = null) + shock_damage *= siemens_coeff + if (shock_damage < 1) + return 0 + + adjustFireLoss(shock_damage) + playsound(loc, "sparks", 50, 1, -1) + + var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + s.set_up(5, 1, loc) + s.start() \ No newline at end of file