diff --git a/scripts/actions/mobskills/hi_potion.lua b/scripts/actions/mobskills/hi_potion.lua new file mode 100644 index 00000000000..99e5ca0a7cf --- /dev/null +++ b/scripts/actions/mobskills/hi_potion.lua @@ -0,0 +1,16 @@ +----------------------------------- +-- Hyper Potion - Restores 250 HP. +----------------------------------- +---@type TMobSkill +local mobskillObject = {} + +mobskillObject.onMobSkillCheck = function(target, mob, skill) + return 0 +end + +mobskillObject.onMobWeaponSkill = function(target, mob, skill) + skill:setMsg(xi.msg.basic.SELF_HEAL) + return xi.mobskills.mobHealMove(target, 100) +end + +return mobskillObject diff --git a/scripts/actions/mobskills/mix_antidote.lua b/scripts/actions/mobskills/mix_antidote.lua index 8df8403de28..56681645cdc 100644 --- a/scripts/actions/mobskills/mix_antidote.lua +++ b/scripts/actions/mobskills/mix_antidote.lua @@ -14,12 +14,10 @@ mobskillObject.onMobWeaponSkill = function(target, mob, skill) if target:hasStatusEffect(xi.effect.POISON) then skill:setMsg(xi.msg.basic.SKILL_ERASE) target:delStatusEffect(xi.effect.POISON) - return xi.effect.POISON + else + skill:setMsg(xi.msg.basic.SKILL_NO_EFFECT) -- NO_EFFECT also works. end - - skill:setMsg(xi.msg.basic.MAGIC_NO_EFFECT) - return xi.effect.NONE end return mobskillObject diff --git a/scripts/actions/mobskills/mix_dark_potion.lua b/scripts/actions/mobskills/mix_dark_potion.lua index 3fc9f30a3a7..9fb7d82c08b 100644 --- a/scripts/actions/mobskills/mix_dark_potion.lua +++ b/scripts/actions/mobskills/mix_dark_potion.lua @@ -9,8 +9,12 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(target, mob, skill) - -- skill:setMsg(xi.msg.basic.READIES_WS) -- not needed? - return 666 + local darkpot = 666 + local dmg = xi.mobskills.mobFinalAdjustments(darkpot, mob, skill, target, xi.attackType.NONE, xi.damageType.NONE, xi.mobskills.shadowBehavior.IGNORE_SHADOWS) + + target:takeDamage(dmg, mob, xi.attackType.NONE, xi.damageType.NONE) + + return dmg end return mobskillObject diff --git a/scripts/actions/mobskills/mix_echo_drops.lua b/scripts/actions/mobskills/mix_echo_drops.lua new file mode 100644 index 00000000000..22b2b63b6d8 --- /dev/null +++ b/scripts/actions/mobskills/mix_echo_drops.lua @@ -0,0 +1,22 @@ +----------------------------------- +-- Echo Drops - Removes Silence. +----------------------------------- +---@type TMobSkill +local mobskillObject = {} + +mobskillObject.onMobSkillCheck = function(target, mob, skill) + return 0 +end + +-- TODO: verify no effect messaging +mobskillObject.onMobWeaponSkill = function(target, mob, skill) + if target:hasStatusEffect(xi.effect.SILENCE) then + skill:setMsg(xi.msg.basic.SKILL_ERASE) + target:delStatusEffect(xi.effect.SILENCE) + return xi.effect.SILENCE + else + skill:setMsg(xi.msg.basic.NO_EFFECT) + end +end + +return mobskillObject diff --git a/scripts/actions/mobskills/mix_eye_drops.lua b/scripts/actions/mobskills/mix_eye_drops.lua index 559d3c835a7..d11308d81e8 100644 --- a/scripts/actions/mobskills/mix_eye_drops.lua +++ b/scripts/actions/mobskills/mix_eye_drops.lua @@ -9,8 +9,13 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(target, mob, skill) - target:delStatusEffect(xi.effect.BLINDNESS) - return 0 + if target:hasStatusEffect(xi.effect.BLINDNESS) then + skill:setMsg(xi.msg.basic.SKILL_ERASE) + target:delStatusEffect(xi.effect.BLINDNESS) + return xi.effect.BLINDNESS + else + skill:setMsg(xi.msg.basic.NO_EFFECT) + end end return mobskillObject diff --git a/scripts/actions/mobskills/mix_final_elixir.lua b/scripts/actions/mobskills/mix_final_elixir.lua index 320ff03abf4..10b811745fc 100644 --- a/scripts/actions/mobskills/mix_final_elixir.lua +++ b/scripts/actions/mobskills/mix_final_elixir.lua @@ -12,7 +12,8 @@ end mobskillObject.onMobWeaponSkill = function(target, mob, skill) target:addHP(target:getMaxHP()) target:addMP(target:getMaxMP()) - return 0 + skill:setMsg(xi.msg.basic.RECOVERS_HP_AND_MP) + return end return mobskillObject diff --git a/scripts/actions/mobskills/mix_gold_needle.lua b/scripts/actions/mobskills/mix_gold_needle.lua index 99f22d93d82..d510b05acf1 100644 --- a/scripts/actions/mobskills/mix_gold_needle.lua +++ b/scripts/actions/mobskills/mix_gold_needle.lua @@ -9,8 +9,13 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(target, mob, skill) - target:delStatusEffect(xi.effect.PETRIFICATION) - return 0 + if target:hasStatusEffect(xi.effect.PETRIFICATION) then + skill:setMsg(xi.msg.basic.SKILL_ERASE) + target:delStatusEffect(xi.effect.PETRIFICATION) + return xi.effect.PETRIFICATION + else + skill:setMsg(xi.msg.basic.NO_EFFECT) + end end return mobskillObject diff --git a/scripts/actions/mobskills/mix_holy_water.lua b/scripts/actions/mobskills/mix_holy_water.lua new file mode 100644 index 00000000000..2bb1b8b2352 --- /dev/null +++ b/scripts/actions/mobskills/mix_holy_water.lua @@ -0,0 +1,43 @@ +----------------------------------- +-- Holy Water - Removes Curse, Zombie, and Doom. +----------------------------------- +---@type TMobSkill +local mobskillObject = {} + +mobskillObject.onMobSkillCheck = function(target, mob, skill) + return 0 +end + +local statii = +{ + xi.effect.CURSE_I, + xi.effect.CURSE_II, -- AKA "Zombie" + xi.effect.BANE, +} + +mobskillObject.onMobWeaponSkill = function(target, mob, skill) + local power = 33 + target:getMod(xi.mod.ENHANCES_HOLYWATER) + local lastEffect = 0 + + for _, effect in pairs(statii) do + lastEffect = effect + if target:hasStatusEffect(xi.effect.DOOM) and power > math.random(1, 100) then + target:delStatusEffect(xi.effect.DOOM) + target:messageBasic(xi.msg.basic.NARROWLY_ESCAPE) + skill:setMsg(xi.msg.basic.SKILL_ERASE) + return xi.effect.DOOM + else + skill:setMsg(xi.msg.basic.NO_EFFECT) + end + + if target:hasStatusEffect(effect) then + target:delStatusEffect(effect) + skill:setMsg(xi.msg.basic.SKILL_ERASE) + return lastEffect + else + skill:setMsg(xi.msg.basic.NO_EFFECT) + end + end +end + +return mobskillObject diff --git a/scripts/actions/mobskills/mix_panacea-1.lua b/scripts/actions/mobskills/mix_panacea-1.lua index afbc7a26ebf..10e63c41c14 100644 --- a/scripts/actions/mobskills/mix_panacea-1.lua +++ b/scripts/actions/mobskills/mix_panacea-1.lua @@ -10,7 +10,6 @@ end local statii = { - xi.effect.PARALYSIS, xi.effect.BIND, xi.effect.WEIGHT, xi.effect.ADDLE, @@ -50,11 +49,12 @@ mobskillObject.onMobWeaponSkill = function(target, mob, skill) for _, effect in pairs(statii) do if target:delStatusEffect(effect) then lastEffect = effect + skill:setMsg(xi.msg.basic.SKILL_ERASE) + return lastEffect + else + skill:setMsg(xi.msg.basic.NO_EFFECT) end end - - skill:setMsg(xi.msg.basic.SKILL_ERASE) - return lastEffect end return mobskillObject diff --git a/scripts/actions/mobskills/mix_para-b-gone.lua b/scripts/actions/mobskills/mix_para-b-gone.lua index f3140c62563..d54b1460f9a 100644 --- a/scripts/actions/mobskills/mix_para-b-gone.lua +++ b/scripts/actions/mobskills/mix_para-b-gone.lua @@ -10,12 +10,12 @@ end mobskillObject.onMobWeaponSkill = function(target, mob, skill) if target:hasStatusEffect(xi.effect.PARALYSIS) then + skill:setMsg(xi.msg.basic.SKILL_ERASE) target:delStatusEffect(xi.effect.PARALYSIS) return xi.effect.PARALYSIS + else + skill:setMsg(xi.msg.basic.NO_EFFECT) end - - skill:setMsg(xi.msg.basic.MAGIC_NO_EFFECT) - return xi.effect.NONE end return mobskillObject diff --git a/scripts/actions/mobskills/mix_vaccine.lua b/scripts/actions/mobskills/mix_vaccine.lua new file mode 100644 index 00000000000..af915eb642e --- /dev/null +++ b/scripts/actions/mobskills/mix_vaccine.lua @@ -0,0 +1,21 @@ +----------------------------------- +-- Vaccine - Removes Plague. +----------------------------------- +---@type TMobSkill +local mobskillObject = {} + +mobskillObject.onMobSkillCheck = function(target, mob, skill) + return 0 +end + +mobskillObject.onMobWeaponSkill = function(target, mob, skill) + if target:hasStatusEffect(xi.effect.PLAGUE) then + skill:setMsg(xi.msg.basic.SKILL_ERASE) + target:delStatusEffect(xi.effect.PLAGUE) + return xi.effect.PLAGUE + else + skill:setMsg(xi.msg.basic.NO_EFFECT) + end +end + +return mobskillObject diff --git a/scripts/actions/mobskills/potion.lua b/scripts/actions/mobskills/potion.lua new file mode 100644 index 00000000000..f35b3d7f6ff --- /dev/null +++ b/scripts/actions/mobskills/potion.lua @@ -0,0 +1,16 @@ +----------------------------------- +-- Potion - Restores 50 HP. +----------------------------------- +---@type TMobSkill +local mobskillObject = {} + +mobskillObject.onMobSkillCheck = function(target, mob, skill) + return 0 +end + +mobskillObject.onMobWeaponSkill = function(target, mob, skill) + skill:setMsg(xi.msg.basic.SELF_HEAL) + return xi.mobskills.mobHealMove(target, 50) +end + +return mobskillObject diff --git a/scripts/actions/mobskills/x-potion.lua b/scripts/actions/mobskills/x-potion.lua new file mode 100644 index 00000000000..abe3ebe1938 --- /dev/null +++ b/scripts/actions/mobskills/x-potion.lua @@ -0,0 +1,16 @@ +----------------------------------- +-- X-Potion - Restores 150 HP. +----------------------------------- +---@type TMobSkill +local mobskillObject = {} + +mobskillObject.onMobSkillCheck = function(target, mob, skill) + return 0 +end + +mobskillObject.onMobWeaponSkill = function(target, mob, skill) + skill:setMsg(xi.msg.basic.SELF_HEAL) + return xi.mobskills.mobHealMove(target, 150) +end + +return mobskillObject diff --git a/scripts/actions/spells/trust/monberaux.lua b/scripts/actions/spells/trust/monberaux.lua index 2c9ef4407e0..000cd22cc81 100644 --- a/scripts/actions/spells/trust/monberaux.lua +++ b/scripts/actions/spells/trust/monberaux.lua @@ -13,36 +13,112 @@ spellObject.onSpellCast = function(caster, target, spell) end spellObject.onMobSpawn = function(mob) - -- TODO: Summon (1 dose of Final Elixir ready): I received a vial of a most valuable medicine. It should prove useful in times of emergency. - -- TODO: Summon (2 doses of Final Elixir ready): I received two vials of a most valuable medicine. They should prove useful in times of emergency. -- TODO: Find right animation for Mix: Insomniant. -- TODO: Add PLD/RUN traits like Resist Sleep and Tenacity. - -- TODO: Add Vaccine skill (removes plague) - -- TODO: Add Gold Needle skill (remove petrify) - -- TODO: Add Holy Water skill (removes curse, zombie, and doom) -- TODO: Add Cover ability with proper conditions (stand behind Monberaux when you have top enmity) - -- TODO: Add mechanic for turning status removal skills into AoE -- https://www.bg-wiki.com/ffxi/BGWiki:Trusts#Monberaux - xi.trust.message(mob, xi.trust.messageOffset.SPAWN) - - local healingMoveCooldown = 3 -- Retail values from BGWiki - - -- Tends to be particular about which potions to use. Seems to favor healing for just the - -- right amount of HP instead of defaulting to the highest-rank potion. - mob:addMod(xi.mod.MPP, -90) - mob:addGambit(ai.t.CASTER, { ai.c.MPP_LT, 25 }, { ai.r.MS, ai.s.SPECIFIC, 4254 }, healingMoveCooldown) -- Mix: Dry Ether Concoction - mob:addGambit(ai.t.PARTY, { ai.c.HPP_LT, 90 }, { ai.r.MS, ai.s.SPECIFIC, 4236 }, healingMoveCooldown) -- Max Potion (500 HP) - mob:addGambit(ai.t.PARTY, { ai.c.HPP_LT, 75 }, { ai.r.MS, ai.s.SPECIFIC, 4237 }, healingMoveCooldown) -- Mix: Max Potion (700 HP) - mob:addGambit(ai.t.PARTY, { ai.c.STATUS, xi.effect.POISON }, { ai.r.MS, ai.s.SPECIFIC, 4238 }, healingMoveCooldown) -- Mix: Antidote - mob:addGambit(ai.t.PARTY, { ai.c.STATUS, xi.effect.SILENCE }, { ai.r.MS, ai.s.SPECIFIC, 4241 }, healingMoveCooldown) -- Echo Drops - mob:addGambit(ai.t.PARTY, { ai.c.STATUS, xi.effect.PARALYSIS }, { ai.r.MS, ai.s.SPECIFIC, 4247 }, healingMoveCooldown) -- Mix: Para-B-Gone - mob:addGambit(ai.t.PARTY, { ai.c.STATUS_FLAG, xi.effectFlag.ERASABLE }, { ai.r.MS, ai.s.SPECIFIC, 4245 }, healingMoveCooldown) -- Mix: Panacea-1 - mob:addGambit(ai.t.PARTY, { ai.c.NOT_STATUS, xi.effect.REGEN }, { ai.r.MS, ai.s.SPECIFIC, 4257 }, healingMoveCooldown) -- Mix: Life Water - mob:addGambit(ai.t.PARTY, { ai.c.NOT_STATUS, xi.effect.STR_BOOST }, { ai.r.MS, ai.s.SPECIFIC, 4261 }, healingMoveCooldown) -- Mix: Samson's Strength - mob:addGambit(ai.t.PARTY, { ai.c.NOT_STATUS, xi.effect.MAGIC_DEF_BOOST }, { ai.r.MS, ai.s.SPECIFIC, 4259 }, healingMoveCooldown) -- Mix: Dragon Shield - mob:addGambit(ai.t.PARTY, { ai.c.NOT_STATUS, xi.effect.MAGIC_ATK_BOOST }, { ai.r.MS, ai.s.SPECIFIC, 4258 }, healingMoveCooldown) -- Mix: Elemental Power - mob:addGambit(ai.t.PARTY, { ai.c.NOT_STATUS, xi.effect.PROTECT }, { ai.r.MS, ai.s.SPECIFIC, 4255 }, healingMoveCooldown) -- Mix: Guard Drink - -- mob:addGambit(ai.t.PARTY, { ai.c.NOT_STATUS, xi.effect.NEGATE_SLEEP }, { ai.r.MS, ai.s.SPECIFIC, 4256 }, healingMoveCooldown) -- Insomniant. Disabled because animation when used is completely wrong. - mob:addGambit(ai.t.TARGET, { ai.c.HP_MISSING, 99 }, { ai.r.MS, ai.s.SPECIFIC, 4260 }, healingMoveCooldown) -- Dark Potion (666 Dark Damage) + local finalElixir = mob:getMaster():getCharVar('finalElixir') -- CVar used to store Elixir donation info. + local potAoe = mob:getMaster():getCharVar('monbAoe') -- CVar used to store gil donation info. + + if potAoe == 0 and finalElixir == 0 then + xi.trust.message(mob, xi.trust.messageOffset.SPAWN) + elseif potAoe == 0 and finalElixir == 1 then + xi.trust.message(mob, xi.trust.messageOffset.TEAMWORK_1) -- 1 Elixir + elseif potAoe == 0 and finalElixir >= 2 then + xi.trust.message(mob, xi.trust.messageOffset.TEAMWORK_2) -- 2 Elixir + elseif potAoe == 1 and finalElixir < 1 then + xi.trust.message(mob, xi.trust.messageOffset.TEAMWORK_3) -- Gil donation (AoE) + elseif potAoe == 1 and finalElixir == 1 then + xi.trust.message(mob, xi.trust.messageOffset.TEAMWORK_4) -- 1 Elixir and Gil + elseif potAoe == 1 and finalElixir >= 2 then + xi.trust.message(mob, xi.trust.messageOffset.TEAMWORK_5) -- ALL Donations + end + + local healingMoveCooldown = math.random(3, 4) -- Mix I Retail values from BGWiki + local buffMoveCooldown = 60 -- Mix II Retail values from BGWiki + local mpMoveCooldown = 90 -- Mix III Retail values from BGWiki + + -- MobMods -- + mob:setMod(xi.mod.MPP, -90) + mob:setMod(xi.mod.SLEEPRES, 100) -- Handle negate sleep + mob:setMod(xi.mod.LULLABYRES, 100) -- Handle negate sleep + mob:setMod(xi.mod.STATUSRES, 15) + + -- Guard Drink should always be the first spell he casts. -- + mob:addGambit(ai.t.PARTY, { ai.c.NOT_STATUS, xi.effect.PROTECT }, { ai.r.MS, ai.s.SPECIFIC, 4255 }, healingMoveCooldown) -- Mix: Guard Drink (Prot/Shell) + mob:addGambit(ai.t.PARTY, { ai.c.NOT_STATUS, xi.effect.SHELL }, { ai.r.MS, ai.s.SPECIFIC, 4255 }, healingMoveCooldown) -- Mix: Guard Drink (Prot/Shell) + -- Handle his Final Elixir (item donation) system, will use whenever a party memeber is asleep -- + if finalElixir ~= 0 then + mob:addGambit(ai.t.PARTY, { ai.c.STATUS, xi.effect.SLEEP_I }, { ai.r.MS, ai.s.SPECIFIC, 4231 }, healingMoveCooldown) + end + + -- Top Priority Heals -- + mob:addGambit(ai.t.PARTY, { ai.c.HPP_LT, 40 }, { ai.r.MS, ai.s.SPECIFIC, 4237 }, healingMoveCooldown) -- Mix: Max Potion (700 HP) + mob:addGambit(ai.t.PARTY, { ai.c.HPP_LT, 55 }, { ai.r.MS, ai.s.SPECIFIC, 4236 }, healingMoveCooldown) -- Max Potion (500 HP) + + -- Mix I AoE -- + if potAoe == 1 then + 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, 4242 }, healingMoveCooldown) -- AoE Holy Water + mob:addGambit(ai.t.PARTY, { ai.c.STATUS, xi.effect.BLINDNESS }, { ai.r.MS, ai.s.SPECIFIC, 4240 }, healingMoveCooldown) -- AoE Mix: Eye Drops + mob:addGambit(ai.t.PARTY, { ai.c.STATUS, xi.effect.POISON }, { ai.r.MS, ai.s.SPECIFIC, 4238 }, healingMoveCooldown) -- AoE Mix: Antidote + mob:addGambit(ai.t.PARTY, { ai.c.STATUS, xi.effect.SILENCE }, { ai.r.MS, ai.s.SPECIFIC, 4241 }, healingMoveCooldown) -- AoE Echo Drops + mob:addGambit(ai.t.PARTY, { ai.c.STATUS, xi.effect.PARALYSIS }, { ai.r.MS, ai.s.SPECIFIC, 4239 }, healingMoveCooldown) -- AoE Mix: Para-B-Gone + mob:addGambit(ai.t.PARTY, { ai.c.STATUS_FLAG, xi.effectFlag.ERASABLE }, { ai.r.MS, ai.s.SPECIFIC, 4245 }, healingMoveCooldown) -- AoE Mix: Panacea-1 + mob:addGambit(ai.t.PARTY, { ai.c.STATUS, xi.effect.PLAGUE }, { ai.r.MS, ai.s.SPECIFIC, 4243 }, healingMoveCooldown) -- AoE Mix: Vaccine + mob:addGambit(ai.t.PARTY, { ai.c.STATUS, xi.effect.PETRIFICATION }, { ai.r.MS, ai.s.SPECIFIC, 4244 }, healingMoveCooldown) -- AoE Mix: Gold Needle + -- Mix I Single Target -- + elseif potAoe == 0 then + 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, 4242 }, healingMoveCooldown) -- Holy Water + mob:addGambit(ai.t.PARTY, { ai.c.STATUS, xi.effect.BLINDNESS }, { ai.r.MS, ai.s.SPECIFIC, 4248 }, healingMoveCooldown) -- Mix: Eye Drops + mob:addGambit(ai.t.PARTY, { ai.c.STATUS, xi.effect.POISON }, { ai.r.MS, ai.s.SPECIFIC, 4246 }, healingMoveCooldown) -- Mix: Antidote + mob:addGambit(ai.t.PARTY, { ai.c.STATUS, xi.effect.SILENCE }, { ai.r.MS, ai.s.SPECIFIC, 4249 }, healingMoveCooldown) -- Echo Drops + mob:addGambit(ai.t.PARTY, { ai.c.STATUS, xi.effect.PARALYSIS }, { ai.r.MS, ai.s.SPECIFIC, 4247 }, healingMoveCooldown) -- Mix: Para-B-Gone + mob:addGambit(ai.t.PARTY, { ai.c.STATUS_FLAG, xi.effectFlag.ERASABLE }, { ai.r.MS, ai.s.SPECIFIC, 4253 }, healingMoveCooldown) -- Mix: Panacea-1 + mob:addGambit(ai.t.PARTY, { ai.c.STATUS, xi.effect.PLAGUE, ai.r.MS }, { ai.s.SPECIFIC, 4251 }, healingMoveCooldown) -- Vaccine + mob:addGambit(ai.t.PARTY, { ai.c.STATUS, xi.effect.PETRIFICATION }, { ai.r.MS, ai.s.SPECIFIC, 4252 }, healingMoveCooldown) -- Mix: Gold Needle + end + + --mob:addGambit(ai.t.PARTY, {ai.c.NOT_STATUS, xi.effect.NEGATE_SLEEP}, {ai.r.MS, ai.s.SPECIFIC, 4256}, healingMoveCooldown) -- Insomniant. Disabled because animation when used is completely wrong. + -- Mix II-- + mob:addGambit(ai.t.PARTY, { ai.c.NOT_STATUS, xi.effect.REGEN }, { ai.r.MS, ai.s.SPECIFIC, 4257 }, buffMoveCooldown) -- Mix: Life Water + mob:addGambit(ai.t.PARTY, { ai.c.NOT_STATUS, xi.effect.STR_BOOST }, { ai.r.MS, ai.s.SPECIFIC, 4261 }, buffMoveCooldown) -- Mix: Samson's Strength + mob:addGambit(ai.t.PARTY, { ai.c.NOT_STATUS, xi.effect.MAGIC_DEF_BOOST }, { ai.r.MS, ai.s.SPECIFIC, 4259 }, buffMoveCooldown) -- Mix: Dragon Shield + mob:addGambit(ai.t.CASTER, { ai.c.NOT_STATUS, xi.effect.MAGIC_ATK_BOOST }, { ai.r.MS, ai.s.SPECIFIC, 4258 }, buffMoveCooldown) -- Mix: Elemental Power + mob:addGambit(ai.t.TARGET, { ai.c.ALWAYS, 0 }, { ai.r.MS, ai.s.SPECIFIC, 4260 }, buffMoveCooldown) -- Dark Potion (666 Dark Damage) + -- Mix III-- + mob:addGambit(ai.t.CASTER, { ai.c.MPP_LT, 50 }, { ai.r.MS, ai.s.SPECIFIC, 4254 }, mpMoveCooldown) -- Mix: Dry Ether Concoction + -- Less Priority Heals -- + mob:addGambit(ai.t.PARTY, { ai.c.HPP_LT, 65 }, { ai.r.MS, ai.s.SPECIFIC, 4235 }, healingMoveCooldown) -- Hyper Potion (250 HP) + --mob:addGambit(ai.t.PARTY, {ai.c.HPP_LT, 75}, {ai.r.MS, ai.s.SPECIFIC, 4234}, healingMoveCooldown) -- X-Potion (150 HP) -- Disabled to prevent super spam + --mob:addGambit(ai.t.PARTY, {ai.c.HPP_LT, 85}, {ai.r.MS, ai.s.SPECIFIC, 4232}, healingMoveCooldown) -- Potion (50 HP) -- Disabled to prevent super spam + + -- Listener to handle removal of CharVar that handles elixir donation -- + mob:addListener('WEAPONSKILL_USE', 'MONBERAUX_WEAPONSKILL_USE', function(mobArg, targetArg, skillid, spentTP, action) + local monbMast = mobArg:getMaster() + local finalElixirL = monbMast:getCharVar('finalElixir') + if skillid == 4231 then + monbMast:setCharVar('finalElixir', finalElixirL - 1) + end + end) + + --Listener to SPECIAL_MOVE -- DISABLED needs correct coding for table + --mob:addListener('WEAPONSKILL_BEFORE_USE', 'MONBERAUX_WEAPONSKILL_BEFORE_USE', function(mobArg, skillid) + --local buffs = { 4234, 4239, 4240, 4241, 4242, 4243, 4244, 4245, 4246, 4247, 4248, 4248, 4249, 4250, 4251, 4252 } -- status condition removals only + --if skillid == 4259 then + --xi.trust.message(mob, xi.trust.messageOffset.SPECIAL_MOVE_1) -- Using Mix: Dragon Shield: Illness and unjury know no boundaries! + --elseif skillid == buffs then + --xi.trust.message(mob, xi.trust.messageOffset.SPECIAL_MOVE_2) -- Other: I shall administer a remedy immediately! + --end + --end) mob:setAutoAttackEnabled(false) diff --git a/scripts/zones/Upper_Jeuno/npcs/Monberaux.lua b/scripts/zones/Upper_Jeuno/npcs/Monberaux.lua index 890e4022626..59d21bcee74 100644 --- a/scripts/zones/Upper_Jeuno/npcs/Monberaux.lua +++ b/scripts/zones/Upper_Jeuno/npcs/Monberaux.lua @@ -3,11 +3,57 @@ -- NPC: Monberaux -- Starts and Finishes Quest: The Lost Cardian (finish), The kind cardian (start) -- Involved in Quests: Save the Clock Tower +-- Involved in handling his how his alter ego reacts in combat. -- !pos -43 0 -1 244 ----------------------------------- ---@type TNpcEntity local entity = {} +entity.onTrade = function(player, npc, trade) + local minimumGil = 10000 + local elixirTotal = 2 + + local finalElixir = player:getCharVar('finalElixir') + local monbAoe = player:getCharVar('monbAoe') + local gilAmount = trade:getGil() + + -- Check trade for elixir/hi-elixir + -- TODO: add logic to trade more than 1 at a time, or more than 1 type at a time. + if + trade:hasItemQty(xi.item.ELIXIR, 1) or + trade:hasItemQty(xi.item.HI_ELIXIR, 1) + then + if finalElixir < elixirTotal then + player:setCharVar('finalElixir', finalElixir + 1) + player:printToPlayer(string.format('Thank you for that medicine. You currently have %d vials remaining.', finalElixir + 1), 0, 'Monberaux') + player:tradeComplete() + elseif finalElixir == elixirTotal then + player:printToPlayer('I am already holding too many vials for you. Come back after I`ve treated you.', 0, 'Monberaux') + else + player:printToPlayer('What do I need this for?', 0, 'Monberaux') + end + + return + end + + -- Check for ailment potion AoE and for gil value + -- TODO: Possibly make required more based on how much gil the player has. + if monbAoe ~= 1 then + if gilAmount >= minimumGil then + player:setCharVar('monbAoe', 1, NextJstWeek()) + player:printToPlayer('Thank you for that donation! My potions will now affect all patrons until the end of the week.', 0, 'Monberaux') + player:tradeComplete() + else + player:printToPlayer('My services are worth at minimum 10,000 gil.', 0, 'Monberaux') + end + + return + else + player:printToPlayer('As much as I appreciate the coin, you`ve already donated this week.', 0, 'Monberaux') + return + end +end + entity.onTrigger = function(player, npc) local theLostCardien = player:getQuestStatus(xi.questLog.JEUNO, xi.quest.id.jeuno.THE_LOST_CARDIAN) local cooksPride = player:getQuestStatus(xi.questLog.JEUNO, xi.quest.id.jeuno.COOKS_PRIDE) diff --git a/sql/mob_pools.sql b/sql/mob_pools.sql index 04d8cef7168..412157fbc75 100644 --- a/sql/mob_pools.sql +++ b/sql/mob_pools.sql @@ -6054,7 +6054,7 @@ INSERT INTO `mob_pools` VALUES (5995,'aatt','ArkTT',153,0x00002C0C00000000000000 INSERT INTO `mob_pools` VALUES (5996,'aagk','ArkGK',146,0x00002D0C00000000000000000000000000000000,12,14,3,240,100,0,0,0,0,0,0,32,0,3,0,0,409,0,0,1111,146); INSERT INTO `mob_pools` VALUES (5997,'iroha','Iroha',149,0x0000270C00000000000000000000000000000000,12,4,3,240,100,0,0,0,0,0,0,32,0,3,0,0,410,0,0,1112,149); INSERT INTO `mob_pools` VALUES (5998,'ygnas','Ygnas',455,0x00002E0C00000000000000000000000000000000,3,0,3,240,100,0,0,0,0,0,0,32,0,3,0,0,411,0,0,1113,455); -INSERT INTO `mob_pools` VALUES (5999,'monberaux','Monberaux',145,0x0000300C00000000000000000000000000000000,21,0,3,240,100,0,0,0,0,0,0,32,0,3,0,0,412,0,0,1114,145); +INSERT INTO `mob_pools` VALUES (5999,'monberaux','Monberaux',145,0x0000300C00000000000000000000000000000000,7,22,3,240,100,0,0,0,0,0,0,32,0,3,0,0,412,0,0,1114,145); -- Reserved for future Trust 6000 -- Reserved for future Trust 6001 -- Reserved for future Trust 6002 diff --git a/sql/mob_skills.sql b/sql/mob_skills.sql index 872d978679d..229200361f7 100644 --- a/sql/mob_skills.sql +++ b/sql/mob_skills.sql @@ -4093,24 +4093,35 @@ INSERT INTO `mob_skills` VALUES (3975,36,'drill_claw',0,0.0,7.0,2000,1500,4,0,0, -- INSERT INTO `mob_skills` VALUES (4078,3822,'#2286',0,0.0,7.0,2000,1500,4,0,0,0,0,0,0); -- INSERT INTO `mob_skills` VALUES (4079,3823,'#2287',0,0.0,7.0,2000,1500,4,0,0,0,0,0,0); -- INSERT INTO `mob_skills` VALUES (4080,3824,'#2288',0,0.0,7.0,2000,1500,4,0,0,0,0,0,0); -INSERT INTO `mob_skills` VALUES (4232,549,'potion',0,0.0,7.0,2000,100,3,4,0,0,0,0,0); -- Trust: Monberaux -INSERT INTO `mob_skills` VALUES (4234,550,'x-potion',0,0.0,7.0,2000,100,3,4,0,0,0,0,0); -- Doesn't have a script? -INSERT INTO `mob_skills` VALUES (4235,2598,'hyper-potion',0,0.0,7.0,2000,100,3,4,0,0,0,0,0); -- verified -INSERT INTO `mob_skills` VALUES (4236,2598,'max_potion',0,0.0,7.0,2000,100,3,4,0,0,0,0,0); -- verified -INSERT INTO `mob_skills` VALUES (4237,2598,'mix_max_potion',0,0.0,7.0,2000,100,3,4,0,0,0,0,0); -- verified -INSERT INTO `mob_skills` VALUES (4238,2600,'mix_antidote',0,0.0,7.0,2000,100,3,4,0,0,0,0,0); -- verified, no effect message might be wrong --- INSERT INTO `mob_skills` VALUES (4239,553,'mix_para-b-gone',0,0.0,7.0,2000,100,3,4,0,0,0,0,0); -- script guessed -INSERT INTO `mob_skills` VALUES (4241,2603,'echo_drops',0,0.0,7.0,2000,100,3,4,0,0,0,0,0); -- messaging might be wrong on no effect -INSERT INTO `mob_skills` VALUES (4245,2604,'mix_panacea-1',0,0.0,7.0,2000,100,3,4,0,0,0,0,0); -- messaging is probably wrong --- INSERT INTO `mob_skills` VALUES (4246,552,'antidote',0,0.0,7.0,2000,100,3,4,0,0,0,0,0); -- second antidote? --- INSERT INTO `mob_skills` VALUES (4247,553,'mix_para-b-gone',0,0.0,7.0,2000,100,3,4,0,0,0,0,0); -- second para-b-gone? --- INSERT INTO `mob_skills` VALUES (4253,556,'mix_panacea-1',0,0.0,7.0,2000,100,3,4,0,0,0,0,0); -- second panacea-1? -INSERT INTO `mob_skills` VALUES (4254,2599,'mix_dry_ether_concoction',0,0.0,7.0,2000,100,3,4,0,0,0,0,0); -- messaging is probably wrong if only partial MP recovery -INSERT INTO `mob_skills` VALUES (4255,2607,'mix_guard_drink',1,0.0,7.0,2000,100,3,4,0,0,0,0,0); -- verified --- INSERT INTO `mob_skills` VALUES (4256,2560,'mix_insomniant',0,0.0,7.0,2000,100,3,4,0,0,0,0,0); -- guessed messaging, animation wrong so disabled -INSERT INTO `mob_skills` VALUES (4257,2609,'mix_life_water',1,0.0,7.0,2000,100,3,4,0,0,0,0,0); -- verified, but no effect messaging is probably wrong. -INSERT INTO `mob_skills` VALUES (4258,2610,'mix_elemental_power',1,0.0,7.0,2000,100,3,4,0,0,0,0,0); -- verified, but no effect messaging is probably wrong. -INSERT INTO `mob_skills` VALUES (4259,2610,'mix_dragon_shield',1,0.0,7.0,2000,100,3,4,0,0,0,0,0); -- verified, but no effect messaging is probably wrong -INSERT INTO `mob_skills` VALUES (4260,2611,'mix_dark_potion',0,0.0,7.0,2000,100,3,4,0,0,0,0,0); -- verified, but check if correct messaging. -INSERT INTO `mob_skills` VALUES (4261,2612,'mix_samsons_strength',1,0.0,7.0,2000,100,3,4,0,0,0,0,0); -- verified, but check no effect messaging +INSERT INTO `mob_skills` VALUES (4231,2613,'mix_final_elixir',0,0.0,14.0,2000,1000,3,4,0,0,0,0,0); -- Trust: Monberaux Final Elixir +INSERT INTO `mob_skills` VALUES (4232,2597,'potion',0,0.0,14.0,2000,1000,3,4,0,0,0,0,0); -- Trust: Monberaux Potion +INSERT INTO `mob_skills` VALUES (4233,2597,'hi_potion',0,0.0,14.0,2000,1000,3,4,0,0,0,0,0); -- Trust: Monberaux Hi Potion +INSERT INTO `mob_skills` VALUES (4234,2597,'x-potion',0,0.0,14.0,2000,1000,3,4,0,0,0,0,0); -- Trust: Monberaux X-Potion +INSERT INTO `mob_skills` VALUES (4235,2597,'hyper-potion',0,0.0,14.0,2000,1000,3,4,0,0,0,0,0); -- Trust: Monberaux Hyper Potion +INSERT INTO `mob_skills` VALUES (4236,2598,'max_potion',0,0.0,14.0,2000,1000,3,4,0,0,0,0,0); -- Trust: Monberaux Max Potion +INSERT INTO `mob_skills` VALUES (4237,2598,'mix_max_potion',0,0.0,14.0,2000,1000,3,4,0,0,0,0,0); -- Trust: Monberaux Mix: Max Potion +INSERT INTO `mob_skills` VALUES (4238,2600,'mix_antidote',1,0.0,14.0,2000,1000,3,4,0,0,0,0,0); -- Trust: Monberaux AoE Antidote +INSERT INTO `mob_skills` VALUES (4239,2601,'mix_para-b-gone',1,0.0,14.0,2000,1000,3,4,0,0,0,0,0); -- Trust: Monberaux AoE Paralyna +INSERT INTO `mob_skills` VALUES (4240,2602,'mix_eye_drops',1,0.0,14.0,2000,1000,3,4,0,0,0,0,0); -- Trust: Monberaux AoE Blindna +INSERT INTO `mob_skills` VALUES (4241,2603,'mix_echo_drops',1,0.0,14.0,2000,1000,3,4,0,0,0,0,0); -- Trust: Monberaux AoE Silena +INSERT INTO `mob_skills` VALUES (4242,2604,'mix_holy_water',1,0.0,14.0,2000,1000,3,4,0,0,0,0,0); -- Trust: Monberaux AoE Cursna +INSERT INTO `mob_skills` VALUES (4243,2605,'mix_vaccine',1,0.0,14.0,2000,1000,3,4,0,0,0,0,0); -- Trust: Monberaux AoE Viruna +INSERT INTO `mob_skills` VALUES (4244,2606,'mix_gold_needle',1,0.0,14.0,2000,1000,3,4,0,0,0,0,0); -- Trust: Monberaux AoE Stona +INSERT INTO `mob_skills` VALUES (4245,2604,'mix_panacea-1',1,0.0,14.0,2000,1000,3,4,0,0,0,0,0); -- Trust: Monberaux AoE Erase +INSERT INTO `mob_skills` VALUES (4246,2600,'mix_antidote',0,0.0,14.0,2000,1000,3,4,0,0,0,0,0); -- Trust: Monberaux Single Target Antitode +INSERT INTO `mob_skills` VALUES (4247,2601,'mix_para-b-gone',0,0.0,14.0,2000,1000,3,4,0,0,0,0,0); -- Trust: Monberaux Single Target Paralyna +INSERT INTO `mob_skills` VALUES (4248,2602,'mix_eye_drops',0,0.0,14.0,2000,1000,3,4,0,0,0,0,0); -- Trust: Monberaux Single Target Blindna +INSERT INTO `mob_skills` VALUES (4249,2603,'mix_echo_drops',0,0.0,14.0,2000,1000,3,4,0,0,0,0,0); -- Trust: Monberaux Single Target Silena +INSERT INTO `mob_skills` VALUES (4250,2604,'mix_holy_water',0,0.0,14.0,2000,1000,3,4,0,0,0,0,0); -- Trust: Monberaux Single Target Cursna +INSERT INTO `mob_skills` VALUES (4251,2605,'mix_vaccine',0,0.0,14.0,2000,1000,3,4,0,0,0,0,0); -- Trust: Monberaux Single Target Viruna +INSERT INTO `mob_skills` VALUES (4252,2606,'mix_gold_needle',0,0.0,14.0,2000,1000,3,4,0,0,0,0,0); -- Trust: Monberaux Single Target Stona +INSERT INTO `mob_skills` VALUES (4253,2604,'mix_panacea-1',0,0.0,14.0,2000,1000,3,4,0,0,0,0,0); -- Trust: Monberaux Single Target Erase +INSERT INTO `mob_skills` VALUES (4254,2599,'mix_dry_ether_concoction',0,0.0,14.0,2000,1000,3,4,0,0,0,0,0); -- Trust: Monberaux Mix: Dry Ether Concoction +INSERT INTO `mob_skills` VALUES (4255,2607,'mix_guard_drink',1,0.0,14.0,2000,1000,3,4,0,0,0,0,0); -- Trust: Monberaux Mix: Guard Drink +INSERT INTO `mob_skills` VALUES (4256,2608,'mix_insomniant',0,0.0,14.0,2000,1000,3,4,0,0,0,0,0); -- Trust: Monberaux Mix: Insomniant; have someone verify new animation +INSERT INTO `mob_skills` VALUES (4257,2609,'mix_life_water',1,0.0,14.0,2000,1000,3,4,0,0,0,0,0); -- Trust: Monberaux Mix: Life Water +INSERT INTO `mob_skills` VALUES (4258,2610,'mix_elemental_power',1,0.0,14.0,2000,1000,3,4,0,0,0,0,0); -- Trust: Monberaux Mix: Elemental Power +INSERT INTO `mob_skills` VALUES (4259,2610,'mix_dragon_shield',1,0.0,14.0,2000,1000,3,4,0,0,0,0,0); -- Trust: Monberaux Mix: Dragon Shield +INSERT INTO `mob_skills` VALUES (4260,2611,'mix_dark_potion',0,0.0,14.0,2000,1000,4,4,0,0,0,0,0); -- Trust: Monberaux Mix: Dark Potion +INSERT INTO `mob_skills` VALUES (4261,2612,'mix_samsons_strength',1,0.0,14.0,2000,1000,3,4,0,0,0,0,0); -- Trust: Monberaux Mix: Samsons Strength -- INSERT INTO `mob_skills` VALUES (4262,2170,'shadow_burst',0,0.0,7.0,2000,1500,4,0,0,0,0,0,0);