Skip to content

Commit

Permalink
don't use blind fight for non-melee attacks or incorporeal miss chance
Browse files Browse the repository at this point in the history
  • Loading branch information
bmos committed Dec 6, 2020
1 parent d980962 commit 5e61380
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/manager_ammunition.lua
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,10 @@ function onMissChance_new(rSource, rTarget, rRoll)
local bHit = false;
-- END
if nTotal <= nMissChance and hasSpecialAbility(rSource, "Blind-Fight", true, false, false, true) then -- bmos adding blind-fight
if string.match(rMessage.text, "%[BLIND%-FIGHT%]") then
if string.match(rMessage.text, "%[BLIND%-FIGHT%]") or
string.match(rMessage.text, "%[ATTACK.*%((%w+)%)%]") ~= 'M' or
(EffectManager35E.hasEffect(rTarget, "Incorporeal") and not string.match(rMessage.text, "%[INCORPOREAL%]")) then

rMessage.text = rMessage.text .. " [MISS]";
removeVar = true;
if rTarget then
Expand Down

0 comments on commit 5e61380

Please sign in to comment.