LandSandBoat / server

:sailboat: LandSandBoat - a server emulator for Final Fantasy XI
https://landsandboat.github.io/server/
GNU General Public License v3.0
298 stars 601 forks source link

Chi blast boost stacking formula wrong #824

Open ShiyoKozuki opened 3 years ago

ShiyoKozuki commented 3 years ago

Additional Information (Steps to reproduce/Expected behavior) : Only stacks once. https://github.com/LandSandBoat/server/blob/2dbae3a1d7e3de544670f35051620660d5f9205f/scripts/globals/abilities/chi_blast.lua#L18

Maybe set a var that +1's for every boost stack?

boost.lua:

    local boost =  player:getCharVar("boost")

    if player:hasStatusEffect(xi.effect.BOOST) then
        local effect = player:getStatusEffect(xi.effect.BOOST)
        effect:setPower(effect:getPower() + power)
        player:addMod(xi.mod.ATTP, power)
        boost = boost + 1
        player:setCharVar("boost", boost)
    else
        player:addStatusEffect(xi.effect.BOOST, power, 0, 180)
        player:setCharVar("boost", 1)
    end

Chi_blast.lua:

    local boost = player:getStatusEffect(xi.effect.BOOST)
    local multiplier = player:getCharVar("boost") -- Get boost variable from abilities/boost.lua
    if multiplier == 0 then -- If buff isn't active, don't multiply by zero!
        multiplier = 1
    end
    if boost ~= nil then
        multiplier = multiplier * ( (boost:getPower()/100) * 4 + 1)  -- power is the raw % atk boost. Get boost damage bonus
    end

    local dmg = math.floor((player:getStat(xi.mod.MND) * (0.5 + (math.random() / 2))) * multiplier) / 3 -- Formula from BG wiki

    local penance = player:getMerit(xi.merit.PENANCE)

    if penance > 0 then
        target:delStatusEffect(xi.effect.INHIBIT_TP)
        target:addStatusEffect(xi.effect.INHIBIT_TP,25,3,penance)
    end

    dmg = utils.stoneskin(target, dmg)
    target:takeDamage(dmg, player, xi.attackType.SPECIAL, xi.damageType.ELEMENTAL)
    target:updateEnmityFromDamage(player, dmg)
    target:updateClaim(player)
    player:delStatusEffect(xi.effect.BOOST)
    player:setCharVar("boost", 0)
TeoTwawki commented 3 years ago

This isn't surprising will will likely not be fixed right away due to SE changing what boost even does and we have not updated.

And when we do 1st thing my own server will do is revert the change coz I hate modern retail boost effect. They stopped it from stacking up. its a single use now...and its based on your attack delay and increases your delay its just $#%^& $#^%# SONUVA #$% :sob:

Skerxan commented 3 years ago

Might be cool if you can choose which Boost you want for your server like the "Adoulin WS changes" on/off.

zach2good commented 3 years ago

Did we have a discussion somewhere about all of the opt-in things we wanted to shift out into modules?

zach2good commented 3 years ago

Ah, only this far:

era/
    era_cure_formula.lua
    era_dynamis.lua
    era_exp_tables.lua
    era_genkai_quests.lua
    era_high_level_mob_adjustments.lua
    era_land_king_system.lua
    era_magic_damage.lua
    era_pre_nerf_monk_boost.lua
    era_pre_nerf_ranger.lua
    era_treasure_hunter_style.lua