Skip to content

Commit 4472d02

Browse files
authored
Merge pull request #9857 from Xaver-DaRed/bind
[magic] Fix Bind allowed resist state value and duration calculation
2 parents 99092bf + b2e1d61 commit 4472d02

2 files changed

Lines changed: 2 additions & 7 deletions

File tree

scripts/data/status_effect_tables.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ xi.data.statusEffect.dataTable =
3737
[xi.effect.ADDLE ] = { 2, 0, 0, xi.effect.NOCTURNE, xi.element.FIRE, xi.immunity.ADDLE, xi.mod.SLOWRES, 0, 0, xi.mod.ADDLE_IMMUNOBREAK }, -- Addle cant be immunobroken?
3838
[xi.effect.AMNESIA ] = { 2, 0, 0, 0, xi.element.FIRE, 0, xi.mod.AMNESIARES, 0, xi.mod.AMNESIA_MEVA, 0 },
3939
[xi.effect.ATTACK_DOWN ] = { 3, 0, 0, 0, xi.element.WATER, 0, 0, 0, 0, 0 },
40-
[xi.effect.BIND ] = { 1, 0, 0, 0, xi.element.ICE, xi.immunity.BIND, xi.mod.BINDRES, xi.mod.BIND_RES_RANK, xi.mod.BIND_MEVA, xi.mod.BIND_IMMUNOBREAK },
40+
[xi.effect.BIND ] = { 2, 0, 0, 0, xi.element.ICE, xi.immunity.BIND, xi.mod.BINDRES, xi.mod.BIND_RES_RANK, xi.mod.BIND_MEVA, xi.mod.BIND_IMMUNOBREAK },
4141
[xi.effect.BIO ] = { 4, 0, xi.effect.DIA, 0, xi.element.DARK, 0, 0, 0, 0, 0 },
4242
[xi.effect.BLINDNESS ] = { 1, 0, 0, 0, xi.element.DARK, xi.immunity.BLIND, xi.mod.BLINDRES, xi.mod.BLIND_RES_RANK, xi.mod.BLIND_MEVA, xi.mod.BLIND_IMMUNOBREAK },
4343
[xi.effect.BURN ] = { 2, xi.effect.DROWN, 0, xi.effect.FROST, xi.element.FIRE, 0, 0, 0, 0, 0 },

scripts/globals/spells/enfeebling_spell.lua

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -319,13 +319,8 @@ end
319319
xi.spells.enfeebling.calculateDuration = function(caster, target, spellId, spellEffect, skillType)
320320
local duration = pTable[spellId][column.BASE_DURATION] -- Get base duration.
321321

322-
-- BIND spells have a special random duration the follows a normal distribution with mean=30 and std=12
323322
if spellEffect == xi.effect.BIND then
324-
-- Use the Box-Muller transform to change uniform dist sample to the normal dist sample
325-
local z0 = math.sqrt(-2 * math.log(math.random())) * math.cos(2 * math.pi * math.random())
326-
327-
---@cast duration integer
328-
duration = utils.clamp(math.floor(30 + z0 * 12), 1, duration)
323+
duration = math.random(13, 60)
329324
end
330325

331326
-- Additions to base duration.

0 commit comments

Comments
 (0)