From ccd864a8022f5c6e1b289ada6c0ba7cf414ac503 Mon Sep 17 00:00:00 2001 From: Skold <113406182+Skold177@users.noreply.github.com> Date: Sun, 10 May 2026 00:13:36 -0400 Subject: [PATCH] [lua] Holy Cow Updates the ENM Holy Cow --- .../Bearclaw_Pinnacle/brothers.lua | 15 ++-- .../follow_the_white_rabbit.lua | 11 +-- .../Bearclaw_Pinnacle/holy_cow.lua | 24 ++--- .../when_hell_freezes_over.lua | 26 +++--- scripts/zones/Bearclaw_Pinnacle/mobs/Apis.lua | 90 ++++++++----------- 5 files changed, 77 insertions(+), 89 deletions(-) diff --git a/scripts/battlefields/Bearclaw_Pinnacle/brothers.lua b/scripts/battlefields/Bearclaw_Pinnacle/brothers.lua index c5a545b4350..88e4bf343bc 100644 --- a/scripts/battlefields/Bearclaw_Pinnacle/brothers.lua +++ b/scripts/battlefields/Bearclaw_Pinnacle/brothers.lua @@ -25,21 +25,22 @@ content:addEssentialMobs({ 'Eldertaur', 'Mindertaur' }) content.loot = { { - { itemId = xi.item.PIECE_OF_CASSIA_LUMBER, weight = 3750 }, - { itemId = xi.item.SQUARE_OF_ELTORO_LEATHER, weight = 2500 }, - { itemId = xi.item.DRAGON_BONE, weight = 3750 }, + { itemId = xi.item.NONE, weight = 9500 }, + { itemId = xi.item.CLOUD_EVOKER, weight = 500 }, }, { - { itemId = xi.item.NONE, weight = 9500 }, - { itemId = xi.item.CLOUD_EVOKER, weight = 500 }, + { itemId = xi.item.NONE, weight = 2500 }, + { itemId = xi.item.PIECE_OF_CASSIA_LUMBER, weight = 2500 }, + { itemId = xi.item.SQUARE_OF_ELTORO_LEATHER, weight = 2500 }, + { itemId = xi.item.DRAGON_BONE, weight = 2500 }, }, { quantity = 2, { itemId = xi.item.NONE, weight = 5500 }, - { itemId = xi.item.SCOUTERS_ROPE, weight = 700 }, - { itemId = xi.item.HEDGEHOG_BOMB, weight = 800 }, + { itemId = xi.item.SCOUTERS_ROPE, weight = 800 }, + { itemId = xi.item.HEDGEHOG_BOMB, weight = 700 }, { itemId = xi.item.MARTIAL_ANELACE, weight = 800 }, { itemId = xi.item.MARTIAL_LANCE, weight = 800 }, { itemId = xi.item.SCROLL_OF_RAISE_III, weight = 1400 }, diff --git a/scripts/battlefields/Bearclaw_Pinnacle/follow_the_white_rabbit.lua b/scripts/battlefields/Bearclaw_Pinnacle/follow_the_white_rabbit.lua index 274992f258e..1a42bac1d73 100644 --- a/scripts/battlefields/Bearclaw_Pinnacle/follow_the_white_rabbit.lua +++ b/scripts/battlefields/Bearclaw_Pinnacle/follow_the_white_rabbit.lua @@ -98,14 +98,15 @@ content.groups = content.loot = { { - { itemId = xi.item.SQUARE_OF_GALATEIA, weight = 3750 }, - { itemId = xi.item.SQUARE_OF_KEJUSU_SATIN, weight = 2500 }, - { itemId = xi.item.POT_OF_VIRIDIAN_URUSHI, weight = 3750 }, + { itemId = xi.item.NONE, weight = 9500 }, + { itemId = xi.item.CLOUD_EVOKER, weight = 500 }, }, { - { itemId = xi.item.NONE, weight = 9500 }, - { itemId = xi.item.CLOUD_EVOKER, weight = 500 }, + { itemId = xi.item.NONE, weight = 2500 }, + { itemId = xi.item.SQUARE_OF_GALATEIA, weight = 2500 }, + { itemId = xi.item.SQUARE_OF_KEJUSU_SATIN, weight = 2500 }, + { itemId = xi.item.POT_OF_VIRIDIAN_URUSHI, weight = 2500 }, }, { diff --git a/scripts/battlefields/Bearclaw_Pinnacle/holy_cow.lua b/scripts/battlefields/Bearclaw_Pinnacle/holy_cow.lua index f0e3754f0a5..97e618f5a27 100644 --- a/scripts/battlefields/Bearclaw_Pinnacle/holy_cow.lua +++ b/scripts/battlefields/Bearclaw_Pinnacle/holy_cow.lua @@ -25,25 +25,25 @@ content:addEssentialMobs({ 'Apis' }) content.loot = { { - { itemId = xi.item.NONE, weight = xi.loot.weight.VERY_LOW }, - { itemId = xi.item.SQUARE_OF_ELTORO_LEATHER, weight = xi.loot.weight.NORMAL }, - { itemId = xi.item.PIECE_OF_CASSIA_LUMBER, weight = xi.loot.weight.NORMAL }, - { itemId = xi.item.DRAGON_BONE, weight = xi.loot.weight.NORMAL }, + { itemId = xi.item.NONE, weight = 9500 }, + { itemId = xi.item.CLOUD_EVOKER, weight = 500 }, }, { - { itemId = xi.item.NONE, weight = xi.loot.weight.EXTREMELY_HIGH }, - { itemId = xi.item.CLOUD_EVOKER, weight = xi.loot.weight.LOW }, + { itemId = xi.item.NONE, weight = 2500 }, + { itemId = xi.item.PIECE_OF_CASSIA_LUMBER, weight = 2500 }, + { itemId = xi.item.SQUARE_OF_ELTORO_LEATHER, weight = 2500 }, + { itemId = xi.item.DRAGON_BONE, weight = 2500 }, }, { quantity = 2, - { itemId = xi.item.NONE, weight = xi.loot.weight.HIGH }, - { itemId = xi.item.GIGANT_MANTLE, weight = xi.loot.weight.LOW }, - { itemId = xi.item.PSILOS_MANTLE, weight = xi.loot.weight.LOW }, - { itemId = xi.item.MARTIAL_BOW, weight = xi.loot.weight.LOW }, - { itemId = xi.item.MARTIAL_KNUCKLES, weight = xi.loot.weight.LOW }, - { itemId = xi.item.SCROLL_OF_RAISE_III, weight = xi.loot.weight.HIGH }, + { itemId = xi.item.NONE, weight = 5500 }, + { itemId = xi.item.GIGANT_MANTLE, weight = 700 }, + { itemId = xi.item.PSILOS_MANTLE, weight = 800 }, + { itemId = xi.item.MARTIAL_BOW, weight = 800 }, + { itemId = xi.item.MARTIAL_KNUCKLES, weight = 800 }, + { itemId = xi.item.SCROLL_OF_RAISE_III, weight = 1400 }, }, } diff --git a/scripts/battlefields/Bearclaw_Pinnacle/when_hell_freezes_over.lua b/scripts/battlefields/Bearclaw_Pinnacle/when_hell_freezes_over.lua index fcc7085ac25..d99b8a9bccb 100644 --- a/scripts/battlefields/Bearclaw_Pinnacle/when_hell_freezes_over.lua +++ b/scripts/battlefields/Bearclaw_Pinnacle/when_hell_freezes_over.lua @@ -129,26 +129,26 @@ end content.loot = { { - { itemId = xi.item.NONE, weight = 950 }, - { itemId = xi.item.CLOUD_EVOKER, weight = 50 }, + { itemId = xi.item.NONE, weight = 9500 }, + { itemId = xi.item.CLOUD_EVOKER, weight = 500 }, }, { - { itemId = xi.item.NONE, weight = 250 }, - { itemId = xi.item.SQUARE_OF_GALATEIA, weight = 350 }, - { itemId = xi.item.SQUARE_OF_KEJUSU_SATIN, weight = 200 }, - { itemId = xi.item.POT_OF_VIRIDIAN_URUSHI, weight = 200 }, + { itemId = xi.item.NONE, weight = 2500 }, + { itemId = xi.item.SQUARE_OF_GALATEIA, weight = 2500 }, + { itemId = xi.item.SQUARE_OF_KEJUSU_SATIN, weight = 2500 }, + { itemId = xi.item.POT_OF_VIRIDIAN_URUSHI, weight = 2500 }, }, { quantity = 2, - { itemId = xi.item.NONE, weight = 250 }, - { itemId = xi.item.MARTIAL_GUN, weight = 125 }, - { itemId = xi.item.MARTIAL_BHUJ, weight = 125 }, - { itemId = xi.item.MARTIAL_STAFF, weight = 125 }, - { itemId = xi.item.HEXEREI_CAPE, weight = 125 }, - { itemId = xi.item.SETTLERS_CAPE, weight = 125 }, - { itemId = xi.item.SCROLL_OF_RAISE_III, weight = 125 }, + { itemId = xi.item.NONE, weight = 5500 }, + { itemId = xi.item.MARTIAL_GUN, weight = 700 }, + { itemId = xi.item.MARTIAL_BHUJ, weight = 800 }, + { itemId = xi.item.MARTIAL_STAFF, weight = 800 }, + { itemId = xi.item.HEXEREI_CAPE, weight = 800 }, + { itemId = xi.item.SETTLERS_CAPE, weight = 800 }, + { itemId = xi.item.SCROLL_OF_RAISE_III, weight = 800 }, }, } diff --git a/scripts/zones/Bearclaw_Pinnacle/mobs/Apis.lua b/scripts/zones/Bearclaw_Pinnacle/mobs/Apis.lua index 0826e4cf82e..fc52c6bc41e 100644 --- a/scripts/zones/Bearclaw_Pinnacle/mobs/Apis.lua +++ b/scripts/zones/Bearclaw_Pinnacle/mobs/Apis.lua @@ -6,72 +6,58 @@ ---@type TMobEntity local entity = {} -entity.onMobInitialize = function(mob) -end +local colorPhaseData = +{ + [1] = { uDmgRange = -10000, uDmgMagic = -10000, uDmgPhys = -10000, uDmgBreath = -10000, baseDamageMultiplier = 100, delay = 260, doubleAttack = 0, injectedAction = 433 }, -- Immune to damage. + [2] = { uDmgRange = 0, uDmgMagic = 0, uDmgPhys = 0, uDmgBreath = 0, baseDamageMultiplier = 150, delay = 260, doubleAttack = 0, injectedAction = 438 }, -- Neutral phase. + [3] = { uDmgRange = 5000, uDmgMagic = 5000, uDmgPhys = 5000, uDmgBreath = 5000, baseDamageMultiplier = 400, delay = 200, doubleAttack = 25, injectedAction = 432 }, -- High attack, 50% increased damage from all sources. + [4] = { uDmgRange = -7500, uDmgMagic = 10000, uDmgPhys = -7500, uDmgBreath = 10000, baseDamageMultiplier = 200, delay = 200, doubleAttack = 25, injectedAction = 439 }, -- High defense, double magic damage. +} entity.onMobSpawn = function(mob) - mob:setMod(xi.mod.UDMGRANGE, -10000) - mob:setMod(xi.mod.UDMGMAGIC, -10000) - mob:setMod(xi.mod.UDMGPHYS, -10000) + local colorPhase = colorPhaseData[1] + + -- Starts immune to all damage. + mob:setMod(xi.mod.UDMGRANGE, colorPhase.uDmgRange) + mob:setMod(xi.mod.UDMGMAGIC, colorPhase.uDmgMagic) + mob:setMod(xi.mod.UDMGPHYS, colorPhase.uDmgPhys) + mob:setMod(xi.mod.UDMGBREATH, colorPhase.uDmgBreath) + mob:setMobMod(xi.mobMod.BASE_DAMAGE_MULTIPLIER, colorPhase.baseDamageMultiplier) + mob:setMod(xi.mod.DOUBLE_ATTACK, colorPhase.doubleAttack) + mob:setDelay(colorPhase.delay) + mob:setMod(xi.mod.ATT, 600) mob:setMobMod(xi.mobMod.SIGHT_RANGE, 35) + mob:setLocalVar('colorChangeTime', 0) end entity.onMobEngage = function(mob, target) - mob:setLocalVar('colorChange', GetSystemTime() + 60) - mob:setLocalVar('currentColor', math.random(1, 3)) + mob:setLocalVar('colorChangeTime', GetSystemTime() + 60) end entity.onMobFight = function(mob, target) - local indicies = { 1, 2, 3 } - local currentColor = mob:getLocalVar('currentColor') - local abilities = { 624, 625, 627 } - - if GetSystemTime() > mob:getLocalVar('colorChange') then - mob:setLocalVar('colorChange', GetSystemTime() + math.random(60, 90)) - mob:setLocalVar('twohour_tp', mob:getTP()) - table.remove(indicies, currentColor) - local index = indicies[math.random(1, #indicies)] - mob:useMobAbility(abilities[index]) - mob:setLocalVar('currentColor', index) + if xi.combat.behavior.isEntityBusy(mob) then + return end -end -entity.onMobWeaponSkill = function(mob, target, skill, action) - if skill:getID() == 624 then -- blue: High ATK, double and triple attack. High magic immunity - mob:setMod(xi.mod.DOUBLE_ATTACK, 35) - mob:setMod(xi.mod.TRIPLE_ATTACK, 35) - mob:setMod(xi.mod.ATT, 2000) - mob:setMod(xi.mod.UDMGRANGE, 0) - mob:setMod(xi.mod.UDMGMAGIC, -9800) - mob:setMod(xi.mod.UDMGPHYS, 0) - mob:addTP(mob:getLocalVar('twohour_tp')) - mob:setLocalVar('twohour_tp', 0) - end + local currentTime = GetSystemTime() + local colorChangeTime = mob:getLocalVar('colorChangeTime') - if skill:getID() == 625 then -- yellow: Moderate ATK, takes lowered phys and magic damage - mob:setMod(xi.mod.DOUBLE_ATTACK, 0) - mob:setMod(xi.mod.TRIPLE_ATTACK, 0) - mob:setMod(xi.mod.ATT, 1000) - mob:setMod(xi.mod.UDMGRANGE, -3000) - mob:setMod(xi.mod.UDMGMAGIC, 0) - mob:setMod(xi.mod.UDMGPHYS, -3000) - mob:addTP(mob:getLocalVar('twohour_tp')) - mob:setLocalVar('twohour_tp', 0) + if currentTime < colorChangeTime then + return end - if skill:getID() == 627 then -- green: Low ATK, High physical immune. - mob:setMod(xi.mod.DOUBLE_ATTACK, 0) - mob:setMod(xi.mod.TRIPLE_ATTACK, 0) - mob:setMod(xi.mod.ATT, 500) - mob:setMod(xi.mod.UDMGRANGE, -9800) - mob:setMod(xi.mod.UDMGMAGIC, 4000) - mob:setMod(xi.mod.UDMGPHYS, -9800) - mob:addTP(mob:getLocalVar('twohour_tp')) - mob:setLocalVar('twohour_tp', 0) - end -end - -entity.onMobDeath = function(mob, player, optParams) + local nextPhase = math.random(1, #colorPhaseData) + local colorPhase = colorPhaseData[nextPhase] + + mob:setMod(xi.mod.UDMGRANGE, colorPhase.uDmgRange) + mob:setMod(xi.mod.UDMGMAGIC, colorPhase.uDmgMagic) + mob:setMod(xi.mod.UDMGPHYS, colorPhase.uDmgPhys) + mob:setMod(xi.mod.UDMGBREATH, colorPhase.uDmgBreath) + mob:setMobMod(xi.mobMod.BASE_DAMAGE_MULTIPLIER, colorPhase.baseDamageMultiplier) + mob:setMod(xi.mod.DOUBLE_ATTACK, colorPhase.doubleAttack) + mob:setDelay(colorPhase.delay) + mob:injectActionPacket(mob:getID(), 11, colorPhase.injectedAction, 0, 0x18, 0, 0, 0) + mob:setLocalVar('colorChangeTime', currentTime + math.random(60, 90)) end return entity