Merge pull request #3274 from Fox-McCloud/attack-fixes

Fixes Some Items Attacks
This commit is contained in:
TheDZD
2016-01-18 19:58:15 -05:00
7 changed files with 46 additions and 43 deletions
+18 -26
View File
@@ -324,10 +324,10 @@
//the mob M is attempting to equip this item into the slot passed through as 'slot'. Return 1 if it can do this and 0 if it can't.
//If you are making custom procs but would like to retain partial or complete functionality of this one, include a 'return ..()' to where you want this to happen.
//Set disable_warning to 1 if you wish it to not give you outputs.
//Set disable_warning to 1 if you wish it to not give you outputs.
/obj/item/proc/mob_can_equip(mob/M, slot, disable_warning = 0)
if(!M)
return 0
return 0
return M.can_equip(src, slot, disable_warning)
@@ -390,42 +390,34 @@
(H.glasses && H.glasses.flags & GLASSESCOVERSEYES) \
))
// you can't stab someone in the eyes wearing a mask!
user << "\red You're going to need to remove that mask/helmet/glasses first."
user << "<span class='danger'>You're going to need to remove that mask/helmet/glasses first!</span>"
return
if(istype(M, /mob/living/carbon/alien) || istype(M, /mob/living/carbon/slime))//Aliens don't have eyes./N slimes also don't have eyes!
user << "\red You cannot locate any eyes on this creature!"
user << "<span class='warning'>You cannot locate any eyes on this creature!</span>"
return
user.attack_log += "\[[time_stamp()]\]<font color='red'> Attacked [key_name(M)] with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
M.attack_log += "\[[time_stamp()]\]<font color='orange'> Attacked by [key_name(user)] with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
if(M.ckey)
msg_admin_attack("[key_name_admin(user)] attacked [key_name_admin(M)] with [src.name] (INTENT: [uppertext(user.a_intent)])") //BS12 EDIT ALG
if(!iscarbon(user))
M.LAssailant = null
else
M.LAssailant = user
src.add_fingerprint(user)
//if((CLUMSY in user.mutations) && prob(50))
// M = user
/*
M << "\red You stab yourself in the eye."
M.sdisabilities |= BLIND
M.weakened += 4
M.adjustBruteLoss(10)
*/
playsound(loc, src.hitsound, 30, 1, -1)
if(M != user)
for(var/mob/O in (viewers(M) - user - M))
O.show_message("\red [M] has been stabbed in the eye with [src] by [user].", 1)
M << "\red [user] stabs you in the eye with [src]!"
user << "\red You stab [M] in the eye with [src]!"
M.visible_message("<span class='danger'>[user] has stabbed [M] in the eye with [src]!</span>", \
"<span class='userdanger'>[user] stabs you in the eye with [src]!</span>")
user.do_attack_animation(M)
else
user.visible_message( \
"\red [user] has stabbed themself with [src]!", \
"\red You stab yourself in the eyes with [src]!" \
"<span class='danger'>[user] has stabbed themself in the eyes with [src]!</span>", \
"<span class='userdanger'>You stab yourself in the eyes with [src]!</span>" \
)
add_logs(M, user, "attacked", "[src.name]", "(INTENT: [uppertext(user.a_intent)])")
if(istype(H))
var/obj/item/organ/eyes/eyes = H.internal_organs_by_name["eyes"]
if(!eyes)
@@ -434,17 +426,17 @@
if(eyes.damage >= eyes.min_bruised_damage)
if(M.stat != 2)
if(!(eyes.status & ORGAN_ROBOT) || !(eyes.status & ORGAN_ASSISTED)) //robot eyes bleeding might be a bit silly
M << "\red Your eyes start to bleed profusely!"
M << "<span class='danger'>Your eyes start to bleed profusely!</span>"
if(prob(50))
if(M.stat != 2)
M << "\red You drop what you're holding and clutch at your eyes!"
M << "<span class='danger'>You drop what you're holding and clutch at your eyes!</span>"
M.drop_item()
M.eye_blurry += 10
M.Paralyse(1)
M.Weaken(2)
if (eyes.damage >= eyes.min_broken_damage)
if(M.stat != 2)
M << "\red You go blind!"
M << "<span class='danger'>You go blind!</span>"
var/obj/item/organ/external/affecting = H.get_organ("head")
if(affecting.take_damage(7))
H.UpdateDamageIcon()
+5 -14
View File
@@ -25,6 +25,7 @@
flags = CONDUCT
origin_tech = "materials=1"
attack_verb = list("attacked", "stabbed", "poked")
hitsound = 'sound/weapons/bladeslice.ogg'
sharp = 0
var/loaded //Descriptive string for currently loaded food object.
@@ -110,8 +111,8 @@
if ((CLUMSY in user.mutations) && prob(50))
user << "\red You accidentally cut yourself with the [src]."
user.take_organ_damage(20)
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
return
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
return ..()
/obj/item/weapon/kitchen/utensil/pknife
@@ -121,14 +122,6 @@
force = 10.0
throwforce = 10.0
/obj/item/weapon/kitchen/utensil/knife/attack(target as mob, mob/living/user as mob)
if ((CLUMSY in user.mutations) && prob(50))
user << "\red You somehow managed to cut yourself with the [src]."
user.take_organ_damage(20)
return
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
return ..()
/*
* Kitchen knives
*/
@@ -148,6 +141,7 @@
materials = list(MAT_METAL=12000)
origin_tech = "materials=1"
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
hitsound = 'sound/weapons/bladeslice.ogg'
suicide_act(mob/user)
viewers(user) << pick("<span class='suicide'>[user] is slitting \his wrists with the [src.name]! It looks like \he's trying to commit suicide.</span>", \
@@ -190,21 +184,18 @@
materials = list(MAT_METAL=12000)
origin_tech = "materials=1"
attack_verb = list("cleaved", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
hitsound = 'sound/weapons/bladeslice.ogg'
sharp = 1
edge = 1
/obj/item/weapon/butch/meatcleaver
name = "Meat Cleaver"
icon_state = "mcleaver"
item_state = "butch"
desc = "A huge thing used for chopping and chopping up meat. This includes clowns and clown-by-products."
force = 25.0
throwforce = 15.0
no_embed = 1
/obj/item/weapon/butch/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
return ..()
/*
* Rolling Pins
*/
@@ -42,6 +42,10 @@
w_class = initial(w_class)
playsound(user, 'sound/weapons/saberoff.ogg', 35, 1) //changed it from 50% volume to 35% because deafness
user << "<span class='notice'>[src] can now be concealed.</span>"
if(istype(user,/mob/living/carbon/human))
var/mob/living/carbon/human/H = user
H.update_inv_l_hand()
H.update_inv_r_hand()
add_fingerprint(user)
return
@@ -173,9 +177,9 @@
// Updating overlays, copied from welder code.
// I tried calling attack_self twice, which looked cool, except it somehow didn't update the overlays!!
if(user.r_hand == src)
user.update_inv_r_hand(0)
user.update_inv_r_hand()
else if(user.l_hand == src)
user.update_inv_l_hand(0)
user.update_inv_l_hand()
else
user << "<span class='warning'>It's already fabulous!</span>"
@@ -97,6 +97,9 @@
w_class = 2
force = 0 //not so robust now
attack_verb = list("hit", "poked")
if(istype(user,/mob/living/carbon/human))
var/mob/living/carbon/human/H = user
H.update_inv_l_hand()
H.update_inv_r_hand()
playsound(src.loc, 'sound/weapons/batonextend.ogg', 50, 1)
add_fingerprint(user)
@@ -0,0 +1,13 @@
author: Fox McCloud
delete-after: True
changes:
- bugfix: "Fixes the energy sword being invisible in-hand when turned on."
- bugfix: "Fixes the telebaton being invisible in-hand when extended."
- bugfix: "Fixes eye-stabbing not having an attack animation or hitsound."
- bugfix: "Fixes some kitchen utensils playing the wrong hit-sound and playing twice in some cases."
- bugfix: "Fixes the butcher cleaver sprite being backwards."
- bugfix: "Fixes the telebaton sprite being missing from the side."
- bugfix: "Fixes the meat cleaver being invisible in-hand."
Binary file not shown.

Before

Width:  |  Height:  |  Size: 155 KiB

After

Width:  |  Height:  |  Size: 155 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 152 KiB

After

Width:  |  Height:  |  Size: 152 KiB