Files
Polaris/code/game/gamemodes/technomancer/devices/tesla_armor.dm
Neerti 8d37a86ba5 Technomancer Tweaks
Cost for various spells and equipment adjusted greatly.  In general, things are cheaper, and everything should now be in multiples of 25, so no points are wasted.
The default jumpsuit for Technomancers is now heavily insulated, protecting them from tasers, batons, and perhaps unfortunate lightning strikes.
Instability between 31 and 50 made less harsh.
Wards made with a scepter of enhancement will break the cloak of anyone invisible that it can see.
Fire aura buffed, increased rate of heating as well as temperature cap for both non-scepter and scepter effects.
Reflect spell made more forgiving for the Technomancer, lasting longer before expiring.
Projectile spells should be able to hit people more reliably.
2016-09-18 20:48:01 -04:00

54 lines
2.3 KiB
Plaintext

/datum/technomancer/equipment/tesla_armor
name = "Tesla Armor"
desc = "This piece of armor offers a retaliation-based defense. When the armor is 'ready', it will completely protect you from \
the next attack you suffer, and strike the attacker with a strong bolt of lightning. This effect requires twenty seconds to \
recharge. If you are attacked while this is recharging, a weaker lightning bolt is sent out, however you won't be protected from \
the person beating you."
cost = 150
obj_path = /obj/item/clothing/suit/armor/tesla
/obj/item/clothing/suit/armor/tesla
name = "tesla armor"
desc = "This rather dangerous looking armor will hopefully shock your enemies, and not you in the process."
icon_state = "reactiveoff" //wip
item_state = "reactiveoff"
blood_overlay_type = "armor"
slowdown = 1
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0)
var/ready = 1 //Determines if the next attack will be blocked, as well if a strong lightning bolt is sent out at the attacker.
var/ready_icon_state = "reactive" //also wip
var/cooldown_to_charge = 20 SECONDS
/obj/item/clothing/suit/armor/tesla/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack")
//First, some retaliation.
if(attacker && attacker != user)
if(get_dist(user, attacker) <= 3) //Anyone farther away than three tiles is too far to shoot lightning at.
if(ready)
shoot_lightning(attacker, 40)
else
shoot_lightning(attacker, 15)
//Deal with protecting our wearer now.
if(ready)
ready = 0
spawn(cooldown_to_charge)
ready = 1
update_icon()
user << "<span class='notice'>\The [src] is ready to protect you once more.</span>"
visible_message("<span class='danger'>\The [user]'s [src.name] blocks [attack_text]!</span>")
update_icon()
return 1
return 0
/obj/item/clothing/suit/armor/tesla/update_icon()
..()
if(ready)
icon_state = ready_icon_state
else
icon_state = initial(icon_state)
/obj/item/clothing/suit/armor/tesla/proc/shoot_lightning(var/mob/target, var/power)
var/obj/item/projectile/beam/lightning/lightning = new(src)
lightning.power = power
lightning.launch(target)
visible_message("<span class='danger'>\The [src] strikes \the [target] with lightning!</span>")