Ports weapons cleaving and reaching features from polaris (#3969)

-axes, chainswords and longswords can now cleave, hitting targets around the user, ported from polaris
-added support for melee weapons that can hit targets two titles away, as well ported from polaris
This commit is contained in:
Alberyk
2017-12-23 21:12:06 +02:00
committed by Erki
parent 5c78e4fc08
commit eb80d3ec68
8 changed files with 105 additions and 8 deletions
@@ -37,6 +37,7 @@
contained_sprite = 1
slot_flags = SLOT_BELT
attack_verb = list("attacked", "stabbed", "prodded", "poked", "lunged")
sharp = 0
/obj/item/weapon/material/sword/longsword
name = "longsword"
@@ -45,6 +46,11 @@
item_state = "claymore"
slot_flags = SLOT_BELT | SLOT_BACK
/obj/item/weapon/material/sword/longsword/pre_attack(var/mob/living/target, var/mob/living/user)
if(istype(target))
cleave(user, target)
..()
/obj/item/weapon/material/sword/trench
name = "trench knife"
desc = "A military knife used to slash and stab enemies in close quarters."
@@ -77,6 +83,11 @@
attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut")
applies_material_colour = 0
/obj/item/weapon/material/sword/axe/pre_attack(var/mob/living/target, var/mob/living/user)
if(istype(target))
cleave(user, target)
..()
/obj/item/weapon/material/sword/khopesh
name = "khopesh"
desc = "An ancient sword shapped like a sickle."
@@ -160,7 +160,7 @@
if (ismob(loc))
var/mob/living/our_mob = loc
our_mob.remove_from_mob(src)
qdel(src)
/obj/item/weapon/material/twohanded/offhand/update_icon()
@@ -197,6 +197,11 @@
var/obj/effect/plant/P = A
P.die_off()
/obj/item/weapon/material/twohanded/fireaxe/pre_attack(var/mob/living/target, var/mob/living/user)
if(istype(target))
cleave(user, target)
..()
//spears, bay edition
/obj/item/weapon/material/twohanded/spear
icon_state = "spearglass0"
@@ -211,7 +216,7 @@
thrown_force_divisor = 1.5 // 20 when thrown with weight 15 (glass)
throw_speed = 3
edge = 1
sharp = 1
sharp = 0
hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb = list("attacked", "poked", "jabbed", "torn", "gored")
default_material = "glass"