From 82b2d8a22e491ee6a1168da77d8fe608854a9f36 Mon Sep 17 00:00:00 2001 From: Skold177 <113406182+Skold177@users.noreply.github.com> Date: Wed, 21 Jan 2026 17:44:48 -0500 Subject: [PATCH] [lua] [sql] KS99 Early Bird Catches the Wyrm Adds the KS99 Early Bird Catches the Wyrm with captures from retail. --- scripts/actions/mobskills/flame_blast.lua | 4 +- scripts/actions/mobskills/flame_blast_alt.lua | 4 +- .../mobskills/hurricane_wing_flying.lua | 7 +- .../early_bird_catches_the_wyrm.lua | 125 ++++----- scripts/enum/mob_skill.lua | 10 + scripts/zones/Balgas_Dais/mobs/Wyrm.lua | 252 ++++++++++++++---- sql/mob_groups.sql | 2 +- sql/mob_skills.sql | 14 +- 8 files changed, 291 insertions(+), 127 deletions(-) diff --git a/scripts/actions/mobskills/flame_blast.lua b/scripts/actions/mobskills/flame_blast.lua index 6f53ce911c2..d0d68f9eee8 100644 --- a/scripts/actions/mobskills/flame_blast.lua +++ b/scripts/actions/mobskills/flame_blast.lua @@ -15,9 +15,7 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(target, mob, skill) - local damage = mob:getWeaponDmg() * 5 - - damage = xi.mobskills.mobMagicalMove(mob, target, skill, damage, xi.element.FIRE, 1, xi.mobskills.magicalTpBonus.NO_EFFECT) + local damage = xi.mobskills.mobMagicalMove(mob, target, skill, mob:getMainLvl() + 2, xi.element.FIRE, 11, xi.mobskills.magicalTpBonus.NO_EFFECT) damage = xi.mobskills.mobFinalAdjustments(damage, mob, skill, target, xi.attackType.MAGICAL, xi.damageType.FIRE, xi.mobskills.shadowBehavior.IGNORE_SHADOWS) target:takeDamage(damage, mob, xi.attackType.MAGICAL, xi.damageType.FIRE) diff --git a/scripts/actions/mobskills/flame_blast_alt.lua b/scripts/actions/mobskills/flame_blast_alt.lua index f7f577b4cf1..ad5575da4c3 100644 --- a/scripts/actions/mobskills/flame_blast_alt.lua +++ b/scripts/actions/mobskills/flame_blast_alt.lua @@ -15,9 +15,7 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(target, mob, skill) - local damage = mob:getWeaponDmg() * 3 - - damage = xi.mobskills.mobMagicalMove(mob, target, skill, damage, xi.element.FIRE, 1, xi.mobskills.magicalTpBonus.NO_EFFECT) + local damage = xi.mobskills.mobMagicalMove(mob, target, skill, mob:getMainLvl() + 2, xi.element.FIRE, 4, xi.mobskills.magicalTpBonus.NO_EFFECT) damage = xi.mobskills.mobFinalAdjustments(damage, mob, skill, target, xi.attackType.MAGICAL, xi.damageType.FIRE, xi.mobskills.shadowBehavior.IGNORE_SHADOWS) target:takeDamage(damage, mob, xi.attackType.MAGICAL, xi.damageType.FIRE) diff --git a/scripts/actions/mobskills/hurricane_wing_flying.lua b/scripts/actions/mobskills/hurricane_wing_flying.lua index 97d6389307f..0bbaa9cef2f 100644 --- a/scripts/actions/mobskills/hurricane_wing_flying.lua +++ b/scripts/actions/mobskills/hurricane_wing_flying.lua @@ -15,13 +15,12 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill) end mobskillObject.onMobWeaponSkill = function(target, mob, skill) - local damage = mob:getWeaponDmg() * 5 - - damage = xi.mobskills.mobMagicalMove(mob, target, skill, damage, xi.element.WIND, 1, xi.mobskills.magicalTpBonus.NO_EFFECT) + local damage = xi.mobskills.mobMagicalMove(mob, target, skill, mob:getMainLvl() + 2, xi.element.WIND, 4, xi.mobskills.magicalTpBonus.NO_EFFECT) damage = xi.mobskills.mobFinalAdjustments(damage, mob, skill, target, xi.attackType.MAGICAL, xi.damageType.WIND, xi.mobskills.shadowBehavior.WIPE_SHADOWS) target:takeDamage(damage, mob, xi.attackType.MAGICAL, xi.damageType.WIND) - xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BLINDNESS, 60, 0, 30) + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BLINDNESS, 100, 0, 30) return damage end diff --git a/scripts/battlefields/Balgas_Dais/early_bird_catches_the_wyrm.lua b/scripts/battlefields/Balgas_Dais/early_bird_catches_the_wyrm.lua index e1ada8e7b5c..623c9ec57de 100644 --- a/scripts/battlefields/Balgas_Dais/early_bird_catches_the_wyrm.lua +++ b/scripts/battlefields/Balgas_Dais/early_bird_catches_the_wyrm.lua @@ -15,8 +15,6 @@ local content = Battlefield:new({ entryNpc = 'BC_Entrance', exitNpc = 'Burning_Circle', requiredItems = { xi.item.THEMIS_ORB, wearMessage = balgasID.text.A_CRACK_HAS_FORMED, wornMessage = balgasID.text.ORB_IS_CRACKED }, - - experimental = true, }) content:addEssentialMobs({ 'Wyrm' }) @@ -24,96 +22,99 @@ content:addEssentialMobs({ 'Wyrm' }) content.loot = { { - { itemId = xi.item.GIL, weight = 1000, amount = 32000 }, -- Gil + { itemId = xi.item.GIL, weight = 10000, amount = 32000 }, }, { - { itemId = xi.item.JUG_OF_HONEY_WINE, weight = 1000 }, -- Jug Of Honey Wine + { itemId = xi.item.JUG_OF_HONEY_WINE, weight = 10000 }, }, { - { itemId = xi.item.LIBATION_ABJURATION, weight = 312 }, -- Libation Abjuration - { itemId = xi.item.GUESPIERE, weight = 182 }, -- Guespiere - { itemId = xi.item.HAVOC_SCYTHE, weight = 65 }, -- Havoc Scythe - { itemId = xi.item.LEOPARD_AXE, weight = 43 }, -- Leopard Axe - { itemId = xi.item.NOKIZARU_SHURIKEN, weight = 181 }, -- Nokizaru Shuriken - { itemId = xi.item.SHINSOKU, weight = 217 }, -- Shinsoku - { itemId = xi.item.SOMNUS_SIGNA, weight = 43 }, -- Somnus Signa + { itemId = xi.item.LIBATION_ABJURATION, weight = 2500 }, + { itemId = xi.item.GUESPIERE, weight = 1250 }, + { itemId = xi.item.HAVOC_SCYTHE, weight = 1250 }, + { itemId = xi.item.LEOPARD_AXE, weight = 1250 }, + { itemId = xi.item.NOKIZARU_SHURIKEN, weight = 1250 }, + { itemId = xi.item.SHINSOKU, weight = 1250 }, + { itemId = xi.item.SOMNUS_SIGNA, weight = 1250 }, }, { - { itemId = xi.item.DIVINE_LOG, weight = 94 }, -- Divine Log - { itemId = xi.item.LACQUER_TREE_LOG, weight = 196 }, -- Lacquer Tree Log - { itemId = xi.item.PETRIFIED_LOG, weight = 572 }, -- Petrified Log - { itemId = xi.item.SQUARE_OF_SHINING_CLOTH, weight = 43 }, -- Square Of Shining Cloth + { itemId = xi.item.OBLATION_ABJURATION, weight = 2500 }, + { itemId = xi.item.BAYARDS_SWORD, weight = 1250 }, + { itemId = xi.item.DREIZACK, weight = 1250 }, + { itemId = xi.item.GRIM_STAFF, weight = 1250 }, + { itemId = xi.item.GROSVENEURS_BOW, weight = 1250 }, + { itemId = xi.item.STYLET, weight = 1250 }, + { itemId = xi.item.UNSHO, weight = 1250 }, }, { - { itemId = xi.item.OBLATION_ABJURATION, weight = 159 }, -- Oblation Abjuration - { itemId = xi.item.BAYARDS_SWORD, weight = 151 }, -- Bayards Sword - { itemId = xi.item.DREIZACK, weight = 167 }, -- Dreizack - { itemId = xi.item.GRIM_STAFF, weight = 95 }, -- Grim Staff - { itemId = xi.item.GROSVENEURS_BOW, weight = 95 }, -- Grosveneurs Bow - { itemId = xi.item.STYLET, weight = 56 }, -- Stylet - { itemId = xi.item.UNSHO, weight = 341 }, -- Unsho + { itemId = xi.item.DRAGON_HEART, weight = 5200 }, + { itemId = xi.item.SLICE_OF_DRAGON_MEAT, weight = 3500 }, + { itemId = xi.item.JUGGERNAUT, weight = 800 }, + { itemId = xi.item.SPEED_BELT, weight = 500 }, }, { - { itemId = xi.item.DRAGON_HEART, weight = 522 }, -- Dragon Heart - { itemId = xi.item.SLICE_OF_DRAGON_MEAT, weight = 346 }, -- Slice Of Dragon Meat - { itemId = xi.item.JUGGERNAUT, weight = 82 }, -- Juggernaut - { itemId = xi.item.SPEED_BELT, weight = 59 }, -- Speed Belt + { itemId = xi.item.CHUNK_OF_DARKSTEEL_ORE, weight = 500 }, + { itemId = xi.item.CHUNK_OF_GOLD_ORE, weight = 500 }, + { itemId = xi.item.CHUNK_OF_MYTHRIL_ORE, weight = 500 }, + { itemId = xi.item.CHUNK_OF_PLATINUM_ORE, weight = 500 }, + { itemId = xi.item.EBONY_LOG, weight = 500 }, + { itemId = xi.item.MAHOGANY_LOG, weight = 500 }, + { itemId = xi.item.PETRIFIED_LOG, weight = 500 }, + { itemId = xi.item.PHILOSOPHERS_STONE, weight = 500 }, + { itemId = xi.item.SPOOL_OF_GOLD_THREAD, weight = 500 }, + { itemId = xi.item.SQUARE_OF_RAINBOW_CLOTH, weight = 500 }, + { itemId = xi.item.SQUARE_OF_RAXA, weight = 500 }, + { itemId = xi.item.CORAL_FRAGMENT, weight = 500 }, + { itemId = xi.item.DEMON_HORN, weight = 500 }, + { itemId = xi.item.HANDFUL_OF_WYVERN_SCALES, weight = 500 }, + { itemId = xi.item.RAM_HORN, weight = 500 }, + { itemId = xi.item.SLAB_OF_GRANITE, weight = 500 }, + { itemId = xi.item.RERAISER, weight = 500 }, + { itemId = xi.item.HI_RERAISER, weight = 500 }, + { itemId = xi.item.VILE_ELIXIR, weight = 500 }, + { itemId = xi.item.VILE_ELIXIR_P1, weight = 500 }, }, { - { itemId = xi.item.CORAL_FRAGMENT, weight = 32 }, -- Coral Fragment - { itemId = xi.item.CHUNK_OF_DARKSTEEL_ORE, weight = 71 }, -- Chunk Of Darksteel Ore - { itemId = xi.item.DEMON_HORN, weight = 79 }, -- Demon Horn - { itemId = xi.item.EBONY_LOG, weight = 56 }, -- Ebony Log - { itemId = xi.item.CHUNK_OF_GOLD_ORE, weight = 71 }, -- Chunk Of Gold Ore - { itemId = xi.item.SPOOL_OF_GOLD_THREAD, weight = 32 }, -- Spool Of Gold Thread - { itemId = xi.item.HI_RERAISER, weight = 48 }, -- Hi-reraiser - { itemId = xi.item.MAHOGANY_LOG, weight = 127 }, -- Mahogany Log - { itemId = xi.item.CHUNK_OF_MYTHRIL_ORE, weight = 111 }, -- Chunk Of Mythril Ore - { itemId = xi.item.PETRIFIED_LOG, weight = 183 }, -- Petrified Log - { itemId = xi.item.PHILOSOPHERS_STONE, weight = 40 }, -- Philosophers Stone - { itemId = xi.item.CHUNK_OF_PLATINUM_ORE, weight = 56 }, -- Chunk Of Platinum Ore - { itemId = xi.item.RAM_HORN, weight = 24 }, -- Ram Horn - { itemId = xi.item.SQUARE_OF_RAXA, weight = 119 }, -- Square Of Raxa - { itemId = xi.item.RERAISER, weight = 56 }, -- Reraiser - { itemId = xi.item.VILE_ELIXIR_P1, weight = 40 }, -- Vile Elixir +1 - { itemId = xi.item.HANDFUL_OF_WYVERN_SCALES, weight = 24 }, -- Handful Of Wyvern Scales + { itemId = xi.item.WYRM_BEARD, weight = 2500 }, + { itemId = xi.item.LOCK_OF_SIRENS_HAIR, weight = 7500 }, }, { - { itemId = xi.item.WYRM_BEARD, weight = 210 }, -- Wyrm Beard - { itemId = xi.item.LOCK_OF_SIRENS_HAIR, weight = 775 }, -- Lock Of Sirens Hair + { itemId = xi.item.MIND_POTION, weight = 1250 }, + { itemId = xi.item.INTELLIGENCE_POTION, weight = 1250 }, + { itemId = xi.item.CHARISMA_POTION, weight = 1250 }, + { itemId = xi.item.ICARUS_WING, weight = 1250 }, + { itemId = xi.item.SQUARE_OF_RAXA, weight = 2500 }, + { itemId = xi.item.PRELATIC_POLE, weight = 2500 }, }, { - { itemId = xi.item.MIND_POTION, weight = 94 }, -- Mind Potion - { itemId = xi.item.INTELLIGENCE_POTION, weight = 130 }, -- Intelligence Potion - { itemId = xi.item.CHARISMA_POTION, weight = 116 }, -- Charisma Potion - { itemId = xi.item.ICARUS_WING, weight = 51 }, -- Icarus Wing - { itemId = xi.item.SQUARE_OF_RAXA, weight = 246 }, -- Square Of Raxa - { itemId = xi.item.PRELATIC_POLE, weight = 246 }, -- Prelatic Pole + { itemId = xi.item.HI_ETHER_P3, weight = 2500 }, + { itemId = xi.item.HI_POTION_P3, weight = 2500 }, + { itemId = xi.item.HI_RERAISER, weight = 2500 }, + { itemId = xi.item.VILE_ELIXIR_P1, weight = 2500 }, }, { - { itemId = xi.item.HI_ETHER_P3, weight = 290 }, -- Hi-ether +3 - { itemId = xi.item.HI_POTION_P3, weight = 225 }, -- Hi-potion +3 - { itemId = xi.item.HI_RERAISER, weight = 210 }, -- Hi-reraiser - { itemId = xi.item.VILE_ELIXIR_P1, weight = 217 }, -- Vile Elixir +1 + { itemId = xi.item.VIAL_OF_BLACK_BEETLE_BLOOD, weight = 625 }, + { itemId = xi.item.SQUARE_OF_DAMASCENE_CLOTH, weight = 625 }, + { itemId = xi.item.DAMASCUS_INGOT, weight = 625 }, + { itemId = xi.item.SPOOL_OF_MALBORO_FIBER, weight = 625 }, + { itemId = xi.item.PHILOSOPHERS_STONE, weight = 2000 }, + { itemId = xi.item.PHOENIX_FEATHER, weight = 3500 }, + { itemId = xi.item.SQUARE_OF_RAXA, weight = 2000 }, }, { - { itemId = xi.item.VIAL_OF_BLACK_BEETLE_BLOOD, weight = 58 }, -- Vial Of Black Beetle Blood - { itemId = xi.item.SQUARE_OF_DAMASCENE_CLOTH, weight = 36 }, -- Square Of Damascene Cloth - { itemId = xi.item.DAMASCUS_INGOT, weight = 72 }, -- Damascus Ingot - { itemId = xi.item.SPOOL_OF_MALBORO_FIBER, weight = 22 }, -- Spool Of Malboro Fiber - { itemId = xi.item.PHILOSOPHERS_STONE, weight = 275 }, -- Philosophers Stone - { itemId = xi.item.PHOENIX_FEATHER, weight = 196 }, -- Phoenix Feather - { itemId = xi.item.SQUARE_OF_RAXA, weight = 225 }, -- Square Of Raxa + { itemId = xi.item.DIVINE_LOG, weight = 1000 }, + { itemId = xi.item.LACQUER_TREE_LOG, weight = 2500 }, + { itemId = xi.item.PETRIFIED_LOG, weight = 6000 }, + { itemId = xi.item.SQUARE_OF_SHINING_CLOTH, weight = 500 }, }, } diff --git a/scripts/enum/mob_skill.lua b/scripts/enum/mob_skill.lua index a4121a482c2..68950d3cc70 100644 --- a/scripts/enum/mob_skill.lua +++ b/scripts/enum/mob_skill.lua @@ -360,6 +360,16 @@ xi.mobSkill = TACHI_GEKKO = 947, -- Ark Angel GK TACHI_KASHA = 948, -- Ark Angel GK + FLAME_BLAST_ATTACK = 950, + HURRICANE_WING_1 = 951, + SPIKE_FLAIL_1 = 952, + DRAGON_BREATH_1 = 953, + TOUCHDOWN_1 = 954, + FLAME_BLAST_1 = 955, + HURRICANE_WING_FLYING = 956, + ABSOLUTE_TERROR_1 = 957, + HORRID_ROAR_1 = 958, + ARKANGEL_TT_WARP_IN = 962, -- Ark Angel TT Warp In TRION_RED_LOTUS_BLADE = 968, -- Trion Red Lotus Blade diff --git a/scripts/zones/Balgas_Dais/mobs/Wyrm.lua b/scripts/zones/Balgas_Dais/mobs/Wyrm.lua index 0e429ceb6fd..98c657a93be 100644 --- a/scripts/zones/Balgas_Dais/mobs/Wyrm.lua +++ b/scripts/zones/Balgas_Dais/mobs/Wyrm.lua @@ -2,73 +2,231 @@ -- Area: Balga's Dais -- Mob: Wyrm -- KSNM: Early Bird Catches the Wyrm --- For future reference: Trusts are not allowed in this fight ------------------------------------ -mixins = { require('scripts/mixins/draw_in') } ----------------------------------- ---@type TMobEntity local entity = {} +-- Phases +----------------------------------- +-- 1 = Ground (Wings Down) (AnimationSub(0)) +-- 2 = Airborne (AnimationSub(1)) +-- 3 = Ground (Wings Up, Enraged) (AnimationSub(2)) +----------------------------------- + +----------------------------------- +-- Enter/Exit Flight Functions +----------------------------------- +local function enterFlight(mob) + mob:setMobSkillAttack(1146) + mob:setMobMod(xi.mobMod.NO_MOVE, 1) + mob:addStatusEffectEx(xi.effect.ALL_MISS, 0, 1, 0, 0) + mob:setBehavior(bit.band(mob:getBehavior(), bit.bnot(xi.behavior.NO_TURN))) + mob:setAnimationSub(1) +end + +local function exitFlight(mob) + mob:setMobSkillAttack(0) + mob:setMobMod(xi.mobMod.NO_MOVE, 0) + mob:useMobAbility(xi.mobSkill.TOUCHDOWN_1) + mob:delStatusEffect(xi.effect.ALL_MISS) + mob:setBehavior(bit.bor(mob:getBehavior(), xi.behavior.NO_TURN)) + mob:setAnimationSub(2) +end + +----------------------------------- +-- Enrage - Happens in 3rd phase after landing @ 33% HP +----------------------------------- +local function enrage(mob) + -- JP Wiki claims it gains 10 levels https://wiki.ffo.jp/html/8145.html TODO: Verify actual level change with dLVL testing, for now this is 10 levels worth of stats. Damage matches up almost exactly. + mob:setMobMod(xi.mobMod.WEAPON_BONUS, 10) + mob:setMod(xi.mod.ATT, 396) + mob:setMod(xi.mod.ACC, 361) + mob:setMod(xi.mod.EVA, 334) + mob:setMod(xi.mod.DEF, 369) + mob:setMod(xi.mod.STR, 11) + mob:setMod(xi.mod.DEX, 11) + mob:setMod(xi.mod.VIT, 10) + mob:setMod(xi.mod.AGI, 11) + mob:setMod(xi.mod.MND, 11) + mob:setMod(xi.mod.INT, 10) + mob:setMod(xi.mod.CHR, 9) +end + +----------------------------------- +-- Arena Centers - Used for pathing correctly to center before taking flight +----------------------------------- +local arenaCenters = +{ + [1] = { x = -139.0, y = 56.5, z = -224.4 }, + [2] = { x = -21.0, y = -3.4, z = -24.3 }, + [3] = { x = 181.0, y = -63.5, z = 175.7 }, +} + +----------------------------------- +-- Draw In Handler +----------------------------------- +local function handleDrawIn(mob, target, battlefield) + -- Early return: Distance from target check. + if mob:checkDistance(target) < 19.5 then + return + end + + -- Early return: No battlefield. + if not battlefield then + return + end + + -- Early return: No center. + local center = arenaCenters[battlefield:getArea()] + if not center then + return + end + + -- Early return: Distance from center check. + if target:checkDistance(center.x, center.y, center.z) <= 22 then + return + end + + local drawInPosition = + { + x = center.x, + y = center.y, + z = center.z + 3.0, + rot = 194, + } + + ----------------------------------- + -- Draw in all players to the draw in position, skip players already within 5 yalms + ----------------------------------- + for _, player in pairs(battlefield:getPlayers()) do + local distanceFromDrawIn = player:checkDistance(drawInPosition.x, drawInPosition.y, drawInPosition.z) + if distanceFromDrawIn > 5 then + mob:drawIn(player, 0, 0, drawInPosition) + end + end +end + +----------------------------------- +-- onMobInitialize +----------------------------------- entity.onMobInitialize = function(mob) + mob:addImmunity(xi.immunity.BIND) + mob:addImmunity(xi.immunity.PARALYZE) + mob:addImmunity(xi.immunity.DARK_SLEEP) + mob:addImmunity(xi.immunity.LIGHT_SLEEP) + mob:addImmunity(xi.immunity.TERROR) + mob:addImmunity(xi.immunity.PLAGUE) end +----------------------------------- +-- onMobSpawn +----------------------------------- entity.onMobSpawn = function(mob) - mob:setTP(3000) -- opens fight with a skill + mob:setMod(xi.mod.REGEN, 30) + mob:setMod(xi.mod.REGAIN, 100) + mob:setMod(xi.mod.DOUBLE_ATTACK, 0) + mob:setMobMod(xi.mobMod.BASE_DAMAGE_MULTIPLIER, 300) + mob:setBehavior(bit.bor(mob:getBehavior(), xi.behavior.NO_TURN)) + mob:setTP(3000) + mob:setAnimationSub(0) + mob:setMobSkillAttack(0) + mob:setLocalVar('forceFlight', 0) end +----------------------------------- +-- onMobEngage - Check if we need to enter flight, in case a wipe during air phase. +----------------------------------- entity.onMobEngage = function(mob, target) - mob:setMod(xi.mod.REGAIN, 100) -- very close to the capture by comparing stop watch measures - mob:setMod(xi.mod.REGEN, 100) -- might be higher: capture showed no change in HP with Poison II and Bio III procced -end - -local function notBusy(mob) - local action = mob:getCurrentAction() if - action == xi.action.category.MOBABILITY_START or - action == xi.action.category.MOBABILITY_USING or - action == xi.action.category.MOBABILITY_FINISH + mob:getAnimationSub() ~= 1 and + mob:getLocalVar('forceFlight') == 1 then - return false -- when the Wyrm is in any stage of using a mobskill - else - return true + enterFlight(mob) + mob:setLocalVar('forceFlight', 0) end end +----------------------------------- +-- onMobFight +----------------------------------- entity.onMobFight = function(mob, target) - -- Return to ground at 33% HP - if - mob:getAnimationSub() == 1 and -- is flying - mob:getHPP() <= 33 and - notBusy(mob) - then - mob:useMobAbility(954) - -- Touchdown will set the following for us in the skill script: - -- lifted wings model stance: mob:setAnimationSub(2) - -- reset default attack: mob:setMobSkillAttack(0) - -- reset melee attacks: mob:delStatusEffect(xi.effect.ALL_MISS) - mob:addStatusEffect(xi.effect.EVASION_BOOST, 75, 0, 0) - mob:addStatusEffect(xi.effect.DEFENSE_BOOST, 75, 0, 0) - mob:addStatusEffect(xi.effect.MAGIC_DEF_BOOST, 75, 0, 0) - mob:setMobMod(xi.mobMod.SKILL_LIST, 262) -- restore standard ground skill set - mob:setBehavior(1024) -- reset behavior to not face target - - -- Go airborne at 66% HP, gets only called once - -- TODO: Should move physically to center/origin before taking off; maybe with pathTo()? - elseif - mob:getHPP() > 33 and - mob:getHPP() <= 66 and - mob:getAnimationSub() == 0 and -- is on ground - notBusy(mob) - then - mob:setAnimationSub(1) -- flying model stance - mob:addStatusEffectEx(xi.effect.ALL_MISS, 0, 1, 0, 0) -- melee attacks miss now - mob:setMobSkillAttack(1146) -- change default attack to ranged fire magic damage - mob:setMobMod(xi.mobMod.SKILL_LIST, 1147) -- change skill set to flying moves - mob:setBehavior(0) -- face target while flying + -- Check for Draw In + local battlefield = mob:getBattlefield() + if not battlefield then + return + end + + handleDrawIn(mob, target, battlefield) + + -- Early return: Landed. + local animationSub = mob:getAnimationSub() + if animationSub == 2 then + return + end + + -- Early return: Entity is busy. + if xi.combat.behavior.isEntityBusy(mob) then + return + end + + -- Flight at 66% HP + if animationSub == 0 then + if mob:getHPP() > 66 then + return + end + + local center = arenaCenters[battlefield:getArea()] + local distanceToCenter = mob:checkDistance(center.x, center.y, center.z) + if distanceToCenter < 1 then + enterFlight(mob) + else + mob:pathTo(center.x, center.y, center.z) + end + end + + -- Land at 33% HP + if animationSub == 1 then + if mob:getHPP() > 33 then + return + end + + exitFlight(mob) + enrage(mob) end end -entity.onMobDeath = function(mob, player, optParams) +entity.onMobMobskillChoose = function(mob, target, skillId) + if skillId == xi.mobSkill.FLAME_BLAST_ATTACK then + return 0 + end + + local skillList = {} + + -- Mid-flight. + if mob:getAnimationSub() == 1 then + table.insert(skillList, xi.mobSkill.FLAME_BLAST_1) + table.insert(skillList, xi.mobSkill.HURRICANE_WING_FLYING) + + -- Ground. + else + table.insert(skillList, xi.mobSkill.HURRICANE_WING_1) + table.insert(skillList, xi.mobSkill.SPIKE_FLAIL_1) + table.insert(skillList, xi.mobSkill.DRAGON_BREATH_1) + table.insert(skillList, xi.mobSkill.ABSOLUTE_TERROR_1) + table.insert(skillList, xi.mobSkill.HORRID_ROAR_1) + end + + return skillList[math.random(1, #skillList)] +end + +----------------------------------- +-- onMobDisengage - If in flight during disengage, exit flight +----------------------------------- +entity.onMobDisengage = function(mob) + if mob:getAnimationSub() == 1 then + exitFlight(mob) + mob:setLocalVar('forceFlight', 1) + end end return entity diff --git a/sql/mob_groups.sql b/sql/mob_groups.sql index aa0540be79e..fdf75df1bf1 100644 --- a/sql/mob_groups.sql +++ b/sql/mob_groups.sql @@ -10782,7 +10782,7 @@ INSERT INTO `mob_groups` VALUES (31,4526,146,'Zuu_Xowu_the_Darksmoke',0,128,0,39 INSERT INTO `mob_groups` VALUES (32,1601,146,'Gii_Jaha_the_Raucous',0,128,0,3600,0,0,NULL); INSERT INTO `mob_groups` VALUES (33,15,146,'Aa_Nawu_the_Thunderblade',0,128,0,4200,0,0,NULL); INSERT INTO `mob_groups` VALUES (34,4474,146,'Yoo_Mihi_the_Haze',0,128,0,4200,0,0,NULL); -INSERT INTO `mob_groups` VALUES (35,4385,146,'Wyrm',0,128,0,45000,15000,0,NULL); +INSERT INTO `mob_groups` VALUES (35,4385,146,'Wyrm',0,128,0,50000,15000,0,NULL); INSERT INTO `mob_groups` VALUES (36,1121,146,'Dromiceiomimus',0,128,0,0,0,0,NULL); INSERT INTO `mob_groups` VALUES (37,2467,146,'Macan_Gadangan',0,128,0,8000,8000,0,NULL); INSERT INTO `mob_groups` VALUES (38,1602,146,'Gilagoge_Tlugvi',0,128,0,9600,5000,0,NULL); diff --git a/sql/mob_skills.sql b/sql/mob_skills.sql index 60bc7ca060d..cc4f4f1713e 100644 --- a/sql/mob_skills.sql +++ b/sql/mob_skills.sql @@ -974,15 +974,15 @@ INSERT INTO `mob_skills` VALUES (946,648,'tachi_yukikaze',0,0.0,7.0,2000,0,4,0,0 INSERT INTO `mob_skills` VALUES (947,649,'tachi_gekko',0,0.0,7.0,2000,0,4,0,0,0,10,5,0); INSERT INTO `mob_skills` VALUES (948,650,'tachi_kasha',0,0.0,7.0,2000,0,4,0,0,0,11,2,0); -- INSERT INTO `mob_skills` VALUES (949,693,'flame_blast',0,0.0,7.0,2000,1500,4,0,0,0,0,0,0); -INSERT INTO `mob_skills` VALUES (950,652,'flame_blast_alt',0,0.0,18.0,2000,0,4,4,0,0,0,0,0); -- KS99_Wyrm regular airborne attack -INSERT INTO `mob_skills` VALUES (951,653,'hurricane_wing',1,0.0,30.0,2000,1500,4,0,0,0,0,0,0); +INSERT INTO `mob_skills` VALUES (950,652,'flame_blast_alt',0,0.0,20.0,2000,0,4,4,0,0,0,0,0); -- KS99_Wyrm regular airborne attack +INSERT INTO `mob_skills` VALUES (951,653,'hurricane_wing',1,0.0,30.0,2000,1400,4,0,0,0,0,0,0); INSERT INTO `mob_skills` VALUES (952,654,'spike_flail',2,30.0,30.0,2000,2000,4,0,0,4,0,0,0); -- Alliance only targeting version of spike flail -INSERT INTO `mob_skills` VALUES (953,655,'dragon_breath',4,0.0,18.0,2000,1500,4,0,0,0,0,0,0); +INSERT INTO `mob_skills` VALUES (953,655,'dragon_breath',4,0.0,18.0,2000,2000,4,0,0,0,0,0,0); INSERT INTO `mob_skills` VALUES (954,656,'touchdown',1,0.0,30.0,2000,0,4,@SKILLFLAG_ALWAYS_ANIMATE,0,0,0,0,0); -INSERT INTO `mob_skills` VALUES (955,657,'flame_blast',1,0.0,30.0,2000,1500,4,0,0,0,0,0,0); -- KS99_Wyrm airborne fire AoE -INSERT INTO `mob_skills` VALUES (956,658,'hurricane_wing_flying',1,0.0,30.0,2000,1500,4,0,0,0,0,0,0); -- KS99_Wyrm airborne Hurricane Wing -INSERT INTO `mob_skills` VALUES (957,659,'absolute_terror',0,0.0,18.0,4000,1500,4,0,0,0,0,0,0); -INSERT INTO `mob_skills` VALUES (958,660,'horrid_roar_1',0,0.0,18.0,4000,1500,4,0,0,0,0,0,0); +INSERT INTO `mob_skills` VALUES (955,657,'flame_blast',1,0.0,30.0,2000,1600,4,0,0,0,0,0,0); -- KS99_Wyrm airborne fire AoE +INSERT INTO `mob_skills` VALUES (956,658,'hurricane_wing_flying',1,0.0,30.0,2000,1400,4,0,0,0,0,0,0); -- KS99_Wyrm airborne Hurricane Wing +INSERT INTO `mob_skills` VALUES (957,659,'absolute_terror',0,0.0,18.0,4000,800,4,0,0,0,0,0,0); +INSERT INTO `mob_skills` VALUES (958,660,'horrid_roar_1',0,0.0,18.0,4000,800,4,0,0,0,0,0,0); -- INSERT INTO `mob_skills` VALUES (959,703,'sickle_slash',0,0.0,7.0,2000,1500,4,0,0,0,0,0,0); -- INSERT INTO `mob_skills` VALUES (960,704,'acid_spray',0,0.0,7.0,2000,1500,4,0,0,0,0,0,0); -- INSERT INTO `mob_skills` VALUES (961,705,'spider_web',0,0.0,7.0,2000,1500,4,0,0,0,0,0,0);