From 29a1f0202b6043881f1228d30e358acabeac34d0 Mon Sep 17 00:00:00 2001 From: Xaver-DaRed Date: Wed, 31 Dec 2025 19:20:57 +0100 Subject: [PATCH 1/4] Add "effect tier" column to action choose --- scripts/globals/combat/entity_behavior.lua | 57 +++++++++++++------ .../Balgas_Dais/mobs/Gilagoge_Tlugvi.lua | 38 ++++++------- .../zones/Balgas_Dais/mobs/Gola_Tlugvi.lua | 22 +++---- .../zones/Balgas_Dais/mobs/King_of_Batons.lua | 44 +++++++------- .../zones/Balgas_Dais/mobs/King_of_Coins.lua | 52 ++++++++--------- .../zones/Balgas_Dais/mobs/King_of_Cups.lua | 44 +++++++------- .../zones/Balgas_Dais/mobs/King_of_Swords.lua | 10 ++-- .../Balgas_Dais/mobs/Queen_of_Batons.lua | 44 +++++++------- .../zones/Balgas_Dais/mobs/Queen_of_Cups.lua | 44 +++++++------- .../Balgas_Dais/mobs/Ulagohvsdi_Tlugvi.lua | 22 +++---- .../Horlais_Peak/mobs/Dragonian_Minstrel.lua | 22 +++---- .../QuBia_Arena/mobs/Ghul-I-Beaban_blm.lua | 20 +++---- .../QuBia_Arena/mobs/Ghul-I-Beaban_drk.lua | 14 ++--- .../mobs/Rauu_the_Whaleswooner.lua | 32 +++++------ .../Waughroon_Shrine/mobs/Flayer_Franz.lua | 10 ++-- .../Waughroon_Shrine/mobs/Flesh_Eater.lua | 10 ++-- 16 files changed, 253 insertions(+), 232 deletions(-) diff --git a/scripts/globals/combat/entity_behavior.lua b/scripts/globals/combat/entity_behavior.lua index b2ad06e2550..cc7052af602 100644 --- a/scripts/globals/combat/entity_behavior.lua +++ b/scripts/globals/combat/entity_behavior.lua @@ -62,12 +62,13 @@ xi.combat.behavior.chooseAction = function(actor, mainTarget, optionalTargets, a -- Build new table with actions that meet the conditions. for entry = 1, #actionTable do - local actionId = actionTable[entry][1] -- The ID of the action. - local actionTarget = actionTable[entry][2] -- The main target of the action. - local actionAllowAllies = actionTable[entry][3] -- Boolean. Determine if we check "optionalTargets" tables for the condition. NOTE: Needs condition. - local actionType = actionTable[entry][4] -- Determines the condition type. - local actionCondition = actionTable[entry][5] -- The condition. (HP/MP under threshold, effect present.) - local actionWeight = actionTable[entry][6] -- How likely it will be for the action to be chosen. + local actionId = actionTable[entry][1] -- The ID of the action. + local actionTarget = actionTable[entry][2] -- The main target of the action. + local actionAllowAllies = actionTable[entry][3] -- Boolean. Determine if we check "optionalTargets" tables for the condition. NOTE: Needs condition. + local actionType = actionTable[entry][4] -- Determines the condition type. + local actionCondition = actionTable[entry][5] -- The condition. (HP/MP under threshold, effect present.) + local effectTier = actionTable[entry][6] or 0 -- Currently used only for effect tiers. + local actionWeight = actionTable[entry][7] or 100 -- How likely it will be for the action to be chosen. switch (actionType): caseof { @@ -151,7 +152,10 @@ xi.combat.behavior.chooseAction = function(actor, mainTarget, optionalTargets, a [xi.action.type.ENHANCING_TARGET] = function() -- Check self. - if not actor:hasStatusEffect(actionCondition) then + if + not actor:hasStatusEffect(actionCondition) and + not xi.data.statusEffect.isEffectNullified(actor, actionCondition, effectTier) + then table.insert(actionList, { actionId, actor, actionWeight }) end @@ -162,7 +166,8 @@ xi.combat.behavior.chooseAction = function(actor, mainTarget, optionalTargets, a allyEntity and allyEntity:isAlive() and allyEntity:checkDistance(actor) <= 8 and - not allyEntity:hasStatusEffect(actionCondition) + not allyEntity:hasStatusEffect(actionCondition) and + not xi.data.statusEffect.isEffectNullified(allyEntity, actionCondition, effectTier) then table.insert(actionList, { actionId, allyEntity, actionWeight }) end @@ -173,7 +178,10 @@ xi.combat.behavior.chooseAction = function(actor, mainTarget, optionalTargets, a -- For Self-targeted AoE enhancements. [xi.action.type.ENHANCING_FORCE_SELF] = function() -- Check self. - if not actor:hasStatusEffect(actionCondition) then + if + not actor:hasStatusEffect(actionCondition) and + not xi.data.statusEffect.isEffectNullified(actor, actionCondition, effectTier) + then table.insert(actionList, { actionId, actor, actionWeight }) -- Check allies. @@ -184,7 +192,8 @@ xi.combat.behavior.chooseAction = function(actor, mainTarget, optionalTargets, a allyEntity and allyEntity:isAlive() and allyEntity:checkDistance(actor) <= 8 and - not allyEntity:hasStatusEffect(actionCondition) + not allyEntity:hasStatusEffect(actionCondition) and + not xi.data.statusEffect.isEffectNullified(allyEntity, actionCondition, effectTier) then table.insert(actionList, { actionId, actor, actionWeight }) break @@ -195,19 +204,31 @@ xi.combat.behavior.chooseAction = function(actor, mainTarget, optionalTargets, a end, [xi.action.type.ENFEEBLING_TARGET] = function() - if not actionTarget:hasStatusEffect(actionCondition) then - if - (actionCondition == xi.effect.SILENCE and xi.data.job.isInnateCaster(actionTarget)) or - actionCondition ~= xi.effect.SILENCE - then - table.insert(actionList, { actionId, actionTarget, actionWeight }) - end + if + not actionTarget:hasStatusEffect(actionCondition) and + not xi.data.statusEffect.isEffectNullified(actor, actionCondition, effectTier) + then + -- Silence + if actionCondition == xi.effect.SILENCE then + if xi.data.job.isInnateCaster(actionTarget) then + table.insert(actionList, { actionId, actionTarget, actionWeight }) + end + + -- -- + -- elseif actionCondition == xi.effect. then + -- + -- else + -- table.insert(actionList, { actionId, actionTarget, actionWeight }) + -- end end end, -- For self-targeted AoE enfeeblements. Use with care. [xi.action.type.ENFEEBLING_FORCE_SELF] = function() - if not actionTarget:hasStatusEffect(actionCondition) then + if + not actionTarget:hasStatusEffect(actionCondition) and + not xi.data.statusEffect.isEffectNullified(actionTarget, actionCondition, effectTier) + then if (actionCondition == xi.effect.SILENCE and xi.data.job.isInnateCaster(actionTarget)) or actionCondition ~= xi.effect.SILENCE diff --git a/scripts/zones/Balgas_Dais/mobs/Gilagoge_Tlugvi.lua b/scripts/zones/Balgas_Dais/mobs/Gilagoge_Tlugvi.lua index dab61c5d0c1..a260473f4a1 100644 --- a/scripts/zones/Balgas_Dais/mobs/Gilagoge_Tlugvi.lua +++ b/scripts/zones/Balgas_Dais/mobs/Gilagoge_Tlugvi.lua @@ -82,25 +82,25 @@ end entity.onMobSpellChoose = function(mob, target, spellId) local spellList = { - [ 1] = { xi.magic.spell.BANISH_III, target, false, xi.action.type.DAMAGE_TARGET, nil, 100 }, - [ 2] = { xi.magic.spell.BANISHGA_II, target, false, xi.action.type.DAMAGE_TARGET, nil, 100 }, - [ 3] = { xi.magic.spell.HOLY, target, false, xi.action.type.DAMAGE_TARGET, nil, 100 }, - [ 4] = { xi.magic.spell.CURE_V, mob, true, xi.action.type.HEALING_TARGET, 33, 100 }, - [ 5] = { xi.magic.spell.CURAGA_II, mob, true, xi.action.type.HEALING_FORCE_SELF, 33, 100 }, - [ 6] = { xi.magic.spell.BLINDNA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.BLINDNESS, 100 }, - [ 7] = { xi.magic.spell.PARALYNA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.PARALYSIS, 100 }, - [ 8] = { xi.magic.spell.POISONA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.POISON, 100 }, - [ 9] = { xi.magic.spell.SILENA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.SILENCE, 100 }, - [10] = { xi.magic.spell.VIRUNA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.DISEASE, 100 }, - [11] = { xi.magic.spell.VIRUNA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.PLAGUE, 100 }, - [12] = { xi.magic.spell.AQUAVEIL, mob, false, xi.action.type.ENHANCING_TARGET, xi.effect.AQUAVEIL, 100 }, - [13] = { xi.magic.spell.BLINK, mob, false, xi.action.type.ENHANCING_TARGET, xi.effect.BLINK, 100 }, - [14] = { xi.magic.spell.PROTECT_IV, mob, true, xi.action.type.ENHANCING_TARGET, xi.effect.PROTECT, 25 }, - [15] = { xi.magic.spell.SHELL_IV, mob, true, xi.action.type.ENHANCING_TARGET, xi.effect.SHELL, 25 }, - [16] = { xi.magic.spell.DIA_II, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.DIA, 50 }, - [17] = { xi.magic.spell.DIAGA_II, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.DIA, 50 }, - [18] = { xi.magic.spell.PARALYZE, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.PARALYSIS, 100 }, - [19] = { xi.magic.spell.SILENCE, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.SILENCE, 100 }, + [ 1] = { xi.magic.spell.BANISH_III, target, false, xi.action.type.DAMAGE_TARGET, nil, 0, 100 }, + [ 2] = { xi.magic.spell.BANISHGA_II, target, false, xi.action.type.DAMAGE_TARGET, nil, 0, 100 }, + [ 3] = { xi.magic.spell.HOLY, target, false, xi.action.type.DAMAGE_TARGET, nil, 0, 100 }, + [ 4] = { xi.magic.spell.CURE_V, mob, true, xi.action.type.HEALING_TARGET, 33, 0, 100 }, + [ 5] = { xi.magic.spell.CURAGA_II, mob, true, xi.action.type.HEALING_FORCE_SELF, 33, 0, 100 }, + [ 6] = { xi.magic.spell.BLINDNA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.BLINDNESS, 0, 100 }, + [ 7] = { xi.magic.spell.PARALYNA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.PARALYSIS, 0, 100 }, + [ 8] = { xi.magic.spell.POISONA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.POISON, 0, 100 }, + [ 9] = { xi.magic.spell.SILENA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.SILENCE, 0, 100 }, + [10] = { xi.magic.spell.VIRUNA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.DISEASE, 0, 100 }, + [11] = { xi.magic.spell.VIRUNA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.PLAGUE, 0, 100 }, + [12] = { xi.magic.spell.AQUAVEIL, mob, false, xi.action.type.ENHANCING_TARGET, xi.effect.AQUAVEIL, 0, 100 }, + [13] = { xi.magic.spell.BLINK, mob, false, xi.action.type.ENHANCING_TARGET, xi.effect.BLINK, 0, 100 }, + [14] = { xi.magic.spell.PROTECT_IV, mob, true, xi.action.type.ENHANCING_TARGET, xi.effect.PROTECT, 0, 25 }, + [15] = { xi.magic.spell.SHELL_IV, mob, true, xi.action.type.ENHANCING_TARGET, xi.effect.SHELL, 0, 25 }, + [16] = { xi.magic.spell.DIA_II, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.DIA, 3, 50 }, + [17] = { xi.magic.spell.DIAGA_II, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.DIA, 3, 50 }, + [18] = { xi.magic.spell.PARALYZE, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.PARALYSIS, 0, 100 }, + [19] = { xi.magic.spell.SILENCE, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.SILENCE, 0, 100 }, } local groupTable = diff --git a/scripts/zones/Balgas_Dais/mobs/Gola_Tlugvi.lua b/scripts/zones/Balgas_Dais/mobs/Gola_Tlugvi.lua index bd504f53490..7849e171bcb 100644 --- a/scripts/zones/Balgas_Dais/mobs/Gola_Tlugvi.lua +++ b/scripts/zones/Balgas_Dais/mobs/Gola_Tlugvi.lua @@ -80,17 +80,17 @@ end entity.onMobSpellChoose = function(mob, target, spellId) local spellList = { - [ 1] = { xi.magic.spell.DRAIN, target, false, xi.action.type.DRAIN_HP, nil, 100 }, - [ 2] = { xi.magic.spell.ASPIR, target, false, xi.action.type.DRAIN_MP, nil, 100 }, - [ 3] = { xi.magic.spell.STUN, mob, false, xi.action.type.ENFEEBLING_EFFECT, xi.effect.STUN, 100 }, - [ 4] = { xi.magic.spell.ABSORB_TP, mob, false, xi.action.type.ENFEEBLING_EFFECT, nil, 100 }, - [ 5] = { xi.magic.spell.ABSORB_STR, mob, false, xi.action.type.ENFEEBLING_EFFECT, xi.effect.STR_DOWN, 100 }, - [ 6] = { xi.magic.spell.ABSORB_DEX, mob, false, xi.action.type.ENFEEBLING_EFFECT, xi.effect.DEX_DOWN, 100 }, - [ 7] = { xi.magic.spell.ABSORB_VIT, mob, false, xi.action.type.ENFEEBLING_EFFECT, xi.effect.VIT_DOWN, 100 }, - [ 8] = { xi.magic.spell.ABSORB_AGI, mob, false, xi.action.type.ENFEEBLING_EFFECT, xi.effect.AGI_DOWN, 100 }, - [ 9] = { xi.magic.spell.ABSORB_INT, mob, false, xi.action.type.ENFEEBLING_EFFECT, xi.effect.INT_DOWN, 100 }, - [10] = { xi.magic.spell.ABSORB_MND, mob, false, xi.action.type.ENFEEBLING_EFFECT, xi.effect.MND_DOWN, 100 }, - [11] = { xi.magic.spell.ABSORB_CHR, mob, false, xi.action.type.ENFEEBLING_EFFECT, xi.effect.CHR_DOWN, 100 }, + [ 1] = { xi.magic.spell.DRAIN, target, false, xi.action.type.DRAIN_HP, nil, 0, 100 }, + [ 2] = { xi.magic.spell.ASPIR, target, false, xi.action.type.DRAIN_MP, nil, 0, 100 }, + [ 3] = { xi.magic.spell.STUN, mob, false, xi.action.type.ENFEEBLING_EFFECT, xi.effect.STUN, 0, 100 }, + [ 4] = { xi.magic.spell.ABSORB_TP, mob, false, xi.action.type.ENFEEBLING_EFFECT, nil, 0, 100 }, + [ 5] = { xi.magic.spell.ABSORB_STR, mob, false, xi.action.type.ENFEEBLING_EFFECT, xi.effect.STR_DOWN, 0, 100 }, + [ 6] = { xi.magic.spell.ABSORB_DEX, mob, false, xi.action.type.ENFEEBLING_EFFECT, xi.effect.DEX_DOWN, 0, 100 }, + [ 7] = { xi.magic.spell.ABSORB_VIT, mob, false, xi.action.type.ENFEEBLING_EFFECT, xi.effect.VIT_DOWN, 0, 100 }, + [ 8] = { xi.magic.spell.ABSORB_AGI, mob, false, xi.action.type.ENFEEBLING_EFFECT, xi.effect.AGI_DOWN, 0, 100 }, + [ 9] = { xi.magic.spell.ABSORB_INT, mob, false, xi.action.type.ENFEEBLING_EFFECT, xi.effect.INT_DOWN, 0, 100 }, + [10] = { xi.magic.spell.ABSORB_MND, mob, false, xi.action.type.ENFEEBLING_EFFECT, xi.effect.MND_DOWN, 0, 100 }, + [11] = { xi.magic.spell.ABSORB_CHR, mob, false, xi.action.type.ENFEEBLING_EFFECT, xi.effect.CHR_DOWN, 0, 100 }, } return xi.combat.behavior.chooseAction(mob, target, nil, spellList) end diff --git a/scripts/zones/Balgas_Dais/mobs/King_of_Batons.lua b/scripts/zones/Balgas_Dais/mobs/King_of_Batons.lua index 4f534647ec7..2d60fd455e4 100644 --- a/scripts/zones/Balgas_Dais/mobs/King_of_Batons.lua +++ b/scripts/zones/Balgas_Dais/mobs/King_of_Batons.lua @@ -40,28 +40,28 @@ end entity.onMobSpellChoose = function(mob, target, spellId) local spellList = { - [ 1] = { xi.magic.spell.FIRE_IV, target, false, xi.action.type.DAMAGE_TARGET, nil, 100 }, - [ 2] = { xi.magic.spell.BLIZZARD_IV, target, false, xi.action.type.DAMAGE_TARGET, nil, 100 }, - [ 3] = { xi.magic.spell.AERO_IV, target, false, xi.action.type.DAMAGE_TARGET, nil, 100 }, - [ 4] = { xi.magic.spell.THUNDER_IV, target, false, xi.action.type.DAMAGE_TARGET, nil, 100 }, - [ 5] = { xi.magic.spell.WATER_IV, target, false, xi.action.type.DAMAGE_TARGET, nil, 100 }, - [ 6] = { xi.magic.spell.FIRAGA_III, target, false, xi.action.type.DAMAGE_TARGET, nil, 100 }, - [ 7] = { xi.magic.spell.THUNDAGA_III, target, false, xi.action.type.DAMAGE_TARGET, nil, 100 }, - [ 8] = { xi.magic.spell.DRAIN, target, false, xi.action.type.DRAIN_HP, nil, 100 }, - [ 9] = { xi.magic.spell.ASPIR, target, false, xi.action.type.DRAIN_MP, nil, 100 }, - [10] = { xi.magic.spell.STUN, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.STUN, 100 }, - [11] = { xi.magic.spell.BLIND, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.BLINDNESS, 100 }, - [12] = { xi.magic.spell.BIND, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.BIND, 100 }, - [13] = { xi.magic.spell.BURN, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.BURN, 100 }, - [14] = { xi.magic.spell.SHOCK, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.SHOCK, 100 }, - [15] = { xi.magic.spell.CHOKE, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.CHOKE, 100 }, - [16] = { xi.magic.spell.BIO_II, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.BIO, 100 }, - [17] = { xi.magic.spell.POISONGA_II, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.POISON, 100 }, - [18] = { xi.magic.spell.SLEEP, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.SLEEP_I, 25 }, - [19] = { xi.magic.spell.SLEEP_II, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.SLEEP_I, 25 }, - [20] = { xi.magic.spell.SLEEPGA, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.SLEEP_I, 25 }, - [21] = { xi.magic.spell.SLEEPGA_II, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.SLEEP_I, 25 }, - [22] = { xi.magic.spell.BLAZE_SPIKES, mob, false, xi.action.type.ENHANCING_FORCE_SELF, xi.effect.BLAZE_SPIKES, 100 }, + [ 1] = { xi.magic.spell.FIRE_IV, target, false, xi.action.type.DAMAGE_TARGET, nil, 0, 100 }, + [ 2] = { xi.magic.spell.BLIZZARD_IV, target, false, xi.action.type.DAMAGE_TARGET, nil, 0, 100 }, + [ 3] = { xi.magic.spell.AERO_IV, target, false, xi.action.type.DAMAGE_TARGET, nil, 0, 100 }, + [ 4] = { xi.magic.spell.THUNDER_IV, target, false, xi.action.type.DAMAGE_TARGET, nil, 0, 100 }, + [ 5] = { xi.magic.spell.WATER_IV, target, false, xi.action.type.DAMAGE_TARGET, nil, 0, 100 }, + [ 6] = { xi.magic.spell.FIRAGA_III, target, false, xi.action.type.DAMAGE_TARGET, nil, 0, 100 }, + [ 7] = { xi.magic.spell.THUNDAGA_III, target, false, xi.action.type.DAMAGE_TARGET, nil, 0, 100 }, + [ 8] = { xi.magic.spell.DRAIN, target, false, xi.action.type.DRAIN_HP, nil, 0, 100 }, + [ 9] = { xi.magic.spell.ASPIR, target, false, xi.action.type.DRAIN_MP, nil, 0, 100 }, + [10] = { xi.magic.spell.STUN, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.STUN, 0, 100 }, + [11] = { xi.magic.spell.BLIND, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.BLINDNESS, 0, 100 }, + [12] = { xi.magic.spell.BIND, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.BIND, 0, 100 }, + [13] = { xi.magic.spell.BURN, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.BURN, 0, 100 }, + [14] = { xi.magic.spell.SHOCK, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.SHOCK, 0, 100 }, + [15] = { xi.magic.spell.CHOKE, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.CHOKE, 0, 100 }, + [16] = { xi.magic.spell.BIO_II, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.BIO, 4, 100 }, + [17] = { xi.magic.spell.POISONGA_II, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.POISON, 0, 100 }, + [18] = { xi.magic.spell.SLEEP, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.SLEEP_I, 0, 50 }, + [19] = { xi.magic.spell.SLEEP_II, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.SLEEP_I, 0, 50 }, + [20] = { xi.magic.spell.SLEEPGA, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.SLEEP_I, 0, 50 }, + [21] = { xi.magic.spell.SLEEPGA_II, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.SLEEP_I, 0, 50 }, + [22] = { xi.magic.spell.BLAZE_SPIKES, mob, false, xi.action.type.ENHANCING_FORCE_SELF, xi.effect.BLAZE_SPIKES, 0, 100 }, } return xi.combat.behavior.chooseAction(mob, target, nil, spellList) diff --git a/scripts/zones/Balgas_Dais/mobs/King_of_Coins.lua b/scripts/zones/Balgas_Dais/mobs/King_of_Coins.lua index 90cd7cf9f38..baab2cfc46e 100644 --- a/scripts/zones/Balgas_Dais/mobs/King_of_Coins.lua +++ b/scripts/zones/Balgas_Dais/mobs/King_of_Coins.lua @@ -40,32 +40,32 @@ end entity.onMobSpellChoose = function(mob, target, spellId) local spellList = { - [ 1] = { xi.magic.spell.FIRE_III, target, false, xi.action.type.DAMAGE_TARGET, nil, 100 }, - [ 2] = { xi.magic.spell.BLIZZARD_III, target, false, xi.action.type.DAMAGE_TARGET, nil, 100 }, - [ 3] = { xi.magic.spell.AERO_III, target, false, xi.action.type.DAMAGE_TARGET, nil, 100 }, - [ 4] = { xi.magic.spell.WATER_III, target, false, xi.action.type.DAMAGE_TARGET, nil, 100 }, - [ 5] = { xi.magic.spell.THUNDER_III, target, false, xi.action.type.DAMAGE_TARGET, nil, 100 }, - [ 6] = { xi.magic.spell.STONE_IV, target, false, xi.action.type.DAMAGE_TARGET, nil, 100 }, - [ 7] = { xi.magic.spell.BIO_III, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.BIO, 100 }, - [ 8] = { xi.magic.spell.POISON_II, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.POISON, 100 }, - [ 9] = { xi.magic.spell.DIA_II, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.DIA, 100 }, - [10] = { xi.magic.spell.DIAGA_II, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.DIA, 100 }, - [11] = { xi.magic.spell.BIND, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.BIND, 100 }, - [12] = { xi.magic.spell.GRAVITY, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.WEIGHT, 100 }, - [13] = { xi.magic.spell.SLEEP, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.SLEEP_I, 50 }, - [14] = { xi.magic.spell.SLEEP_II, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.SLEEP_II, 50 }, - [15] = { xi.magic.spell.SLOW, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.SLOW, 100 }, - [16] = { xi.magic.spell.PARALYZE, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.PARALYSIS, 100 }, - [17] = { xi.magic.spell.BLIND, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.BLINDNESS, 100 }, - [18] = { xi.magic.spell.BLINK, mob, false, xi.action.type.ENHANCING_FORCE_SELF, xi.effect.BLINK, 100 }, - [19] = { xi.magic.spell.STONESKIN, mob, false, xi.action.type.ENHANCING_FORCE_SELF, xi.effect.STONESKIN, 100 }, - [20] = { xi.magic.spell.AQUAVEIL, mob, false, xi.action.type.ENHANCING_FORCE_SELF, xi.effect.AQUAVEIL, 100 }, - [21] = { xi.magic.spell.ENWATER, mob, false, xi.action.type.ENHANCING_FORCE_SELF, xi.effect.ENWATER, 100 }, - [22] = { xi.magic.spell.PROTECT_IV, mob, true, xi.action.type.ENHANCING_TARGET, xi.effect.PROTECT, 25 }, - [23] = { xi.magic.spell.SHELL_IV, mob, true, xi.action.type.ENHANCING_TARGET, xi.effect.SHELL, 25 }, - [24] = { xi.magic.spell.HASTE, mob, true, xi.action.type.ENHANCING_TARGET, xi.effect.HASTE, 100 }, - [25] = { xi.magic.spell.REGEN, mob, true, xi.action.type.ENHANCING_TARGET, xi.effect.REGEN, 100 }, - [26] = { xi.magic.spell.CURE_IV, mob, true, xi.action.type.HEALING_TARGET, 33, 100 }, + [ 1] = { xi.magic.spell.FIRE_III, target, false, xi.action.type.DAMAGE_TARGET, nil, 0, 100 }, + [ 2] = { xi.magic.spell.BLIZZARD_III, target, false, xi.action.type.DAMAGE_TARGET, nil, 0, 100 }, + [ 3] = { xi.magic.spell.AERO_III, target, false, xi.action.type.DAMAGE_TARGET, nil, 0, 100 }, + [ 4] = { xi.magic.spell.WATER_III, target, false, xi.action.type.DAMAGE_TARGET, nil, 0, 100 }, + [ 5] = { xi.magic.spell.THUNDER_III, target, false, xi.action.type.DAMAGE_TARGET, nil, 0, 100 }, + [ 6] = { xi.magic.spell.STONE_IV, target, false, xi.action.type.DAMAGE_TARGET, nil, 0, 100 }, + [ 7] = { xi.magic.spell.BIO_III, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.BIO, 6, 100 }, + [ 8] = { xi.magic.spell.POISON_II, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.POISON, 0, 100 }, + [ 9] = { xi.magic.spell.DIA_II, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.DIA, 3, 100 }, + [10] = { xi.magic.spell.DIAGA_II, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.DIA, 3, 100 }, + [11] = { xi.magic.spell.BIND, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.BIND, 0, 100 }, + [12] = { xi.magic.spell.GRAVITY, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.WEIGHT, 0, 100 }, + [13] = { xi.magic.spell.SLEEP, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.SLEEP_I, 0, 50 }, + [14] = { xi.magic.spell.SLEEP_II, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.SLEEP_II, 0, 50 }, + [15] = { xi.magic.spell.SLOW, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.SLOW, 3, 100 }, + [16] = { xi.magic.spell.PARALYZE, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.PARALYSIS, 0, 100 }, + [17] = { xi.magic.spell.BLIND, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.BLINDNESS, 0, 100 }, + [18] = { xi.magic.spell.BLINK, mob, false, xi.action.type.ENHANCING_FORCE_SELF, xi.effect.BLINK, 0, 100 }, + [19] = { xi.magic.spell.STONESKIN, mob, false, xi.action.type.ENHANCING_FORCE_SELF, xi.effect.STONESKIN, 0, 100 }, + [20] = { xi.magic.spell.AQUAVEIL, mob, false, xi.action.type.ENHANCING_FORCE_SELF, xi.effect.AQUAVEIL, 0, 100 }, + [21] = { xi.magic.spell.ENWATER, mob, false, xi.action.type.ENHANCING_FORCE_SELF, xi.effect.ENWATER, 0, 100 }, + [22] = { xi.magic.spell.PROTECT_IV, mob, true, xi.action.type.ENHANCING_TARGET, xi.effect.PROTECT, 0, 25 }, + [23] = { xi.magic.spell.SHELL_IV, mob, true, xi.action.type.ENHANCING_TARGET, xi.effect.SHELL, 0, 25 }, + [24] = { xi.magic.spell.HASTE, mob, true, xi.action.type.ENHANCING_TARGET, xi.effect.HASTE, 5, 100 }, + [25] = { xi.magic.spell.REGEN, mob, true, xi.action.type.ENHANCING_TARGET, xi.effect.REGEN, 0, 100 }, + [26] = { xi.magic.spell.CURE_IV, mob, true, xi.action.type.HEALING_TARGET, 33, 0, 100 }, } if target:hasStatusEffectByFlag(xi.effectFlag.DISPELABLE) then diff --git a/scripts/zones/Balgas_Dais/mobs/King_of_Cups.lua b/scripts/zones/Balgas_Dais/mobs/King_of_Cups.lua index d9cbc2ac5fe..920e94b5a1e 100644 --- a/scripts/zones/Balgas_Dais/mobs/King_of_Cups.lua +++ b/scripts/zones/Balgas_Dais/mobs/King_of_Cups.lua @@ -40,28 +40,28 @@ end entity.onMobSpellChoose = function(mob, target, spellId) local spellList = { - [ 1] = { xi.magic.spell.BANISH_III, target, false, xi.action.type.DAMAGE_TARGET, nil, 100 }, - [ 2] = { xi.magic.spell.BANISHGA_III, target, false, xi.action.type.DAMAGE_TARGET, nil, 100 }, - [ 3] = { xi.magic.spell.HOLY, target, false, xi.action.type.DAMAGE_TARGET, nil, 100 }, - [ 4] = { xi.magic.spell.DIA_II, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.DIA, 100 }, - [ 5] = { xi.magic.spell.DIAGA_II, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.DIA, 100 }, - [ 6] = { xi.magic.spell.PARALYZE, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.PARALYSIS, 100 }, - [ 7] = { xi.magic.spell.SLOW, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.SLOW, 100 }, - [ 8] = { xi.magic.spell.SILENCE, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.SILENCE, 100 }, - [ 9] = { xi.magic.spell.BLINK, mob, false, xi.action.type.ENHANCING_FORCE_SELF, xi.effect.BLINK, 100 }, - [10] = { xi.magic.spell.STONESKIN, mob, false, xi.action.type.ENHANCING_FORCE_SELF, xi.effect.STONESKIN, 100 }, - [11] = { xi.magic.spell.AQUAVEIL, mob, false, xi.action.type.ENHANCING_FORCE_SELF, xi.effect.AQUAVEIL, 100 }, - [12] = { xi.magic.spell.HASTE, mob, true, xi.action.type.ENHANCING_TARGET, xi.effect.HASTE, 100 }, - [13] = { xi.magic.spell.PROTECT_IV, mob, true, xi.action.type.ENHANCING_TARGET, xi.effect.PROTECT, 25 }, - [14] = { xi.magic.spell.SHELL_IV, mob, true, xi.action.type.ENHANCING_TARGET, xi.effect.SHELL, 25 }, - [15] = { xi.magic.spell.POISONA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.POISON, 100 }, - [16] = { xi.magic.spell.BLINDNA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.BLINDNESS, 100 }, - [17] = { xi.magic.spell.PARALYNA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.PARALYSIS, 100 }, - [18] = { xi.magic.spell.POISONA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.POISON, 100 }, - [19] = { xi.magic.spell.SILENA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.SILENCE, 100 }, - [20] = { xi.magic.spell.VIRUNA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.DISEASE, 100 }, - [21] = { xi.magic.spell.VIRUNA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.PLAGUE, 100 }, - [22] = { xi.magic.spell.CURE_V, mob, true, xi.action.type.HEALING_TARGET, 33, 100 }, + [ 1] = { xi.magic.spell.BANISH_III, target, false, xi.action.type.DAMAGE_TARGET, nil, 0, 100 }, + [ 2] = { xi.magic.spell.BANISHGA_III, target, false, xi.action.type.DAMAGE_TARGET, nil, 0, 100 }, + [ 3] = { xi.magic.spell.HOLY, target, false, xi.action.type.DAMAGE_TARGET, nil, 0, 100 }, + [ 4] = { xi.magic.spell.DIA_II, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.DIA, 3, 100 }, + [ 5] = { xi.magic.spell.DIAGA_II, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.DIA, 3, 100 }, + [ 6] = { xi.magic.spell.PARALYZE, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.PARALYSIS, 0, 100 }, + [ 7] = { xi.magic.spell.SLOW, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.SLOW, 3, 100 }, + [ 8] = { xi.magic.spell.SILENCE, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.SILENCE, 0, 100 }, + [ 9] = { xi.magic.spell.BLINK, mob, false, xi.action.type.ENHANCING_FORCE_SELF, xi.effect.BLINK, 0, 100 }, + [10] = { xi.magic.spell.STONESKIN, mob, false, xi.action.type.ENHANCING_FORCE_SELF, xi.effect.STONESKIN, 0, 100 }, + [11] = { xi.magic.spell.AQUAVEIL, mob, false, xi.action.type.ENHANCING_FORCE_SELF, xi.effect.AQUAVEIL, 0, 100 }, + [12] = { xi.magic.spell.HASTE, mob, true, xi.action.type.ENHANCING_TARGET, xi.effect.HASTE, 5, 100 }, + [13] = { xi.magic.spell.PROTECT_IV, mob, true, xi.action.type.ENHANCING_TARGET, xi.effect.PROTECT, 0, 25 }, + [14] = { xi.magic.spell.SHELL_IV, mob, true, xi.action.type.ENHANCING_TARGET, xi.effect.SHELL, 0, 25 }, + [15] = { xi.magic.spell.POISONA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.POISON, 0, 100 }, + [16] = { xi.magic.spell.BLINDNA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.BLINDNESS, 0, 100 }, + [17] = { xi.magic.spell.PARALYNA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.PARALYSIS, 0, 100 }, + [18] = { xi.magic.spell.POISONA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.POISON, 0, 100 }, + [19] = { xi.magic.spell.SILENA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.SILENCE, 0, 100 }, + [20] = { xi.magic.spell.VIRUNA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.DISEASE, 0, 100 }, + [21] = { xi.magic.spell.VIRUNA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.PLAGUE, 0, 100 }, + [22] = { xi.magic.spell.CURE_V, mob, true, xi.action.type.HEALING_TARGET, 33, 0, 100 }, } if mob:hasStatusEffectByFlag(xi.effectFlag.ERASABLE) then diff --git a/scripts/zones/Balgas_Dais/mobs/King_of_Swords.lua b/scripts/zones/Balgas_Dais/mobs/King_of_Swords.lua index 99fff6a5f5e..33344ccdd5e 100644 --- a/scripts/zones/Balgas_Dais/mobs/King_of_Swords.lua +++ b/scripts/zones/Balgas_Dais/mobs/King_of_Swords.lua @@ -40,11 +40,11 @@ end entity.onMobSpellChoose = function(mob, target, spellId) local spellList = { - [1] = { xi.magic.spell.BANISH_II, target, false, xi.action.type.DAMAGE_TARGET, nil, 100 }, - [2] = { xi.magic.spell.FLASH, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.FLASH, 100 }, - [3] = { xi.magic.spell.PROTECT_IV, mob, true, xi.action.type.ENHANCING_TARGET, xi.effect.PROTECT, 25 }, - [4] = { xi.magic.spell.SHELL_III, mob, true, xi.action.type.ENHANCING_TARGET, xi.effect.SHELL, 25 }, - [5] = { xi.magic.spell.CURE_IV, mob, true, xi.action.type.HEALING_TARGET, 33, 100 }, + [1] = { xi.magic.spell.BANISH_II, target, false, xi.action.type.DAMAGE_TARGET, nil, 0, 100 }, + [2] = { xi.magic.spell.FLASH, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.FLASH, 0, 100 }, + [3] = { xi.magic.spell.PROTECT_IV, mob, true, xi.action.type.ENHANCING_TARGET, xi.effect.PROTECT, 0, 25 }, + [4] = { xi.magic.spell.SHELL_III, mob, true, xi.action.type.ENHANCING_TARGET, xi.effect.SHELL, 0, 25 }, + [5] = { xi.magic.spell.CURE_IV, mob, true, xi.action.type.HEALING_TARGET, 33, 0, 100 }, } local groupTable = diff --git a/scripts/zones/Balgas_Dais/mobs/Queen_of_Batons.lua b/scripts/zones/Balgas_Dais/mobs/Queen_of_Batons.lua index 30a2a49e03c..78028850fe3 100644 --- a/scripts/zones/Balgas_Dais/mobs/Queen_of_Batons.lua +++ b/scripts/zones/Balgas_Dais/mobs/Queen_of_Batons.lua @@ -30,28 +30,28 @@ end entity.onMobSpellChoose = function(mob, target, spellId) local spellList = { - [ 1] = { xi.magic.spell.FIRE_IV, target, false, xi.action.type.DAMAGE_TARGET, nil, 100 }, - [ 2] = { xi.magic.spell.BLIZZARD_IV, target, false, xi.action.type.DAMAGE_TARGET, nil, 100 }, - [ 3] = { xi.magic.spell.AERO_IV, target, false, xi.action.type.DAMAGE_TARGET, nil, 100 }, - [ 4] = { xi.magic.spell.THUNDER_IV, target, false, xi.action.type.DAMAGE_TARGET, nil, 100 }, - [ 5] = { xi.magic.spell.WATER_IV, target, false, xi.action.type.DAMAGE_TARGET, nil, 100 }, - [ 6] = { xi.magic.spell.FIRAGA_III, target, false, xi.action.type.DAMAGE_TARGET, nil, 100 }, - [ 7] = { xi.magic.spell.THUNDAGA_III, target, false, xi.action.type.DAMAGE_TARGET, nil, 100 }, - [ 8] = { xi.magic.spell.DRAIN, target, false, xi.action.type.DRAIN_HP, nil, 100 }, - [ 9] = { xi.magic.spell.ASPIR, target, false, xi.action.type.DRAIN_MP, nil, 100 }, - [10] = { xi.magic.spell.STUN, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.STUN, 100 }, - [11] = { xi.magic.spell.BLIND, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.BLINDNESS, 100 }, - [12] = { xi.magic.spell.BIND, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.BIND, 100 }, - [13] = { xi.magic.spell.BURN, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.BURN, 100 }, - [14] = { xi.magic.spell.SHOCK, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.SHOCK, 100 }, - [15] = { xi.magic.spell.CHOKE, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.CHOKE, 100 }, - [16] = { xi.magic.spell.BIO_II, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.BIO, 100 }, - [17] = { xi.magic.spell.POISONGA_II, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.POISON, 100 }, - [18] = { xi.magic.spell.SLEEP, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.SLEEP_I, 25 }, - [19] = { xi.magic.spell.SLEEP_II, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.SLEEP_I, 25 }, - [20] = { xi.magic.spell.SLEEPGA, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.SLEEP_I, 25 }, - [21] = { xi.magic.spell.SLEEPGA_II, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.SLEEP_I, 25 }, - [22] = { xi.magic.spell.BLAZE_SPIKES, mob, false, xi.action.type.ENHANCING_FORCE_SELF, xi.effect.BLAZE_SPIKES, 100 }, + [ 1] = { xi.magic.spell.FIRE_IV, target, false, xi.action.type.DAMAGE_TARGET, nil, 0, 100 }, + [ 2] = { xi.magic.spell.BLIZZARD_IV, target, false, xi.action.type.DAMAGE_TARGET, nil, 0, 100 }, + [ 3] = { xi.magic.spell.AERO_IV, target, false, xi.action.type.DAMAGE_TARGET, nil, 0, 100 }, + [ 4] = { xi.magic.spell.THUNDER_IV, target, false, xi.action.type.DAMAGE_TARGET, nil, 0, 100 }, + [ 5] = { xi.magic.spell.WATER_IV, target, false, xi.action.type.DAMAGE_TARGET, nil, 0, 100 }, + [ 6] = { xi.magic.spell.FIRAGA_III, target, false, xi.action.type.DAMAGE_TARGET, nil, 0, 100 }, + [ 7] = { xi.magic.spell.THUNDAGA_III, target, false, xi.action.type.DAMAGE_TARGET, nil, 0, 100 }, + [ 8] = { xi.magic.spell.DRAIN, target, false, xi.action.type.DRAIN_HP, nil, 0, 100 }, + [ 9] = { xi.magic.spell.ASPIR, target, false, xi.action.type.DRAIN_MP, nil, 0, 100 }, + [10] = { xi.magic.spell.STUN, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.STUN, 0, 100 }, + [11] = { xi.magic.spell.BLIND, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.BLINDNESS, 0, 100 }, + [12] = { xi.magic.spell.BIND, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.BIND, 0, 100 }, + [13] = { xi.magic.spell.BURN, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.BURN, 0, 100 }, + [14] = { xi.magic.spell.SHOCK, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.SHOCK, 0, 100 }, + [15] = { xi.magic.spell.CHOKE, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.CHOKE, 0, 100 }, + [16] = { xi.magic.spell.BIO_II, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.BIO, 4, 100 }, + [17] = { xi.magic.spell.POISONGA_II, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.POISON, 0, 100 }, + [18] = { xi.magic.spell.SLEEP, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.SLEEP_I, 0, 50 }, + [19] = { xi.magic.spell.SLEEP_II, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.SLEEP_I, 0, 50 }, + [20] = { xi.magic.spell.SLEEPGA, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.SLEEP_I, 0, 50 }, + [21] = { xi.magic.spell.SLEEPGA_II, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.SLEEP_I, 0, 50 }, + [22] = { xi.magic.spell.BLAZE_SPIKES, mob, false, xi.action.type.ENHANCING_FORCE_SELF, xi.effect.BLAZE_SPIKES, 0, 100 }, } return xi.combat.behavior.chooseAction(mob, target, nil, spellList) diff --git a/scripts/zones/Balgas_Dais/mobs/Queen_of_Cups.lua b/scripts/zones/Balgas_Dais/mobs/Queen_of_Cups.lua index 8776c04afc2..f3d7d17ec69 100644 --- a/scripts/zones/Balgas_Dais/mobs/Queen_of_Cups.lua +++ b/scripts/zones/Balgas_Dais/mobs/Queen_of_Cups.lua @@ -30,28 +30,28 @@ end entity.onMobSpellChoose = function(mob, target, spellId) local spellList = { - [ 1] = { xi.magic.spell.BANISH_III, target, false, xi.action.type.DAMAGE_TARGET, nil, 100 }, - [ 2] = { xi.magic.spell.BANISHGA_III, target, false, xi.action.type.DAMAGE_TARGET, nil, 100 }, - [ 3] = { xi.magic.spell.HOLY, target, false, xi.action.type.DAMAGE_TARGET, nil, 100 }, - [ 4] = { xi.magic.spell.DIA_II, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.DIA, 100 }, - [ 5] = { xi.magic.spell.DIAGA_II, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.DIA, 100 }, - [ 6] = { xi.magic.spell.PARALYZE, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.PARALYSIS, 100 }, - [ 7] = { xi.magic.spell.SLOW, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.SLOW, 100 }, - [ 8] = { xi.magic.spell.SILENCE, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.SILENCE, 100 }, - [ 9] = { xi.magic.spell.BLINK, mob, false, xi.action.type.ENHANCING_FORCE_SELF, xi.effect.BLINK, 100 }, - [10] = { xi.magic.spell.STONESKIN, mob, false, xi.action.type.ENHANCING_FORCE_SELF, xi.effect.STONESKIN, 100 }, - [11] = { xi.magic.spell.AQUAVEIL, mob, false, xi.action.type.ENHANCING_FORCE_SELF, xi.effect.AQUAVEIL, 100 }, - [12] = { xi.magic.spell.HASTE, mob, true, xi.action.type.ENHANCING_TARGET, xi.effect.HASTE, 100 }, - [13] = { xi.magic.spell.PROTECT_IV, mob, true, xi.action.type.ENHANCING_TARGET, xi.effect.PROTECT, 25 }, - [14] = { xi.magic.spell.SHELL_IV, mob, true, xi.action.type.ENHANCING_TARGET, xi.effect.SHELL, 25 }, - [15] = { xi.magic.spell.POISONA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.POISON, 100 }, - [16] = { xi.magic.spell.BLINDNA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.BLINDNESS, 100 }, - [17] = { xi.magic.spell.PARALYNA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.PARALYSIS, 100 }, - [18] = { xi.magic.spell.POISONA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.POISON, 100 }, - [19] = { xi.magic.spell.SILENA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.SILENCE, 100 }, - [20] = { xi.magic.spell.VIRUNA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.DISEASE, 100 }, - [21] = { xi.magic.spell.VIRUNA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.PLAGUE, 100 }, - [22] = { xi.magic.spell.CURE_V, mob, true, xi.action.type.HEALING_TARGET, 33, 100 }, + [ 1] = { xi.magic.spell.BANISH_III, target, false, xi.action.type.DAMAGE_TARGET, nil, 0, 100 }, + [ 2] = { xi.magic.spell.BANISHGA_III, target, false, xi.action.type.DAMAGE_TARGET, nil, 0, 100 }, + [ 3] = { xi.magic.spell.HOLY, target, false, xi.action.type.DAMAGE_TARGET, nil, 0, 100 }, + [ 4] = { xi.magic.spell.DIA_II, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.DIA, 3, 100 }, + [ 5] = { xi.magic.spell.DIAGA_II, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.DIA, 3, 100 }, + [ 6] = { xi.magic.spell.PARALYZE, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.PARALYSIS, 0, 100 }, + [ 7] = { xi.magic.spell.SLOW, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.SLOW, 3, 100 }, + [ 8] = { xi.magic.spell.SILENCE, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.SILENCE, 0, 100 }, + [ 9] = { xi.magic.spell.BLINK, mob, false, xi.action.type.ENHANCING_FORCE_SELF, xi.effect.BLINK, 0, 100 }, + [10] = { xi.magic.spell.STONESKIN, mob, false, xi.action.type.ENHANCING_FORCE_SELF, xi.effect.STONESKIN, 0, 100 }, + [11] = { xi.magic.spell.AQUAVEIL, mob, false, xi.action.type.ENHANCING_FORCE_SELF, xi.effect.AQUAVEIL, 0, 100 }, + [12] = { xi.magic.spell.HASTE, mob, true, xi.action.type.ENHANCING_TARGET, xi.effect.HASTE, 5, 100 }, + [13] = { xi.magic.spell.PROTECT_IV, mob, true, xi.action.type.ENHANCING_TARGET, xi.effect.PROTECT, 0, 25 }, + [14] = { xi.magic.spell.SHELL_IV, mob, true, xi.action.type.ENHANCING_TARGET, xi.effect.SHELL, 0, 25 }, + [15] = { xi.magic.spell.POISONA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.POISON, 0, 100 }, + [16] = { xi.magic.spell.BLINDNA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.BLINDNESS, 0, 100 }, + [17] = { xi.magic.spell.PARALYNA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.PARALYSIS, 0, 100 }, + [18] = { xi.magic.spell.POISONA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.POISON, 0, 100 }, + [19] = { xi.magic.spell.SILENA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.SILENCE, 0, 100 }, + [20] = { xi.magic.spell.VIRUNA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.DISEASE, 0, 100 }, + [21] = { xi.magic.spell.VIRUNA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.PLAGUE, 0, 100 }, + [22] = { xi.magic.spell.CURE_V, mob, true, xi.action.type.HEALING_TARGET, 33, 0, 100 }, } if mob:hasStatusEffectByFlag(xi.effectFlag.ERASABLE) then diff --git a/scripts/zones/Balgas_Dais/mobs/Ulagohvsdi_Tlugvi.lua b/scripts/zones/Balgas_Dais/mobs/Ulagohvsdi_Tlugvi.lua index 5cff961e329..3eeb8d00d99 100644 --- a/scripts/zones/Balgas_Dais/mobs/Ulagohvsdi_Tlugvi.lua +++ b/scripts/zones/Balgas_Dais/mobs/Ulagohvsdi_Tlugvi.lua @@ -82,17 +82,17 @@ end entity.onMobSpellChoose = function(mob, target, spellId) local spellList = { - [ 1] = { xi.magic.spell.DOTON_NI, target, false, xi.action.type.DAMAGE_TARGET, nil, 100 }, - [ 2] = { xi.magic.spell.HYOTON_NI, target, false, xi.action.type.DAMAGE_TARGET, nil, 100 }, - [ 3] = { xi.magic.spell.HUTON_NI, target, false, xi.action.type.DAMAGE_TARGET, nil, 100 }, - [ 4] = { xi.magic.spell.KATON_NI, target, false, xi.action.type.DAMAGE_TARGET, nil, 100 }, - [ 5] = { xi.magic.spell.RAITON_NI, target, false, xi.action.type.DAMAGE_TARGET, nil, 100 }, - [ 6] = { xi.magic.spell.SUITON_NI, target, false, xi.action.type.DAMAGE_TARGET, nil, 100 }, - [ 7] = { xi.magic.spell.DOKUMORI_NI, mob, false, xi.action.type.ENFEEBLING_EFFECT, xi.effect.POISON, 100 }, - [ 8] = { xi.magic.spell.KURAYAMI_NI, mob, false, xi.action.type.ENFEEBLING_EFFECT, xi.effect.BLINDNESS, 100 }, - [ 9] = { xi.magic.spell.HOJO_NI, mob, false, xi.action.type.ENFEEBLING_EFFECT, xi.effect.SLOW, 100 }, - [10] = { xi.magic.spell.JUBAKU_NI, mob, false, xi.action.type.ENFEEBLING_EFFECT, xi.effect.PARALYSIS, 100 }, - [11] = { xi.magic.spell.UTSUSEMI_NI, mob, false, xi.action.type.ENHANCING_TARGET, xi.effect.COPY_IMAGE, 100 }, + [ 1] = { xi.magic.spell.DOTON_NI, target, false, xi.action.type.DAMAGE_TARGET, nil, 0, 100 }, + [ 2] = { xi.magic.spell.HYOTON_NI, target, false, xi.action.type.DAMAGE_TARGET, nil, 0, 100 }, + [ 3] = { xi.magic.spell.HUTON_NI, target, false, xi.action.type.DAMAGE_TARGET, nil, 0, 100 }, + [ 4] = { xi.magic.spell.KATON_NI, target, false, xi.action.type.DAMAGE_TARGET, nil, 0, 100 }, + [ 5] = { xi.magic.spell.RAITON_NI, target, false, xi.action.type.DAMAGE_TARGET, nil, 0, 100 }, + [ 6] = { xi.magic.spell.SUITON_NI, target, false, xi.action.type.DAMAGE_TARGET, nil, 0, 100 }, + [ 7] = { xi.magic.spell.DOKUMORI_NI, mob, false, xi.action.type.ENFEEBLING_EFFECT, xi.effect.POISON, 0, 100 }, + [ 8] = { xi.magic.spell.KURAYAMI_NI, mob, false, xi.action.type.ENFEEBLING_EFFECT, xi.effect.BLINDNESS, 0, 100 }, + [ 9] = { xi.magic.spell.HOJO_NI, mob, false, xi.action.type.ENFEEBLING_EFFECT, xi.effect.SLOW, 4, 100 }, + [10] = { xi.magic.spell.JUBAKU_NI, mob, false, xi.action.type.ENFEEBLING_EFFECT, xi.effect.PARALYSIS, 0, 100 }, + [11] = { xi.magic.spell.UTSUSEMI_NI, mob, false, xi.action.type.ENHANCING_TARGET, xi.effect.COPY_IMAGE, 0, 100 }, } return xi.combat.behavior.chooseAction(mob, target, nil, spellList) end diff --git a/scripts/zones/Horlais_Peak/mobs/Dragonian_Minstrel.lua b/scripts/zones/Horlais_Peak/mobs/Dragonian_Minstrel.lua index 798dca6e7ed..d685baeaf0d 100644 --- a/scripts/zones/Horlais_Peak/mobs/Dragonian_Minstrel.lua +++ b/scripts/zones/Horlais_Peak/mobs/Dragonian_Minstrel.lua @@ -56,17 +56,17 @@ end entity.onMobSpellChoose = function(mob, target, spellId) local spellList = { - { xi.magic.spell.VICTORY_MARCH, mob, false, xi.action.type.ENHANCING_FORCE_SELF, xi.effect.MARCH, 100 }, - { xi.magic.spell.VALOR_MINUET_IV, mob, false, xi.action.type.ENHANCING_FORCE_SELF, xi.effect.MINUET, 100 }, - { xi.magic.spell.KNIGHTS_MINNE_IV, mob, false, xi.action.type.ENHANCING_FORCE_SELF, xi.effect.MINNE, 100 }, - { xi.magic.spell.ARMYS_PAEON_V, mob, false, xi.action.type.ENHANCING_FORCE_SELF, xi.effect.PAEON, 100 }, - { xi.magic.spell.MAGES_BALLAD_II, mob, false, xi.action.type.ENHANCING_FORCE_SELF, xi.effect.BALLAD, 100 }, - { xi.magic.spell.UNCANNY_ETUDE, mob, false, xi.action.type.ENHANCING_FORCE_SELF, xi.effect.ETUDE, 100 }, - { xi.magic.spell.SWIFT_ETUDE, mob, false, xi.action.type.ENHANCING_FORCE_SELF, xi.effect.ETUDE, 100 }, - { xi.magic.spell.FOE_REQUIEM_VI, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.REQUIEM, 100 }, - { xi.magic.spell.BATTLEFIELD_ELEGY, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.ELEGY, 100 }, - { xi.magic.spell.HORDE_LULLABY, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.SLEEP_I, 100 }, - { xi.magic.spell.MAGIC_FINALE, target, false, xi.action.type.NONE, nil, 50 }, + { xi.magic.spell.VICTORY_MARCH, mob, false, xi.action.type.ENHANCING_FORCE_SELF, xi.effect.MARCH, 0, 100 }, + { xi.magic.spell.VALOR_MINUET_IV, mob, false, xi.action.type.ENHANCING_FORCE_SELF, xi.effect.MINUET, 0, 100 }, + { xi.magic.spell.KNIGHTS_MINNE_IV, mob, false, xi.action.type.ENHANCING_FORCE_SELF, xi.effect.MINNE, 0, 100 }, + { xi.magic.spell.ARMYS_PAEON_V, mob, false, xi.action.type.ENHANCING_FORCE_SELF, xi.effect.PAEON, 0, 100 }, + { xi.magic.spell.MAGES_BALLAD_II, mob, false, xi.action.type.ENHANCING_FORCE_SELF, xi.effect.BALLAD, 0, 100 }, + { xi.magic.spell.UNCANNY_ETUDE, mob, false, xi.action.type.ENHANCING_FORCE_SELF, xi.effect.ETUDE, 0, 100 }, + { xi.magic.spell.SWIFT_ETUDE, mob, false, xi.action.type.ENHANCING_FORCE_SELF, xi.effect.ETUDE, 0, 100 }, + { xi.magic.spell.FOE_REQUIEM_VI, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.REQUIEM, 0, 100 }, + { xi.magic.spell.BATTLEFIELD_ELEGY, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.ELEGY, 0, 100 }, + { xi.magic.spell.HORDE_LULLABY, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.SLEEP_I, 0, 100 }, + { xi.magic.spell.MAGIC_FINALE, target, false, xi.action.type.NONE, nil, 0, 50 }, } return xi.combat.behavior.chooseAction(mob, target, nil, spellList) diff --git a/scripts/zones/QuBia_Arena/mobs/Ghul-I-Beaban_blm.lua b/scripts/zones/QuBia_Arena/mobs/Ghul-I-Beaban_blm.lua index 7cddf3a5ec8..d0c9e5b5b83 100644 --- a/scripts/zones/QuBia_Arena/mobs/Ghul-I-Beaban_blm.lua +++ b/scripts/zones/QuBia_Arena/mobs/Ghul-I-Beaban_blm.lua @@ -41,16 +41,16 @@ end entity.onMobSpellChoose = function(mob, target, spellId) local spellList = { - [ 1] = { xi.magic.spell.AERO_II, target, false, xi.action.type.DAMAGE_TARGET, nil, 100 }, - [ 2] = { xi.magic.spell.FIRE_II, target, false, xi.action.type.DAMAGE_TARGET, nil, 100 }, - [ 3] = { xi.magic.spell.THUNDAGA, target, false, xi.action.type.DAMAGE_TARGET, nil, 100 }, - [ 4] = { xi.magic.spell.STONEGA_II, target, false, xi.action.type.DAMAGE_TARGET, nil, 100 }, - [ 5] = { xi.magic.spell.DRAIN, target, false, xi.action.type.DRAIN_HP, nil, 100 }, - [ 6] = { xi.magic.spell.ASPIR, target, false, xi.action.type.DRAIN_MP, nil, 100 }, - [ 7] = { xi.magic.spell.SLEEP, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.SLEEP_I, 100 }, - [ 8] = { xi.magic.spell.SLEEPGA, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.SLEEP_I, 100 }, - [ 9] = { xi.magic.spell.BIO_II, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.BIO, 100 }, - [10] = { xi.magic.spell.ICE_SPIKES, mob, false, xi.action.type.ENHANCING_FORCE_SELF, xi.effect.ICE_SPIKES, 100 }, + [ 1] = { xi.magic.spell.AERO_II, target, false, xi.action.type.DAMAGE_TARGET, nil, 0, 100 }, + [ 2] = { xi.magic.spell.FIRE_II, target, false, xi.action.type.DAMAGE_TARGET, nil, 0, 100 }, + [ 3] = { xi.magic.spell.THUNDAGA, target, false, xi.action.type.DAMAGE_TARGET, nil, 0, 100 }, + [ 4] = { xi.magic.spell.STONEGA_II, target, false, xi.action.type.DAMAGE_TARGET, nil, 0, 100 }, + [ 5] = { xi.magic.spell.DRAIN, target, false, xi.action.type.DRAIN_HP, nil, 0, 100 }, + [ 6] = { xi.magic.spell.ASPIR, target, false, xi.action.type.DRAIN_MP, nil, 0, 100 }, + [ 7] = { xi.magic.spell.SLEEP, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.SLEEP_I, 0, 100 }, + [ 8] = { xi.magic.spell.SLEEPGA, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.SLEEP_I, 0, 100 }, + [ 9] = { xi.magic.spell.BIO_II, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.BIO, 4, 100 }, + [10] = { xi.magic.spell.ICE_SPIKES, mob, false, xi.action.type.ENHANCING_FORCE_SELF, xi.effect.ICE_SPIKES, 0, 100 }, } return xi.combat.behavior.chooseAction(mob, target, nil, spellList) diff --git a/scripts/zones/QuBia_Arena/mobs/Ghul-I-Beaban_drk.lua b/scripts/zones/QuBia_Arena/mobs/Ghul-I-Beaban_drk.lua index e6e4c8de642..138c67c6cc6 100644 --- a/scripts/zones/QuBia_Arena/mobs/Ghul-I-Beaban_drk.lua +++ b/scripts/zones/QuBia_Arena/mobs/Ghul-I-Beaban_drk.lua @@ -40,13 +40,13 @@ end entity.onMobSpellChoose = function(mob, target, spellId) local spellList = { - [1] = { xi.magic.spell.ABSORB_MND, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.MND_DOWN, 100 }, - [2] = { xi.magic.spell.ABSORB_CHR, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.CHR_DOWN, 100 }, - [3] = { xi.magic.spell.ABSORB_VIT, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.VIT_DOWN, 100 }, - [4] = { xi.magic.spell.ABSORB_AGI, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.AGI_DOWN, 100 }, - [5] = { xi.magic.spell.ABSORB_INT, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.INT_DOWN, 100 }, - [6] = { xi.magic.spell.ABSORB_DEX, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.DEX_DOWN, 100 }, - [7] = { xi.magic.spell.ABSORB_STR, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.STR_DOWN, 100 }, + [1] = { xi.magic.spell.ABSORB_MND, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.MND_DOWN, 0, 100 }, + [2] = { xi.magic.spell.ABSORB_CHR, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.CHR_DOWN, 0, 100 }, + [3] = { xi.magic.spell.ABSORB_VIT, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.VIT_DOWN, 0, 100 }, + [4] = { xi.magic.spell.ABSORB_AGI, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.AGI_DOWN, 0, 100 }, + [5] = { xi.magic.spell.ABSORB_INT, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.INT_DOWN, 0, 100 }, + [6] = { xi.magic.spell.ABSORB_DEX, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.DEX_DOWN, 0, 100 }, + [7] = { xi.magic.spell.ABSORB_STR, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.STR_DOWN, 0, 100 }, } return xi.combat.behavior.chooseAction(mob, target, nil, spellList) diff --git a/scripts/zones/Sacrificial_Chamber/mobs/Rauu_the_Whaleswooner.lua b/scripts/zones/Sacrificial_Chamber/mobs/Rauu_the_Whaleswooner.lua index 2fe4d25c754..69e9d9ae63b 100644 --- a/scripts/zones/Sacrificial_Chamber/mobs/Rauu_the_Whaleswooner.lua +++ b/scripts/zones/Sacrificial_Chamber/mobs/Rauu_the_Whaleswooner.lua @@ -18,22 +18,22 @@ end entity.onMobSpellChoose = function(mob, target, spellId) local spellList = { - [ 1] = { xi.magic.spell.BANISH_II, target, false, xi.action.type.DAMAGE_TARGET, nil, 100 }, -- No condition. - [ 2] = { xi.magic.spell.CURE_V, mob, true, xi.action.type.HEALING_TARGET, 33, 100 }, -- HP <= 33% - [ 3] = { xi.magic.spell.CURAGA_II, mob, true, xi.action.type.HEALING_FORCE_SELF, 33, 100 }, -- HP <= 33% - [ 4] = { xi.magic.spell.BLINDNA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.BLINDNESS, 100 }, -- Effect present on self (or on ally if "true") - [ 5] = { xi.magic.spell.PARALYNA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.PARALYSIS, 100 }, -- Effect present on self (or on ally if "true") - [ 6] = { xi.magic.spell.POISONA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.POISON, 100 }, -- Effect present on self (or on ally if "true") - [ 7] = { xi.magic.spell.SILENA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.SILENCE, 100 }, -- Effect present on self (or on ally if "true") - [ 8] = { xi.magic.spell.VIRUNA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.DISEASE, 100 }, -- Effect present on self (or on ally if "true") - [ 9] = { xi.magic.spell.VIRUNA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.PLAGUE, 100 }, -- Effect present on self (or on ally if "true") - [10] = { xi.magic.spell.AQUAVEIL, mob, false, xi.action.type.ENHANCING_TARGET, xi.effect.AQUAVEIL, 100 }, -- Effect not present on self (or on ally if "true") - [11] = { xi.magic.spell.HASTE, mob, true, xi.action.type.ENHANCING_TARGET, xi.effect.HASTE, 100 }, -- Effect not present on self (or on ally if "true") - [12] = { xi.magic.spell.PROTECT_III, mob, true, xi.action.type.ENHANCING_TARGET, xi.effect.PROTECT, 100 }, -- Effect not present on self (or on ally if "true") - [13] = { xi.magic.spell.SHELL_III, mob, true, xi.action.type.ENHANCING_TARGET, xi.effect.SHELL, 100 }, -- Effect not present on self (or on ally if "true") - [14] = { xi.magic.spell.DIA_II, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.DIA, 100 }, -- Effect not present on target. - [15] = { xi.magic.spell.PARALYZE, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.PARALYSIS, 100 }, -- Effect not present on target. - [16] = { xi.magic.spell.SILENCE, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.SILENCE, 100 }, -- Effect not present on target. + [ 1] = { xi.magic.spell.BANISH_II, target, false, xi.action.type.DAMAGE_TARGET, nil, 0, 100 }, -- No condition. + [ 2] = { xi.magic.spell.CURE_V, mob, true, xi.action.type.HEALING_TARGET, 33, 0, 100 }, -- HP <= 33% + [ 3] = { xi.magic.spell.CURAGA_II, mob, true, xi.action.type.HEALING_FORCE_SELF, 33, 0, 100 }, -- HP <= 33% + [ 4] = { xi.magic.spell.BLINDNA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.BLINDNESS, 0, 100 }, -- Effect present on self (or on ally if "true") + [ 5] = { xi.magic.spell.PARALYNA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.PARALYSIS, 0, 100 }, -- Effect present on self (or on ally if "true") + [ 6] = { xi.magic.spell.POISONA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.POISON, 0, 100 }, -- Effect present on self (or on ally if "true") + [ 7] = { xi.magic.spell.SILENA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.SILENCE, 0, 100 }, -- Effect present on self (or on ally if "true") + [ 8] = { xi.magic.spell.VIRUNA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.DISEASE, 0, 100 }, -- Effect present on self (or on ally if "true") + [ 9] = { xi.magic.spell.VIRUNA, mob, true, xi.action.type.HEALING_EFFECT, xi.effect.PLAGUE, 0, 100 }, -- Effect present on self (or on ally if "true") + [10] = { xi.magic.spell.AQUAVEIL, mob, false, xi.action.type.ENHANCING_TARGET, xi.effect.AQUAVEIL, 0, 100 }, -- Effect not present on self (or on ally if "true") + [11] = { xi.magic.spell.HASTE, mob, true, xi.action.type.ENHANCING_TARGET, xi.effect.HASTE, 5, 100 }, -- Effect not present on self (or on ally if "true") + [12] = { xi.magic.spell.PROTECT_III, mob, true, xi.action.type.ENHANCING_TARGET, xi.effect.PROTECT, 0, 100 }, -- Effect not present on self (or on ally if "true") + [13] = { xi.magic.spell.SHELL_III, mob, true, xi.action.type.ENHANCING_TARGET, xi.effect.SHELL, 0, 100 }, -- Effect not present on self (or on ally if "true") + [14] = { xi.magic.spell.DIA_II, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.DIA, 3, 100 }, -- Effect not present on target. + [15] = { xi.magic.spell.PARALYZE, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.PARALYSIS, 0, 100 }, -- Effect not present on target. + [16] = { xi.magic.spell.SILENCE, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.SILENCE, 0, 100 }, -- Effect not present on target. } local groupTable = diff --git a/scripts/zones/Waughroon_Shrine/mobs/Flayer_Franz.lua b/scripts/zones/Waughroon_Shrine/mobs/Flayer_Franz.lua index 022045bd4db..3fbf6adb8ba 100644 --- a/scripts/zones/Waughroon_Shrine/mobs/Flayer_Franz.lua +++ b/scripts/zones/Waughroon_Shrine/mobs/Flayer_Franz.lua @@ -17,11 +17,11 @@ end entity.onMobSpellChoose = function(mob, target, spellId) local spellList = { - [1] = { xi.magic.spell.STONE_II, target, false, xi.action.type.DAMAGE_TARGET, nil, 100 }, - [2] = { xi.magic.spell.STONEGA, target, false, xi.action.type.DAMAGE_TARGET, nil, 100 }, - [3] = { xi.magic.spell.RASP, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.RASP, 100 }, - [4] = { xi.magic.spell.BIND, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.BIND, 100 }, - [5] = { xi.magic.spell.STONESKIN, mob, false, xi.action.type.ENHANCING_TARGET, xi.effect.STONESKIN, 100 }, + [1] = { xi.magic.spell.STONE_II, target, false, xi.action.type.DAMAGE_TARGET, nil, 0, 100 }, + [2] = { xi.magic.spell.STONEGA, target, false, xi.action.type.DAMAGE_TARGET, nil, 0, 100 }, + [3] = { xi.magic.spell.RASP, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.RASP, 0, 100 }, + [4] = { xi.magic.spell.BIND, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.BIND, 0, 100 }, + [5] = { xi.magic.spell.STONESKIN, mob, false, xi.action.type.ENHANCING_TARGET, xi.effect.STONESKIN, 0, 100 }, } return xi.combat.behavior.chooseAction(mob, target, nil, spellList) diff --git a/scripts/zones/Waughroon_Shrine/mobs/Flesh_Eater.lua b/scripts/zones/Waughroon_Shrine/mobs/Flesh_Eater.lua index 706b8d50a19..948f3d50681 100644 --- a/scripts/zones/Waughroon_Shrine/mobs/Flesh_Eater.lua +++ b/scripts/zones/Waughroon_Shrine/mobs/Flesh_Eater.lua @@ -13,11 +13,11 @@ end entity.onMobSpellChoose = function(mob, target, spellId) local spellList = { - [1] = { xi.magic.spell.STONE_II, target, false, xi.action.type.DAMAGE_TARGET, nil, 100 }, - [2] = { xi.magic.spell.STONEGA, target, false, xi.action.type.DAMAGE_TARGET, nil, 100 }, - [3] = { xi.magic.spell.RASP, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.RASP, 100 }, - [4] = { xi.magic.spell.BIND, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.BIND, 100 }, - [5] = { xi.magic.spell.STONESKIN, mob, false, xi.action.type.ENHANCING_TARGET, xi.effect.STONESKIN, 100 }, + [1] = { xi.magic.spell.STONE_II, target, false, xi.action.type.DAMAGE_TARGET, nil, 0, 100 }, + [2] = { xi.magic.spell.STONEGA, target, false, xi.action.type.DAMAGE_TARGET, nil, 0, 100 }, + [3] = { xi.magic.spell.RASP, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.RASP, 0, 100 }, + [4] = { xi.magic.spell.BIND, target, false, xi.action.type.ENFEEBLING_TARGET, xi.effect.BIND, 0, 100 }, + [5] = { xi.magic.spell.STONESKIN, mob, false, xi.action.type.ENHANCING_TARGET, xi.effect.STONESKIN, 0, 100 }, } return xi.combat.behavior.chooseAction(mob, target, nil, spellList) From 9301e8bffd0a41e77f6e0275269a8842cf4ac7c4 Mon Sep 17 00:00:00 2001 From: Xaver-DaRed Date: Wed, 31 Dec 2025 19:27:56 +0100 Subject: [PATCH 2/4] Add logic to status effect nullification function for tiering --- .../abilities/pets/automaton/shield_bash.lua | 2 +- .../actions/abilities/pets/mewing_lullaby.lua | 2 +- scripts/actions/abilities/pets/nightmare.lua | 2 +- scripts/actions/abilities/pets/sleepga.lua | 2 +- scripts/actions/abilities/pets/slowga.lua | 2 +- scripts/data/status_effect_tables.lua | 103 ++++++---- scripts/globals/additional_effects.lua | 2 +- scripts/globals/bluemagic.lua | 26 +-- scripts/globals/job_utils/dancer.lua | 4 +- scripts/globals/mobskills.lua | 2 +- scripts/globals/spells/enfeebling_song.lua | 2 +- scripts/globals/spells/enfeebling_spell.lua | 184 +++++++++--------- scripts/globals/spells/enhancing_spell.lua | 6 +- scripts/globals/weaponskills.lua | 2 +- 14 files changed, 187 insertions(+), 154 deletions(-) diff --git a/scripts/actions/abilities/pets/automaton/shield_bash.lua b/scripts/actions/abilities/pets/automaton/shield_bash.lua index cb56721bb11..06dbabc5b5e 100644 --- a/scripts/actions/abilities/pets/automaton/shield_bash.lua +++ b/scripts/actions/abilities/pets/automaton/shield_bash.lua @@ -31,7 +31,7 @@ abilityObject.onAutomatonAbility = function(target, automaton, skill, master, ac duration = math.random(70, 75) end - target:addStatusEffect(xi.effect.SLOW, slowPower * 100, 0, duration) + target:addStatusEffect(xi.effect.SLOW, slowPower * 100, 0, duration, 0, 0, 3) end -- randomize damage diff --git a/scripts/actions/abilities/pets/mewing_lullaby.lua b/scripts/actions/abilities/pets/mewing_lullaby.lua index 5533cd164dd..e4dd73b9485 100644 --- a/scripts/actions/abilities/pets/mewing_lullaby.lua +++ b/scripts/actions/abilities/pets/mewing_lullaby.lua @@ -19,7 +19,7 @@ abilityObject.onPetAbility = function(target, pet, petskill, summoner, action) if xi.data.statusEffect.isTargetImmune(target, xi.effect.SLEEP_I, xi.element.LIGHT) or xi.data.statusEffect.isTargetResistant(pet, target, xi.effect.SLEEP_I) or - xi.data.statusEffect.isEffectNullified(target, xi.effect.SLEEP_I) or + xi.data.statusEffect.isEffectNullified(target, xi.effect.SLEEP_I, 0) or target:hasStatusEffect(xi.effect.SLEEP_I) then petskill:setMsg(xi.msg.basic.JA_NO_EFFECT_2) diff --git a/scripts/actions/abilities/pets/nightmare.lua b/scripts/actions/abilities/pets/nightmare.lua index d63d99306ae..cc5c1bdf4f4 100644 --- a/scripts/actions/abilities/pets/nightmare.lua +++ b/scripts/actions/abilities/pets/nightmare.lua @@ -20,7 +20,7 @@ abilityObject.onPetAbility = function(target, pet, petskill, summoner, action) if xi.data.statusEffect.isTargetImmune(target, xi.effect.SLEEP_I, xi.element.DARK) or xi.data.statusEffect.isTargetResistant(pet, target, xi.effect.SLEEP_I) or - xi.data.statusEffect.isEffectNullified(target, xi.effect.SLEEP_I) or + xi.data.statusEffect.isEffectNullified(target, xi.effect.SLEEP_I, 0) or target:hasStatusEffect(xi.effect.SLEEP_I) then petskill:setMsg(xi.msg.basic.JA_NO_EFFECT_2) diff --git a/scripts/actions/abilities/pets/sleepga.lua b/scripts/actions/abilities/pets/sleepga.lua index dd935353026..94cac11b5b2 100644 --- a/scripts/actions/abilities/pets/sleepga.lua +++ b/scripts/actions/abilities/pets/sleepga.lua @@ -15,7 +15,7 @@ abilityObject.onPetAbility = function(target, pet, petskill, summoner, action) if xi.data.statusEffect.isTargetImmune(target, xi.effect.SLEEP_I, xi.element.DARK) or xi.data.statusEffect.isTargetResistant(pet, target, xi.effect.SLEEP_I) or - xi.data.statusEffect.isEffectNullified(target, xi.effect.SLEEP_I) or + xi.data.statusEffect.isEffectNullified(target, xi.effect.SLEEP_I, 0) or target:hasStatusEffect(xi.effect.SLEEP_I) then if target:getID() == action:getPrimaryTargetID() then diff --git a/scripts/actions/abilities/pets/slowga.lua b/scripts/actions/abilities/pets/slowga.lua index f89b91cf4a8..ae01bdcb0c2 100644 --- a/scripts/actions/abilities/pets/slowga.lua +++ b/scripts/actions/abilities/pets/slowga.lua @@ -16,7 +16,7 @@ abilityObject.onPetAbility = function(target, pet, petskill, summoner, action) xi.job_utils.summoner.onUseBloodPact(target, petskill, summoner, action) - if target:addStatusEffect(xi.effect.SLOW, 3000, 0, duration) then + if target:addStatusEffect(xi.effect.SLOW, 3000, 0, duration, 0, 0, 3) then petskill:setMsg(xi.msg.basic.SKILL_ENFEEB_IS) else petskill:setMsg(xi.msg.basic.SKILL_NO_EFFECT) diff --git a/scripts/data/status_effect_tables.lua b/scripts/data/status_effect_tables.lua index da7c107531c..5f4aec904e6 100644 --- a/scripts/data/status_effect_tables.lua +++ b/scripts/data/status_effect_tables.lua @@ -19,45 +19,49 @@ xi.data.statusEffect = xi.data.statusEffect or {} -- Table column names. local column = { - EFFECT_NULLIFIED_BY = 1, -- [effect] is nullified by { effect }. In other words, [effect] cant be applied because { effect } is active. - EFFECT_NULLIFIES = 2, -- TODO: IMPLEMENT. [effect] nullifies { effect }. - EFFECT_ELEMENT = 3, -- Players and most effects dont have "effect resistance ranks", so they always use the effect "associated element" "resistance rank". - EFFECT_IMMUNITY = 4, -- Detected by "Completely resists" message. Cant immunobreak/resistance-hack it. - MOD_RESIST_TRAIT = 5, -- Detected by "Resist!" message. Cant immunobreak/resistance-hack it if triggered. - MOD_RESIST_RANK = 6, -- TODO: IMPLEMENT. For mobs, status effects can either: Use an specific status effect ressistance rank OR use their associated element resistance rank. - MOD_MAGIC_EVASION = 7, - MOD_IMMUNOBREAK = 8, + EFFECT_NULLIFIED_ALWAYS = 1, -- [effect] is nullified by { effect }. In other words, [effect] cant be applied because { effect } is active. + EFFECT_NULLIFIED_BY_TIER = 2, + EFFECT_NULLIFIES = 3, -- TODO: IMPLEMENT. [effect] nullifies { effect }. + EFFECT_ELEMENT = 4, -- Players and most effects dont have "effect resistance ranks", so they always use the effect "associated element" "resistance rank". + EFFECT_IMMUNITY = 5, -- Detected by "Completely resists" message. Cant immunobreak/resistance-hack it. + MOD_RESIST_TRAIT = 6, -- Detected by "Resist!" message. Cant immunobreak/resistance-hack it if triggered. + MOD_RESIST_RANK = 7, -- TODO: IMPLEMENT. For mobs, status effects can either: Use an specific status effect ressistance rank OR use their associated element resistance rank. + MOD_MAGIC_EVASION = 8, + MOD_IMMUNOBREAK = 9, } -- Table associating an status effect with their corresponding immunobreak, MEVA and resistance modifiers and immunities. xi.data.statusEffect.dataTable = { - [xi.effect.ADDLE ] = { 0, xi.effect.NOCTURNE, xi.element.FIRE, xi.immunity.ADDLE, xi.mod.SLOWRES, 0, 0, xi.mod.ADDLE_IMMUNOBREAK }, -- Addle cant be immunobroken? - [xi.effect.AMNESIA ] = { 0, 0, xi.element.FIRE, 0, xi.mod.AMNESIARES, 0, xi.mod.AMNESIA_MEVA, 0 }, - [xi.effect.ATTACK_DOWN ] = { 0, 0, xi.element.WATER, 0, 0, 0, 0, 0 }, - [xi.effect.BIND ] = { 0, 0, xi.element.ICE, xi.immunity.BIND, xi.mod.BINDRES, xi.mod.BIND_RES_RANK, xi.mod.BIND_MEVA, xi.mod.BIND_IMMUNOBREAK }, - [xi.effect.BLINDNESS ] = { 0, 0, xi.element.DARK, xi.immunity.BLIND, xi.mod.BLINDRES, xi.mod.BLIND_RES_RANK, xi.mod.BLIND_MEVA, xi.mod.BLIND_IMMUNOBREAK }, - [xi.effect.BURN ] = { xi.effect.DROWN, 0, xi.element.FIRE, 0, 0, 0, 0, 0 }, - [xi.effect.CHARM_I ] = { 0, 0, xi.element.LIGHT, 0, xi.mod.CHARMRES, 0, xi.mod.CHARM_MEVA, 0 }, -- TODO: charm should be moved from a mob property to a regular immunity - [xi.effect.CHOKE ] = { xi.effect.FROST, 0, xi.element.WIND, 0, 0, 0, 0, 0 }, - [xi.effect.CURSE_I ] = { 0, 0, xi.element.DARK, xi.immunity.NONE, xi.mod.CURSERES, 0, xi.mod.CURSE_MEVA, 0 }, - [xi.effect.DEFENSE_DOWN ] = { 0, 0, xi.element.WIND, 0, 0, 0, 0, 0 }, - [xi.effect.DROWN ] = { xi.effect.SHOCK, 0, xi.element.WATER, 0, 0, 0, 0, 0 }, - [xi.effect.FLASH ] = { 0, 0, xi.element.LIGHT, xi.immunity.BLIND, xi.mod.BLINDRES, xi.mod.BLIND_RES_RANK, xi.mod.BLIND_MEVA, xi.mod.BLIND_IMMUNOBREAK }, - [xi.effect.FROST ] = { xi.effect.BURN, 0, xi.element.ICE, 0, 0, 0, 0, 0 }, - [xi.effect.NOCTURNE ] = { xi.effect.ADDLE, 0, xi.element.FIRE, xi.immunity.ADDLE, xi.mod.SLOWRES, 0, 0, 0 }, - [xi.effect.NONE ] = { 0, 0, xi.element.DARK, xi.immunity.DISPEL, 0, 0, 0, 0 }, - [xi.effect.PARALYSIS ] = { 0, 0, xi.element.ICE, xi.immunity.PARALYZE, xi.mod.PARALYZERES, xi.mod.PARALYZE_RES_RANK, xi.mod.PARALYZE_MEVA, xi.mod.PARALYZE_IMMUNOBREAK }, - [xi.effect.PETRIFICATION] = { 0, 0, xi.element.EARTH, xi.immunity.PETRIFY, xi.mod.PETRIFYRES, 0, xi.mod.PETRIFY_MEVA, xi.mod.PETRIFY_IMMUNOBREAK }, - [xi.effect.PLAGUE ] = { 0, 0, xi.element.FIRE, xi.immunity.PLAGUE, xi.mod.VIRUSRES, 0, xi.mod.VIRUS_MEVA, 0 }, - [xi.effect.POISON ] = { 0, 0, xi.element.WATER, xi.immunity.POISON, xi.mod.POISONRES, xi.mod.POISON_RES_RANK, xi.mod.POISON_MEVA, xi.mod.POISON_IMMUNOBREAK }, - [xi.effect.RASP ] = { xi.effect.CHOKE, 0, xi.element.EARTH, 0, 0, 0, 0, 0 }, - [xi.effect.SHOCK ] = { xi.effect.RASP, 0, xi.element.THUNDER, 0, 0, 0, 0, 0 }, - [xi.effect.SILENCE ] = { 0, 0, xi.element.WIND, xi.immunity.SILENCE, xi.mod.SILENCERES, xi.mod.SILENCE_RES_RANK, xi.mod.SILENCE_MEVA, xi.mod.SILENCE_IMMUNOBREAK }, - [xi.effect.SLEEP_I ] = { 0, 0, xi.element.DARK, xi.immunity.DARK_SLEEP, xi.mod.SLEEPRES, xi.mod.DARK_SLEEP_RES_RANK, xi.mod.SLEEP_MEVA, xi.mod.SLEEP_IMMUNOBREAK }, - [xi.effect.SLOW ] = { 0, 0, xi.element.EARTH, xi.immunity.SLOW, xi.mod.SLOWRES, xi.mod.SLOW_RES_RANK, xi.mod.SLOW_MEVA, xi.mod.SLOW_IMMUNOBREAK }, - [xi.effect.STUN ] = { 0, 0, xi.element.THUNDER, xi.immunity.STUN, xi.mod.STUNRES, 0, xi.mod.STUN_MEVA, 0 }, - [xi.effect.WEIGHT ] = { 0, 0, xi.element.WIND, xi.immunity.GRAVITY, xi.mod.GRAVITYRES, 0, xi.mod.GRAVITY_MEVA, xi.mod.GRAVITY_IMMUNOBREAK }, + [xi.effect.ADDLE ] = { 0, 0, xi.effect.NOCTURNE, xi.element.FIRE, xi.immunity.ADDLE, xi.mod.SLOWRES, 0, 0, xi.mod.ADDLE_IMMUNOBREAK }, -- Addle cant be immunobroken? + [xi.effect.AMNESIA ] = { 0, 0, 0, xi.element.FIRE, 0, xi.mod.AMNESIARES, 0, xi.mod.AMNESIA_MEVA, 0 }, + [xi.effect.ATTACK_DOWN ] = { 0, 0, 0, xi.element.WATER, 0, 0, 0, 0, 0 }, + [xi.effect.BIND ] = { 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 }, + [xi.effect.BIO ] = { 0, xi.effect.DIA, 0, xi.element.DARK, 0, 0, 0, 0, 0 }, + [xi.effect.BLINDNESS ] = { 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 }, + [xi.effect.BURN ] = { xi.effect.DROWN, 0, xi.effect.FROST, xi.element.FIRE, 0, 0, 0, 0, 0 }, + [xi.effect.CHARM_I ] = { 0, 0, 0, xi.element.LIGHT, 0, xi.mod.CHARMRES, 0, xi.mod.CHARM_MEVA, 0 }, -- TODO: charm should be moved from a mob property to a regular immunity + [xi.effect.CHOKE ] = { xi.effect.FROST, 0, xi.effect.RASP, xi.element.WIND, 0, 0, 0, 0, 0 }, + [xi.effect.CURSE_I ] = { 0, 0, 0, xi.element.DARK, xi.immunity.NONE, xi.mod.CURSERES, 0, xi.mod.CURSE_MEVA, 0 }, + [xi.effect.DEFENSE_DOWN ] = { 0, 0, 0, xi.element.WIND, 0, 0, 0, 0, 0 }, + [xi.effect.DIA ] = { 0, xi.effect.BIO, 0, xi.element.LIGHT, 0, 0, 0, 0, 0 }, + [xi.effect.DROWN ] = { xi.effect.SHOCK, 0, xi.effect.BURN, xi.element.WATER, 0, 0, 0, 0, 0 }, + [xi.effect.FLASH ] = { 0, 0, 0, xi.element.LIGHT, xi.immunity.BLIND, xi.mod.BLINDRES, xi.mod.BLIND_RES_RANK, xi.mod.BLIND_MEVA, xi.mod.BLIND_IMMUNOBREAK }, + [xi.effect.FROST ] = { xi.effect.BURN, 0, xi.effect.CHOKE, xi.element.ICE, 0, 0, 0, 0, 0 }, + [xi.effect.HASTE ] = { 0, xi.effect.SLOW, 0, xi.element.NONE, 0, 0, 0, 0, 0 }, + [xi.effect.NOCTURNE ] = { xi.effect.ADDLE, 0, 0, xi.element.FIRE, xi.immunity.ADDLE, xi.mod.SLOWRES, 0, 0, 0 }, + [xi.effect.NONE ] = { 0, 0, 0, xi.element.DARK, xi.immunity.DISPEL, 0, 0, 0, 0 }, + [xi.effect.PARALYSIS ] = { 0, 0, 0, xi.element.ICE, xi.immunity.PARALYZE, xi.mod.PARALYZERES, xi.mod.PARALYZE_RES_RANK, xi.mod.PARALYZE_MEVA, xi.mod.PARALYZE_IMMUNOBREAK }, + [xi.effect.PETRIFICATION] = { 0, 0, 0, xi.element.EARTH, xi.immunity.PETRIFY, xi.mod.PETRIFYRES, 0, xi.mod.PETRIFY_MEVA, xi.mod.PETRIFY_IMMUNOBREAK }, + [xi.effect.PLAGUE ] = { 0, 0, 0, xi.element.FIRE, xi.immunity.PLAGUE, xi.mod.VIRUSRES, 0, xi.mod.VIRUS_MEVA, 0 }, + [xi.effect.POISON ] = { 0, 0, 0, xi.element.WATER, xi.immunity.POISON, xi.mod.POISONRES, xi.mod.POISON_RES_RANK, xi.mod.POISON_MEVA, xi.mod.POISON_IMMUNOBREAK }, + [xi.effect.RASP ] = { xi.effect.CHOKE, 0, xi.effect.SHOCK, xi.element.EARTH, 0, 0, 0, 0, 0 }, + [xi.effect.SHOCK ] = { xi.effect.RASP, 0, xi.effect.DROWN, xi.element.THUNDER, 0, 0, 0, 0, 0 }, + [xi.effect.SILENCE ] = { 0, 0, 0, xi.element.WIND, xi.immunity.SILENCE, xi.mod.SILENCERES, xi.mod.SILENCE_RES_RANK, xi.mod.SILENCE_MEVA, xi.mod.SILENCE_IMMUNOBREAK }, + [xi.effect.SLEEP_I ] = { 0, 0, 0, xi.element.DARK, xi.immunity.DARK_SLEEP, xi.mod.SLEEPRES, xi.mod.DARK_SLEEP_RES_RANK, xi.mod.SLEEP_MEVA, xi.mod.SLEEP_IMMUNOBREAK }, + [xi.effect.SLOW ] = { 0, xi.effect.HASTE, 0, xi.element.EARTH, xi.immunity.SLOW, xi.mod.SLOWRES, xi.mod.SLOW_RES_RANK, xi.mod.SLOW_MEVA, xi.mod.SLOW_IMMUNOBREAK }, + [xi.effect.STUN ] = { 0, 0, 0, xi.element.THUNDER, xi.immunity.STUN, xi.mod.STUNRES, 0, xi.mod.STUN_MEVA, 0 }, + [xi.effect.WEIGHT ] = { 0, 0, 0, xi.element.WIND, xi.immunity.GRAVITY, xi.mod.GRAVITYRES, 0, xi.mod.GRAVITY_MEVA, xi.mod.GRAVITY_IMMUNOBREAK }, } ----------------------------------- @@ -69,7 +73,19 @@ xi.data.statusEffect.getNullificatingEffect = function(effectId) -- Fetch effect ID from table if entry exists. if xi.data.statusEffect.dataTable[effectToCheck] then - return xi.data.statusEffect.dataTable[effectToCheck][column.EFFECT_NULLIFIED_BY] + return xi.data.statusEffect.dataTable[effectToCheck][column.EFFECT_NULLIFIED_ALWAYS] + end + + return 0 +end + +xi.data.statusEffect.getNullificatingEffectByTier = function(effectId) + -- Sanitize fed value + local effectToCheck = utils.defaultIfNil(effectId, 0) + + -- Fetch effect ID from table if entry exists. + if xi.data.statusEffect.dataTable[effectToCheck] then + return xi.data.statusEffect.dataTable[effectToCheck][column.EFFECT_NULLIFIED_BY_TIER] end return 0 @@ -226,7 +242,8 @@ xi.data.statusEffect.isTargetResistant = function(actor, target, effectId) return false end -xi.data.statusEffect.isEffectNullified = function(target, effectId) +xi.data.statusEffect.isEffectNullified = function(target, effectId, effectTier) + -- Check effects that always block current effect from being applied. local nullificatingEffect = xi.data.statusEffect.getNullificatingEffect(effectId) if nullificatingEffect > 0 and @@ -235,5 +252,19 @@ xi.data.statusEffect.isEffectNullified = function(target, effectId) return true end + -- Check effects that can block current effect from being applied, based on tier. + local tierToCheck = utils.defaultIfNil(effectId, 0) + local tierNullificatingEffect = xi.data.statusEffect.getNullificatingEffectByTier(effectId) + if + tierToCheck > 0 and + tierNullificatingEffect > 0 and + target:hasStatusEffect(tierNullificatingEffect) + then + local blockingTier = target:getStatusEffect(tierNullificatingEffect):getTier() + if blockingTier > tierToCheck then + return true + end + end + return false end diff --git a/scripts/globals/additional_effects.lua b/scripts/globals/additional_effects.lua index f0a6a035204..2c2ee00699f 100644 --- a/scripts/globals/additional_effects.lua +++ b/scripts/globals/additional_effects.lua @@ -266,7 +266,7 @@ xi.additionalEffect.procFunctions[xi.additionalEffect.procType.DEBUFF] = functio end -- Early return: Incompatible effect in place. - if xi.data.statusEffect.isEffectNullified(target, effectId) then + if xi.data.statusEffect.isEffectNullified(target, effectId, 0) then return 0, 0, 0 end diff --git a/scripts/globals/bluemagic.lua b/scripts/globals/bluemagic.lua index 5bcc933b0f7..f344683ee65 100644 --- a/scripts/globals/bluemagic.lua +++ b/scripts/globals/bluemagic.lua @@ -634,6 +634,8 @@ end -- Perform an enfeebling Blue Magic spell xi.spells.blue.useEnfeeblingSpell = function(caster, target, spell, params) local spellElement = spell:getElement() + local effect = params.effect + local tier = params.tier or 0 -- Early return: Out of cone. if @@ -641,7 +643,7 @@ xi.spells.blue.useEnfeeblingSpell = function(caster, target, spell, params) not target:isInfront(caster, 64) then spell:setMsg(xi.msg.basic.MAGIC_NO_EFFECT) - return params.effect + return effect end -- Early return: Out of gaze. @@ -650,36 +652,36 @@ xi.spells.blue.useEnfeeblingSpell = function(caster, target, spell, params) (not target:isFacing(caster) or not caster:isFacing(target)) then spell:setMsg(xi.msg.basic.MAGIC_NO_EFFECT) - return params.effect + return effect end -- Early return: Target is immune. - if xi.data.statusEffect.isTargetImmune(target, params.effect, spellElement) then + if xi.data.statusEffect.isTargetImmune(target, effect, spellElement) then spell:setMsg(xi.msg.basic.MAGIC_COMPLETE_RESIST) - return params.effect + return effect end -- Early return: Trait nullification trigger. - if xi.data.statusEffect.isTargetResistant(caster, target, params.effect) then + if xi.data.statusEffect.isTargetResistant(caster, target, effect) then spell:setModifier(xi.msg.actionModifier.RESIST) spell:setMsg(xi.msg.basic.MAGIC_RESIST) - return params.effect + return effect end -- Early return: Target already has an status effect that nullifies current. - if xi.data.statusEffect.isEffectNullified(target, params.effect) then + if xi.data.statusEffect.isEffectNullified(target, effect, tier) then spell:setMsg(xi.msg.basic.MAGIC_NO_EFFECT) - return params.effect + return effect end -- Early return: Regular resist. local resist = xi.combat.magicHitRate.calculateResistRate(caster, target, 0, xi.skill.BLUE_MAGIC, 0, spellElement, xi.mod.INT, 0, 0) if resist < params.resistThreshold then spell:setMsg(xi.msg.basic.MAGIC_RESIST) - return params.effect + return effect end - if target:addStatusEffect(params.effect, params.power, params.tick, math.floor(params.duration * resist)) then + if target:addStatusEffect(effect, params.power, params.tick, math.floor(params.duration * resist)) then -- Add "Magic Burst!" message local _, skillchainCount = xi.magicburst.formMagicBurst(spellElement, target) -- External function. Not present in magic.lua. @@ -693,7 +695,7 @@ xi.spells.blue.useEnfeeblingSpell = function(caster, target, spell, params) spell:setMsg(xi.msg.basic.MAGIC_NO_EFFECT) end - return params.effect + return effect end -- Perform a curative Blue Magic spell @@ -752,7 +754,7 @@ xi.spells.blue.applyBlueAdditionalEffect = function(caster, target, params, effe if not xi.data.statusEffect.isTargetImmune(target, effect, element) and -- Target isn't immune. not xi.data.statusEffect.isTargetResistant(caster, target, effect) and -- Target didn't trigger a job trait resistance. - not xi.data.statusEffect.isEffectNullified(target, effect) -- Target doesn't have an status effect that nullifies current. + not xi.data.statusEffect.isEffectNullified(target, effect, 0) -- Target doesn't have an status effect that nullifies current. TODO: Tier. then target:addStatusEffect(effect, power, tick, math.floor(duration * resist)) end diff --git a/scripts/globals/job_utils/dancer.lua b/scripts/globals/job_utils/dancer.lua index e0451d0f6bd..4c5920b7f84 100644 --- a/scripts/globals/job_utils/dancer.lua +++ b/scripts/globals/job_utils/dancer.lua @@ -393,7 +393,7 @@ xi.job_utils.dancer.useDesperateFlourishAbility = function(player, target, abili if not xi.data.statusEffect.isTargetImmune(target, xi.effect.WEIGHT, xi.element.WIND) and -- Check immunity. not xi.data.statusEffect.isTargetResistant(player, target, xi.effect.WEIGHT) and -- Check resistance trigger. - not xi.data.statusEffect.isEffectNullified(target, xi.effect.WEIGHT) and -- Check conflicting effect. + not xi.data.statusEffect.isEffectNullified(target, xi.effect.WEIGHT, 0) and -- Check conflicting effect. resistRate > 0.25 and -- Check actual resistance. target:addStatusEffect(xi.effect.WEIGHT, 50, 0, 60 * resistRate) -- Check effect power. then @@ -450,7 +450,7 @@ xi.job_utils.dancer.useViolentFlourishAbility = function(player, target, ability if not xi.data.statusEffect.isTargetImmune(target, xi.effect.STUN, xi.element.THUNDER) and -- Check immunity. not xi.data.statusEffect.isTargetResistant(player, target, xi.effect.STUN) and -- check resistance trigger. - not xi.data.statusEffect.isEffectNullified(target, xi.effect.STUN) and -- check conflicting effect. + not xi.data.statusEffect.isEffectNullified(target, xi.effect.STUN, 0) and -- check conflicting effect. resistRate > 0.25 -- Check actual resistance. then target:addStatusEffect(xi.effect.STUN, 1, 0, 2) diff --git a/scripts/globals/mobskills.lua b/scripts/globals/mobskills.lua index 6cfb2a366ed..e8113fd9662 100644 --- a/scripts/globals/mobskills.lua +++ b/scripts/globals/mobskills.lua @@ -777,7 +777,7 @@ xi.mobskills.mobStatusEffectMove = function(mob, target, typeEffect, power, tick return xi.msg.basic.SKILL_MISS -- uses , but misses . -- Check effect incompatibilities. - elseif xi.data.statusEffect.isEffectNullified(target, typeEffect) then + elseif xi.data.statusEffect.isEffectNullified(target, typeEffect, 0) then return xi.msg.basic.SKILL_MISS -- uses , but misses . end diff --git a/scripts/globals/spells/enfeebling_song.lua b/scripts/globals/spells/enfeebling_song.lua index 249b4360977..41a6665c9bc 100644 --- a/scripts/globals/spells/enfeebling_song.lua +++ b/scripts/globals/spells/enfeebling_song.lua @@ -165,7 +165,7 @@ xi.spells.enfeebling.useEnfeeblingSong = function(caster, target, spell) end -- Target already has an status effect that nullifies current. - if xi.data.statusEffect.isEffectNullified(target, spellEffect) then + if xi.data.statusEffect.isEffectNullified(target, spellEffect, 0) then spell:setMsg(xi.msg.basic.MAGIC_NO_EFFECT) return spellEffect end diff --git a/scripts/globals/spells/enfeebling_spell.lua b/scripts/globals/spells/enfeebling_spell.lua index b2babb83e20..cf34e5185dc 100644 --- a/scripts/globals/spells/enfeebling_spell.lua +++ b/scripts/globals/spells/enfeebling_spell.lua @@ -12,106 +12,105 @@ xi.spells.enfeebling = xi.spells.enfeebling or {} ----------------------------------- local column = { - EFFECT_ID = 1, - STAT_USED = 2, - BASE_POTENCY = 3, - BASE_TICK = 4, - BASE_DURATION = 5, - RESIST_STAGES = 6, - MESSAGE_OFFSET = 7, - SABOTEUR = 8, - BONUS_MACC = 9, + EFFECT_ID = 1, + EFFECT_TIER = 2, + STAT_USED = 3, + BASE_POTENCY = 4, + BASE_TICK = 5, + BASE_DURATION = 6, + RESIST_STAGES = 7, + MESSAGE_OFFSET = 8, + SABOTEUR = 9, + BONUS_MACC = 10, } local pTable = -{ -- 1 2 3 4 5 6 7 8 9 - -- [Spell ID ] = { Effect, Stat-Used, pBase, DoT, Duration, Resist, msg, pSaboteur, mAcc }, -- Black Magic - [xi.magic.spell.BIND ] = { xi.effect.BIND, xi.mod.INT, 0, 0, 60, 2, 0, false, 0 }, - [xi.magic.spell.BINDGA ] = { xi.effect.BIND, xi.mod.INT, 0, 0, 60, 2, 0, false, 0 }, - [xi.magic.spell.BLIND ] = { xi.effect.BLINDNESS, xi.mod.INT, 0, 0, 180, 2, 0, true, 0 }, - [xi.magic.spell.BLIND_II ] = { xi.effect.BLINDNESS, xi.mod.INT, 0, 0, 180, 2, 0, true, 0 }, - [xi.magic.spell.BLINDGA ] = { xi.effect.BLINDNESS, xi.mod.INT, 0, 0, 180, 2, 0, true, 0 }, - [xi.magic.spell.BREAK ] = { xi.effect.PETRIFICATION, xi.mod.INT, 1, 0, 30, 2, 0, false, 0 }, - [xi.magic.spell.BREAKGA ] = { xi.effect.PETRIFICATION, xi.mod.INT, 1, 0, 30, 2, 0, false, 0 }, - [xi.magic.spell.BURN ] = { xi.effect.BURN, xi.mod.INT, 0, 3, 90, 3, 1, true, 0 }, - [xi.magic.spell.CHOKE ] = { xi.effect.CHOKE, xi.mod.INT, 0, 3, 90, 3, 1, true, 0 }, - [xi.magic.spell.CURSE ] = { xi.effect.CURSE_I, xi.mod.INT, 50, 0, 300, 2, 0, false, 0 }, - [xi.magic.spell.DISPEL ] = { xi.effect.NONE, xi.mod.INT, 0, 0, 0, 4, 0, false, 175 }, - [xi.magic.spell.DISPELGA ] = { xi.effect.NONE, xi.mod.INT, 0, 0, 0, 4, 0, false, 0 }, - [xi.magic.spell.DISTRACT ] = { xi.effect.EVASION_DOWN, xi.mod.MND, 0, 0, 120, 2, 0, true, 150 }, - [xi.magic.spell.DISTRACT_II ] = { xi.effect.EVASION_DOWN, xi.mod.MND, 0, 0, 120, 2, 0, true, 150 }, - [xi.magic.spell.DISTRACT_III ] = { xi.effect.EVASION_DOWN, xi.mod.MND, 0, 0, 120, 2, 0, true, 150 }, - [xi.magic.spell.DROWN ] = { xi.effect.DROWN, xi.mod.INT, 0, 3, 90, 3, 1, true, 0 }, - [xi.magic.spell.FRAZZLE ] = { xi.effect.MAGIC_EVASION_DOWN, xi.mod.MND, 0, 0, 120, 2, 0, true, 150 }, - [xi.magic.spell.FRAZZLE_II ] = { xi.effect.MAGIC_EVASION_DOWN, xi.mod.MND, 0, 0, 120, 2, 0, true, 150 }, - [xi.magic.spell.FRAZZLE_III ] = { xi.effect.MAGIC_EVASION_DOWN, xi.mod.MND, 0, 0, 120, 2, 0, true, 150 }, - [xi.magic.spell.FROST ] = { xi.effect.FROST, xi.mod.INT, 0, 3, 90, 3, 1, true, 0 }, - [xi.magic.spell.GRAVITY ] = { xi.effect.WEIGHT, xi.mod.INT, 26, 0, 120, 2, 0, true, 0 }, - [xi.magic.spell.GRAVITY_II ] = { xi.effect.WEIGHT, xi.mod.INT, 32, 0, 180, 2, 0, true, 0 }, - [xi.magic.spell.GRAVIGA ] = { xi.effect.WEIGHT, xi.mod.INT, 50, 0, 120, 2, 0, true, 0 }, - [xi.magic.spell.POISON ] = { xi.effect.POISON, xi.mod.INT, 0, 3, 90, 2, 0, true, 0 }, - [xi.magic.spell.POISON_II ] = { xi.effect.POISON, xi.mod.INT, 0, 3, 120, 2, 0, true, 30 }, - [xi.magic.spell.POISON_III ] = { xi.effect.POISON, xi.mod.INT, 0, 3, 150, 2, 0, true, 0 }, - [xi.magic.spell.POISONGA ] = { xi.effect.POISON, xi.mod.INT, 0, 3, 90, 2, 0, true, 0 }, - [xi.magic.spell.POISONGA_II ] = { xi.effect.POISON, xi.mod.INT, 0, 3, 120, 2, 0, true, 0 }, - [xi.magic.spell.POISONGA_III ] = { xi.effect.POISON, xi.mod.INT, 0, 3, 150, 2, 0, true, 0 }, - [xi.magic.spell.RASP ] = { xi.effect.RASP, xi.mod.INT, 0, 3, 90, 3, 1, true, 0 }, - [xi.magic.spell.SHOCK ] = { xi.effect.SHOCK, xi.mod.INT, 0, 3, 90, 3, 1, true, 0 }, - [xi.magic.spell.SLEEP ] = { xi.effect.SLEEP_I, xi.mod.INT, 1, 0, 60, 2, 0, false, 0 }, - [xi.magic.spell.SLEEP_II ] = { xi.effect.SLEEP_I, xi.mod.INT, 2, 0, 90, 2, 0, false, 0 }, - [xi.magic.spell.SLEEPGA ] = { xi.effect.SLEEP_I, xi.mod.INT, 1, 0, 60, 2, 0, false, 0 }, - [xi.magic.spell.SLEEPGA_II ] = { xi.effect.SLEEP_I, xi.mod.INT, 2, 0, 90, 2, 0, false, 0 }, - [xi.magic.spell.STUN ] = { xi.effect.STUN, xi.mod.INT, 1, 0, 5, 4, 0, false, 200 }, - [xi.magic.spell.VIRUS ] = { xi.effect.PLAGUE, xi.mod.INT, 5, 3, 60, 2, 0, false, 0 }, + [xi.magic.spell.BIND ] = { xi.effect.BIND, 1, xi.mod.INT, 0, 0, 60, 2, 0, false, 0 }, + [xi.magic.spell.BINDGA ] = { xi.effect.BIND, 1, xi.mod.INT, 0, 0, 60, 2, 0, false, 0 }, + [xi.magic.spell.BLIND ] = { xi.effect.BLINDNESS, 1, xi.mod.INT, 0, 0, 180, 2, 0, true, 0 }, + [xi.magic.spell.BLIND_II ] = { xi.effect.BLINDNESS, 3, xi.mod.INT, 0, 0, 180, 2, 0, true, 0 }, + [xi.magic.spell.BLINDGA ] = { xi.effect.BLINDNESS, 2, xi.mod.INT, 0, 0, 180, 2, 0, true, 0 }, + [xi.magic.spell.BREAK ] = { xi.effect.PETRIFICATION, 1, xi.mod.INT, 1, 0, 30, 2, 0, false, 0 }, + [xi.magic.spell.BREAKGA ] = { xi.effect.PETRIFICATION, 2, xi.mod.INT, 1, 0, 30, 2, 0, false, 0 }, + [xi.magic.spell.BURN ] = { xi.effect.BURN, 1, xi.mod.INT, 0, 3, 90, 3, 1, true, 0 }, + [xi.magic.spell.CHOKE ] = { xi.effect.CHOKE, 1, xi.mod.INT, 0, 3, 90, 3, 1, true, 0 }, + [xi.magic.spell.CURSE ] = { xi.effect.CURSE_I, 1, xi.mod.INT, 50, 0, 300, 2, 0, false, 0 }, + [xi.magic.spell.DISPEL ] = { xi.effect.NONE, 1, xi.mod.INT, 0, 0, 0, 4, 0, false, 175 }, + [xi.magic.spell.DISPELGA ] = { xi.effect.NONE, 1, xi.mod.INT, 0, 0, 0, 4, 0, false, 0 }, + [xi.magic.spell.DISTRACT ] = { xi.effect.EVASION_DOWN, 1, xi.mod.MND, 0, 0, 120, 2, 0, true, 150 }, + [xi.magic.spell.DISTRACT_II ] = { xi.effect.EVASION_DOWN, 2, xi.mod.MND, 0, 0, 120, 2, 0, true, 150 }, + [xi.magic.spell.DISTRACT_III ] = { xi.effect.EVASION_DOWN, 3, xi.mod.MND, 0, 0, 120, 2, 0, true, 150 }, + [xi.magic.spell.DROWN ] = { xi.effect.DROWN, 1, xi.mod.INT, 0, 3, 90, 3, 1, true, 0 }, + [xi.magic.spell.FRAZZLE ] = { xi.effect.MAGIC_EVASION_DOWN, 1, xi.mod.MND, 0, 0, 120, 2, 0, true, 150 }, + [xi.magic.spell.FRAZZLE_II ] = { xi.effect.MAGIC_EVASION_DOWN, 2, xi.mod.MND, 0, 0, 120, 2, 0, true, 150 }, + [xi.magic.spell.FRAZZLE_III ] = { xi.effect.MAGIC_EVASION_DOWN, 3, xi.mod.MND, 0, 0, 120, 2, 0, true, 150 }, + [xi.magic.spell.FROST ] = { xi.effect.FROST, 1, xi.mod.INT, 0, 3, 90, 3, 1, true, 0 }, + [xi.magic.spell.GRAVITY ] = { xi.effect.WEIGHT, 1, xi.mod.INT, 26, 0, 120, 2, 0, true, 0 }, + [xi.magic.spell.GRAVITY_II ] = { xi.effect.WEIGHT, 2, xi.mod.INT, 32, 0, 180, 2, 0, true, 0 }, + [xi.magic.spell.GRAVIGA ] = { xi.effect.WEIGHT, 1, xi.mod.INT, 50, 0, 120, 2, 0, true, 0 }, + [xi.magic.spell.POISON ] = { xi.effect.POISON, 1, xi.mod.INT, 0, 3, 90, 2, 0, true, 0 }, + [xi.magic.spell.POISON_II ] = { xi.effect.POISON, 2, xi.mod.INT, 0, 3, 120, 2, 0, true, 30 }, + [xi.magic.spell.POISON_III ] = { xi.effect.POISON, 3, xi.mod.INT, 0, 3, 150, 2, 0, true, 0 }, + [xi.magic.spell.POISONGA ] = { xi.effect.POISON, 1, xi.mod.INT, 0, 3, 90, 2, 0, true, 0 }, + [xi.magic.spell.POISONGA_II ] = { xi.effect.POISON, 1, xi.mod.INT, 0, 3, 120, 2, 0, true, 0 }, + [xi.magic.spell.POISONGA_III ] = { xi.effect.POISON, 1, xi.mod.INT, 0, 3, 150, 2, 0, true, 0 }, + [xi.magic.spell.RASP ] = { xi.effect.RASP, 1, xi.mod.INT, 0, 3, 90, 3, 1, true, 0 }, + [xi.magic.spell.SHOCK ] = { xi.effect.SHOCK, 1, xi.mod.INT, 0, 3, 90, 3, 1, true, 0 }, + [xi.magic.spell.SLEEP ] = { xi.effect.SLEEP_I, 1, xi.mod.INT, 1, 0, 60, 2, 0, false, 0 }, + [xi.magic.spell.SLEEP_II ] = { xi.effect.SLEEP_I, 2, xi.mod.INT, 2, 0, 90, 2, 0, false, 0 }, + [xi.magic.spell.SLEEPGA ] = { xi.effect.SLEEP_I, 1, xi.mod.INT, 1, 0, 60, 2, 0, false, 0 }, + [xi.magic.spell.SLEEPGA_II ] = { xi.effect.SLEEP_I, 2, xi.mod.INT, 2, 0, 90, 2, 0, false, 0 }, + [xi.magic.spell.STUN ] = { xi.effect.STUN, 1, xi.mod.INT, 1, 0, 5, 4, 0, false, 200 }, + [xi.magic.spell.VIRUS ] = { xi.effect.PLAGUE, 1, xi.mod.INT, 5, 3, 60, 2, 0, false, 0 }, -- Black magic Helixes - [xi.magic.spell.GEOHELIX ] = { xi.effect.HELIX, xi.mod.INT, 0, 10, 30, 0, 0, false, 0 }, - [xi.magic.spell.GEOHELIX_II ] = { xi.effect.HELIX, xi.mod.INT, 0, 10, 30, 0, 0, false, 0 }, - [xi.magic.spell.HYDROHELIX ] = { xi.effect.HELIX, xi.mod.INT, 0, 10, 30, 0, 0, false, 0 }, - [xi.magic.spell.HYDROHELIX_II ] = { xi.effect.HELIX, xi.mod.INT, 0, 10, 30, 0, 0, false, 0 }, - [xi.magic.spell.ANEMOHELIX ] = { xi.effect.HELIX, xi.mod.INT, 0, 10, 30, 0, 0, false, 0 }, - [xi.magic.spell.ANEMOHELIX_II ] = { xi.effect.HELIX, xi.mod.INT, 0, 10, 30, 0, 0, false, 0 }, - [xi.magic.spell.PYROHELIX ] = { xi.effect.HELIX, xi.mod.INT, 0, 10, 30, 0, 0, false, 0 }, - [xi.magic.spell.PYROHELIX_II ] = { xi.effect.HELIX, xi.mod.INT, 0, 10, 30, 0, 0, false, 0 }, - [xi.magic.spell.CRYOHELIX ] = { xi.effect.HELIX, xi.mod.INT, 0, 10, 30, 0, 0, false, 0 }, - [xi.magic.spell.CRYOHELIX_II ] = { xi.effect.HELIX, xi.mod.INT, 0, 10, 30, 0, 0, false, 0 }, - [xi.magic.spell.IONOHELIX ] = { xi.effect.HELIX, xi.mod.INT, 0, 10, 30, 0, 0, false, 0 }, - [xi.magic.spell.IONOHELIX_II ] = { xi.effect.HELIX, xi.mod.INT, 0, 10, 30, 0, 0, false, 0 }, - [xi.magic.spell.NOCTOHELIX ] = { xi.effect.HELIX, xi.mod.INT, 0, 10, 30, 0, 0, false, 0 }, - [xi.magic.spell.NOCTOHELIX_II ] = { xi.effect.HELIX, xi.mod.INT, 0, 10, 30, 0, 0, false, 0 }, - [xi.magic.spell.LUMINOHELIX ] = { xi.effect.HELIX, xi.mod.INT, 0, 10, 30, 0, 0, false, 0 }, - [xi.magic.spell.LUMINOHELIX_II] = { xi.effect.HELIX, xi.mod.INT, 0, 10, 30, 0, 0, false, 0 }, + [xi.magic.spell.GEOHELIX ] = { xi.effect.HELIX, 1, xi.mod.INT, 0, 10, 30, 0, 0, false, 0 }, + [xi.magic.spell.GEOHELIX_II ] = { xi.effect.HELIX, 2, xi.mod.INT, 0, 10, 30, 0, 0, false, 0 }, + [xi.magic.spell.HYDROHELIX ] = { xi.effect.HELIX, 1, xi.mod.INT, 0, 10, 30, 0, 0, false, 0 }, + [xi.magic.spell.HYDROHELIX_II ] = { xi.effect.HELIX, 2, xi.mod.INT, 0, 10, 30, 0, 0, false, 0 }, + [xi.magic.spell.ANEMOHELIX ] = { xi.effect.HELIX, 1, xi.mod.INT, 0, 10, 30, 0, 0, false, 0 }, + [xi.magic.spell.ANEMOHELIX_II ] = { xi.effect.HELIX, 2, xi.mod.INT, 0, 10, 30, 0, 0, false, 0 }, + [xi.magic.spell.PYROHELIX ] = { xi.effect.HELIX, 1, xi.mod.INT, 0, 10, 30, 0, 0, false, 0 }, + [xi.magic.spell.PYROHELIX_II ] = { xi.effect.HELIX, 2, xi.mod.INT, 0, 10, 30, 0, 0, false, 0 }, + [xi.magic.spell.CRYOHELIX ] = { xi.effect.HELIX, 1, xi.mod.INT, 0, 10, 30, 0, 0, false, 0 }, + [xi.magic.spell.CRYOHELIX_II ] = { xi.effect.HELIX, 2, xi.mod.INT, 0, 10, 30, 0, 0, false, 0 }, + [xi.magic.spell.IONOHELIX ] = { xi.effect.HELIX, 1, xi.mod.INT, 0, 10, 30, 0, 0, false, 0 }, + [xi.magic.spell.IONOHELIX_II ] = { xi.effect.HELIX, 2, xi.mod.INT, 0, 10, 30, 0, 0, false, 0 }, + [xi.magic.spell.NOCTOHELIX ] = { xi.effect.HELIX, 1, xi.mod.INT, 0, 10, 30, 0, 0, false, 0 }, + [xi.magic.spell.NOCTOHELIX_II ] = { xi.effect.HELIX, 2, xi.mod.INT, 0, 10, 30, 0, 0, false, 0 }, + [xi.magic.spell.LUMINOHELIX ] = { xi.effect.HELIX, 1, xi.mod.INT, 0, 10, 30, 0, 0, false, 0 }, + [xi.magic.spell.LUMINOHELIX_II] = { xi.effect.HELIX, 2, xi.mod.INT, 0, 10, 30, 0, 0, false, 0 }, -- White Magic - [xi.magic.spell.ADDLE ] = { xi.effect.ADDLE, xi.mod.MND, 30, 0, 180, 2, 0, true, 0 }, - [xi.magic.spell.FLASH ] = { xi.effect.FLASH, xi.mod.MND, 0, 0, 12, 4, 0, true, 512 }, -- Effect handled in hit rate calculations - [xi.magic.spell.INUNDATION ] = { xi.effect.INUNDATION, xi.mod.MND, 1, 0, 300, 5, 0, false, 0 }, - [xi.magic.spell.PARALYZE ] = { xi.effect.PARALYSIS, xi.mod.MND, 0, 0, 120, 2, 0, true, -10 }, - [xi.magic.spell.PARALYZE_II ] = { xi.effect.PARALYSIS, xi.mod.MND, 0, 0, 120, 2, 0, true, 0 }, - [xi.magic.spell.PARALYGA ] = { xi.effect.PARALYSIS, xi.mod.MND, 0, 0, 120, 2, 0, true, 0 }, - [xi.magic.spell.REPOSE ] = { xi.effect.SLEEP_I, xi.mod.MND, 2, 0, 90, 2, 1, false, 0 }, - [xi.magic.spell.SILENCE ] = { xi.effect.SILENCE, xi.mod.MND, 1, 0, 120, 2, 0, false, 0 }, - [xi.magic.spell.SILENCEGA ] = { xi.effect.SILENCE, xi.mod.MND, 1, 0, 120, 2, 0, false, 0 }, - [xi.magic.spell.SLOW ] = { xi.effect.SLOW, xi.mod.MND, 0, 0, 180, 2, 0, true, 10 }, - [xi.magic.spell.SLOW_II ] = { xi.effect.SLOW, xi.mod.MND, 0, 0, 180, 2, 0, true, 10 }, - [xi.magic.spell.SLOWGA ] = { xi.effect.SLOW, xi.mod.MND, 0, 0, 180, 2, 0, true, 0 }, + [xi.magic.spell.ADDLE ] = { xi.effect.ADDLE, 1, xi.mod.MND, 30, 0, 180, 2, 0, true, 0 }, + [xi.magic.spell.FLASH ] = { xi.effect.FLASH, 1, xi.mod.MND, 0, 0, 12, 4, 0, true, 512 }, + [xi.magic.spell.INUNDATION ] = { xi.effect.INUNDATION, 1, xi.mod.MND, 1, 0, 300, 5, 0, false, 0 }, + [xi.magic.spell.PARALYZE ] = { xi.effect.PARALYSIS, 1, xi.mod.MND, 0, 0, 120, 2, 0, true, -10 }, + [xi.magic.spell.PARALYZE_II ] = { xi.effect.PARALYSIS, 3, xi.mod.MND, 0, 0, 120, 2, 0, true, 0 }, + [xi.magic.spell.PARALYGA ] = { xi.effect.PARALYSIS, 2, xi.mod.MND, 0, 0, 120, 2, 0, true, 0 }, + [xi.magic.spell.REPOSE ] = { xi.effect.SLEEP_I, 1, xi.mod.MND, 2, 0, 90, 2, 1, false, 0 }, + [xi.magic.spell.SILENCE ] = { xi.effect.SILENCE, 1, xi.mod.MND, 1, 0, 120, 2, 0, false, 0 }, + [xi.magic.spell.SILENCEGA ] = { xi.effect.SILENCE, 2, xi.mod.MND, 1, 0, 120, 2, 0, false, 0 }, + [xi.magic.spell.SLOW ] = { xi.effect.SLOW, 3, xi.mod.MND, 0, 0, 180, 2, 0, true, 10 }, + [xi.magic.spell.SLOW_II ] = { xi.effect.SLOW, 7, xi.mod.MND, 0, 0, 180, 2, 0, true, 10 }, + [xi.magic.spell.SLOWGA ] = { xi.effect.SLOW, 8, xi.mod.MND, 0, 0, 180, 2, 0, true, 0 }, -- Ninjutsu - [xi.magic.spell.AISHA_ICHI ] = { xi.effect.ATTACK_DOWN, xi.mod.INT, 15, 0, 120, 4, 1, false, 0 }, - [xi.magic.spell.DOKUMORI_ICHI ] = { xi.effect.POISON, xi.mod.INT, 3, 3, 60, 2, 0, false, 0 }, - [xi.magic.spell.DOKUMORI_NI ] = { xi.effect.POISON, xi.mod.INT, 10, 3, 120, 2, 0, false, 0 }, - [xi.magic.spell.DOKUMORI_SAN ] = { xi.effect.POISON, xi.mod.INT, 20, 3, 360, 2, 0, false, 0 }, - [xi.magic.spell.HOJO_ICHI ] = { xi.effect.SLOW, xi.mod.INT, 1465, 0, 180, 2, 0, false, 0 }, - [xi.magic.spell.HOJO_NI ] = { xi.effect.SLOW, xi.mod.INT, 1953, 0, 300, 2, 0, false, 0 }, - [xi.magic.spell.HOJO_SAN ] = { xi.effect.SLOW, xi.mod.INT, 2930, 0, 420, 2, 0, false, 0 }, - [xi.magic.spell.JUBAKU_ICHI ] = { xi.effect.PARALYSIS, xi.mod.INT, 20, 0, 180, 2, 1, false, 0 }, - [xi.magic.spell.JUBAKU_NI ] = { xi.effect.PARALYSIS, xi.mod.INT, 30, 0, 300, 2, 1, false, 0 }, - [xi.magic.spell.JUBAKU_SAN ] = { xi.effect.PARALYSIS, xi.mod.INT, 35, 0, 420, 2, 1, false, 0 }, - [xi.magic.spell.KURAYAMI_ICHI ] = { xi.effect.BLINDNESS, xi.mod.INT, 20, 0, 180, 2, 0, false, 0 }, - [xi.magic.spell.KURAYAMI_NI ] = { xi.effect.BLINDNESS, xi.mod.INT, 30, 0, 300, 2, 0, false, 0 }, - [xi.magic.spell.KURAYAMI_SAN ] = { xi.effect.BLINDNESS, xi.mod.INT, 40, 0, 420, 2, 0, false, 0 }, - [xi.magic.spell.YURIN_ICHI ] = { xi.effect.INHIBIT_TP, xi.mod.INT, 10, 0, 180, 3, 1, false, 0 }, + [xi.magic.spell.AISHA_ICHI ] = { xi.effect.ATTACK_DOWN, 1, xi.mod.INT, 15, 0, 120, 4, 1, false, 0 }, + [xi.magic.spell.DOKUMORI_ICHI ] = { xi.effect.POISON, 1, xi.mod.INT, 3, 3, 60, 2, 0, false, 0 }, + [xi.magic.spell.DOKUMORI_NI ] = { xi.effect.POISON, 2, xi.mod.INT, 10, 3, 120, 2, 0, false, 0 }, + [xi.magic.spell.DOKUMORI_SAN ] = { xi.effect.POISON, 3, xi.mod.INT, 20, 3, 360, 2, 0, false, 0 }, + [xi.magic.spell.HOJO_ICHI ] = { xi.effect.SLOW, 3, xi.mod.INT, 1465, 0, 180, 2, 0, false, 0 }, + [xi.magic.spell.HOJO_NI ] = { xi.effect.SLOW, 4, xi.mod.INT, 1953, 0, 300, 2, 0, false, 0 }, + [xi.magic.spell.HOJO_SAN ] = { xi.effect.SLOW, 7, xi.mod.INT, 2930, 0, 420, 2, 0, false, 0 }, + [xi.magic.spell.JUBAKU_ICHI ] = { xi.effect.PARALYSIS, 1, xi.mod.INT, 20, 0, 180, 2, 1, false, 0 }, + [xi.magic.spell.JUBAKU_NI ] = { xi.effect.PARALYSIS, 2, xi.mod.INT, 30, 0, 300, 2, 1, false, 0 }, + [xi.magic.spell.JUBAKU_SAN ] = { xi.effect.PARALYSIS, 3, xi.mod.INT, 35, 0, 420, 2, 1, false, 0 }, + [xi.magic.spell.KURAYAMI_ICHI ] = { xi.effect.BLINDNESS, 1, xi.mod.INT, 20, 0, 180, 2, 0, false, 0 }, + [xi.magic.spell.KURAYAMI_NI ] = { xi.effect.BLINDNESS, 2, xi.mod.INT, 30, 0, 300, 2, 0, false, 0 }, + [xi.magic.spell.KURAYAMI_SAN ] = { xi.effect.BLINDNESS, 3, xi.mod.INT, 40, 0, 420, 2, 0, false, 0 }, + [xi.magic.spell.YURIN_ICHI ] = { xi.effect.INHIBIT_TP, 1, xi.mod.INT, 10, 0, 180, 3, 1, false, 0 }, } local function getElementalDebuffPotency(caster, statUsed) @@ -334,6 +333,7 @@ xi.spells.enfeebling.useEnfeeblingSpell = function(caster, target, spell) local spellId = spell:getID() local spellElement = spell:getElement() local spellEffect = pTable[spellId][column.EFFECT_ID] + local tier = pTable[spellId][column.TIER] ------------------------------ -- STEP 1: Check spell nullification. @@ -351,7 +351,7 @@ xi.spells.enfeebling.useEnfeeblingSpell = function(caster, target, spell) end -- Target already has an status effect that nullifies current. - if xi.data.statusEffect.isEffectNullified(target, spellEffect) then + if xi.data.statusEffect.isEffectNullified(target, spellEffect, tier) then spell:setMsg(xi.msg.basic.MAGIC_NO_EFFECT) return spellEffect end @@ -473,7 +473,7 @@ xi.spells.enfeebling.useEnfeeblingSpell = function(caster, target, spell) ------------------------------ -- STEP 6: Final Operations. ------------------------------ - if target:addStatusEffect(spellEffect, potency, tick, duration, 0, subpotency) then + if target:addStatusEffect(spellEffect, potency, tick, duration, 0, subpotency, tier) then -- Delete Stymie effect if skillType == xi.skill.ENFEEBLING_MAGIC and diff --git a/scripts/globals/spells/enhancing_spell.lua b/scripts/globals/spells/enhancing_spell.lua index 4f556c553c2..84b95744f8b 100644 --- a/scripts/globals/spells/enhancing_spell.lua +++ b/scripts/globals/spells/enhancing_spell.lua @@ -122,9 +122,9 @@ local pTable = [xi.magic.spell.GAIN_CHR ] = { 1, xi.effect.CHR_BOOST, 1, 5, 300, true, false, 0 }, -- Haste - [xi.magic.spell.HASTE ] = { 1, xi.effect.HASTE, 40, 1465, 180, true, false, 0 }, - [xi.magic.spell.HASTE_II ] = { 2, xi.effect.HASTE, 96, 2998, 180, true, false, 0 }, - [xi.magic.spell.HASTEGA ] = { 1, xi.effect.HASTE, 48, 1494, 180, false, false, 0 }, + [xi.magic.spell.HASTE ] = { 5, xi.effect.HASTE, 40, 1465, 180, true, false, 0 }, + [xi.magic.spell.HASTE_II ] = { 6, xi.effect.HASTE, 96, 2998, 180, true, false, 0 }, + [xi.magic.spell.HASTEGA ] = { 5, xi.effect.HASTE, 48, 1494, 180, false, false, 0 }, -- [xi.magic.spell.HASTEGA_II ] = { 2, xi.effect.HASTE, 99, 2998, 180, false, false, 0 }, -- Phalanx diff --git a/scripts/globals/weaponskills.lua b/scripts/globals/weaponskills.lua index bdbc15e1bb9..9ba6b9c5542 100644 --- a/scripts/globals/weaponskills.lua +++ b/scripts/globals/weaponskills.lua @@ -1067,7 +1067,7 @@ xi.weaponskills.handleWeaponskillEffect = function(actor, target, effectId, acti not target:hasStatusEffect(effectId) and not xi.data.statusEffect.isTargetImmune(target, effectId, actionElement) and not xi.data.statusEffect.isTargetResistant(actor, target, effectId) and - not xi.data.statusEffect.isEffectNullified(target, effectId) + not xi.data.statusEffect.isEffectNullified(target, effectId, 0) then target:addStatusEffect(effectId, power, 0, duration) end From 5ee1eeaf97984d4f6fcd027df779854f6b07251b Mon Sep 17 00:00:00 2001 From: Xaver-DaRed Date: Fri, 2 Jan 2026 00:44:27 +0100 Subject: [PATCH 3/4] Revise Dia/Bio tiers --- scripts/actions/abilities/pets/nightmare.lua | 3 +- scripts/actions/mobskills/nightmare.lua | 11 ++-- scripts/actions/mobskills/plague_swipe.lua | 3 +- scripts/actions/mobskills/purulent_ooze.lua | 1 + scripts/actions/spells/black/bio.lua | 20 ++++--- scripts/actions/spells/black/bio_ii.lua | 20 ++++--- scripts/actions/spells/black/bio_iii.lua | 35 ++++++------ scripts/actions/spells/black/bio_iv.lua | 15 +++--- scripts/actions/spells/black/bio_v.lua | 15 +++--- scripts/actions/spells/white/dia.lua | 13 ++--- scripts/actions/spells/white/dia_ii.lua | 13 ++--- scripts/actions/spells/white/dia_iii.lua | 13 ++--- scripts/actions/spells/white/dia_iv.lua | 13 ++--- scripts/actions/spells/white/dia_v.lua | 13 ++--- scripts/actions/spells/white/diaga.lua | 13 ++--- scripts/actions/spells/white/diaga_ii.lua | 13 ++--- scripts/actions/spells/white/diaga_iii.lua | 13 ++--- scripts/actions/spells/white/diaga_iv.lua | 13 ++--- scripts/actions/spells/white/diaga_v.lua | 13 ++--- scripts/effects/bio.lua | 8 +-- scripts/globals/combat/entity_behavior.lua | 56 ++++++++++++++++---- scripts/globals/spells/enfeebling_spell.lua | 1 + src/map/lua/lua_baseentity.cpp | 2 +- 23 files changed, 160 insertions(+), 160 deletions(-) diff --git a/scripts/actions/abilities/pets/nightmare.lua b/scripts/actions/abilities/pets/nightmare.lua index cc5c1bdf4f4..c4928b7161b 100644 --- a/scripts/actions/abilities/pets/nightmare.lua +++ b/scripts/actions/abilities/pets/nightmare.lua @@ -40,8 +40,9 @@ abilityObject.onPetAbility = function(target, pet, petskill, summoner, action) -- Apply sleep and bio if target:addStatusEffect(xi.effect.SLEEP_I, 1, 0, duration, 0, 2, 4) then petskill:setMsg(xi.msg.basic.JA_GAIN_EFFECT) + target:delStatusEffectSilent(xi.effect.DIA) target:delStatusEffectSilent(xi.effect.BIO) - target:addStatusEffect(xi.effect.BIO, 2, 3, duration, 0, 10, 5) + target:addStatusEffect(xi.effect.BIO, 2, 3, duration, 0, 10, 11) -- Miss else diff --git a/scripts/actions/mobskills/nightmare.lua b/scripts/actions/mobskills/nightmare.lua index 54b259cf7e6..8cbf65b0c37 100644 --- a/scripts/actions/mobskills/nightmare.lua +++ b/scripts/actions/mobskills/nightmare.lua @@ -33,16 +33,17 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(target, mob, skill) - local bioPower = 15 - local duration = math.random(20, 30) - local effectTierier = 5 + local bioPower = 15 + local duration = math.random(20, 30) + local effectTier = 11 -- Handle unbreakable sleep - skill:setMsg(xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.SLEEP_I, 1, 0, duration, 0, 0, effectTierier)) + skill:setMsg(xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.SLEEP_I, 1, 0, duration, 0, 0, effectTier)) -- Handle special Bio + target:delStatusEffectSilent(xi.effect.DIA) target:delStatusEffectSilent(xi.effect.BIO) - target:addStatusEffect(xi.effect.BIO, bioPower, 3, duration, 0, 10, effectTierier) + target:addStatusEffect(xi.effect.BIO, bioPower, 3, duration, 0, 10, effectTier) return xi.effect.SLEEP_I end diff --git a/scripts/actions/mobskills/plague_swipe.lua b/scripts/actions/mobskills/plague_swipe.lua index bbb894d1499..ff71132fba4 100644 --- a/scripts/actions/mobskills/plague_swipe.lua +++ b/scripts/actions/mobskills/plague_swipe.lua @@ -25,10 +25,11 @@ mobskillObject.onMobWeaponSkill = function(target, mob, skill) local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, ftp, xi.mobskills.physicalTpBonus.NO_EFFECT) local dmg = xi.mobskills.mobFinalAdjustments(info.dmg, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded) + target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) + xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.BIO, 7, 3, 60) xi.mobskills.mobPhysicalStatusEffectMove(mob, target, skill, xi.effect.PLAGUE, 5, 3, 60) - target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING) return dmg end diff --git a/scripts/actions/mobskills/purulent_ooze.lua b/scripts/actions/mobskills/purulent_ooze.lua index 3b99d0a84b4..5e768ee10a0 100644 --- a/scripts/actions/mobskills/purulent_ooze.lua +++ b/scripts/actions/mobskills/purulent_ooze.lua @@ -20,6 +20,7 @@ mobskillObject.onMobWeaponSkill = function(target, mob, skill) damage = xi.mobskills.mobFinalAdjustments(damage, mob, skill, target, xi.attackType.MAGICAL, xi.damageType.WATER, xi.mobskills.shadowBehavior.WIPE_SHADOWS) target:takeDamage(damage, mob, xi.attackType.MAGICAL, xi.damageType.WATER) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BIO, 5, 3, 120, 0, 10) xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.MAX_HP_DOWN, 10, 0, 120) diff --git a/scripts/actions/spells/black/bio.lua b/scripts/actions/spells/black/bio.lua index 0866afea538..3ccb5fb2cdf 100644 --- a/scripts/actions/spells/black/bio.lua +++ b/scripts/actions/spells/black/bio.lua @@ -11,22 +11,20 @@ end spellObject.onSpellCast = function(caster, target, spell) local damage = xi.spells.damage.useDamageSpell(caster, target, spell) + local tier = 2 - -- Check for Dia + -- Check for Dia. local dia = target:getStatusEffect(xi.effect.DIA) - if dia and dia:getTier() >= 2 then - return damage - else + if dia and dia:getTier() < tier then target:delStatusEffect(xi.effect.DIA) - end - -- Calculate DoT effect - -- http://wiki.ffo.jp/html/1954.html - local power = caster:getSkillLevel(xi.skill.DARK_MAGIC) - power = math.ceil(power / 40) - power = utils.clamp(power, 1, 3) + -- Calculate DoT effect: http://wiki.ffo.jp/html/1954.html + local power = caster:getSkillLevel(xi.skill.DARK_MAGIC) + power = math.ceil(power / 40) + power = utils.clamp(power, 1, 3) - target:addStatusEffect(xi.effect.BIO, power, 3, 60, 0, 10, 1) + target:addStatusEffect(xi.effect.BIO, power, 3, 60, 0, 10, tier) + end return damage end diff --git a/scripts/actions/spells/black/bio_ii.lua b/scripts/actions/spells/black/bio_ii.lua index 2437ac14027..6aed33a6bd5 100644 --- a/scripts/actions/spells/black/bio_ii.lua +++ b/scripts/actions/spells/black/bio_ii.lua @@ -11,22 +11,20 @@ end spellObject.onSpellCast = function(caster, target, spell) local damage = xi.spells.damage.useDamageSpell(caster, target, spell) + local tier = 4 - -- Check for Dia + -- Check for Dia. local dia = target:getStatusEffect(xi.effect.DIA) - if dia and dia:getTier() >= 3 then - return damage - else + if dia and dia:getTier() < tier then target:delStatusEffect(xi.effect.DIA) - end - -- Calculate DoT effect - -- http://wiki.ffo.jp/html/1954.html - local power = caster:getSkillLevel(xi.skill.DARK_MAGIC) - power = math.floor((power + 29) / 40) - power = utils.clamp(power, 3, 8) + -- Calculate DoT effect: http://wiki.ffo.jp/html/1954.html + local power = caster:getSkillLevel(xi.skill.DARK_MAGIC) + power = math.floor((power + 29) / 40) + power = utils.clamp(power, 3, 8) - target:addStatusEffect(xi.effect.BIO, power, 3, 120, 0, 15, 2) + target:addStatusEffect(xi.effect.BIO, power, 3, 120, 0, 15, tier) + end return damage end diff --git a/scripts/actions/spells/black/bio_iii.lua b/scripts/actions/spells/black/bio_iii.lua index b2ca7667172..4bb8cd147af 100644 --- a/scripts/actions/spells/black/bio_iii.lua +++ b/scripts/actions/spells/black/bio_iii.lua @@ -11,31 +11,28 @@ end spellObject.onSpellCast = function(caster, target, spell) local damage = xi.spells.damage.useDamageSpell(caster, target, spell) + local tier = 6 - -- Check for Dia + -- Check for Dia. local dia = target:getStatusEffect(xi.effect.DIA) - if dia and dia:getTier() >= 4 then - return damage - else + if dia and dia:getTier() < tier then target:delStatusEffect(xi.effect.DIA) - end - -- Calculate DoT effect - -- http://wiki.ffo.jp/html/1954.html - local skillLevel = caster:getSkillLevel(xi.skill.DARK_MAGIC) - local power = 0 - - if skillLevel > 291 then - power = 13 + math.floor((skillLevel - 291) / 27) -- 13 + 1 every 27 skill levels. - elseif skillLevel > 246 then - power = 9 + math.floor((skillLevel - 246) / 11) -- 9 + 1 every 11 skill levels. - else - power = 5 + math.floor((skillLevel - 106) / 35) -- 5 + 1 every 35 skill levels. - end + -- Calculate DoT effect: http://wiki.ffo.jp/html/1954.html + local power = 0 + local skillLevel = caster:getSkillLevel(xi.skill.DARK_MAGIC) + if skillLevel > 291 then + power = 13 + math.floor((skillLevel - 291) / 27) -- 13 + 1 every 27 skill levels. + elseif skillLevel > 246 then + power = 9 + math.floor((skillLevel - 246) / 11) -- 9 + 1 every 11 skill levels. + else + power = 5 + math.floor((skillLevel - 106) / 35) -- 5 + 1 every 35 skill levels. + end - power = utils.clamp(power, 5, 17) + power = utils.clamp(power, 5, 17) - target:addStatusEffect(xi.effect.BIO, power, 3, 180, 0, 20, 3) + target:addStatusEffect(xi.effect.BIO, power, 3, 180, 0, 20, tier) + end return damage end diff --git a/scripts/actions/spells/black/bio_iv.lua b/scripts/actions/spells/black/bio_iv.lua index fbd80d0c961..7b8e70ea27b 100644 --- a/scripts/actions/spells/black/bio_iv.lua +++ b/scripts/actions/spells/black/bio_iv.lua @@ -11,19 +11,18 @@ end spellObject.onSpellCast = function(caster, target, spell) local damage = xi.spells.damage.useDamageSpell(caster, target, spell) + local tier = 8 - -- Check for Dia + -- Check for Dia. local dia = target:getStatusEffect(xi.effect.DIA) - if dia and dia:getTier() >= 5 then - return damage - else + if dia and dia:getTier() < tier then target:delStatusEffect(xi.effect.DIA) - end - -- Calculate DoT effect (rough, though fairly accurate) - local power = 5 + math.floor(caster:getSkillLevel(xi.skill.DARK_MAGIC) / 60) + -- Calculate DoT effect (rough, though fairly accurate) + local power = 5 + math.floor(caster:getSkillLevel(xi.skill.DARK_MAGIC) / 60) - target:addStatusEffect(xi.effect.BIO, power, 3, 180, 0, 25, 4) + target:addStatusEffect(xi.effect.BIO, power, 3, 180, 0, 25, tier) + end return damage end diff --git a/scripts/actions/spells/black/bio_v.lua b/scripts/actions/spells/black/bio_v.lua index 5736c150b13..88f4e2194f6 100644 --- a/scripts/actions/spells/black/bio_v.lua +++ b/scripts/actions/spells/black/bio_v.lua @@ -11,19 +11,18 @@ end spellObject.onSpellCast = function(caster, target, spell) local damage = xi.spells.damage.useDamageSpell(caster, target, spell) + local tier = 10 - -- Check for Dia + -- Check for Dia. local dia = target:getStatusEffect(xi.effect.DIA) - if dia and dia:getTier() >= 6 then - return damage - else + if dia and dia:getTier() < tier then target:delStatusEffect(xi.effect.DIA) - end - -- Calculate DoT effect (rough, though fairly accurate) - local power = 5 + math.floor(caster:getSkillLevel(xi.skill.DARK_MAGIC) / 50) + -- Calculate DoT effect (rough, though fairly accurate) + local power = 5 + math.floor(caster:getSkillLevel(xi.skill.DARK_MAGIC) / 50) - target:addStatusEffect(xi.effect.BIO, power, 3, 180, 0, 25, 4) + target:addStatusEffect(xi.effect.BIO, power, 3, 180, 0, 25, tier) + end return damage end diff --git a/scripts/actions/spells/white/dia.lua b/scripts/actions/spells/white/dia.lua index d957e096a54..ed248e3d9bd 100644 --- a/scripts/actions/spells/white/dia.lua +++ b/scripts/actions/spells/white/dia.lua @@ -11,19 +11,16 @@ end spellObject.onSpellCast = function(caster, target, spell) local damage = xi.spells.damage.useDamageSpell(caster, target, spell) + local tier = 1 -- Check for Bio local bio = target:getStatusEffect(xi.effect.BIO) - if bio and bio:getTier() >= 1 then - return damage - else + if bio and bio:getTier() < tier then target:delStatusEffect(xi.effect.BIO) - end - - -- Apply effect. - local power = 1 + caster:getMod(xi.mod.DIA_DOT) + local power = 1 + caster:getMod(xi.mod.DIA_DOT) - target:addStatusEffect(xi.effect.DIA, power, 3, 60, 0, 10, 1) + target:addStatusEffect(xi.effect.DIA, power, 3, 60, 0, 10, tier) + end return damage end diff --git a/scripts/actions/spells/white/dia_ii.lua b/scripts/actions/spells/white/dia_ii.lua index ea98f829ae1..458791b5db6 100644 --- a/scripts/actions/spells/white/dia_ii.lua +++ b/scripts/actions/spells/white/dia_ii.lua @@ -11,19 +11,16 @@ end spellObject.onSpellCast = function(caster, target, spell) local damage = xi.spells.damage.useDamageSpell(caster, target, spell) + local tier = 3 -- Check for Bio local bio = target:getStatusEffect(xi.effect.BIO) - if bio and bio:getTier() >= 2 then - return damage - else + if bio and bio:getTier() < tier then target:delStatusEffect(xi.effect.BIO) - end - - -- Apply effect. - local power = 2 + caster:getMod(xi.mod.DIA_DOT) + local power = 2 + caster:getMod(xi.mod.DIA_DOT) - target:addStatusEffect(xi.effect.DIA, power, 3, 120, 0, 15, 2) + target:addStatusEffect(xi.effect.DIA, power, 3, 120, 0, 15, tier) + end return damage end diff --git a/scripts/actions/spells/white/dia_iii.lua b/scripts/actions/spells/white/dia_iii.lua index 72423bb63b2..5f4fe166b47 100644 --- a/scripts/actions/spells/white/dia_iii.lua +++ b/scripts/actions/spells/white/dia_iii.lua @@ -11,19 +11,16 @@ end spellObject.onSpellCast = function(caster, target, spell) local damage = xi.spells.damage.useDamageSpell(caster, target, spell) + local tier = 5 -- Check for Bio local bio = target:getStatusEffect(xi.effect.BIO) - if bio and bio:getTier() >= 3 then - return damage - else + if bio and bio:getTier() < tier then target:delStatusEffect(xi.effect.BIO) - end - - -- Apply effect. - local power = 3 + caster:getMod(xi.mod.DIA_DOT) + local power = 3 + caster:getMod(xi.mod.DIA_DOT) - target:addStatusEffect(xi.effect.DIA, power, 3, 180, 0, 20, 3) + target:addStatusEffect(xi.effect.DIA, power, 3, 180, 0, 20, tier) + end return damage end diff --git a/scripts/actions/spells/white/dia_iv.lua b/scripts/actions/spells/white/dia_iv.lua index 9b714eae255..e8e39bbf8e7 100644 --- a/scripts/actions/spells/white/dia_iv.lua +++ b/scripts/actions/spells/white/dia_iv.lua @@ -11,19 +11,16 @@ end spellObject.onSpellCast = function(caster, target, spell) local damage = xi.spells.damage.useDamageSpell(caster, target, spell) + local tier = 7 -- Check for Bio local bio = target:getStatusEffect(xi.effect.BIO) - if bio and bio:getTier() >= 4 then - return damage - else + if bio and bio:getTier() < tier then target:delStatusEffect(xi.effect.BIO) - end - - -- Apply effect. - local power = 4 + caster:getMod(xi.mod.DIA_DOT) + local power = 4 + caster:getMod(xi.mod.DIA_DOT) - target:addStatusEffect(xi.effect.DIA, power, 3, 180, 0, 25, 4) + target:addStatusEffect(xi.effect.DIA, power, 3, 180, 0, 25, tier) + end return damage end diff --git a/scripts/actions/spells/white/dia_v.lua b/scripts/actions/spells/white/dia_v.lua index 4b237cb8032..d89f9990da1 100644 --- a/scripts/actions/spells/white/dia_v.lua +++ b/scripts/actions/spells/white/dia_v.lua @@ -11,19 +11,16 @@ end spellObject.onSpellCast = function(caster, target, spell) local damage = xi.spells.damage.useDamageSpell(caster, target, spell) + local tier = 9 -- Check for Bio local bio = target:getStatusEffect(xi.effect.BIO) - if bio and bio:getTier() >= 5 then - return damage - else + if bio and bio:getTier() < tier then target:delStatusEffect(xi.effect.BIO) - end - - -- Apply effect. - local power = 5 + caster:getMod(xi.mod.DIA_DOT) + local power = 5 + caster:getMod(xi.mod.DIA_DOT) - target:addStatusEffect(xi.effect.DIA, power, 3, 180, 0, 30, 5) + target:addStatusEffect(xi.effect.DIA, power, 3, 180, 0, 30, tier) + end return damage end diff --git a/scripts/actions/spells/white/diaga.lua b/scripts/actions/spells/white/diaga.lua index 7b77c81a580..76f2fba15e3 100644 --- a/scripts/actions/spells/white/diaga.lua +++ b/scripts/actions/spells/white/diaga.lua @@ -11,19 +11,16 @@ end spellObject.onSpellCast = function(caster, target, spell) local damage = xi.spells.damage.useDamageSpell(caster, target, spell) + local tier = 1 -- Check for Bio local bio = target:getStatusEffect(xi.effect.BIO) - if bio and bio:getTier() >= 1 then - return damage - else + if bio and bio:getTier() < tier then target:delStatusEffect(xi.effect.BIO) - end - - -- Apply effect. - local power = 1 + caster:getMod(xi.mod.DIA_DOT) + local power = 1 + caster:getMod(xi.mod.DIA_DOT) - target:addStatusEffect(xi.effect.DIA, power, 3, 60, 0, 10, 1) + target:addStatusEffect(xi.effect.DIA, power, 3, 60, 0, 10, tier) + end return damage end diff --git a/scripts/actions/spells/white/diaga_ii.lua b/scripts/actions/spells/white/diaga_ii.lua index 66ea280ad7b..37035e4e72b 100644 --- a/scripts/actions/spells/white/diaga_ii.lua +++ b/scripts/actions/spells/white/diaga_ii.lua @@ -11,19 +11,16 @@ end spellObject.onSpellCast = function(caster, target, spell) local damage = xi.spells.damage.useDamageSpell(caster, target, spell) + local tier = 3 -- Check for Bio local bio = target:getStatusEffect(xi.effect.BIO) - if bio and bio:getTier() >= 2 then - return damage - else + if bio and bio:getTier() < tier then target:delStatusEffect(xi.effect.BIO) - end - - -- Apply effect. - local power = 2 + caster:getMod(xi.mod.DIA_DOT) + local power = 2 + caster:getMod(xi.mod.DIA_DOT) - target:addStatusEffect(xi.effect.DIA, power, 3, 120, 0, 15, 2) + target:addStatusEffect(xi.effect.DIA, power, 3, 120, 0, 15, tier) + end return damage end diff --git a/scripts/actions/spells/white/diaga_iii.lua b/scripts/actions/spells/white/diaga_iii.lua index 6a1939a29c0..7fad1f51aac 100644 --- a/scripts/actions/spells/white/diaga_iii.lua +++ b/scripts/actions/spells/white/diaga_iii.lua @@ -11,19 +11,16 @@ end spellObject.onSpellCast = function(caster, target, spell) local damage = xi.spells.damage.useDamageSpell(caster, target, spell) + local tier = 5 -- Check for Bio local bio = target:getStatusEffect(xi.effect.BIO) - if bio and bio:getTier() >= 3 then - return damage - else + if bio and bio:getTier() < tier then target:delStatusEffect(xi.effect.BIO) - end - - -- Apply effect. - local power = 3 + caster:getMod(xi.mod.DIA_DOT) + local power = 3 + caster:getMod(xi.mod.DIA_DOT) - target:addStatusEffect(xi.effect.DIA, power, 3, 180, 0, 20, 3) + target:addStatusEffect(xi.effect.DIA, power, 3, 180, 0, 20, tier) + end return damage end diff --git a/scripts/actions/spells/white/diaga_iv.lua b/scripts/actions/spells/white/diaga_iv.lua index 6f37673c14c..241076efb31 100644 --- a/scripts/actions/spells/white/diaga_iv.lua +++ b/scripts/actions/spells/white/diaga_iv.lua @@ -11,19 +11,16 @@ end spellObject.onSpellCast = function(caster, target, spell) local damage = xi.spells.damage.useDamageSpell(caster, target, spell) + local tier = 7 -- Check for Bio local bio = target:getStatusEffect(xi.effect.BIO) - if bio and bio:getTier() >= 4 then - return damage - else + if bio and bio:getTier() < tier then target:delStatusEffect(xi.effect.BIO) - end - - -- Apply effect. - local power = 4 + caster:getMod(xi.mod.DIA_DOT) + local power = 4 + caster:getMod(xi.mod.DIA_DOT) - target:addStatusEffect(xi.effect.DIA, power, 3, 180, 0, 25, 4) + target:addStatusEffect(xi.effect.DIA, power, 3, 180, 0, 25, tier) + end return damage end diff --git a/scripts/actions/spells/white/diaga_v.lua b/scripts/actions/spells/white/diaga_v.lua index 43f555a44f0..4ea10fefe36 100644 --- a/scripts/actions/spells/white/diaga_v.lua +++ b/scripts/actions/spells/white/diaga_v.lua @@ -11,19 +11,16 @@ end spellObject.onSpellCast = function(caster, target, spell) local damage = xi.spells.damage.useDamageSpell(caster, target, spell) + local tier = 9 -- Check for Bio local bio = target:getStatusEffect(xi.effect.BIO) - if bio and bio:getTier() >= 5 then - return damage - else + if bio and bio:getTier() < tier then target:delStatusEffect(xi.effect.BIO) - end - - -- Apply effect. - local power = 5 + caster:getMod(xi.mod.DIA_DOT) + local power = 5 + caster:getMod(xi.mod.DIA_DOT) - target:addStatusEffect(xi.effect.DIA, power, 3, 180, 0, 30, 5) + target:addStatusEffect(xi.effect.DIA, power, 3, 180, 0, 30, tier) + end return damage end diff --git a/scripts/effects/bio.lua b/scripts/effects/bio.lua index ddca8f5c6db..f1cdcd6726d 100644 --- a/scripts/effects/bio.lua +++ b/scripts/effects/bio.lua @@ -1,13 +1,13 @@ ----------------------------------- -- xi.effect.BIO --- Tier >= 5 signals this is a bio that doesn't break sleep +-- Tier >= 11 signals this is a bio that doesn't break sleep -- See mobskills/nightmare.lua for full explanation ----------------------------------- ---@type TEffect local effectObject = {} effectObject.onEffectGain = function(target, effect) - if effect:getTier() < 5 then -- Regular bio application. + if effect:getTier() < 11 then -- Regular bio application. effect:addMod(xi.mod.REGEN_DOWN, effect:getPower()) end @@ -15,9 +15,9 @@ effectObject.onEffectGain = function(target, effect) end effectObject.onEffectTick = function(target, effect) - -- Bio with Tier >= 5 is a signal that we don't wake up targets from this dot damage + -- Bio with Tier >= 11 is a signal that we don't wake up targets from this dot damage -- handle diabolos nightmare bio damage explicitly - if effect:getTier() >= 5 then + if effect:getTier() >= 11 then -- re-using logic from helix effect processing local dmg = utils.handleStoneskin(target, effect:getPower()) diff --git a/scripts/globals/combat/entity_behavior.lua b/scripts/globals/combat/entity_behavior.lua index cc7052af602..9f75d9e2f15 100644 --- a/scripts/globals/combat/entity_behavior.lua +++ b/scripts/globals/combat/entity_behavior.lua @@ -206,20 +206,34 @@ xi.combat.behavior.chooseAction = function(actor, mainTarget, optionalTargets, a [xi.action.type.ENFEEBLING_TARGET] = function() if not actionTarget:hasStatusEffect(actionCondition) and - not xi.data.statusEffect.isEffectNullified(actor, actionCondition, effectTier) + not xi.data.statusEffect.isEffectNullified(actionTarget, actionCondition, effectTier) then - -- Silence + -- Special condition: Silence if actionCondition == xi.effect.SILENCE then if xi.data.job.isInnateCaster(actionTarget) then table.insert(actionList, { actionId, actionTarget, actionWeight }) end - -- -- - -- elseif actionCondition == xi.effect. then - -- - -- else - -- table.insert(actionList, { actionId, actionTarget, actionWeight }) - -- end + -- Special condition: Elemental DoT incompatibilities. This will ensure we only cast stackable effects. + elseif + actionCondition == xi.effect.BURN or + actionCondition == xi.effect.CHOKE or + actionCondition == xi.effect.DROWN or + actionCondition == xi.effect.FROST or + actionCondition == xi.effect.RASP or + actionCondition == xi.effect.SHOCK + then + if + not actionTarget:hasStatusEffect(xi.data.statusEffect.getEffectToRemove(actionCondition)) and + not actionTarget:hasStatusEffect(xi.data.statusEffect.getNullificatingEffect(actionCondition)) + then + table.insert(actionList, { actionId, actionTarget, actionWeight }) + end + + -- No special conditions. + else + table.insert(actionList, { actionId, actionTarget, actionWeight }) + end end end, @@ -229,10 +243,30 @@ xi.combat.behavior.chooseAction = function(actor, mainTarget, optionalTargets, a not actionTarget:hasStatusEffect(actionCondition) and not xi.data.statusEffect.isEffectNullified(actionTarget, actionCondition, effectTier) then - if - (actionCondition == xi.effect.SILENCE and xi.data.job.isInnateCaster(actionTarget)) or - actionCondition ~= xi.effect.SILENCE + -- Special condition: Silence + if actionCondition == xi.effect.SILENCE then + if xi.data.job.isInnateCaster(actionTarget) then + table.insert(actionList, { actionId, actor, actionWeight }) + end + + -- Special condition: Elemental DoT incompatibilities. This will ensure we only cast stackable effects. + elseif + actionCondition == xi.effect.BURN or + actionCondition == xi.effect.CHOKE or + actionCondition == xi.effect.DROWN or + actionCondition == xi.effect.FROST or + actionCondition == xi.effect.RASP or + actionCondition == xi.effect.SHOCK then + if + not actionTarget:hasStatusEffect(xi.data.statusEffect.getEffectToRemove(actionCondition)) and + not actionTarget:hasStatusEffect(xi.data.statusEffect.getNullificatingEffect(actionCondition)) + then + table.insert(actionList, { actionId, actor, actionWeight }) + end + + -- No special conditions. + else table.insert(actionList, { actionId, actor, actionWeight }) end end diff --git a/scripts/globals/spells/enfeebling_spell.lua b/scripts/globals/spells/enfeebling_spell.lua index cf34e5185dc..a570f421275 100644 --- a/scripts/globals/spells/enfeebling_spell.lua +++ b/scripts/globals/spells/enfeebling_spell.lua @@ -25,6 +25,7 @@ local column = } local pTable = +{ -- Black Magic [xi.magic.spell.BIND ] = { xi.effect.BIND, 1, xi.mod.INT, 0, 0, 60, 2, 0, false, 0 }, [xi.magic.spell.BINDGA ] = { xi.effect.BIND, 1, xi.mod.INT, 0, 0, 60, 2, 0, false, 0 }, diff --git a/src/map/lua/lua_baseentity.cpp b/src/map/lua/lua_baseentity.cpp index e4919c5ed31..eef92a8e1fc 100644 --- a/src/map/lua/lua_baseentity.cpp +++ b/src/map/lua/lua_baseentity.cpp @@ -10099,7 +10099,7 @@ void CLuaBaseEntity::takeDamage(int32 damage, const sol::object& attacker, const // Diabolos NM/mob ability // "Damage will not wake you up from Nightmare, only Cure and Benediction (Benediction will also remove the Bio effect)." if (wakeUp == true && - PDefender->StatusEffectContainer->GetStatusEffect(EFFECT_SLEEP)->GetTier() >= 5) // Tier 5 = Diabolos NM Nightmare + PDefender->StatusEffectContainer->GetStatusEffect(EFFECT_SLEEP)->GetTier() >= 11) // Tier 11 = Diabolos NM Nightmare { wakeUp = false; } From 8d56d50404f2dd8df7f56e3f86d5d6c7779d573e Mon Sep 17 00:00:00 2001 From: Xaver-DaRed Date: Fri, 2 Jan 2026 02:48:00 +0100 Subject: [PATCH 4/4] Create a new global for status effect mobskills --- scripts/actions/mobskills/spider_web.lua | 10 +- scripts/data/status_effect_tables.lua | 2 +- .../combat/action_mobskill_status_effect.lua | 92 +++++++++++++++++++ scripts/globals/spells/enfeebling_spell.lua | 2 +- 4 files changed, 103 insertions(+), 3 deletions(-) create mode 100644 scripts/globals/combat/action_mobskill_status_effect.lua diff --git a/scripts/actions/mobskills/spider_web.lua b/scripts/actions/mobskills/spider_web.lua index 3a906337911..e2d8761add8 100644 --- a/scripts/actions/mobskills/spider_web.lua +++ b/scripts/actions/mobskills/spider_web.lua @@ -10,7 +10,15 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(target, mob, skill) - skill:setMsg(xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.SLOW, 3000, 0, 90)) + local effectparams = + { + effectId = xi.effect.SLOW, + power = 3000, + duration = 90, + tier = 8, -- https://wiki.ffo.jp/html/4125.html + } + + xi.combat.action.executeMobskillStatusEffect(mob, target, skill, effectparams, true) return xi.effect.SLOW end diff --git a/scripts/data/status_effect_tables.lua b/scripts/data/status_effect_tables.lua index 5f4aec904e6..c6cdab0e9ff 100644 --- a/scripts/data/status_effect_tables.lua +++ b/scripts/data/status_effect_tables.lua @@ -42,7 +42,7 @@ xi.data.statusEffect.dataTable = [xi.effect.BURN ] = { xi.effect.DROWN, 0, xi.effect.FROST, xi.element.FIRE, 0, 0, 0, 0, 0 }, [xi.effect.CHARM_I ] = { 0, 0, 0, xi.element.LIGHT, 0, xi.mod.CHARMRES, 0, xi.mod.CHARM_MEVA, 0 }, -- TODO: charm should be moved from a mob property to a regular immunity [xi.effect.CHOKE ] = { xi.effect.FROST, 0, xi.effect.RASP, xi.element.WIND, 0, 0, 0, 0, 0 }, - [xi.effect.CURSE_I ] = { 0, 0, 0, xi.element.DARK, xi.immunity.NONE, xi.mod.CURSERES, 0, xi.mod.CURSE_MEVA, 0 }, + [xi.effect.CURSE_I ] = { 0, 0, 0, xi.element.DARK, 0, xi.mod.CURSERES, 0, xi.mod.CURSE_MEVA, 0 }, [xi.effect.DEFENSE_DOWN ] = { 0, 0, 0, xi.element.WIND, 0, 0, 0, 0, 0 }, [xi.effect.DIA ] = { 0, xi.effect.BIO, 0, xi.element.LIGHT, 0, 0, 0, 0, 0 }, [xi.effect.DROWN ] = { xi.effect.SHOCK, 0, xi.effect.BURN, xi.element.WATER, 0, 0, 0, 0, 0 }, diff --git a/scripts/globals/combat/action_mobskill_status_effect.lua b/scripts/globals/combat/action_mobskill_status_effect.lua new file mode 100644 index 00000000000..420531f17ba --- /dev/null +++ b/scripts/globals/combat/action_mobskill_status_effect.lua @@ -0,0 +1,92 @@ +----------------------------------- +-- Global file for mobskills that apply status effects. +----------------------------------- +xi = xi or {} +xi.combat = xi.combat or {} +xi.combat.action = xi.combat.action or {} +----------------------------------- + +local step = +{ + CANT_GAIN = 1, + IMMUNE_CHECK = 2, + RESIST_TRAIT_CHECK = 3, + NULLIFY_CHECK = 4, + RESIST_RATE_CHECK = 5, + APPLICATION_SUCCESS = 6, + APPLICATION_FAIL = 7, +} + +local function validateParameters(effectData) + local params = {} + + -- Status effect application parameters. + params.effectId = effectData.effectId or 0 + params.power = effectData.power or 0 + params.tick = effectData.tick or 0 + params.duration = effectData.duration or 0 + params.subType = effectData.subType or 0 + params.subPower = effectData.subPower or 0 + params.tier = effectData.tier or 0 + + -- Calculation parameters. + params.resist = effectData.resist or 0.125 -- The amount of resists this effect allows. Example: Sleep can only resist once before failing, so value = 1/2 (No 1/4 nor 1/8) + params.rank = effectData.rank or xi.skillRank.A_PLUS -- The skill rank used for macc. + params.stat = effectData.stat or xi.mod.INT -- Stat used for macc. + params.macc = effectData.macc or 0 -- Flat macc bonus addition. + + return params +end + +local function handleReturn(skill, setMessage, message, processStep) + if not setMessage then + return + end + + -- TODO: Handle message modifiers with mobskills. + -- if processStep == step.RESIST_TRAIT_CHECK then + -- skill:setModifier(xi.msg.actionModifier.RESIST) -- Resist! + -- end + + skill:setMsg(message) +end + +xi.combat.action.executeMobskillStatusEffect = function(actor, target, skill, effectData, setMessage) + -- Ensure all data fed is valid and initialized. + local params = validateParameters(effectData) + + if not target:canGainStatusEffect(params.effectId, params.power) then + return handleReturn(skill, setMessage, xi.msg.basic.SKILL_NO_EFFECT, step.CANT_GAIN) + end + + local element = xi.data.statusEffect.getAssociatedElement(params.effectId, actor:getStatusEffectElement(params.effectId)) + + -- Check immunity. + if xi.data.statusEffect.isTargetImmune(target, params.effectId, element) then + return handleReturn(skill, setMessage, xi.msg.basic.SKILL_MISS, step.IMMUNE_CHECK) + + -- Check resist traits. + elseif xi.data.statusEffect.isTargetResistant(actor, target, params.effectId) then + return handleReturn(skill, setMessage, xi.msg.basic.SKILL_MISS, step.RESIST_TRAIT_CHECK) + + -- Check effect incompatibilities. + elseif xi.data.statusEffect.isEffectNullified(target, params.effectId, params.tier) then + return handleReturn(skill, setMessage, xi.msg.basic.SKILL_MISS, step.NULLIFY_CHECK) + end + + -- Calculate resist state. + local resistRate = xi.combat.magicHitRate.calculateResistRate(actor, target, 0, 0, params.rank, element, params.stat, params.effectId, params.macc) + if resistRate < params.resist then + return handleReturn(skill, setMessage, xi.msg.basic.SKILL_MISS, step.RESIST_RATE_CHECK) + end + + -- Calculate duration. + local totalDuration = math.floor(params.duration * resistRate) + + -- Apply effect. + if target:addStatusEffect(params.effectId, params.power, params.tick, totalDuration, params.subType, params.subPower, params.tier) then + return handleReturn(skill, setMessage, xi.msg.basic.SKILL_ENFEEB_IS, step.APPLICATION_SUCCESS) + end + + return handleReturn(skill, setMessage, xi.msg.basic.SKILL_MISS, step.APPLICATION_FAIL) +end diff --git a/scripts/globals/spells/enfeebling_spell.lua b/scripts/globals/spells/enfeebling_spell.lua index a570f421275..01766fdbbfc 100644 --- a/scripts/globals/spells/enfeebling_spell.lua +++ b/scripts/globals/spells/enfeebling_spell.lua @@ -90,7 +90,7 @@ local pTable = [xi.magic.spell.PARALYZE ] = { xi.effect.PARALYSIS, 1, xi.mod.MND, 0, 0, 120, 2, 0, true, -10 }, [xi.magic.spell.PARALYZE_II ] = { xi.effect.PARALYSIS, 3, xi.mod.MND, 0, 0, 120, 2, 0, true, 0 }, [xi.magic.spell.PARALYGA ] = { xi.effect.PARALYSIS, 2, xi.mod.MND, 0, 0, 120, 2, 0, true, 0 }, - [xi.magic.spell.REPOSE ] = { xi.effect.SLEEP_I, 1, xi.mod.MND, 2, 0, 90, 2, 1, false, 0 }, + [xi.magic.spell.REPOSE ] = { xi.effect.SLEEP_I, 2, xi.mod.MND, 2, 0, 90, 2, 1, false, 0 }, [xi.magic.spell.SILENCE ] = { xi.effect.SILENCE, 1, xi.mod.MND, 1, 0, 120, 2, 0, false, 0 }, [xi.magic.spell.SILENCEGA ] = { xi.effect.SILENCE, 2, xi.mod.MND, 1, 0, 120, 2, 0, false, 0 }, [xi.magic.spell.SLOW ] = { xi.effect.SLOW, 3, xi.mod.MND, 0, 0, 180, 2, 0, true, 10 },