From 09ebc5a75f4f162b70b676fcacca3d64a964298f Mon Sep 17 00:00:00 2001 From: "n3ophyt3@gmail.com" Date: Sat, 2 Apr 2011 18:09:59 +0000 Subject: [PATCH] I hate special snowflakes update~ Assorted items no longer have special snowflake attack() code that lets them bypass the base attack() proc stun/KO chances. This mostly affected guns of assorted varieties, and was done mainly due to the fact that the code was both outdated and based on the horribly overpowered revolver code (which got commented out ages ago). If you want specifics, the only way to protect yourself from the special snowflake code is to be an admin and manually set the bitflag on your headgear to include the "8" bitflag, which was the "protects your head" bitflag in ancientcode. This was even if the attack wasn't actually targeting the head. Aside from that, there was also the problem that this special snowflake code left targets incapacitated for FAR longer than the base attack() proc would (60 ticks of life() for the pre-nerf revolver, 10-120 ticks for the energy gun). And again, this was with no way to protect yourself aside from being an admin and modifying the vars on your headgear. Harmbatons, Harmtasers, and Death Nettles got to keep their snowflake code, but I modified it so you only get stunned if the attack makes it past any armor you're wearing. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1346 316c924e-a436-60f5-8080-3fe189b3f50e --- code/game/objects/items/item.dm | 2 +- code/game/objects/items/weapons/guns_ammo.dm | 28 ++++++++++++------- .../game/objects/items/weapons/hydroponics.dm | 3 +- .../objects/items/weapons/swords_axes_etc.dm | 12 +++----- code/game/objects/tank.dm | 3 ++ 5 files changed, 28 insertions(+), 20 deletions(-) diff --git a/code/game/objects/items/item.dm b/code/game/objects/items/item.dm index 10fa0ea348f..5a9afbdf91e 100644 --- a/code/game/objects/items/item.dm +++ b/code/game/objects/items/item.dm @@ -367,7 +367,7 @@ M << "Aargh it burns!" M.updatehealth() src.add_fingerprint(user) - return + return 1 diff --git a/code/game/objects/items/weapons/guns_ammo.dm b/code/game/objects/items/weapons/guns_ammo.dm index e8bf9f2252c..1cba26e8e7f 100644 --- a/code/game/objects/items/weapons/guns_ammo.dm +++ b/code/game/objects/items/weapons/guns_ammo.dm @@ -70,6 +70,8 @@ TELEPORT GUN return /obj/item/weapon/gun/energy/pulse_rifle/attack(mob/M as mob, mob/user as mob) + ..() + /* src.add_fingerprint(user) var/mob/living/carbon/human/H = M @@ -92,7 +94,7 @@ TELEPORT GUN if(O.client) O.show_message(text("\red [] has been rifle butted by []!", M, user), 1, "\red You hear someone fall.", 2) return - + */ // AMMO @@ -516,6 +518,8 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us if(!detective) usr << "\red You just don't feel cool enough to use this gun looking like that." return + ..() + /* if ((istype(H, /mob/living/carbon/human) && istype(H, /obj/item/clothing/head) && H.flags & 8 && prob(80))) M << "\red The helmet protects you from being hit hard in the head!" return @@ -546,6 +550,7 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us for(var/mob/O in viewers(M, null)) if (O.client) O.show_message(text("\red [] has been pistol whipped with the detectives revolver by []!", M, user), 1, "\red You hear someone fall", 2) return + */ // ENERGY GUN @@ -638,6 +643,7 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us /obj/item/weapon/gun/energy/laser_gun/attack(mob/M as mob, mob/user as mob) ..() + /* src.add_fingerprint(user) if ((prob(30) && M.stat < 2)) var/mob/living/carbon/human/H = M @@ -658,6 +664,7 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us if(O.client) O.show_message(text("\red [] has been knocked unconscious!", M), 1, "\red You hear someone fall", 2) return + */ // TASER GUN @@ -722,6 +729,7 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us return if((src.charges >= 1) && (istype(H, /mob/living/carbon/human))) if (user.a_intent == "hurt") + if (!..()) return if (prob(20)) if (M.paralysis < 10 && (!(M.mutations & 8)) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/) M.paralysis = 10 @@ -729,7 +737,7 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us M.weakened = 10 if (M.stuttering < 10 && (!(M.mutations & 8)) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/) M.stuttering = 10 - ..() + if(M.stat != 2) M.stat = 1 for(var/mob/O in viewers(M, null)) O.show_message("\red [M] has been knocked unconscious!", 1, "\red You hear someone fall", 2) @@ -745,10 +753,15 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us if(M.stat != 2) M.stat = 1 for(var/mob/O in viewers(M, null)) if (O.client) O.show_message("\red [M] has been stunned with the taser gun by [user]!", 1, "\red You hear someone fall", 2) - src.charges-- + if(isrobot(user)) + var/mob/living/silicon/robot/R = user + R.cell.charge -= 20 + else + src.charges-- update_icon() else if((src.charges >= 1) && (istype(M, /mob/living/carbon/monkey))) if (user.a_intent == "hurt") + if (!..()) return if (prob(20)) if (M.paralysis < 10 && (!(M.mutations & 8)) ) M.paralysis = 10 @@ -756,7 +769,6 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us M.weakened = 10 if (M.stuttering < 10 && (!(M.mutations & 8)) ) M.stuttering = 10 - ..() if(M.stat != 2) M.stat = 1 for(var/mob/O in viewers(M, null)) O.show_message("\red [M] has been knocked unconscious!", 1, "\red You hear someone fall", 2) @@ -833,11 +845,6 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us A.process() /obj/item/weapon/gun/energy/crossbow/attack(mob/M as mob, mob/user as mob) - src.add_fingerprint(user) - var/mob/living/carbon/human/H = M - if ((istype(H, /mob/living/carbon/human) && istype(H, /obj/item/clothing/head) && H.flags & 8 && prob(80))) - M << "\red The helmet protects you from being hit hard in the head!" - return ..() @@ -1134,6 +1141,7 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us attack(mob/M as mob, mob/user as mob) ..() + /* src.add_fingerprint(user) if ((prob(30) && M.stat < 2)) var/mob/living/carbon/human/H = M @@ -1153,7 +1161,7 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us if(O.client) O.show_message(text("\red [M] has been knocked unconscious!"), 1, "\red You hear someone fall", 2) return - + */ diff --git a/code/game/objects/items/weapons/hydroponics.dm b/code/game/objects/items/weapons/hydroponics.dm index bb6196d17dc..6df25c2180a 100644 --- a/code/game/objects/items/weapons/hydroponics.dm +++ b/code/game/objects/items/weapons/hydroponics.dm @@ -92,6 +92,7 @@ Deathnettle user << "\red You are stunned by the Deathnettle when you try picking it up!" /obj/item/weapon/grown/deathnettle/attack(mob/living/carbon/M as mob, mob/user as mob) + if(!..()) return if(istype(M, /mob/living/carbon/human)) M << "\red You are stunned by the powerful acid of the Deathnettle!" M.eye_blurry += 4 @@ -99,7 +100,7 @@ Deathnettle M.paralysis += 5 M.weakened += 2 M.drop_item() - ..() + /obj/item/weapon/grown/deathnettle/afterattack(atom/A as mob|obj, mob/user as mob) if (force > 0) diff --git a/code/game/objects/items/weapons/swords_axes_etc.dm b/code/game/objects/items/weapons/swords_axes_etc.dm index d852db4ca1e..6f9f5892168 100644 --- a/code/game/objects/items/weapons/swords_axes_etc.dm +++ b/code/game/objects/items/weapons/swords_axes_etc.dm @@ -11,8 +11,6 @@ STUN BATON // SWORD /obj/item/weapon/sword/attack(target as mob, mob/user as mob) - if(istype(target, /mob/living)) - target:fireloss += 20 ..() /obj/item/weapon/sword/New() @@ -109,11 +107,10 @@ STUN BATON src.add_fingerprint(user) var/mob/living/carbon/human/H = M - if ((istype(H, /mob/living/carbon/human) && istype(H, /obj/item/clothing/head) && H.flags & 8 && prob(80))) - M << "\red The helmet protects you from being hit hard in the head!" - return + if (status == 0 || (status == 1 && charges ==0)) if(user.a_intent == "hurt") + if(!..()) return /* if (!istype(H:r_hand, /obj/item/weapon/shield/riot) && prob(40)) for(var/mob/O in viewers(M, null)) if (O.client) O.show_message(text("\red [] has blocked []'s stun baton with the riot shield!", M, user), 1, "\red You hear a cracking sound", 2) @@ -124,7 +121,6 @@ STUN BATON return*/ if (M.weakened < 5 && (!(M.mutations & 8)) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/) M.weakened = 5 - ..() for(var/mob/O in viewers(M)) if (O.client) O.show_message("\red [M] has been beaten with the stun baton by [user]!", 1) if(status == 1 && charges == 0) @@ -139,6 +135,7 @@ STUN BATON if((charges > 0 && status == 1) && (istype(H, /mob/living/carbon))) flick("baton_active", src) if (user.a_intent == "hurt") + if(!..()) return /* if (!istype(H:r_hand, /obj/item/weapon/shield/riot) && prob(40)) for(var/mob/O in viewers(M, null)) if (O.client) O.show_message(text("\red [] has blocked []'s stun baton with the riot shield!", M, user), 1, "\red You hear a cracking sound", 2) @@ -157,7 +154,6 @@ STUN BATON M.weakened = 1 if (M.stuttering < 1 && (!(M.mutations & 8)) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/) M.stuttering = 1 - ..() if (M.stunned < 1 && (!(M.mutations & 8)) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/) M.stunned = 1 else @@ -206,12 +202,12 @@ STUN BATON src.add_fingerprint(user) if (user.a_intent == "hurt") + if(!..()) return playsound(src.loc, "swing_hit", 50, 1, -1) if (M.weakened < 8 && (!(M.mutations & 8)) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/) M.weakened = 8 if (M.stuttering < 8 && (!(M.mutations & 8)) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/) M.stuttering = 8 - ..() if (M.stunned < 8 && (!(M.mutations & 8)) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/) M.stunned = 8 for(var/mob/O in viewers(M)) diff --git a/code/game/objects/tank.dm b/code/game/objects/tank.dm index 45025372a61..dd98096a5ff 100644 --- a/code/game/objects/tank.dm +++ b/code/game/objects/tank.dm @@ -146,6 +146,8 @@ /obj/item/weapon/tank/attack(mob/M as mob, mob/user as mob) ..() + + /* if ((prob(30) && M.stat < 2)) var/mob/living/carbon/human/H = M @@ -166,6 +168,7 @@ if ((O.client && !( O.blinded ))) O << text("\red [] has been knocked unconscious!", M) return + */ /obj/item/weapon/tank/attackby(obj/item/weapon/W as obj, mob/user as mob) ..()