Files
Bubberstation/code/game/objects/items/fireaxe.dm
SmArtKar 7ddc30783a Adds better attack animations and alternate attack modes (#88418)
## About The Pull Request

This is the first PR in a series attempting to modernize our damage and
armor, both from a code and a gameplay perspective. This part implements
unique attack animations, adds alternate attack modes for items and
fixes some minor oversights.

Items now have unique attack animation based on their sharpness - sharp
items are now swung in an arc, while pointy items are thrust forward.
This change is ***purely visual***, this is not swing combat. (However,
this does assign icon rotation data to many items, which should help
swing combat later down the line).

Certain items like knives and swords now have secondary attacks - right
clicks will perform stabbing attacks instead of slashing for a chance to
leave piercing wounds, albeit with slightly lower damage - trying to
stick a katana through someone won't get you very far!

https://github.com/user-attachments/assets/1f92bbcd-9aa1-482f-bc26-5e84fe2a07e1

Turns out that spears acted as oversized knives this entire time, being
SHARP_EDGED instead of SHARP_POINTY - in order for their animations to
make sense, they're now once again pointy (according to comment,
originally they were made sharp because piercing wounds weren't very
threatening, which is no longer the case)

Another major change is that structure damage is now influenced by armor
penetration - I am not sure if this is intentional or not, but attacking
item's AP never applied to non-mob damage.

Additionally, also fixes an issue where attack verbs for you and
everyone else may differ.
2024-12-17 12:35:52 -06:00

109 lines
3.5 KiB
Plaintext

GLOBAL_DATUM(bridge_axe, /obj/item/fireaxe)
/*
* Fireaxe
*/
/obj/item/fireaxe // DEM AXES MAN, marker -Agouri
name = "fire axe"
desc = "Truly, the weapon of a madman. Who would think to fight fire with an axe?"
icon = 'icons/obj/weapons/fireaxe.dmi'
icon_state = "fireaxe0"
base_icon_state = "fireaxe"
lefthand_file = 'icons/mob/inhands/weapons/axes_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/axes_righthand.dmi'
force = 5
throwforce = 15
demolition_mod = 1.25
w_class = WEIGHT_CLASS_BULKY
obj_flags = CONDUCTS_ELECTRICITY
slot_flags = ITEM_SLOT_BACK
attack_verb_continuous = list("attacks", "chops", "cleaves", "tears", "lacerates", "cuts")
attack_verb_simple = list("attack", "chop", "cleave", "tear", "lacerate", "cut")
hitsound = 'sound/items/weapons/bladeslice.ogg'
sharpness = SHARP_EDGED
armor_type = /datum/armor/item_fireaxe
resistance_flags = FIRE_PROOF
wound_bonus = -15
bare_wound_bonus = 20
/// How much damage to do unwielded
var/force_unwielded = 5
/// How much damage to do wielded
var/force_wielded = 24
/datum/armor/item_fireaxe
fire = 100
acid = 30
/obj/item/fireaxe/Initialize(mapload)
. = ..()
if(!GLOB.bridge_axe && istype(get_area(src), /area/station/command))
GLOB.bridge_axe = src
AddComponent(/datum/component/butchering, \
speed = 10 SECONDS, \
effectiveness = 80, \
bonus_modifier = 0 , \
butcher_sound = hitsound, \
)
//axes are not known for being precision butchering tools
AddComponent(/datum/component/two_handed, force_unwielded=force_unwielded, force_wielded=force_wielded, icon_wielded="[base_icon_state]1")
/obj/item/fireaxe/Destroy()
if(GLOB.bridge_axe == src)
GLOB.bridge_axe = null
return ..()
/obj/item/fireaxe/update_icon_state()
icon_state = "[base_icon_state]0"
return ..()
/obj/item/fireaxe/suicide_act(mob/living/user)
user.visible_message(span_suicide("[user] axes [user.p_them()]self from head to toe! It looks like [user.p_theyre()] trying to commit suicide!"))
return BRUTELOSS
/obj/item/fireaxe/afterattack(atom/target, mob/user, click_parameters)
if(!HAS_TRAIT(src, TRAIT_WIELDED)) //destroys windows and grilles in one hit
return
if(target.resistance_flags & INDESTRUCTIBLE)
return
if(istype(target, /obj/structure/window) || istype(target, /obj/structure/grille))
target.atom_destruction("fireaxe")
/*
* Bone Axe
*/
/obj/item/fireaxe/boneaxe // Blatant imitation of the fireaxe, but made out of bone.
name = "bone axe"
desc = "A large, vicious axe crafted out of several sharpened bone plates and crudely tied together. Made of monsters, by killing monsters, for killing monsters."
icon_state = "bone_axe0"
base_icon_state = "bone_axe"
icon_angle = 180
force_unwielded = 5
force_wielded = 23
/*
* Metal Hydrogen Axe
*/
/obj/item/fireaxe/metal_h2_axe
name = "metallic hydrogen axe"
desc = "A lightweight crowbar with an extreme sharp fire axe head attached. It trades its heft as a weapon by making it easier to carry around when holstered to suits without having to sacrifice your backpack."
icon_state = "metalh2_axe0"
base_icon_state = "metalh2_axe"
icon_angle = -45
force_unwielded = 5
force_wielded = 15
demolition_mod = 2
tool_behaviour = TOOL_CROWBAR
toolspeed = 1
usesound = 'sound/items/tools/crowbar.ogg'
//boarding axe
/obj/item/fireaxe/boardingaxe
name = "boarding axe"
desc = "A hulking cleaver that feels like a burden just looking at it. Seems excellent at halving obstacles like windows, airlocks, barricades and people."
icon_state = "boarding_axe0"
base_icon_state = "boarding_axe"
force_unwielded = 5
force_wielded = 30
demolition_mod = 3