diff --git a/code/_onclick/hud/_defines.dm b/code/_onclick/hud/_defines.dm index d36a3b11a9..f2df817366 100644 --- a/code/_onclick/hud/_defines.dm +++ b/code/_onclick/hud/_defines.dm @@ -140,5 +140,5 @@ #define ui_iarrowleft "SOUTH-1,EAST-4" #define ui_iarrowright "SOUTH-1,EAST-2" -#define ui_spell_master "EAST-1:16,NORTH-1:16" +#define ui_spell_master "EAST-2:16,NORTH-1:26" #define ui_genetic_master "EAST-1:16,NORTH-3:16" diff --git a/code/game/gamemodes/technomancer/devices/disposable_teleporter.dm b/code/game/gamemodes/technomancer/devices/disposable_teleporter.dm index 1e396b1bc9..43f0f2737a 100644 --- a/code/game/gamemodes/technomancer/devices/disposable_teleporter.dm +++ b/code/game/gamemodes/technomancer/devices/disposable_teleporter.dm @@ -31,7 +31,8 @@ user << "\The [src] has ran out of uses, and is now useless to you!" return else - var/area/A = input(user, "Area to teleport to", "Teleportation") in teleportlocs + var/area_wanted = input(user, "Area to teleport to", "Teleportation") in teleportlocs + var/area/A = teleportlocs[area_wanted] if(!A) return @@ -62,8 +63,8 @@ targets.Add(T) if(!targets.len) - user <<"The teleporter matrix was unable to locate a suitable teleport destination, as all the possibilities were nonexistant \ - or hazardous. Try a different area." + user << "The teleporter matrix was unable to locate a suitable teleport destination, as all the possibilities \ + were nonexistant or hazardous. Try a different area." return var/turf/simulated/destination = null diff --git a/code/game/gamemodes/technomancer/instability.dm b/code/game/gamemodes/technomancer/instability.dm index 587ec16147..9297f18a17 100644 --- a/code/game/gamemodes/technomancer/instability.dm +++ b/code/game/gamemodes/technomancer/instability.dm @@ -44,26 +44,26 @@ // 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() - instability = Clamp(instability, 0, 200) + 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() switch(instability) if(1 to 10) - adjust_instability(-1) - if(11 to 20) adjust_instability(-2) - if(21 to 30) - adjust_instability(-3) - if(31 to 40) + if(11 to 20) adjust_instability(-4) + if(21 to 30) + adjust_instability(-6) + if(31 to 40) + adjust_instability(-8) if(41 to 50) - adjust_instability(-5) - if(51 to 100) adjust_instability(-10) - if(101 to 200) + if(51 to 100) adjust_instability(-20) + if(101 to 200) + adjust_instability(-40) /* [16:18:08] Sparks @@ -88,6 +88,7 @@ sleep(4) overlays.Remove(instability_flash) qdel(instability_flash) + radiate_instability() switch(instability) if(1 to 10) //Harmless return @@ -165,6 +166,7 @@ src << "You feel your body slowly degenerate." if(7) adjustToxLoss(instability * 0.25) //25 tox @ 100 instability + if(101 to 200) //Lethal rng = rand(0,8) switch(rng) @@ -191,3 +193,18 @@ src << "You feel your body slowly degenerate." if(7) adjustToxLoss(instability * 0.40) //25 tox @ 100 instability + +/mob/living/carbon/human/proc/radiate_instability() + var/distance = round(sqrt(instability / 2)) + if(instability <= 30) + distance = 0 + if(distance) + for(var/mob/living/carbon/human/H in range(src, distance) ) + if(H == src) // This instability is radiating away from them, so don't include them. + continue + var/radius = max(get_dist(H, src), 1) + // People next to the source take a third of the instability. Further distance decreases the amount absorbed. + var/outgoing_instability = (instability / 3) * ( 1 / (radius**2) ) + H.adjust_instability(outgoing_instability) + + set_light(distance, distance, l_color = "#C26DDE") diff --git a/code/game/gamemodes/technomancer/spells/gambit.dm b/code/game/gamemodes/technomancer/spells/gambit.dm new file mode 100644 index 0000000000..6a0b29d117 --- /dev/null +++ b/code/game/gamemodes/technomancer/spells/gambit.dm @@ -0,0 +1,29 @@ +/datum/technomancer/spell/gambit + name = "Gambit" + desc = "This function causes you to receive a random function, including those which you haven't purchased." + ability_icon_state = "tech_gambit" + cost = 50 + obj_path = /obj/item/weapon/spell/gambit + +/var/global/list/all_technomancer_gambit_spells = typesof(/obj/item/weapon/spell) - list( + /obj/item/weapon/spell/gambit, + /obj/item/weapon/spell/projectile, + /obj/item/weapon/spell/aura, + /obj/item/weapon/spell/insert, + /obj/item/weapon/spell/spawner) + +/obj/item/weapon/spell/gambit + name = "gambit" + desc = "Do you feel lucky?" + icon_state = "gambit" + cast_methods = CAST_USE + aspect = ASPECT_UNSTABLE + +/obj/item/weapon/spell/gambit/on_use_cast(mob/living/carbon/human/user) + if(pay_energy(200)) + adjust_instability(3) + var/obj/item/weapon/spell/random_spell = pick(all_technomancer_gambit_spells) + if(random_spell) + user.drop_from_inventory(src, null) + user.place_spell_in_hand(random_spell) + qdel(src) diff --git a/code/game/gamemodes/technomancer/spells/mark_recall.dm b/code/game/gamemodes/technomancer/spells/mark_recall.dm index 9372b81842..0fe6be7808 100644 --- a/code/game/gamemodes/technomancer/spells/mark_recall.dm +++ b/code/game/gamemodes/technomancer/spells/mark_recall.dm @@ -26,6 +26,9 @@ aspect = ASPECT_TELE /obj/item/weapon/spell/mark/on_use_cast(mob/living/user) + if(!allowed_to_teleport()) // Otherwise you could teleport back to the admin Z-level. + user << "You can't teleport here!" + return 0 if(pay_energy(1000)) if(!mark_spell_ref) mark_spell_ref = new(get_turf(user)) @@ -77,8 +80,23 @@ set_light(light_intensity, light_intensity, l_color = "#006AFF") time_left-- sleep(1 SECOND) - user.forceMove(get_turf(mark_spell_ref)) + + var/turf/target_turf = get_turf(mark_spell_ref) + var/turf/old_turf = get_turf(user) + + for(var/obj/item/weapon/grab/G in user.contents) // People the Technomancer is grabbing come along for the ride. + if(G.affecting) + G.affecting.forceMove(locate( target_turf.x+rand(-1,1), target_turf.y+rand(-1,1), target_turf.z)) + G.affecting << "You are teleported along with [user]!" + + user.forceMove(target_turf) user << "You are teleported to your Mark." + + playsound(target_turf, 'sound/effects/phasein.ogg', 25, 1) + playsound(target_turf, 'sound/effects/sparks2.ogg', 50, 1) + + playsound(old_turf, 'sound/effects/sparks2.ogg', 50, 1) + owner.adjust_instability(25) qdel(src) return 1 diff --git a/code/game/gamemodes/technomancer/spells/shield.dm b/code/game/gamemodes/technomancer/spells/shield.dm index 22eb7ff42f..807ea698a2 100644 --- a/code/game/gamemodes/technomancer/spells/shield.dm +++ b/code/game/gamemodes/technomancer/spells/shield.dm @@ -51,5 +51,6 @@ user.visible_message("\The [user]'s [src] blocks [attack_text]!") spark_system.start() playsound(user.loc, 'sound/weapons/blade1.ogg', 50, 1) + adjust_instability(2) return 1 return 0 diff --git a/icons/mob/screen_spells.dmi b/icons/mob/screen_spells.dmi index 4859c8b757..a1a480a50a 100644 Binary files a/icons/mob/screen_spells.dmi and b/icons/mob/screen_spells.dmi differ diff --git a/icons/obj/spells.dmi b/icons/obj/spells.dmi index 41d3262949..3f4572f61c 100644 Binary files a/icons/obj/spells.dmi and b/icons/obj/spells.dmi differ diff --git a/polaris.dme b/polaris.dme index 44c9ea385c..74930c5913 100644 --- a/polaris.dme +++ b/polaris.dme @@ -432,6 +432,7 @@ #include "code\game\gamemodes\technomancer\spells\dispel.dm" #include "code\game\gamemodes\technomancer\spells\energy_siphon.dm" #include "code\game\gamemodes\technomancer\spells\flame_tongue.dm" +#include "code\game\gamemodes\technomancer\spells\gambit.dm" #include "code\game\gamemodes\technomancer\spells\illusion.dm" #include "code\game\gamemodes\technomancer\spells\instability_tap.dm" #include "code\game\gamemodes\technomancer\spells\mark_recall.dm"