Files
6a83c1ad67 Migrate two-handed weapons to the new attack chain. (#32313)
* Migrate two-handed weapons to the new attack chain.

* Apply suggestions from CRUNCH review.

Co-authored-by: CRUNCH <143041327+CRUNCH-Borg@users.noreply.github.com>
Signed-off-by: Alan <alfalfascout@users.noreply.github.com>

* Separate two-handed weapons into several files in their own folder.

* Formatting tweaks.

* Apply suggestions from CRUNCH review.

* Include paradise.dme.

* Migrate a bit more, clean up a bit more.

* Apply suggestions from CRUNCH review.

Co-authored-by: CRUNCH <143041327+CRUNCH-Borg@users.noreply.github.com>
Signed-off-by: Alan <alfalfascout@users.noreply.github.com>

* Apply suggestions from CRUNCH review

Co-authored-by: CRUNCH <143041327+CRUNCH-Borg@users.noreply.github.com>
Signed-off-by: Alan <alfalfascout@users.noreply.github.com>

* Hopefully resolve CRLF error.

* Define some variables.

* Apply suggestions from CRUNCH review.

Co-authored-by: CRUNCH <143041327+CRUNCH-Borg@users.noreply.github.com>
Signed-off-by: Alan <alfalfascout@users.noreply.github.com>

* Apply suggestions from CRUNCH review.

Co-authored-by: CRUNCH <143041327+CRUNCH-Borg@users.noreply.github.com>
Signed-off-by: Alan <alfalfascout@users.noreply.github.com>

* Apply suggestions from CRUNCH review

Co-authored-by: CRUNCH <143041327+CRUNCH-Borg@users.noreply.github.com>
Signed-off-by: Alan <alfalfascout@users.noreply.github.com>

* Fix supermatter halberd dusting condition, spelling errors.

* Apply suggestion from CRUNCH review.

Co-authored-by: CRUNCH <143041327+CRUNCH-Borg@users.noreply.github.com>
Signed-off-by: Alan <alfalfascout@users.noreply.github.com>

* GITHUB NO. PUT THAT BACK.

* Fix pyro claws door force.

* Restore the coveted trailing newline.

* Apply suggestion from CRUNCH review.

Co-authored-by: CRUNCH <143041327+CRUNCH-Borg@users.noreply.github.com>
Signed-off-by: Alan <alfalfascout@users.noreply.github.com>

* Migrate bo staff to the two handed folder and new attack chain.

* Apply suggestions from CRUNCH review.

Co-authored-by: CRUNCH <143041327+CRUNCH-Borg@users.noreply.github.com>
Signed-off-by: Alan <alfalfascout@users.noreply.github.com>

---------

Signed-off-by: Alan <alfalfascout@users.noreply.github.com>
Co-authored-by: CRUNCH <143041327+CRUNCH-Borg@users.noreply.github.com>
2026-08-12 23:23:39 +00:00

110 lines
3.6 KiB
Plaintext

/*
* Fireaxe
*/
/// DEM AXES MAN, marker -Agouri
/obj/item/fireaxe
base_icon_state = "fireaxe"
lefthand_file = 'icons/mob/inhands/weapons_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons_righthand.dmi'
icon = 'icons/obj/weapons/melee.dmi'
icon_state = "fireaxe0"
name = "fire axe"
desc = "Truly, the weapon of a madman. Who would think to fight fire with an axe?"
force = 5
throwforce = 15
sharp = TRUE
w_class = WEIGHT_CLASS_BULKY
slot_flags = ITEM_SLOT_BACK
toolspeed = 0.25
attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut")
hitsound = 'sound/weapons/bladeslice.ogg'
usesound = 'sound/items/crowbar.ogg'
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, RAD = 0, FIRE = 100, ACID = 30)
resistance_flags = FIRE_PROOF
var/force_unwielded = 5
var/force_wielded = 24
new_attack_chain = TRUE
/obj/item/fireaxe/Initialize(mapload)
. = ..()
AddComponent(/datum/component/forces_doors_open)
AddComponent(/datum/component/parry, \
_stamina_constant = 2, \
_stamina_coefficient = 0.7, \
_parryable_attack_types = MELEE_ATTACK, \
_parry_cooldown = (10 / 3) SECONDS, \
_requires_two_hands = TRUE) // 2.3333 seconds of parry cooldown for 30% uptime.
AddComponent(/datum/component/two_handed, \
force_unwielded = force_unwielded, \
force_wielded = force_wielded, \
icon_wielded = "[base_icon_state]1")
/obj/item/fireaxe/update_icon_state() // Currently only here to fuck with the on-mob icons.
icon_state = "[base_icon_state]0"
return ..()
/obj/item/fireaxe/after_attack(atom/target, mob/user, proximity_flag, click_parameters)
if(!proximity_flag)
return FINISH_ATTACK
if(!HAS_TRAIT(src, TRAIT_WIELDED)) // Destroys windows and grilles in one hit.
return ..()
if(!istype(target, /obj/structure/window) && !istype(target, /obj/structure/grille))
return ..()
var/obj/structure/target_structure = target
target_structure.obj_destruction("fireaxe")
return FINISH_ATTACK
/// Blatant imitation of the fireaxe, but made out of bone.
/obj/item/fireaxe/boneaxe
icon_state = "bone_axe0"
base_icon_state = "bone_axe"
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."
force_wielded = 23
needs_permit = TRUE
/obj/item/fireaxe/energized
desc = "Someone with a love for fire axes decided to turn this one into a high-powered energy weapon. Seems excessive."
force_wielded = 35
armor_penetration_flat = 10
armor_penetration_percentage = 30
var/charge = 20
var/max_charge = 20
/obj/item/fireaxe/energized/Initialize(mapload)
. = ..()
// only update the new args
START_PROCESSING(SSobj, src)
AddComponent(/datum/component/two_handed, \
force_wielded = force_wielded, \
icon_wielded = "[base_icon_state]2")
/obj/item/fireaxe/energized/Destroy()
STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/fireaxe/energized/process()
charge = min(charge + 1, max_charge)
/obj/item/fireaxe/energized/after_attack(mob/living/target, mob/user, proximity_flag, click_parameters)
. = ..()
if(!HAS_TRAIT(src, TRAIT_WIELDED) || charge != max_charge)
return
if(!isliving(target))
return
charge = 0
playsound(loc, 'sound/magic/lightningbolt.ogg', 5, 1)
target.visible_message(
SPAN_DANGER("[user] slams the charged axe into [target] with all [user.p_their()] might!"),
SPAN_USERDANGER("[user] slams into you with incredible force!"),
SPAN_HEAR("You hear a collossal impact!")
)
do_sparks(1, 1, src)
target.KnockDown(8 SECONDS)
var/atom/throw_target = get_edge_target_turf(target, get_dir(src, get_step_away(target, src)))
target.throw_at(throw_target, 5, 1)
return FINISH_ATTACK