From a1d2f8043ef7cb8ccf61ac6669c46d98c396e787 Mon Sep 17 00:00:00 2001 From: Skold <113406182+Skold177@users.noreply.github.com> Date: Sun, 14 Jun 2026 15:21:20 -0400 Subject: [PATCH] Implement Nott for Trusts Implement Nott, add to Apururu (UC) and Sylvie (UC) --- scripts/actions/mobskills/dagan.lua | 6 +++-- scripts/actions/mobskills/myrkr.lua | 3 ++- scripts/actions/mobskills/nott.lua | 30 +++++++++++++++++++++ scripts/actions/spells/trust/apururu_uc.lua | 3 ++- scripts/actions/spells/trust/sylvie_uc.lua | 3 ++- scripts/enum/mob_skill.lua | 2 ++ sql/mob_skills.sql | 2 +- 7 files changed, 43 insertions(+), 6 deletions(-) create mode 100644 scripts/actions/mobskills/nott.lua diff --git a/scripts/actions/mobskills/dagan.lua b/scripts/actions/mobskills/dagan.lua index e05a463168b..080e462b9c4 100644 --- a/scripts/actions/mobskills/dagan.lua +++ b/scripts/actions/mobskills/dagan.lua @@ -11,8 +11,10 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local hp = math.floor(mob:getMaxHP() * xi.mobskills.calculateDuration(skill:getTP(), 22, 52) / 100) - local mp = math.floor(mob:getMaxMP() * xi.mobskills.calculateDuration(skill:getTP(), 15, 35) / 100) + local hpPercent = xi.combat.physical.calculateTPfactor(skill:getTP(), { 22, 33, 52 }) + local mpPercent = xi.combat.physical.calculateTPfactor(skill:getTP(), { 15, 22, 35 }) + local hp = math.floor(mob:getMaxHP() * hpPercent / 100) + local mp = math.floor(mob:getMaxMP() * mpPercent / 100) mob:addHP(hp) mob:addMP(mp) diff --git a/scripts/actions/mobskills/myrkr.lua b/scripts/actions/mobskills/myrkr.lua index ca146967c47..b6cc763c6ba 100644 --- a/scripts/actions/mobskills/myrkr.lua +++ b/scripts/actions/mobskills/myrkr.lua @@ -11,7 +11,8 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) - local amount = math.floor(xi.mobskills.calculateDuration(skill:getTP(), 20, 60) * mob:getMaxMP() / 100) + local mpPercent = xi.combat.physical.calculateTPfactor(skill:getTP(), { 20, 40, 60 }) + local amount = math.floor(mob:getMaxMP() * mpPercent / 100) mob:addMP(amount) skill:setMsg(xi.msg.basic.SKILL_RECOVERS_MP) diff --git a/scripts/actions/mobskills/nott.lua b/scripts/actions/mobskills/nott.lua new file mode 100644 index 00000000000..31aa458f0bc --- /dev/null +++ b/scripts/actions/mobskills/nott.lua @@ -0,0 +1,30 @@ +----------------------------------- +-- Nott +-- Family: Humanoid Club Weaponskill +-- Description: Restores HP and MP. Amount restored varies with TP. +----------------------------------- +---@type TMobSkill +local mobskillObject = {} + +mobskillObject.onMobSkillCheck = function(target, mob, skill) + mob:messageBasic(xi.msg.basic.READIES_SKILL, 0, xi.mobSkill.NOTT) + + return 0 +end + +mobskillObject.onMobWeaponSkill = function(mob, target, skill, action) + action:setCategory(xi.action.category.WEAPONSKILL_FINISH) + + local hpPercent = xi.combat.physical.calculateTPfactor(skill:getTP(), { 22, 33, 52 }) + local mpPercent = xi.combat.physical.calculateTPfactor(skill:getTP(), { 15, 22, 35 }) + local hp = math.floor(mob:getMaxHP() * hpPercent / 100) + local mp = math.floor(mob:getMaxMP() * mpPercent / 100) + + mob:addHP(hp) + mob:addMP(mp) + skill:setMsg(xi.msg.basic.SKILL_RECOVERS_HP) + + return hp +end + +return mobskillObject diff --git a/scripts/actions/spells/trust/apururu_uc.lua b/scripts/actions/spells/trust/apururu_uc.lua index 94e500aafb5..3faccfec976 100644 --- a/scripts/actions/spells/trust/apururu_uc.lua +++ b/scripts/actions/spells/trust/apururu_uc.lua @@ -27,11 +27,12 @@ spellObject.onMobSpawn = function(mob) -- Unity ranking high : xi.trust.message(mob, xi.trust.messageOffset.TEAMWORK_1) - -- TODO: Nott weaponskill needs implemented and logic added here for Apururu to use at 50% MP at level 50. -- TODO: UC trusts are supposed to get bonuses depending on unity ranking. Needs research. -- TODO: Custom spawn messages if Unity ranking is higher. -- TODO: Setup conditional behaviors for Devotion, Martyr + mob:addGambit(ai.t.SELF, { { ai.c.MPP_LT, 51 }, { ai.c.LVL_GTE, 50 }, { ai.c.TP_GTE, 1000 } }, { ai.r.MS, ai.s.SPECIFIC, xi.mobSkill.NOTT }) + mob:addGambit(ai.t.SELF, { ai.c.MPP_LT, 25 }, { ai.r.JA, ai.s.SPECIFIC, xi.ja.CONVERT }) mob:addGambit(ai.t.PARTY, { ai.c.HPP_LT, 25 }, { ai.r.MA, ai.s.HIGHEST, xi.magic.spellFamily.CURE }) diff --git a/scripts/actions/spells/trust/sylvie_uc.lua b/scripts/actions/spells/trust/sylvie_uc.lua index 176bd09ed10..03a9f5c0f47 100644 --- a/scripts/actions/spells/trust/sylvie_uc.lua +++ b/scripts/actions/spells/trust/sylvie_uc.lua @@ -22,7 +22,6 @@ spellObject.onMobSpawn = function(mob) local mJob = master:getMainJob() - -- TODO: Nott weaponskill needs implemented and logic added here for Apururu to use at 50% MP at level 50. -- Has Regain (50/tick) and uses Nott when MP falls below 66%. -- cure IV cures 456 HP @99 @@ -34,6 +33,8 @@ spellObject.onMobSpawn = function(mob) mob:addMod(xi.mod.GEOMANCY_BONUS, 3) end + mob:addGambit(ai.t.SELF, { { ai.c.MPP_LT, 66 }, { ai.c.LVL_GTE, 50 }, { ai.c.TP_GTE, 1000 } }, { ai.r.MS, ai.s.SPECIFIC, xi.mobSkill.NOTT }) + mob:addGambit(ai.t.PARTY, { ai.c.HPP_LT, 25 }, { ai.r.MA, ai.s.HIGHEST, xi.magic.spellFamily.CURE }) mob:addGambit(ai.t.PARTY, { ai.c.STATUS, xi.effect.SLEEP_I }, { ai.r.MA, ai.s.SPECIFIC, xi.magic.spell.CURE }) diff --git a/scripts/enum/mob_skill.lua b/scripts/enum/mob_skill.lua index df250eca3a1..6241ec6a8e0 100644 --- a/scripts/enum/mob_skill.lua +++ b/scripts/enum/mob_skill.lua @@ -1257,6 +1257,8 @@ xi.mobSkill = -- AZURE_LORE = 3481, BOLSTER = 3482, + NOTT = 3502, + DAYBREAK_TRUST = 3652, -- August Trust TARTARIC_SIGIL_TRUST = 3653, -- August Trust NULL_FIELD_TRUST = 3654, -- August Trust diff --git a/sql/mob_skills.sql b/sql/mob_skills.sql index 07c4366de44..5405eecb555 100644 --- a/sql/mob_skills.sql +++ b/sql/mob_skills.sql @@ -3530,7 +3530,7 @@ INSERT INTO `mob_skills` VALUES (3496,2505,'hollow_smite',0,0.0,7.0,2000,1500,4, -- INSERT INTO `mob_skills` VALUES (3499,3243,'soturis_fury',0,0.0,7.0,2000,1500,4,0,0,0,0,0,0); -- INSERT INTO `mob_skills` VALUES (3500,3244,'celidons_torment',0,0.0,7.0,2000,1500,4,0,0,0,0,0,0); -- INSERT INTO `mob_skills` VALUES (3501,3245,'tachi_mudo',0,0.0,7.0,2000,1500,4,0,0,0,0,0,0); -INSERT INTO `mob_skills` VALUES (3502,89,'nott',0,0.0,7.0,2000,1500,4,0,0,0,0,0,0); +INSERT INTO `mob_skills` VALUES (3502,89,'nott',0,0.0,7.0,2000,0,1,0,0,0,0,0,0); INSERT INTO `mob_skills` VALUES (3503,3247,'justicebreaker',0,0.0,7.0,2000,0,4,0,0,0,0,0,0); -- INSERT INTO `mob_skills` VALUES (3504,3248,'rancid_breath',0,0.0,7.0,2000,1500,4,0,0,0,0,0,0); -- INSERT INTO `mob_skills` VALUES (3505,3249,'geotic_spin',0,0.0,7.0,2000,1500,4,0,0,0,0,0,0);