mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-18 18:46:24 +01:00
Technomancer Additions/Fixes
Moves spell HUD so it doesn't cover instability warning. Makes Instability radiate out towards other humans at sufficently high amounts. People radiating instability will glow purple light. It is adviced to keep your distance or you will get instability as well. Mark can no longer be cast on the admin z-level. Adds Gambit, a spell which will randomly give you (almost) any spell that exists. Shield now causes a bit of instability when blocking. Recall will bring anyone who is grabbed along for the ride when cast. Disposable Teleporters now function correctly. Instability decays faster.
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -31,7 +31,8 @@
|
||||
user << "<span class='danger'>\The [src] has ran out of uses, and is now useless to you!</span>"
|
||||
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
|
||||
|
||||
|
||||
@@ -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] <PsiOmegaDelta> 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 << "<span class='danger'>You feel your body slowly degenerate.</span>"
|
||||
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 << "<span class='danger'>You feel your body slowly degenerate.</span>"
|
||||
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")
|
||||
|
||||
@@ -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)
|
||||
@@ -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 << "<span class='warning'>You can't teleport here!</span>"
|
||||
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 << "<span class='warning'>You are teleported along with [user]!</span>"
|
||||
|
||||
user.forceMove(target_turf)
|
||||
user << "<span class='notice'>You are teleported to your Mark.</span>"
|
||||
|
||||
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
|
||||
|
||||
@@ -51,5 +51,6 @@
|
||||
user.visible_message("<span class='danger'>\The [user]'s [src] blocks [attack_text]!</span>")
|
||||
spark_system.start()
|
||||
playsound(user.loc, 'sound/weapons/blade1.ogg', 50, 1)
|
||||
adjust_instability(2)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 24 KiB |
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user