Skip to content

Commit

Permalink
Combat stances FIX
Browse files Browse the repository at this point in the history
  • Loading branch information
VoiceInYourHead committed May 29, 2024
1 parent b6ef04c commit 722979b
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mods/_fd/combat_stances/code/item.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
/obj/item/attack_self(mob/living/carbon/user)
. = ..()

if(melee_strikes)
var/obj/item/melee/I

if(melee_strikes && !istype(I, /obj/item/melee/energy/))
swap_stances(user)

/obj/item/proc/swap_stances(mob/user)
Expand Down
24 changes: 24 additions & 0 deletions mods/_fd/combat_stances/code/weapons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
melee_strikes = list(/singleton/combo_strike/swipe_strike/sword_slashes, /singleton/combo_strike/swipe_strike/mixed_combo)
lunge_dist = 4

/obj/item/material/armblade/resolve_attackby(atom/atom, mob/living/user, click_params)
if(!isnull(melee_strike) && !user.skill_check(SKILL_COMBAT, SKILL_EXPERIENCED) && prob(src.fail_chance))
return 1

..()

/obj/item/material/armblade/claws
melee_strikes = list(/singleton/combo_strike/precise_strike/fast_attacks)

Expand All @@ -18,6 +24,12 @@
fail_chance = 30
lunge_dist = 2

/obj/item/melee/baton/cattleprod/AltClick(mob/user)
if(melee_strikes)
swap_stances(user)

..()

/obj/item/melee/cultblade
melee_strikes = list(/singleton/combo_strike/swipe_strike/sword_slashes, /singleton/combo_strike/swipe_strike/mixed_combo)
lunge_dist = 3
Expand All @@ -26,11 +38,23 @@
melee_strikes = list(/singleton/combo_strike/swipe_strike/sword_slashes, /singleton/combo_strike/swipe_strike/mixed_combo)
fail_chance = 40

/obj/item/melee/energy/sword/AltClick(mob/user)
if(melee_strikes)
swap_stances(user)

..()

/obj/item/melee/energy/blade
melee_strikes = list(/singleton/combo_strike/swipe_strike/sword_slashes, /singleton/combo_strike/swipe_strike/mixed_combo)
fail_chance = 60
lunge_dist = 4

/obj/item/melee/energy/blade/AltClick(mob/user)
if(melee_strikes)
swap_stances(user)

..()

/obj/item/material/harpoon
melee_strikes = list(/singleton/combo_strike/swipe_strike/polearm_mixed)

Expand Down

0 comments on commit 722979b

Please sign in to comment.