Merge pull request #7730 from Fox-McCloud/projectile-reflect

Projectile Reflection Refactor
This commit is contained in:
tigercat2000
2017-07-08 17:34:08 -07:00
committed by GitHub
4 changed files with 4 additions and 1 deletions
@@ -10,7 +10,7 @@ emp_act
/mob/living/carbon/human/bullet_act(obj/item/projectile/P, def_zone)
if(istype(P, /obj/item/projectile/energy) || istype(P, /obj/item/projectile/beam))
if(P.is_reflectable)
if(check_reflect(def_zone)) // Checks if you've passed a reflection% check
visible_message("<span class='danger'>The [P.name] gets reflected by [src]!</span>", \
"<span class='userdanger'>The [P.name] gets reflected by [src]!</span>")
+1
View File
@@ -37,6 +37,7 @@
var/flag = "bullet" //Defines what armor to use when it hits things. Must be set to bullet, laser, energy,or bomb //Cael - bio and rad are also valid
var/projectile_type = "/obj/item/projectile"
var/range = 50 //This will de-increment every step. When 0, it will delete the projectile.
var/is_reflectable = FALSE // Can it be reflected or not?
//Effects
var/stun = 0
var/weaken = 0
@@ -8,6 +8,7 @@
hitsound_wall = 'sound/weapons/effects/searwall.ogg'
flag = "laser"
eyeblur = 2
is_reflectable = TRUE
/obj/item/projectile/beam/laser
@@ -4,6 +4,7 @@
damage = 0
damage_type = BURN
flag = "energy"
is_reflectable = TRUE
/obj/item/projectile/energy/electrode
name = "electrode"