From 962a811110293274eb8695728ddbeab6f95162b1 Mon Sep 17 00:00:00 2001 From: Critical <48370698+CriticalXI@users.noreply.github.com> Date: Sun, 22 Feb 2026 16:02:11 -0700 Subject: [PATCH] [lua,sql,c++] Correct AOE ability buff messaging --- modules/abyssea/lua/job_adjustments.lua | 14 ++------------ scripts/enum/msg.lua | 2 +- scripts/globals/job_utils/dark_knight.lua | 5 ----- scripts/globals/job_utils/monk.lua | 2 +- scripts/globals/job_utils/samurai.lua | 5 ----- sql/abilities.sql | 6 +++--- src/map/enums/msg_basic.h | 10 +++++++++- src/map/utils/messageutils.h | 9 +++++++-- 8 files changed, 23 insertions(+), 30 deletions(-) diff --git a/modules/abyssea/lua/job_adjustments.lua b/modules/abyssea/lua/job_adjustments.lua index 595b5396d82..2deb110f37a 100644 --- a/modules/abyssea/lua/job_adjustments.lua +++ b/modules/abyssea/lua/job_adjustments.lua @@ -109,12 +109,7 @@ m:addOverride('xi.job_utils.dark_knight.useArcaneCircle', function(player, targe power = power + player:getMod(xi.mod.ARCANE_CIRCLE_POTENCY) - -- Handle simplified message for other party members. - if player:getID() ~= target:getID() then - ability:setMsg(xi.msg.basic.FORTIFIED_ARCANA) - end - - target:addStatusEffect(xi.effect.ARCANE_CIRCLE, power, 0, duration) + target:addStatusEffect(xi.effect.ARCANE_CIRCLE, { power = power, duration = duration, origin = player }) return xi.effect.ARCANE_CIRCLE end) @@ -221,12 +216,7 @@ m:addOverride('xi.job_utils.samurai.useWardingCircle', function(player, target, power = power + player:getMod(xi.mod.WARDING_CIRCLE_POTENCY) - -- Handle simplified message for other party members. - if player:getID() ~= target:getID() then - ability:setMsg(xi.msg.basic.FORTIFIED_DEMONS) - end - - target:addStatusEffect(xi.effect.WARDING_CIRCLE, power, 0, duration) + target:addStatusEffect(xi.effect.WARDING_CIRCLE, { power = power, duration = duration, origin = player }) return xi.effect.WARDING_CIRCLE end) diff --git a/scripts/enum/msg.lua b/scripts/enum/msg.lua index 0b66057aa24..14bacab5fc7 100644 --- a/scripts/enum/msg.lua +++ b/scripts/enum/msg.lua @@ -158,7 +158,7 @@ xi.msg.basic = USES_JA_TAKE_DAMAGE = 317, -- The uses .. takes .. points of damage. JA_GAIN_EFFECT = 266, -- gains the effect of . JA_RECEIVES_EFFECT = 267, -- receives the effect of . - JA_GAIN_EFFECT_2 = 316, -- uses . gains the effect of . + JA_GAIN_EFFECT_2 = 319, -- uses . gains the effect of . JA_RECEIVES_EFFECT_2 = 320, -- uses . receives the effect of . JA_RECEIVES_MAB_MDB = 415, -- uses . receives the effect of Magic Attack Boost and Magic Defense Boost. JA_RECEIVES_MAB_MDB_2 = 414, -- receives the effect of Magic Attack Boost and Magic Defense Boost. diff --git a/scripts/globals/job_utils/dark_knight.lua b/scripts/globals/job_utils/dark_knight.lua index f785553251c..babd3aae43f 100644 --- a/scripts/globals/job_utils/dark_knight.lua +++ b/scripts/globals/job_utils/dark_knight.lua @@ -60,11 +60,6 @@ xi.job_utils.dark_knight.useArcaneCircle = function(player, target, ability) power = power + player:getMod(xi.mod.ARCANE_CIRCLE_POTENCY) - -- Handle simplified message for other party memebers. - if player:getID() ~= target:getID() then - ability:setMsg(xi.msg.basic.FORTIFIED_ARCANA) - end - target:addStatusEffect(xi.effect.ARCANE_CIRCLE, { power = power, duration = duration, origin = player }) return xi.effect.ARCANE_CIRCLE diff --git a/scripts/globals/job_utils/monk.lua b/scripts/globals/job_utils/monk.lua index 97674f0b41e..fcbdb58cd5a 100644 --- a/scripts/globals/job_utils/monk.lua +++ b/scripts/globals/job_utils/monk.lua @@ -212,7 +212,7 @@ xi.job_utils.monk.useMantra = function(player, target, ability) target:delStatusEffect(xi.effect.MAX_HP_BOOST) -- TODO: confirm which versions of HP boost mantra can overwrite target:addStatusEffect(xi.effect.MAX_HP_BOOST, { power = merits, duration = 180, origin = player }) - return 0 -- xi.effect.MANTRA -- TODO: implement xi.effect.MANTRA + return xi.effect.MAX_HP_BOOST end xi.job_utils.monk.usePerfectCounter = function(player, target, ability) diff --git a/scripts/globals/job_utils/samurai.lua b/scripts/globals/job_utils/samurai.lua index a1b03fc4ee9..c1e66cf170d 100644 --- a/scripts/globals/job_utils/samurai.lua +++ b/scripts/globals/job_utils/samurai.lua @@ -104,11 +104,6 @@ xi.job_utils.samurai.useWardingCircle = function(player, target, ability) power = power + player:getMod(xi.mod.WARDING_CIRCLE_POTENCY) - -- Handle simplified message for other party members. - if player:getID() ~= target:getID() then - ability:setMsg(xi.msg.basic.FORTIFIED_DEMONS) - end - target:addStatusEffect(xi.effect.WARDING_CIRCLE, { power = power, duration = duration, origin = player }) return xi.effect.WARDING_CIRCLE diff --git a/sql/abilities.sql b/sql/abilities.sql index e982b0132bd..bc72fb02327 100644 --- a/sql/abilities.sql +++ b/sql/abilities.sql @@ -64,7 +64,7 @@ INSERT INTO `abilities` VALUES (43,'hide',6,45,1,300,63,0,0,10,2000,0,6,0,0,0,0, INSERT INTO `abilities` VALUES (44,'sneak_attack',6,15,1,60,64,0,0,17,2000,0,6,0,0,0,1,0,708,0,NULL); INSERT INTO `abilities` VALUES (45,'mug',6,35,4,300,65,129,0,183,2000,0,3,3,0,0,1,300,0,0,NULL); INSERT INTO `abilities` VALUES (46,'shield_bash',7,15,4,60,73,0,0,185,2000,0,3,3,0,0,450,900,768,0,NULL); -INSERT INTO `abilities` VALUES (47,'holy_circle',7,5,1,300,74,0,0,29,2000,0,6,0,1,10,1,20,770,0,NULL); +INSERT INTO `abilities` VALUES (47,'holy_circle',7,5,1,300,74,131,0,29,2000,0,6,0,1,10,1,20,770,0,NULL); INSERT INTO `abilities` VALUES (48,'sentinel',7,30,1,300,75,0,0,11,2000,0,6,0,0,0,1,900,772,0,NULL); INSERT INTO `abilities` VALUES (49,'souleater',8,30,1,360,85,0,0,20,2000,0,6,0,0,0,1,1300,832,0,NULL); INSERT INTO `abilities` VALUES (50,'arcane_circle',8,5,1,300,86,134,0,30,2000,0,6,0,1,10,1,20,834,0,NULL); @@ -81,7 +81,7 @@ INSERT INTO `abilities` VALUES (60,'barrage',11,30,1,300,125,0,0,23,2000,0,6,0,0 INSERT INTO `abilities` VALUES (61,'call_wyvern',14,1,1,1200,163,0,0,94,2000,0,6,0,0,0,1,300,0,4,NULL); INSERT INTO `abilities` VALUES (62,'third_eye',12,15,1,60,133,0,0,24,2000,0,6,0,0,0,1,0,1088,0,NULL); INSERT INTO `abilities` VALUES (63,'meditate',12,30,1,180,134,0,0,25,2000,0,6,0,0,0,320,0,1094,0,NULL); -INSERT INTO `abilities` VALUES (64,'warding_circle',12,5,1,300,135,0,0,31,2000,0,6,0,1,10,1,20,1090,0,NULL); +INSERT INTO `abilities` VALUES (64,'warding_circle',12,5,1,300,135,148,0,31,2000,0,6,0,1,10,1,20,1090,0,NULL); INSERT INTO `abilities` VALUES (65,'ancient_circle',14,5,1,300,157,0,0,32,2000,0,6,0,1,10,1,20,1216,0,NULL); INSERT INTO `abilities` VALUES (66,'jump',14,10,4,60,158,110,0,204,2000,0,3,8,0,0,0,0,1218,0,NULL); INSERT INTO `abilities` VALUES (67,'high_jump',14,35,4,120,159,110,0,209,2000,0,3,10,0,0,0,0,1220,0,NULL); @@ -109,7 +109,7 @@ INSERT INTO `abilities` VALUES (88,'assault',15,1,4,5,170,0,0,94,2000,0,6,20,0,0 INSERT INTO `abilities` VALUES (89,'retreat',15,1,1,5,171,0,0,94,2000,0,6,0,0,0,-10,0,0,256,NULL); INSERT INTO `abilities` VALUES (90,'release',15,1,1,5,172,0,0,94,2000,0,6,0,0,0,-10,0,0,256,NULL); INSERT INTO `abilities` VALUES (91,'blood_pact_rage',15,1,1,60,173,0,0,0,2000,0,6,20,0,0,1,300,0,256,NULL); -INSERT INTO `abilities` VALUES (92,'rampart',7,62,1,300,77,0,0,91,2000,0,6,0,1,14,320,320,776,0,NULL); +INSERT INTO `abilities` VALUES (92,'rampart',7,62,1,300,77,319,0,91,2000,0,6,0,1,14,320,320,776,0,NULL); INSERT INTO `abilities` VALUES (93,'azure_lore',16,0,1,3600,0,0,0,142,2000,0,6,0,0,0,1,300,0,0,'TOAU'); INSERT INTO `abilities` VALUES (94,'chain_affinity',16,40,1,120,181,0,0,140,2000,0,6,0,0,0,1,300,1344,0,'TOAU'); INSERT INTO `abilities` VALUES (95,'burst_affinity',16,25,1,120,182,0,0,141,2000,0,6,0,0,0,1,300,1346,0,'TOAU'); diff --git a/src/map/enums/msg_basic.h b/src/map/enums/msg_basic.h index ebf89c73355..89907651cb4 100644 --- a/src/map/enums/msg_basic.h +++ b/src/map/enums/msg_basic.h @@ -95,9 +95,13 @@ enum class MsgBasic : uint16_t SKILL_RECOVERS_HP = 103, // The uses .. recovers .. HP. IS_INTIMIDATED = 106, // The is intimidated by 's presence. USES_ABILITY_TAKES_DAMAGE = 110, // uses . takes points of damage. + USES_ABILITY_FORTIFIED_UNDEAD = 131, // uses . is fortified against undead. SPIKES_EFFECT_HP_DRAIN = 132, // 's spikes drain HP from the . + USES_ABILITY_FORTIFIED_ARCANA = 134, // uses . is fortified against arcana. CHARM_SUCCESS = 136, // The uses .. is now under the 's control. CHARM_FAIL = 137, // The uses .. The fails to charm . + USES_ABILITY_FORTIFIED_DEMONS = 148, // uses . is fortified against demons. + TARGET_FORTIFIED_DEMONS = 149, // is fortified against demons. USES_ABILITY_FORTIFIED_DRAGONS = 150, // uses . is fortified against dragons. TARGET_FORTIFIED_DRAGONS = 151, // is fortified against dragons. CANNOT_ON_THAT_TARG = 155, // You cannot perform that action on the specified target. @@ -159,6 +163,8 @@ enum class MsgBasic : uint16_t TARGET_EVADES = 282, // evades. TARGET_NO_EFFECT = 283, // No effect on . MAGIC_RESISTED_TARGET = 284, // resists the effects of the spell! + TARGET_FORTIFIED_UNDEAD = 286, // is fortified against undead. + TARGET_FORTIFIED_ARCANA = 287, // is fortified against arcana. USES_ITEM_RECOVERS_HP_AOE = 306, // uses . recovers HP. NEEDS_2H_WEAPON = 307, // That action requires a two-handed weapon. SKILL_DROP = 310, // 's skill drops X points! @@ -167,6 +173,7 @@ enum class MsgBasic : uint16_t CANNOT_USE_IN_AREA = 316, // That action cannot be used in this area. USES_JA_TAKE_DAMAGE = 317, // The uses .. takes .. points of damage. USES_ITEM_RECOVERS_HP_AOE2 = 318, // uses . recovers HP. + USES_ABILITY_GAINS_EFFECT = 319, // uses . gains the effect of . USES_BUT_MISSES = 324, // The uses .. but misses . READIES_SKILL = 326, // readies . STARTS_CASTING_TARGET = 327, // starts casting on . @@ -197,7 +204,7 @@ enum class MsgBasic : uint16_t TARGET_EFFECT_DRAINED = 404, // status effects drained from . LEARNS_SPELL = 419, // learns (nullptr)! ROLL_MAIN = 420, // The uses .. The total comes to ..! receives the effect of .. - ROLL_SUB = 421, // receives the effect of .. + RECEIVES_EFFECT_ABILITY = 421, // receives the effect of . ROLL_MAIN_FAIL = 422, // The uses .. The total comes to ..! No effect on . ROLL_SUB_FAIL = 423, // No effect on . DOUBLEUP = 424, // The uses Double-Up. The total for . increases to ..! receives the effect of .. @@ -213,6 +220,7 @@ enum class MsgBasic : uint16_t TARGET_RECHARGED_TP = 438, // 's abilities are recharged. 's TP is increased. USES_ABILITY_RECHARGE_MP = 439, // uses ! All of 's abilities are recharged. regains MP. TARGET_RECHARGED_MP = 440, // All of 's abilities are recharged. regains MP. + USES_ABILITY_EFFECT = 441, // receives the effect of . LEARNS_NEW_ABILITY = 442, // learns a new ability! CANNOT_USE_ITEMS = 445, // You cannot use items at this time. CANNOT_ATTACK_TARGET = 446, // You cannot attack that target diff --git a/src/map/utils/messageutils.h b/src/map/utils/messageutils.h index c6d084d6817..ab7e8a695ca 100644 --- a/src/map/utils/messageutils.h +++ b/src/map/utils/messageutils.h @@ -56,13 +56,18 @@ const std::unordered_map aoeVariants = { { MsgBasic::ABILITY_MISSES, MsgBasic::TARGET_EVADES }, { MsgBasic::USES_ABILITY_DISPEL, MsgBasic::TARGET_EFFECT_DISAPPEARS }, { MsgBasic::USES_JA_TAKE_DAMAGE, MsgBasic::TARGET_TAKES_DAMAGE }, + { MsgBasic::USES_ABILITY_FORTIFIED_UNDEAD, MsgBasic::TARGET_FORTIFIED_UNDEAD }, + { MsgBasic::USES_ABILITY_FORTIFIED_ARCANA, MsgBasic::TARGET_FORTIFIED_ARCANA }, + { MsgBasic::USES_ABILITY_FORTIFIED_DEMONS, MsgBasic::TARGET_FORTIFIED_DEMONS }, { MsgBasic::USES_ABILITY_FORTIFIED_DRAGONS, MsgBasic::TARGET_FORTIFIED_DRAGONS }, + { MsgBasic::USES_ABILITY_GAINS_EFFECT, MsgBasic::TARGET_GAINS_EFFECT }, + { MsgBasic::USES_ABILITY_EFFECT, MsgBasic::RECEIVES_EFFECT_ABILITY }, { MsgBasic::USES_ABILITY_RECHARGE, MsgBasic::TARGET_ABILITIES_RECHARGED }, { MsgBasic::USES_ABILITY_RECHARGE_TP, MsgBasic::TARGET_RECHARGED_TP }, { MsgBasic::USES_ABILITY_RECHARGE_MP, MsgBasic::TARGET_RECHARGED_MP }, { MsgBasic::VALLATION_GAIN, MsgBasic::VALIANCE_GAIN_PARTY_MEMBER }, - { MsgBasic::ROLL_MAIN, MsgBasic::ROLL_SUB }, - { MsgBasic::DOUBLEUP, MsgBasic::ROLL_SUB }, + { MsgBasic::ROLL_MAIN, MsgBasic::RECEIVES_EFFECT_ABILITY }, + { MsgBasic::DOUBLEUP, MsgBasic::RECEIVES_EFFECT_ABILITY }, { MsgBasic::ROLL_MAIN_FAIL, MsgBasic::ROLL_SUB_FAIL }, { MsgBasic::DOUBLEUP_FAIL, MsgBasic::ROLL_SUB_FAIL }, { MsgBasic::DOUBLEUP_BUST, MsgBasic::DOUBLEUP_BUST_SUB },