Separates the sharp flag into edge and sharp

Now weapons can properly cause cuts without necessarily having a greater
chance to remove limbs.

Also separates is_sharp, has_edge, and can_puncture.
This commit is contained in:
mwerezak
2014-06-15 20:25:39 -04:00
parent cbec032ae3
commit 1b33ca943d
39 changed files with 94 additions and 74 deletions
+1 -1
View File
@@ -44,5 +44,5 @@
return
/obj/item/latexballon/attackby(obj/item/W as obj, mob/user as mob)
if (is_sharp(W))
if (can_puncture(W))
burst()
+1 -1
View File
@@ -112,7 +112,7 @@ var/last_chew = 0
H.attack_log += text("\[[time_stamp()]\] <font color='red'>[s] ([H.ckey])</font>")
log_attack("[s] ([H.ckey])")
if(O.take_damage(3,0,1,"teeth marks"))
if(O.take_damage(3,0,1,1,"teeth marks"))
H:UpdateDamageIcon()
last_chew = world.time
@@ -53,6 +53,7 @@
name = "fork"
desc = "Pointy."
icon_state = "fork"
sharp = 1
/obj/item/weapon/kitchen/utensil/fork/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!istype(M))
@@ -114,6 +115,8 @@
icon_state = "knife"
force = 10.0
throwforce = 10.0
sharp = 1
edge = 1
suicide_act(mob/user)
viewers(user) << pick("\red <b>[user] is slitting \his wrists with the [src.name]! It looks like \he's trying to commit suicide.</b>", \
@@ -154,6 +157,7 @@
desc = "A general purpose Chef's Knife made by SpaceCook Incorporated. Guaranteed to stay sharp for years to come."
flags = FPRINT | TABLEPASS | CONDUCT
sharp = 1
edge = 1
force = 10.0
w_class = 3.0
throwforce = 6.0
@@ -192,6 +196,8 @@
m_amt = 12000
origin_tech = "materials=1"
attack_verb = list("cleaved", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
sharp = 1
edge = 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)
@@ -19,6 +19,8 @@
flags = FPRINT | CONDUCT | NOSHIELD | TABLEPASS | NOBLOODY
origin_tech = "combat=3"
attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut")
sharp = 1
edge = 1
suicide_act(mob/user)
viewers(user) << "\red <b>[user] swings the [src.name] towards /his head! It looks like \he's trying to commit suicide.</b>"
@@ -37,6 +39,8 @@
flags = FPRINT | TABLEPASS | NOSHIELD | NOBLOODY
origin_tech = "magnets=3;syndicate=4"
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
sharp = 1
edge = 1
/obj/item/weapon/melee/energy/sword/pirate
name = "energy cutlass"
@@ -48,6 +52,8 @@
desc = "A concentrated beam of energy in the shape of a blade. Very stylish... and lethal."
icon_state = "blade"
force = 70.0//Normal attacks deal very high damage.
sharp = 1
edge = 1
throwforce = 1//Throwing or dropping the item deletes it.
throw_speed = 1
throw_range = 1
@@ -379,6 +379,8 @@ LOOK FOR SURGERY.DM*/
icon_state = "scalpel"
flags = FPRINT | TABLEPASS | CONDUCT
force = 10.0
sharp = 1
edge = 1
w_class = 2.0
throwforce = 5.0
throw_speed = 3
@@ -668,6 +670,8 @@ LOOK FOR SURGERY.DM*/
g_amt = 10000
origin_tech = "materials=1;biotech=1"
attack_verb = list("attacked", "slashed", "sawed", "cut")
sharp = 1
edge = 1
/*
/obj/item/weapon/circular_saw/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
+2
View File
@@ -106,6 +106,8 @@
m_amt = 80
origin_tech = "materials=1;engineering=1"
attack_verb = list("pinched", "nipped")
sharp = 1
edge = 1
/obj/item/weapon/wirecutters/New()
if(prob(50))
@@ -109,6 +109,8 @@
name = "fire axe"
desc = "Truly, the weapon of a madman. Who would think to fight fire with an axe?"
force = 5
sharp = 1
edge = 1
w_class = 4.0
slot_flags = SLOT_BACK
force_unwielded = 10
@@ -154,6 +156,8 @@
flags = FPRINT | TABLEPASS | NOSHIELD
origin_tech = "magnets=3;syndicate=4"
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
sharp = 1
edge = 1
/obj/item/weapon/twohanded/dualsaber/update_icon()
icon_state = "dualsaber[wielded]"
@@ -139,6 +139,7 @@
/obj/item/weapon/harpoon
name = "harpoon"
sharp = 1
edge = 0
desc = "Tharr she blows!"
icon_state = "harpoon"
item_state = "harpoon"
+2 -1
View File
@@ -10,7 +10,8 @@
animate_movement = 2
var/throwforce = 1
var/list/attack_verb = list() //Used in attackby() to say how something was attacked "[x] has been [z.attack_verb] by [y] with [z]"
var/sharp = 0 // whether this object cuts
var/sharp = 0 // whether this object cuts
var/edge = 0 // whether this object is more likely to dismember
var/in_use = 0 // If we have a user using us, this will be set on. We will check if the user has stopped using us, and thus stop updating and LAGGING EVERYTHING!
var/damtype = "brute"
+1 -1
View File
@@ -110,7 +110,7 @@
attackby(obj/item/weapon/W as obj, mob/user as mob)
if(!istype(W)) return
if (is_sharp(W))
if (can_puncture(W))
visible_message("\red <b>[user] pierces [src] with [W]!</b>")
deflate(1)
if(W.damtype == BRUTE || W.damtype == BURN)