Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[lua&sql] Trust addition; Rahal, Karaha and Areuhat #7063

Merged
merged 1 commit into from
Feb 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions scripts/actions/spells/trust/areuhat.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,24 @@ end

spellObject.onMobSpawn = function(mob)
xi.trust.message(mob, xi.trust.messageOffset.SPAWN)

mob:addGambit(ai.t.SELF, { ai.c.NOT_STATUS, xi.effect.AGGRESSOR }, { ai.r.JA, ai.s.SPECIFIC, xi.ja.AGGRESSOR })
mob:addGambit(ai.t.SELF, { ai.c.NOT_STATUS, xi.effect.BERSERK }, { ai.r.JA, ai.s.SPECIFIC, xi.ja.BERSERK })
mob:addGambit(ai.t.PARTY, { ai.l.OR(
{ ai.c.NOT_STATUS, xi.effect.WARCRY },
{ ai.c.NOT_STATUS, xi.effect.BLOOD_RAGE })
}, { ai.r.JA, ai.s.SPECIFIC, xi.ja.BLOOD_RAGE })

mob:addListener('WEAPONSKILL_USE', 'AREUHAT_WEAPONSKILL_USE', function(mobArg, target, wsid, tp, action)
if wsid == 3438 then -- Dragon Breath
-- Perhaps I should just burn the eyes of these infidels with my true form.
if math.random(1, 100) <= 33 then
xi.trust.message(mobArg, xi.trust.messageOffset.SPECIAL_MOVE_1)
end
end
end)

mob:setTrustTPSkillSettings(ai.tp.CLOSER_UNTIL_TP, ai.s.HIGHEST, 2000)
end

spellObject.onMobDespawn = function(mob)
Expand Down
60 changes: 59 additions & 1 deletion scripts/actions/spells/trust/karaha-baruha.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,65 @@ spellObject.onSpellCast = function(caster, target, spell)
end

spellObject.onMobSpawn = function(mob)
xi.trust.message(mob, xi.trust.messageOffset.SPAWN)
-- TODO: Add logic so that Spirit Taker is used if lower on mana, instead of holding to close TP.
xi.trust.teamworkMessage(mob, {
[xi.magic.spell.STAR_SIBYL] = xi.trust.messageOffset.TEAMWORK_1,
[xi.magic.spell.ROBEL_AKBEL] = xi.trust.messageOffset.TEAMWORK_2,
})

mob:addGambit(ai.t.PARTY, { ai.c.HPP_LT, 55 }, { ai.r.MA, ai.s.HIGHEST, xi.magic.spellFamily.CURE })
mob:addGambit(ai.t.PARTY, { ai.c.NOT_STATUS, xi.effect.PROTECT }, { ai.r.MA, ai.s.HIGHEST, xi.magic.spellFamily.PROTECTRA })
mob:addGambit(ai.t.PARTY, { ai.c.NOT_STATUS, xi.effect.SHELL }, { ai.r.MA, ai.s.HIGHEST, xi.magic.spellFamily.SHELLRA })
mob:addGambit(ai.t.PARTY, { ai.c.NOT_STATUS, xi.effect.PROTECT }, { ai.r.MA, ai.s.HIGHEST, xi.magic.spellFamily.PROTECT })
mob:addGambit(ai.t.PARTY, { ai.c.NOT_STATUS, xi.effect.SHELL }, { ai.r.MA, ai.s.HIGHEST, xi.magic.spellFamily.SHELL })
mob:addGambit(ai.t.PARTY, { ai.c.NOT_STATUS, xi.effect.HASTE }, { ai.r.MA, ai.s.HIGHEST, xi.magic.spellFamily.HASTE })
-- -na Spells
mob:addGambit(ai.t.PARTY, { ai.l.OR(
{ ai.c.STATUS, xi.effect.CURSE_I },
{ ai.c.STATUS, xi.effect.CURSE_II },
{ ai.c.STATUS, xi.effect.BANE },
{ ai.c.STATUS, xi.effect.DOOM })
}, { ai.r.MS, ai.s.SPECIFIC, xi.magic.spell.CURSNA })
mob:addGambit(ai.t.PARTY, { ai.c.STATUS, xi.effect.PARALYSIS }, { ai.r.MA, ai.s.SPECIFIC, xi.magic.spell.PARALYNA })
mob:addGambit(ai.t.PARTY, { ai.c.STATUS, xi.effect.BLINDNESS }, { ai.r.MA, ai.s.SPECIFIC, xi.magic.spell.BLINDNA })
mob:addGambit(ai.t.PARTY, { ai.c.STATUS, xi.effect.SILENCE }, { ai.r.MA, ai.s.SPECIFIC, xi.magic.spell.SILENA })
mob:addGambit(ai.t.PARTY, { ai.c.STATUS, xi.effect.PETRIFICATION }, { ai.r.MA, ai.s.SPECIFIC, xi.magic.spell.STONA })
mob:addGambit(ai.t.PARTY, { ai.c.STATUS, xi.effect.DISEASE }, { ai.r.MA, ai.s.SPECIFIC, xi.magic.spell.VIRUNA })

-- Handle his Barelementra tracking --
mob:addListener('TAKE_DAMAGE', 'KARAHA-BARUHA_TAKE_DAMAGE', function(mobArg, amount, attacker, attackType, damageType)
local elemTable = {
[xi.damageType.FIRE] = { effect = xi.effect.BARFIRE, spell = 66 },
[xi.damageType.ICE] = { effect = xi.effect.BARBLIZZARD, spell = 67 },
[xi.damageType.WIND] = { effect = xi.effect.BARAERO, spell = 68 },
[xi.damageType.EARTH] = { effect = xi.effect.BARSTONE, spell = 69 },
[xi.damageType.THUNDER] = { effect = xi.effect.BARTHUNDER, spell = 70 },
[xi.damageType.WATER] = { effect = xi.effect.BARWATER, spell = 71 },
}
local elemData = elemTable[damageType]
if elemData and not mobArg:getStatusEffect(elemData.effect) then
mobArg:timer(30, function(mobBar)
mobBar:castSpell(elemData.spell)
end)
end
end)

mob:addListener('WEAPONSKILL_USE', 'KARAHA-BARUHA_WEAPONSKILL_USE', function(mobArg, target, wsid, tp, action)
if wsid == 3336 then -- Howling Moon
-- The light shall never fade!
if math.random(1, 100) <= 25 then
xi.trust.message(mobArg, xi.trust.messageOffset.SPECIAL_MOVE_1)
end
end
end)

if
mob:getMPP() < 30
then
mob:setTrustTPSkillSettings(ai.tp.ASAP, ai.s.RANDOM)
else
mob:setTrustTPSkillSettings(ai.tp.CLOSER_UNTIL_TP, ai.s.HIGHEST, 3000)
end
end

spellObject.onMobDespawn = function(mob)
Expand Down
29 changes: 28 additions & 1 deletion scripts/actions/spells/trust/rahal.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,34 @@ spellObject.onSpellCast = function(caster, target, spell)
end

spellObject.onMobSpawn = function(mob)
xi.trust.message(mob, xi.trust.messageOffset.SPAWN)
-- Dragon Killer handled in mob_pool_mods
xi.trust.teamworkMessage(mob, {
[xi.magic.spell.TRION] = xi.trust.messageOffset.TEAMWORK_1,
[xi.magic.spell.CURILLA] = xi.trust.messageOffset.TEAMWORK_2,
[xi.magic.spell.EXCENMILLE] = xi.trust.messageOffset.TEAMWORK_3,
[xi.magic.spell.EXCENMILLE_S] = xi.trust.messageOffset.TEAMWORK_4,
})

mob:addGambit(ai.t.TARGET, { ai.c.NOT_STATUS, xi.effect.FLASH }, { ai.r.MA, ai.s.SPECIFIC, xi.magic.spell.FLASH })
mob:addGambit(ai.t.SELF, { ai.c.NOT_HAS_TOP_ENMITY, 0 }, { ai.r.JA, ai.s.SPECIFIC, xi.ja.PROVOKE })
mob:addGambit(ai.t.SELF, { ai.c.HPP_LT, 33 }, { ai.r.JA, ai.s.SPECIFIC, xi.ja.SENTINEL })
mob:addGambit(ai.t.PARTY, { ai.l.OR(
{ ai.c.STATUS, xi.effect.SLEEP_I },
{ ai.c.STATUS, xi.effect.SLEEP_II },
{ ai.c.STATUS, xi.effect.LULLABY })
}, { ai.r.MA, ai.s.SPECIFIC, xi.magic.spell.CURE })
mob:addGambit(ai.t.TARGET, { ai.l.OR(
{ ai.c.CASTING_MA, 0 },
{ ai.c.READYING_JA, 0 },
{ ai.c.READYING_MS, 0 },
{ ai.c.READYING_WS, 0 })
}, { ai.r.JA, ai.s.SPECIFIC, xi.ja.SHIELD_BASH })
mob:addGambit(ai.t.PARTY, { ai.c.HPP_LT, 33 }, { ai.r.MA, ai.s.HIGHEST, xi.magic.spellFamily.CURE })
mob:addGambit(ai.t.SELF, { ai.c.NOT_STATUS, xi.effect.ENLIGHT }, { ai.r.MA, ai.s.HIGHEST, xi.magic.spellFamily.ENLIGHT })
mob:addGambit(ai.t.SELF, { ai.c.NOT_STATUS, xi.effect.PHALANX }, { ai.r.MA, ai.s.HIGHEST, xi.magic.spellFamily.PHALANX })
mob:addGambit(ai.t.MASTER, { ai.c.NOT_STATUS, xi.effect.BERSERK }, { ai.r.JA, ai.s.SPECIFIC, xi.ja.BERSERK })

mob:setTrustTPSkillSettings(ai.tp.CLOSER_UNTIL_TP, ai.s.HIGHEST, 2500)
end

spellObject.onMobDespawn = function(mob)
Expand Down
11 changes: 11 additions & 0 deletions sql/mob_pool_mods.sql
Original file line number Diff line number Diff line change
Expand Up @@ -593,10 +593,21 @@ INSERT INTO `mob_pool_mods` VALUES (5922,6,150,0); -- MPP: 150
-- Trust: Fablinix
INSERT INTO `mob_pool_mods` VALUES (5932,6,250,0); -- MPP: 250

-- Trust: Karaha-Baruha
INSERT INTO `mob_pool_mods` VALUES (5936,3,-10,0); -- HPP: -10
INSERT INTO `mob_pool_mods` VALUES (5936,6,20,0); -- MPP: 20

-- Trust: Areuhat
INSERT INTO `mob_pool_mods` VALUES (5939,1046,30,0); -- ENHANCES_BLOOD_RAGE: 30
INSERT INTO `mob_pool_mods` VALUES (5939,234,8,0); -- DEMON_KILLER: 8

-- Trust: Ferreous Coffin
INSERT INTO `mob_pool_mods` VALUES (5944,3,-10,0); -- HPP: -10
INSERT INTO `mob_pool_mods` VALUES (5944,6,35,0); -- MPP: 35

-- Trust: Rahal
INSERT INTO `mob_pool_mods` VALUES (5951,233,8,0); -- DRAGON_KILLER: 8

-- Trust: Prishe II
INSERT INTO `mob_pool_mods` VALUES (6011,165,25,0); -- CRITHITRATE: 25

Expand Down
2 changes: 1 addition & 1 deletion sql/mob_pools.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5994,7 +5994,7 @@ INSERT INTO `mob_pools` VALUES (5935,'star_sibyl','StarSibyl',153,0x0000DF0B0000
INSERT INTO `mob_pools` VALUES (5936,'karaha-baruha','Karaha-Baruha',153,0x0000E00B00000000000000000000000000000000,3,15,3,240,100,0,0,0,0,0,0,32,0,3,0,0,348,0,0,1051,153);
INSERT INTO `mob_pools` VALUES (5937,'cid','Cid',149,0x0000E10B00000000000000000000000000000000,1,0,3,240,100,0,0,0,0,0,0,32,0,3,0,0,349,0,0,1052,149);
INSERT INTO `mob_pools` VALUES (5938,'gilgamesh','Gilgamesh',149,0x0000E20B00000000000000000000000000000000,12,0,3,240,100,0,0,0,0,0,0,32,0,3,0,0,350,0,0,1053,149);
INSERT INTO `mob_pools` VALUES (5939,'areuhat','Areuhat',145,0x0000E30B00000000000000000000000000000000,1,0,3,240,100,0,0,0,0,0,0,32,0,3,0,0,351,0,0,1054,145);
INSERT INTO `mob_pools` VALUES (5939,'areuhat','Areuhat',145,0x0000E30B00000000000000000000000000000000,1,7,3,240,100,0,0,0,0,0,0,32,0,3,0,0,351,0,0,1054,145);
INSERT INTO `mob_pools` VALUES (5940,'semih_lafihna','SemihLafihna',151,0x0000E40B00000000000000000000000000000000,11,1,25,500,200,0,0,0,0,0,0,32,0,3,0,0,0,0,0,1055,151);
INSERT INTO `mob_pools` VALUES (5941,'elivira','Elivira',149,0x0000E50B00000000000000000000000000000000,11,1,3,240,100,0,0,0,0,0,0,32,0,3,0,0,353,0,0,1056,149);
INSERT INTO `mob_pools` VALUES (5942,'noillurie','Noillurie',145,0x0000E60B00000000000000000000000000000000,12,7,3,240,100,0,0,0,0,0,0,32,0,3,0,0,354,0,0,1057,145);
Expand Down
17 changes: 14 additions & 3 deletions sql/mob_skill_lists.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3545,10 +3545,18 @@ INSERT INTO `mob_skill_lists` VALUES ('TRUST_Maat',1048,3416); -- Dragon Kick (M
INSERT INTO `mob_skill_lists` VALUES ('TRUST_Maat',1048,3417); -- Asuran Fists (Maat)
-- INSERT INTO `mob_skill_lists` VALUES ('TRUST_D_Shantotto',1049,0);
-- INSERT INTO `mob_skill_lists` VALUES ('TRUST_Star_Sibyl',1050,0);
-- INSERT INTO `mob_skill_lists` VALUES ('TRUST_Karaha-Baruha',1051,0);
INSERT INTO `mob_skill_lists` VALUES ('TRUST_Karaha-Baruha',1051,3336); -- Howling Moon
INSERT INTO `mob_skill_lists` VALUES ('TRUST_Karaha-Baruha',1051,183); -- Spirit Taker
INSERT INTO `mob_skill_lists` VALUES ('TRUST_Karaha-Baruha',1051,179); -- Starburst
INSERT INTO `mob_skill_lists` VALUES ('TRUST_Karaha-Baruha',1051,180); -- Sunburst
-- INSERT INTO `mob_skill_lists` VALUES ('TRUST_Karaha-Baruha',1051,3337); -- Lunar Bay,disable wrong animation
-- INSERT INTO `mob_skill_lists` VALUES ('TRUST_Cid',1052,0);
-- INSERT INTO `mob_skill_lists` VALUES ('TRUST_Gilgamesh',1053,0);
-- INSERT INTO `mob_skill_lists` VALUES ('TRUST_Areuhat',1054,0);
INSERT INTO `mob_skill_lists` VALUES ('TRUST_Areuhat',1054,37); -- Seraph Blade
INSERT INTO `mob_skill_lists` VALUES ('TRUST_Areuhat',1054,40); -- Vorpal Blade
INSERT INTO `mob_skill_lists` VALUES ('TRUST_Areuhat',1054,42); -- Savage Blade
INSERT INTO `mob_skill_lists` VALUES ('TRUST_Areuhat',1054,3438); -- Dragon Breath (Areuhat)
INSERT INTO `mob_skill_lists` VALUES ('TRUST_Areuhat',1054,3439); -- Hurricane Wing (Areuhat)
INSERT INTO `mob_skill_lists` VALUES ('TRUST_Semih_Lafihna',1055,3487); -- Sidewinder (Semih Lafihna)
INSERT INTO `mob_skill_lists` VALUES ('TRUST_Semih_Lafihna',1055,3488); -- Arching Arrow (Semih Lafihna)
INSERT INTO `mob_skill_lists` VALUES ('TRUST_Semih_Lafihna',1055,3489); -- Lux Arrow
Expand All @@ -3563,7 +3571,10 @@ INSERT INTO `mob_skill_lists` VALUES ('TRUST_Uka_Totlihn',1062,167); -- Judgemen
-- INSERT INTO `mob_skill_lists` VALUES ('TRUST_Klara',1063,0);
-- INSERT INTO `mob_skill_lists` VALUES ('TRUST_Romaa_Mihgo',1064,0);
-- INSERT INTO `mob_skill_lists` VALUES ('TRUST_Kuyin_Hathdenna',1065,0);
-- INSERT INTO `mob_skill_lists` VALUES ('TRUST_Rahal',1066,0);
INSERT INTO `mob_skill_lists` VALUES ('TRUST_Rahal', 1066, 32); -- Fast Blade
INSERT INTO `mob_skill_lists` VALUES ('TRUST_Rahal', 1066, 37); -- Seraph Blade
INSERT INTO `mob_skill_lists` VALUES ('TRUST_Rahal', 1066, 42); -- Savage Blade
INSERT INTO `mob_skill_lists` VALUES ('TRUST_Rahal', 1066, 41); -- Swift Blade
-- INSERT INTO `mob_skill_lists` VALUES ('TRUST_Koru-Moru',1067,0);
-- INSERT INTO `mob_skill_lists` VALUES ('TRUST_Pieuje_UC',1068,0);
-- INSERT INTO `mob_skill_lists` VALUES ('TRUST_Invincible_Shield_UC',1069,0);
Expand Down
4 changes: 2 additions & 2 deletions sql/mob_skills.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3450,8 +3450,8 @@ INSERT INTO `mob_skills` VALUES (3434,385,'tachi_kamai',0,0.0,7.0,2000,1500,4,0,
INSERT INTO `mob_skills` VALUES (3435,386,'iainuki',0,0.0,7.0,2000,1500,4,0,0,0,0,0,0);
INSERT INTO `mob_skills` VALUES (3436,383,'tachi_goten',0,0.0,7.0,2000,1500,4,0,0,0,0,0,0);
INSERT INTO `mob_skills` VALUES (3437,384,'tachi_kasha',0,0.0,7.0,2000,1500,4,0,0,0,11,2,0);
INSERT INTO `mob_skills` VALUES (3438,2430,'dragon_breath',0,0.0,7.0,2000,1500,4,0,0,0,0,0,0);
INSERT INTO `mob_skills` VALUES (3439,2429,'hurricane_wing',0,0.0,7.0,2000,1500,4,0,0,0,0,0,0);
INSERT INTO `mob_skills` VALUES (3438,2430,'dragon_breath',2,0.0,7.0,2000,1500,4,0,0,0,13,11,0);
INSERT INTO `mob_skills` VALUES (3439,2429,'hurricane_wing',1,0.0,7.0,2000,1500,4,0,0,0,4,6,0);
INSERT INTO `mob_skills` VALUES (3440,2317,'pocket_sand',0,0.0,7.0,2000,1500,4,0,0,0,0,0,0);
INSERT INTO `mob_skills` VALUES (3441,2316,'tripe_gripe',0,0.0,7.0,2000,1500,4,0,0,0,0,0,0);
INSERT INTO `mob_skills` VALUES (3442,2319,'sharp_eye',0,0.0,7.0,2000,1500,4,0,0,0,0,0,0);
Expand Down
10 changes: 10 additions & 0 deletions sql/mob_spell_lists.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3550,11 +3550,21 @@ INSERT INTO `mob_spell_lists` VALUES ('TRUST_Karaha-Baruha',348,68,13,255); --
INSERT INTO `mob_spell_lists` VALUES ('TRUST_Karaha-Baruha',348,69,5,255); -- barstonra (5~255)
INSERT INTO `mob_spell_lists` VALUES ('TRUST_Karaha-Baruha',348,70,25,255); -- barthundra (25~255)
INSERT INTO `mob_spell_lists` VALUES ('TRUST_Karaha-Baruha',348,71,9,255); -- barwatera (9~255)
INSERT INTO `mob_spell_lists` VALUES ('TRUST_Karaha-Baruha',348,43,7,255); -- protect (7~255)
INSERT INTO `mob_spell_lists` VALUES ('TRUST_Karaha-Baruha',348,44,27,255); -- protect_ii (27~255)
INSERT INTO `mob_spell_lists` VALUES ('TRUST_Karaha-Baruha',348,45,47,255); -- protect_iii (47~255)
INSERT INTO `mob_spell_lists` VALUES ('TRUST_Karaha-Baruha',348,46,63,255); -- protect_iv (63~255)
INSERT INTO `mob_spell_lists` VALUES ('TRUST_Karaha-Baruha',348,47,75,255); -- protect_v (75~255)
INSERT INTO `mob_spell_lists` VALUES ('TRUST_Karaha-Baruha',348,125,7,255); -- protectra (7~255)
INSERT INTO `mob_spell_lists` VALUES ('TRUST_Karaha-Baruha',348,126,27,255); -- protectra_ii (27~255)
INSERT INTO `mob_spell_lists` VALUES ('TRUST_Karaha-Baruha',348,127,47,255); -- protectra_iii (47~255)
INSERT INTO `mob_spell_lists` VALUES ('TRUST_Karaha-Baruha',348,128,63,255); -- protectra_iv (63~255)
INSERT INTO `mob_spell_lists` VALUES ('TRUST_Karaha-Baruha',348,129,75,255); -- protectra_v (75~255)
INSERT INTO `mob_spell_lists` VALUES ('TRUST_Karaha-Baruha',348,48,17,255); -- shell (17~255)
INSERT INTO `mob_spell_lists` VALUES ('TRUST_Karaha-Baruha',348,49,37,255); -- shell_ii (37~255)
INSERT INTO `mob_spell_lists` VALUES ('TRUST_Karaha-Baruha',348,50,57,255); -- shell_iii (57~255)
INSERT INTO `mob_spell_lists` VALUES ('TRUST_Karaha-Baruha',348,51,68,255); -- shell_iv (68~255)
INSERT INTO `mob_spell_lists` VALUES ('TRUST_Karaha-Baruha',348,52,75,255); -- shell_v (75~255)
INSERT INTO `mob_spell_lists` VALUES ('TRUST_Karaha-Baruha',348,130,17,255); -- shellra (17~255)
INSERT INTO `mob_spell_lists` VALUES ('TRUST_Karaha-Baruha',348,131,37,255); -- shellra_ii (37~255)
INSERT INTO `mob_spell_lists` VALUES ('TRUST_Karaha-Baruha',348,132,57,255); -- shellra_iii (57~255)
Expand Down