LandSandBoat / server

:sailboat: LandSandBoat - a server emulator for Final Fantasy XI. Just an X-34 landspeeder out for a drive.

Home Page:https://landsandboat.github.io/server/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸ› Mob AEs with 100% Proc Rate shouldn't be level corrected

CatsEyeXI opened this issue Β· comments

I affirm:

  • I understand that if I do not agree to the following points by completing the checkboxes my issue will be ignored.
  • I have read and understood the Contributing Guide and the Code of Conduct.
  • I have searched existing issues to see if the issue has already been opened, and I have checked the commit log to see if the issue has been resolved since my server was last updated.

OS / platform the server is running (if known)

Windows 10

Branch affected by issue

base

Steps to reproduce

entity.onAdditionalEffect = function(mob, target, damage)
    return xi.mob.onAddEffect(mob, target, damage, xi.mob.ae.ENFIRE, { chance = 100, power = 35 })
end

Turn on debug prints in mobs.lua, see that the chance returned is actually 15.

Expected behavior

100% chance should be a 100% chance, not 15.

specifically its 15 in this print

-- target:printToPlayer(string.format('Chance: %i', chance)) -- DEBUG

because the players level was 18 levels above the monsters level

the correction of "chance" should only occur when it is less than 100% but its being done anyway