From 0141008bfd94b1aef8b1a5f2bee687e363006c03 Mon Sep 17 00:00:00 2001 From: Xaver-DaRed Date: Tue, 27 Jan 2026 17:17:11 +0100 Subject: [PATCH] Fix Dia and Bio effect checks --- scripts/actions/spells/black/bio.lua | 5 ++++- scripts/actions/spells/black/bio_ii.lua | 5 ++++- scripts/actions/spells/black/bio_iii.lua | 5 ++++- scripts/actions/spells/black/bio_iv.lua | 5 ++++- scripts/actions/spells/black/bio_v.lua | 5 ++++- scripts/actions/spells/white/dia.lua | 5 ++++- scripts/actions/spells/white/dia_ii.lua | 5 ++++- scripts/actions/spells/white/dia_iii.lua | 5 ++++- scripts/actions/spells/white/dia_iv.lua | 5 ++++- scripts/actions/spells/white/dia_v.lua | 5 ++++- scripts/actions/spells/white/diaga.lua | 5 ++++- scripts/actions/spells/white/diaga_ii.lua | 5 ++++- scripts/actions/spells/white/diaga_iii.lua | 5 ++++- scripts/actions/spells/white/diaga_iv.lua | 5 ++++- scripts/actions/spells/white/diaga_v.lua | 5 ++++- 15 files changed, 60 insertions(+), 15 deletions(-) diff --git a/scripts/actions/spells/black/bio.lua b/scripts/actions/spells/black/bio.lua index 3ccb5fb2cdf..e643b818e9f 100644 --- a/scripts/actions/spells/black/bio.lua +++ b/scripts/actions/spells/black/bio.lua @@ -15,7 +15,10 @@ spellObject.onSpellCast = function(caster, target, spell) -- Check for Dia. local dia = target:getStatusEffect(xi.effect.DIA) - if dia and dia:getTier() < tier then + if + not dia or + (dia and dia:getTier() < tier) + then target:delStatusEffect(xi.effect.DIA) -- Calculate DoT effect: http://wiki.ffo.jp/html/1954.html diff --git a/scripts/actions/spells/black/bio_ii.lua b/scripts/actions/spells/black/bio_ii.lua index 6aed33a6bd5..a6a7cf1776e 100644 --- a/scripts/actions/spells/black/bio_ii.lua +++ b/scripts/actions/spells/black/bio_ii.lua @@ -15,7 +15,10 @@ spellObject.onSpellCast = function(caster, target, spell) -- Check for Dia. local dia = target:getStatusEffect(xi.effect.DIA) - if dia and dia:getTier() < tier then + if + not dia or + (dia and dia:getTier() < tier) + then target:delStatusEffect(xi.effect.DIA) -- Calculate DoT effect: http://wiki.ffo.jp/html/1954.html diff --git a/scripts/actions/spells/black/bio_iii.lua b/scripts/actions/spells/black/bio_iii.lua index 4bb8cd147af..bef4df318f6 100644 --- a/scripts/actions/spells/black/bio_iii.lua +++ b/scripts/actions/spells/black/bio_iii.lua @@ -15,7 +15,10 @@ spellObject.onSpellCast = function(caster, target, spell) -- Check for Dia. local dia = target:getStatusEffect(xi.effect.DIA) - if dia and dia:getTier() < tier then + if + not dia or + (dia and dia:getTier() < tier) + then target:delStatusEffect(xi.effect.DIA) -- Calculate DoT effect: http://wiki.ffo.jp/html/1954.html diff --git a/scripts/actions/spells/black/bio_iv.lua b/scripts/actions/spells/black/bio_iv.lua index 7b8e70ea27b..9bd684fe713 100644 --- a/scripts/actions/spells/black/bio_iv.lua +++ b/scripts/actions/spells/black/bio_iv.lua @@ -15,7 +15,10 @@ spellObject.onSpellCast = function(caster, target, spell) -- Check for Dia. local dia = target:getStatusEffect(xi.effect.DIA) - if dia and dia:getTier() < tier then + if + not dia or + (dia and dia:getTier() < tier) + then target:delStatusEffect(xi.effect.DIA) -- Calculate DoT effect (rough, though fairly accurate) diff --git a/scripts/actions/spells/black/bio_v.lua b/scripts/actions/spells/black/bio_v.lua index 88f4e2194f6..9d89d7b5eca 100644 --- a/scripts/actions/spells/black/bio_v.lua +++ b/scripts/actions/spells/black/bio_v.lua @@ -15,7 +15,10 @@ spellObject.onSpellCast = function(caster, target, spell) -- Check for Dia. local dia = target:getStatusEffect(xi.effect.DIA) - if dia and dia:getTier() < tier then + if + not dia or + (dia and dia:getTier() < tier) + then target:delStatusEffect(xi.effect.DIA) -- Calculate DoT effect (rough, though fairly accurate) diff --git a/scripts/actions/spells/white/dia.lua b/scripts/actions/spells/white/dia.lua index ed248e3d9bd..5a0c17ebedd 100644 --- a/scripts/actions/spells/white/dia.lua +++ b/scripts/actions/spells/white/dia.lua @@ -15,7 +15,10 @@ spellObject.onSpellCast = function(caster, target, spell) -- Check for Bio local bio = target:getStatusEffect(xi.effect.BIO) - if bio and bio:getTier() < tier then + if + not bio or + (bio and bio:getTier() < tier) + then target:delStatusEffect(xi.effect.BIO) local power = 1 + caster:getMod(xi.mod.DIA_DOT) diff --git a/scripts/actions/spells/white/dia_ii.lua b/scripts/actions/spells/white/dia_ii.lua index 458791b5db6..1618275f143 100644 --- a/scripts/actions/spells/white/dia_ii.lua +++ b/scripts/actions/spells/white/dia_ii.lua @@ -15,7 +15,10 @@ spellObject.onSpellCast = function(caster, target, spell) -- Check for Bio local bio = target:getStatusEffect(xi.effect.BIO) - if bio and bio:getTier() < tier then + if + not bio or + (bio and bio:getTier() < tier) + then target:delStatusEffect(xi.effect.BIO) local power = 2 + caster:getMod(xi.mod.DIA_DOT) diff --git a/scripts/actions/spells/white/dia_iii.lua b/scripts/actions/spells/white/dia_iii.lua index 5f4fe166b47..aa898d40b78 100644 --- a/scripts/actions/spells/white/dia_iii.lua +++ b/scripts/actions/spells/white/dia_iii.lua @@ -15,7 +15,10 @@ spellObject.onSpellCast = function(caster, target, spell) -- Check for Bio local bio = target:getStatusEffect(xi.effect.BIO) - if bio and bio:getTier() < tier then + if + not bio or + (bio and bio:getTier() < tier) + then target:delStatusEffect(xi.effect.BIO) local power = 3 + caster:getMod(xi.mod.DIA_DOT) diff --git a/scripts/actions/spells/white/dia_iv.lua b/scripts/actions/spells/white/dia_iv.lua index e8e39bbf8e7..5e5ee1cda0e 100644 --- a/scripts/actions/spells/white/dia_iv.lua +++ b/scripts/actions/spells/white/dia_iv.lua @@ -15,7 +15,10 @@ spellObject.onSpellCast = function(caster, target, spell) -- Check for Bio local bio = target:getStatusEffect(xi.effect.BIO) - if bio and bio:getTier() < tier then + if + not bio or + (bio and bio:getTier() < tier) + then target:delStatusEffect(xi.effect.BIO) local power = 4 + caster:getMod(xi.mod.DIA_DOT) diff --git a/scripts/actions/spells/white/dia_v.lua b/scripts/actions/spells/white/dia_v.lua index d89f9990da1..82c827496c5 100644 --- a/scripts/actions/spells/white/dia_v.lua +++ b/scripts/actions/spells/white/dia_v.lua @@ -15,7 +15,10 @@ spellObject.onSpellCast = function(caster, target, spell) -- Check for Bio local bio = target:getStatusEffect(xi.effect.BIO) - if bio and bio:getTier() < tier then + if + not bio or + (bio and bio:getTier() < tier) + then target:delStatusEffect(xi.effect.BIO) local power = 5 + caster:getMod(xi.mod.DIA_DOT) diff --git a/scripts/actions/spells/white/diaga.lua b/scripts/actions/spells/white/diaga.lua index 76f2fba15e3..7439c568fe9 100644 --- a/scripts/actions/spells/white/diaga.lua +++ b/scripts/actions/spells/white/diaga.lua @@ -15,7 +15,10 @@ spellObject.onSpellCast = function(caster, target, spell) -- Check for Bio local bio = target:getStatusEffect(xi.effect.BIO) - if bio and bio:getTier() < tier then + if + not bio or + (bio and bio:getTier() < tier) + then target:delStatusEffect(xi.effect.BIO) local power = 1 + caster:getMod(xi.mod.DIA_DOT) diff --git a/scripts/actions/spells/white/diaga_ii.lua b/scripts/actions/spells/white/diaga_ii.lua index 37035e4e72b..9e0bf4055b7 100644 --- a/scripts/actions/spells/white/diaga_ii.lua +++ b/scripts/actions/spells/white/diaga_ii.lua @@ -15,7 +15,10 @@ spellObject.onSpellCast = function(caster, target, spell) -- Check for Bio local bio = target:getStatusEffect(xi.effect.BIO) - if bio and bio:getTier() < tier then + if + not bio or + (bio and bio:getTier() < tier) + then target:delStatusEffect(xi.effect.BIO) local power = 2 + caster:getMod(xi.mod.DIA_DOT) diff --git a/scripts/actions/spells/white/diaga_iii.lua b/scripts/actions/spells/white/diaga_iii.lua index 7fad1f51aac..4ca148e66ed 100644 --- a/scripts/actions/spells/white/diaga_iii.lua +++ b/scripts/actions/spells/white/diaga_iii.lua @@ -15,7 +15,10 @@ spellObject.onSpellCast = function(caster, target, spell) -- Check for Bio local bio = target:getStatusEffect(xi.effect.BIO) - if bio and bio:getTier() < tier then + if + not bio or + (bio and bio:getTier() < tier) + then target:delStatusEffect(xi.effect.BIO) local power = 3 + caster:getMod(xi.mod.DIA_DOT) diff --git a/scripts/actions/spells/white/diaga_iv.lua b/scripts/actions/spells/white/diaga_iv.lua index 241076efb31..e55ee2879b2 100644 --- a/scripts/actions/spells/white/diaga_iv.lua +++ b/scripts/actions/spells/white/diaga_iv.lua @@ -15,7 +15,10 @@ spellObject.onSpellCast = function(caster, target, spell) -- Check for Bio local bio = target:getStatusEffect(xi.effect.BIO) - if bio and bio:getTier() < tier then + if + not bio or + (bio and bio:getTier() < tier) + then target:delStatusEffect(xi.effect.BIO) local power = 4 + caster:getMod(xi.mod.DIA_DOT) diff --git a/scripts/actions/spells/white/diaga_v.lua b/scripts/actions/spells/white/diaga_v.lua index 4ea10fefe36..d28cf18fead 100644 --- a/scripts/actions/spells/white/diaga_v.lua +++ b/scripts/actions/spells/white/diaga_v.lua @@ -15,7 +15,10 @@ spellObject.onSpellCast = function(caster, target, spell) -- Check for Bio local bio = target:getStatusEffect(xi.effect.BIO) - if bio and bio:getTier() < tier then + if + not bio or + (bio and bio:getTier() < tier) + then target:delStatusEffect(xi.effect.BIO) local power = 5 + caster:getMod(xi.mod.DIA_DOT)