Skip to content

Commit

Permalink
Dont use forceshield parry when invincible
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiskster committed Oct 12, 2024
1 parent d36f1f2 commit ceb9bb5
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/Lua/pizzaface.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,18 @@ PTSR.PFMaskData = {
}

function PTSR:ForceShieldParry(toucher, special)
PTSR.DoParry(toucher, special)

PTSR.DoParryAnim(toucher, true)
PTSR.DoParryAnim(special)

if toucher.player.powers[pw_shield] & SH_FORCEHP then
toucher.player.powers[pw_shield] = SH_FORCE|((toucher.player.powers[pw_shield] & SH_FORCEHP) - 1)
else
toucher.player.powers[pw_shield] = SH_NONE
P_DoPlayerPain(toucher.player)
if not toucher.player.powers[pw_invulnerability] then
PTSR.DoParry(toucher, special)

PTSR.DoParryAnim(toucher, true)
PTSR.DoParryAnim(special)

if toucher.player.powers[pw_shield] & SH_FORCEHP then
toucher.player.powers[pw_shield] = SH_FORCE|((toucher.player.powers[pw_shield] & SH_FORCEHP) - 1)
else
toucher.player.powers[pw_shield] = SH_NONE
P_DoPlayerPain(toucher.player)
end
end
end

Expand Down

0 comments on commit ceb9bb5

Please sign in to comment.