mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 19:47:22 +01:00
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>
This commit is contained in:
@@ -370,88 +370,6 @@
|
||||
new /obj/effect/decal/cleanable/ash(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/item/bostaff
|
||||
name = "bo staff"
|
||||
desc = "A long, tall staff made of polished wood. Traditionally used in ancient old-Earth martial arts. Can be wielded to both kill and incapacitate."
|
||||
icon = 'icons/obj/weapons/melee.dmi'
|
||||
icon_state = "bostaff0"
|
||||
base_icon_state = "bostaff"
|
||||
lefthand_file = 'icons/mob/inhands/staves_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/staves_righthand.dmi'
|
||||
force = 10
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
throwforce = 20
|
||||
attack_verb = list("smashed", "slammed", "whacked", "thwacked")
|
||||
|
||||
/obj/item/bostaff/Initialize(mapload)
|
||||
. = ..()
|
||||
AddComponent(/datum/component/parry, _stamina_constant = 2, _stamina_coefficient = 0.5, _parryable_attack_types = ALL_ATTACK_TYPES)
|
||||
AddComponent(/datum/component/two_handed, force_wielded = 24, force_unwielded = force, icon_wielded = "[base_icon_state]1")
|
||||
|
||||
/obj/item/bostaff/update_icon_state()
|
||||
icon_state = "[base_icon_state]0"
|
||||
|
||||
/obj/item/bostaff/attack__legacy__attackchain(mob/target, mob/living/user)
|
||||
add_fingerprint(user)
|
||||
if(HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50))
|
||||
to_chat(user, "<span class ='warning'>You club yourself over the head with [src].</span>")
|
||||
user.Weaken(6 SECONDS)
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
H.apply_damage(2*force, BRUTE, "head")
|
||||
else
|
||||
user.take_organ_damage(2*force)
|
||||
return
|
||||
if(isrobot(target))
|
||||
return ..()
|
||||
if(!isliving(target))
|
||||
return ..()
|
||||
var/mob/living/carbon/C = target
|
||||
if(C.stat)
|
||||
to_chat(user, SPAN_WARNING("It would be dishonorable to attack a foe while [C.p_they()] cannot retaliate."))
|
||||
return
|
||||
if(HAS_TRAIT(user, TRAIT_PACIFISM))
|
||||
to_chat(user, SPAN_WARNING("You feel violence is not the answer."))
|
||||
return
|
||||
switch(user.a_intent)
|
||||
if(INTENT_DISARM)
|
||||
if(!HAS_TRAIT(src, TRAIT_WIELDED))
|
||||
return ..()
|
||||
if(!ishuman(target))
|
||||
return ..()
|
||||
|
||||
var/mob/living/carbon/human/H = target
|
||||
var/list/fluffmessages = list("[user] clubs [H] with [src]!", \
|
||||
"[user] smacks [H] with the butt of [src]!", \
|
||||
"[user] broadsides [H] with [src]!", \
|
||||
"[user] smashes [H]'s head with [src]!", \
|
||||
"[user] beats [H] with front of [src]!", \
|
||||
"[user] twirls and slams [H] with [src]!")
|
||||
H.visible_message(SPAN_WARNING("[pick(fluffmessages)]"), \
|
||||
SPAN_USERDANGER("[pick(fluffmessages)]"))
|
||||
playsound(get_turf(user), 'sound/effects/woodhit.ogg', 75, TRUE, -1)
|
||||
H.apply_damage(rand(13,20), STAMINA)
|
||||
if(prob(10))
|
||||
H.visible_message(SPAN_WARNING("[H] collapses!"), \
|
||||
SPAN_USERDANGER("Your legs give out!"))
|
||||
H.Weaken(8 SECONDS)
|
||||
if(H.getStaminaLoss() && !H.IsSleeping())
|
||||
var/total_health = (H.health - H.getStaminaLoss())
|
||||
if(total_health <= HEALTH_THRESHOLD_CRIT && !H.stat)
|
||||
H.visible_message(SPAN_WARNING("[user] delivers a heavy hit to [H]'s head, knocking [H.p_them()] out cold!"), \
|
||||
SPAN_USERDANGER("[user] knocks you unconscious!"))
|
||||
H.SetSleeping(60 SECONDS)
|
||||
H.adjustBrainLoss(25)
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/bostaff/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
if(HAS_TRAIT(src, TRAIT_WIELDED))
|
||||
return ..()
|
||||
return FALSE
|
||||
|
||||
/atom/movable/screen/combo
|
||||
icon_state = ""
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
|
||||
Reference in New Issue
Block a user