Dual Eswords Now Deflect Shots

This commit is contained in:
SamCroswell
2014-11-12 22:06:48 -05:00
parent a59a535a0e
commit e8e3f76ca2
5 changed files with 51 additions and 24 deletions
+5
View File
@@ -36,6 +36,7 @@
var/siemens_coefficient = 1 // for electrical admittance/conductance (electrocution checks and shit)
var/slowdown = 0 // How much clothing is slowing you down. Negative values speeds you up
var/canremove = 1 //Mostly for Ninja code at this point but basically will not allow the item to be removed if set to 0. /N
var/reflect_chance = 0 //This var dictates what % of a time an object will reflect an energy based weapon's shot
var/armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
var/list/allowed = null //suit storage stuff.
var/obj/item/device/uplink/hidden/hidden_uplink = null // All items can have an uplink hidden inside, just remember to add the triggers.
@@ -557,6 +558,10 @@
/obj/item/proc/IsShield()
return 0
/obj/item/proc/IsReflect(var/def_zone) //This proc determines if and at what% an object will reflect energy projectiles if it's in l_hand,r_hand or wear_suit
if(prob(reflect_chance))
return 1
/obj/item/proc/get_loc_turf()
var/atom/L = loc
while(L && !istype(L, /turf/))
@@ -299,6 +299,7 @@
active = !active
if (active)
force = 10
reflect_chance = 80
icon_state = "eshield[active]"
w_class = 4
playsound(user, 'sound/weapons/saberon.ogg', 50, 1)
@@ -307,6 +308,7 @@
force = 3
icon_state = "eshield[active]"
w_class = 1
reflect_chance = 0
playsound(user, 'sound/weapons/saberoff.ogg', 50, 1)
user << "\blue [src] can now be concealed."
if(istype(user,/mob/living/carbon/human))
@@ -219,8 +219,10 @@ obj/item/weapon/twohanded/
/obj/item/weapon/twohanded/dualsaber/update_icon()
if(wielded)
icon_state = "dualsaber[blade_color][wielded]"
reflect_chance = 80
else
icon_state = "dualsaber0"
reflect_chance = 0
/obj/item/weapon/twohanded/dualsaber/attack(target as mob, mob/living/user as mob)
..()