diff --git a/modules/phoenix/sql/limbus/limbus_pools.sql b/modules/phoenix/sql/limbus/limbus_pools.sql index 3b1226fedf2..22ad5943948 100644 --- a/modules/phoenix/sql/limbus/limbus_pools.sql +++ b/modules/phoenix/sql/limbus/limbus_pools.sql @@ -145,29 +145,29 @@ INSERT INTO `mob_pools` VALUES (10677,'Armoury_Crate','Armoury_Crate',183,0x0000 -- ------------------------------------------------------------ -- SW Apollyon -INSERT INTO `mob_pools` VALUES (10615,'Fir_Bholg_thf_ev','Fir_Bholg',115,0x0500FE0300000000000000000000000000000000,6,6,4,240,100,0,1,1,1,18,0,0,507,131,8,0,0,0,0,115,115,NULL,NULL); -INSERT INTO `mob_pools` VALUES (10616,'Fir_Bholg_pld_gk','Fir_Bholg',115,0x0500100400000000000000000000000000000000,7,7,4,240,100,0,1,1,1,18,0,0,507,131,0,0,4,0,0,115,115,NULL,NULL); -INSERT INTO `mob_pools` VALUES (10617,'Fir_Bholg_sam_hm','Fir_Bholg',115,0x0500F40300000000000000000000000000000000,12,12,4,240,100,0,1,1,1,18,0,0,507,131,0,0,0,0,0,115,115,NULL,NULL); -INSERT INTO `mob_pools` VALUES (10618,'Fir_Bholg_rdm_mr','Fir_Bholg',115,0x0500080400000000000000000000000000000000,5,5,4,240,100,0,1,1,1,18,0,0,507,3,0,0,3,0,0,115,115,NULL,NULL); -INSERT INTO `mob_pools` VALUES (10619,'Fir_Bholg_blm_tt','Fir_Bholg',115,0x0500060400000000000000000000000000000000,4,4,4,240,100,0,1,1,1,18,0,0,507,131,0,0,2,0,0,115,115,NULL,NULL); -INSERT INTO `mob_pools` VALUES (10620,'Jidra','Jidra',245,0x00008B0100000000000000000000000000000000,1,1,7,240,100,0,1,1,1,16,0,0,659,135,0,0,0,0,256,245,245,NULL,NULL); -INSERT INTO `mob_pools` VALUES (10678,'Jidra','Jidra',245,0x00008B0100000000000000000000000000000000,1,1,7,240,100,0,1,1,1,16,0,0,659,135,0,0,0,0,256,245,245,NULL,NULL); -INSERT INTO `mob_pools` VALUES (10621,'Arboricole_Beetle','Arboricole_Beetle',49,0x0000980100000000000000000000000000000000,7,7,4,240,100,0,1,1,1,18,0,0,6540,1155,0,0,0,0,0,49,49,NULL,NULL); -INSERT INTO `mob_pools` VALUES (10622,'Arboricole_Crawler','Arboricole_Crawler',79,0x00008C0100000000000000000000000000000000,1,1,11,240,100,0,1,1,1,18,0,0,5199,1155,0,0,0,0,0,79,79,NULL,NULL); -INSERT INTO `mob_pools` VALUES (10623,'Arboricole_Hornet','Arboricole_Hornet',48,0x0000100100000000000000000000000000000000,1,1,5,240,100,0,1,0,1,18,0,0,4651,1155,8,0,0,0,0,48,48,NULL,NULL); -INSERT INTO `mob_pools` VALUES (10624,'Arboricole_Opo-opo','Arboricole_Opo-opo',188,0x0000A00100000000000000000000000000000000,1,1,7,200,100,0,1,1,1,16,0,0,1051,1155,0,0,0,0,0,188,188,NULL,NULL); -INSERT INTO `mob_pools` VALUES (10625,'Arboricole_Raven','Arboricole_Raven',55,0x0000BD0100000000000000000000000000000000,1,1,5,240,100,0,1,1,1,18,0,0,657,1155,0,0,0,0,0,55,55,NULL,NULL); -INSERT INTO `mob_pools` VALUES (10626,'Arboricole_Spider','Arboricole_Spider',235,0x0000360100000000000000000000000000000000,1,1,7,240,100,0,1,1,1,16,0,0,5027,1667,8,0,0,0,0,236,235,NULL,NULL); -INSERT INTO `mob_pools` VALUES (10627,'Apollyon_Sapling','Apollyon_Sapling',216,0x0000880100000000000000000000000000000000,1,1,7,240,100,0,1,1,1,16,0,0,3208,1155,0,0,0,0,256,216,216,NULL,NULL); -INSERT INTO `mob_pools` VALUES (10628,'Armoury_Crate','Armoury_Crate',183,0x0000030100000000000000000000000000000000,1,1,7,170,100,0,1,1,1,16,0,0,0,1155,8,0,0,0,0,183,183,NULL,NULL); -INSERT INTO `mob_pools` VALUES (10629,'Air_Elemental_A','Air_Elemental',99,0x00000A0000000000000000000000000000000000,4,5,12,240,100,0,1,0,0,0,658,0,112,1153,16,0,12,0,0,99,99,NULL,NULL); -INSERT INTO `mob_pools` VALUES (10630,'Dark_Elemental_A','Dark_Elemental',100,0x00000F0000000000000000000000000000000000,8,8,11,240,100,0,1,0,0,0,6208,0,291,129,16,0,18,0,0,100,100,NULL,NULL); -INSERT INTO `mob_pools` VALUES (10631,'Earth_Elemental_A','Earth_Elemental',101,0x00000B0000000000000000000000000000000000,4,5,12,240,100,0,1,0,0,16,648,0,508,1153,16,0,13,0,0,101,101,NULL,NULL); -INSERT INTO `mob_pools` VALUES (10632,'Fire_Elemental_A','Fire_Elemental',102,0x0000080000000000000000000000000000000000,4,5,12,240,100,0,1,0,0,0,36,0,1934,129,16,0,17,0,0,102,102,NULL,NULL); -INSERT INTO `mob_pools` VALUES (10633,'Ice_Elemental_A','Ice_Elemental',103,0x0000090000000000000000000000000000000000,4,5,12,240,100,0,1,0,0,0,54,0,764,1153,16,0,14,0,0,103,103,NULL,NULL); -INSERT INTO `mob_pools` VALUES (10634,'Light_Elemental_A','Light_Elemental',104,0x00000E0000000000000000000000000000000000,3,3,11,240,100,0,1,0,0,0,0,0,1710,129,16,0,19,0,0,104,104,NULL,NULL); -INSERT INTO `mob_pools` VALUES (10635,'Water_Elemental_A','Water_Elemental',106,0x00000C0000000000000000000000000000000000,4,5,12,240,100,0,1,0,0,0,256,0,343,129,16,0,15,0,0,106,106,NULL,NULL); -INSERT INTO `mob_pools` VALUES (10636,'Thunder_Elemental_A','Thunder_Elemental',105,0x00000D0000000000000000000000000000000000,4,5,12,240,100,0,1,0,0,0,264,0,291,129,16,0,16,0,0,105,105,NULL,NULL); +INSERT INTO `mob_pools` VALUES (10615,'Fir_Bholg_thf_ev','Fir_Bholg',115,0x0500FE0300000000000000000000000000000000,6,6,4,210,100,0,1,1,1,18,0,0,507,131,8,0,0,0,0,115,115,1,20); +INSERT INTO `mob_pools` VALUES (10616,'Fir_Bholg_pld_gk','Fir_Bholg',115,0x0500100400000000000000000000000000000000,7,7,4,210,100,0,1,1,1,18,0,0,507,131,0,0,4,0,0,115,115,1,20); +INSERT INTO `mob_pools` VALUES (10617,'Fir_Bholg_sam_hm','Fir_Bholg',115,0x0500F40300000000000000000000000000000000,12,12,4,240,100,0,1,1,1,18,0,0,507,131,0,0,0,0,0,115,115,1,17); +INSERT INTO `mob_pools` VALUES (10618,'Fir_Bholg_rdm_mr','Fir_Bholg',115,0x0500080400000000000000000000000000000000,5,5,4,240,100,0,1,1,1,18,0,0,507,3,0,0,3,0,0,115,115,1,17); +INSERT INTO `mob_pools` VALUES (10619,'Fir_Bholg_blm_tt','Fir_Bholg',115,0x0500060400000000000000000000000000000000,4,1,4,210,100,0,1,1,1,18,0,0,507,131,0,0,2,0,0,115,115,1,15); +INSERT INTO `mob_pools` VALUES (10620,'Jidra','Jidra',245,0x00008B0100000000000000000000000000000000,1,1,7,240,100,0,1,1,1,18,0,0,659,135,0,0,0,0,256,245,245,3,53); +INSERT INTO `mob_pools` VALUES (10678,'Jidra','Jidra',245,0x0000840100000000000000000000000000000000,1,1,7,240,100,0,1,1,1,18,0,0,659,135,0,0,0,0,256,245,245,1,37); +INSERT INTO `mob_pools` VALUES (10621,'Arboricole_Beetle','Arboricole_Beetle',49,0x0000980100000000000000000000000000000000,7,7,4,240,100,0,1,1,1,18,0,0,6540,1155,0,0,0,0,0,49,49,1,12); +INSERT INTO `mob_pools` VALUES (10622,'Arboricole_Crawler','Arboricole_Crawler',79,0x00008C0100000000000000000000000000000000,1,1,11,240,100,0,1,1,1,18,0,0,5199,1155,0,0,0,0,0,79,79,1,15); +INSERT INTO `mob_pools` VALUES (10623,'Arboricole_Hornet','Arboricole_Hornet',48,0x0000100100000000000000000000000000000000,1,1,5,240,100,0,1,0,1,18,0,0,4651,1155,8,0,0,0,0,48,48,1,10); +INSERT INTO `mob_pools` VALUES (10624,'Arboricole_Opo-opo','Arboricole_Opo-opo',188,0x0000A00100000000000000000000000000000000,1,1,7,200,100,0,1,1,1,18,0,0,1051,1155,0,0,0,0,0,188,188,1,18); +INSERT INTO `mob_pools` VALUES (10625,'Arboricole_Raven','Arboricole_Raven',55,0x0000BD0100000000000000000000000000000000,6,6,5,240,100,0,1,1,1,18,0,0,657,1155,0,0,0,0,0,55,55,1,20); +INSERT INTO `mob_pools` VALUES (10626,'Arboricole_Spider','Arboricole_Spider',235,0x0000360100000000000000000000000000000000,8,8,7,240,100,0,1,1,1,18,0,0,5027,1667,8,0,0,0,0,236,235,1,13); +INSERT INTO `mob_pools` VALUES (10627,'Apollyon_Sapling','Apollyon_Sapling',216,0x0000880100000000000000000000000000000000,1,1,7,240,100,0,1,1,1,18,0,0,3208,1155,0,0,0,0,256,216,216,1,12); +INSERT INTO `mob_pools` VALUES (10628,'Armoury_Crate','Armoury_Crate',183,0x0000030100000000000000000000000000000000,6,1,7,170,100,0,1,1,1,18,0,0,0,1155,8,0,0,0,0,183,183,1,12); +INSERT INTO `mob_pools` VALUES (10629,'Air_Elemental_A','Air_Elemental',99,0x00000A0000000000000000000000000000000000,4,4,12,240,100,0,1,0,0,18,658,0,112,1153,18,0,12,0,0,99,99,0,8); +INSERT INTO `mob_pools` VALUES (10630,'Dark_Elemental_A','Dark_Elemental',100,0x00000F0000000000000000000000000000000000,4,4,11,240,100,0,1,0,0,18,6208,0,291,129,16,0,18,0,0,100,100,0,8); +INSERT INTO `mob_pools` VALUES (10631,'Earth_Elemental_A','Earth_Elemental',101,0x00000B0000000000000000000000000000000000,4,4,12,240,100,0,1,0,0,18,648,0,508,1153,16,0,13,0,0,101,101,0,8); +INSERT INTO `mob_pools` VALUES (10632,'Fire_Elemental_A','Fire_Elemental',102,0x0000080000000000000000000000000000000000,4,4,12,240,100,0,1,0,0,18,36,0,1934,129,16,0,17,0,0,102,102,0,8); +INSERT INTO `mob_pools` VALUES (10633,'Ice_Elemental_A','Ice_Elemental',103,0x0000090000000000000000000000000000000000,4,4,12,240,100,0,1,0,0,18,54,0,764,1153,16,0,14,0,0,103,103,0,8); +INSERT INTO `mob_pools` VALUES (10634,'Light_Elemental_A','Light_Elemental',104,0x00000E0000000000000000000000000000000000,3,3,11,240,100,0,1,0,0,18,0,0,1710,129,16,0,19,0,0,104,104,0,8); +INSERT INTO `mob_pools` VALUES (10635,'Water_Elemental_A','Water_Elemental',106,0x00000C0000000000000000000000000000000000,4,4,12,240,100,0,1,0,0,18,256,0,343,129,16,0,15,0,0,106,106,0,8); +INSERT INTO `mob_pools` VALUES (10636,'Thunder_Elemental_A','Thunder_Elemental',105,0x00000D0000000000000000000000000000000000,4,4,12,240,100,0,1,0,0,18,264,0,291,129,16,0,16,0,0,105,105,0,8); -- NW Apollyon INSERT INTO `mob_pools` VALUES (10637,'Bardha','Bardha',121,0x0000700100000000000000000000000000000000,4,4,12,240,100,0,1,1,1,16,0,0,970,131,0,0,28,0,256,121,121,NULL,NULL); diff --git a/scripts/battlefields/Apollyon/sw_apollyon.lua b/scripts/battlefields/Apollyon/sw_apollyon.lua index 5f179c7b003..512e82b0333 100644 --- a/scripts/battlefields/Apollyon/sw_apollyon.lua +++ b/scripts/battlefields/Apollyon/sw_apollyon.lua @@ -37,6 +37,9 @@ function content:onBattlefieldRegister(player, battlefield) end battlefield:setLocalVar('initiatorRace', race) + + -- Randomize whether door opens first (0) or crates spawn first (1) + battlefield:setLocalVar('doorFirst', math.random(0, 1)) end content.sections = @@ -58,18 +61,18 @@ content.sections = } } -local checkRaceVortex = function(mobRace, battlefield, mob) +local checkRaceEvent = function(mobRace, isFirstKill, battlefield, mob) local race = battlefield:getLocalVar('initiatorRace') - if race == mobRace then - content:openDoor(mob:getBattlefield(), 1) + if race ~= mobRace then + return end -end -local checkRaceCrates = function(mobRace, battlefield, mob) - local race = battlefield:getLocalVar('initiatorRace') + local doorFirst = battlefield:getLocalVar('doorFirst') == 0 - if race == mobRace then + if doorFirst == isFirstKill then + content:openDoor(mob:getBattlefield(), 1) + else npcUtil.showCrate(GetNPCByID(ID.SW_APOLLYON.npc.ITEM_CRATES[1])) npcUtil.showCrate(GetNPCByID(ID.SW_APOLLYON.npc.TIME_CRATES[1])) xi.limbus.showRecoverCrate(ID.SW_APOLLYON.npc.RECOVER_CRATES[1]) @@ -237,51 +240,51 @@ content.groups = { mobs = { 'Fir_Bholg_THF' }, stationary = false, - randomDeath = utils.bind(checkRaceVortex, xi.race.ELVAAN_M), - allDeath = utils.bind(checkRaceCrates, xi.race.ELVAAN_M), + randomDeath = utils.bind(checkRaceEvent, xi.race.ELVAAN_M, true), + allDeath = utils.bind(checkRaceEvent, xi.race.ELVAAN_M, false), }, { mobs = { 'Fir_Bholg_PLD' }, stationary = false, - randomDeath = utils.bind(checkRaceVortex, xi.race.GALKA), - allDeath = utils.bind(checkRaceCrates, xi.race.GALKA), + randomDeath = utils.bind(checkRaceEvent, xi.race.GALKA, true), + allDeath = utils.bind(checkRaceEvent, xi.race.GALKA, false), }, { mobs = { 'Fir_Bholg_SAM' }, stationary = false, - randomDeath = utils.bind(checkRaceVortex, xi.race.HUME_M), - allDeath = utils.bind(checkRaceCrates, xi.race.HUME_M), + randomDeath = utils.bind(checkRaceEvent, xi.race.HUME_M, true), + allDeath = utils.bind(checkRaceEvent, xi.race.HUME_M, false), }, { mobs = { 'Fir_Bholg_RDM' }, stationary = false, - randomDeath = utils.bind(checkRaceVortex, xi.race.MITHRA), - allDeath = utils.bind(checkRaceCrates, xi.race.MITHRA), + randomDeath = utils.bind(checkRaceEvent, xi.race.MITHRA, true), + allDeath = utils.bind(checkRaceEvent, xi.race.MITHRA, false), }, { mobs = { 'Fir_Bholg_BLM' }, stationary = false, - randomDeath = utils.bind(checkRaceVortex, xi.race.TARU_M), - allDeath = utils.bind(checkRaceCrates, xi.race.TARU_M), + randomDeath = utils.bind(checkRaceEvent, xi.race.TARU_M, true), + allDeath = utils.bind(checkRaceEvent, xi.race.TARU_M, false), }, -- Floor 2 { mobs = { 'Jidra_Boss' }, - mobMods = { [xi.mobMod.DONT_ROAM_HOME] = 1 }, - death = function(battlefield, mob, count) + stationary = true, + death = function(battlefield, mob, count) content:openDoor(battlefield, 2) end, }, { mobs = { 'Jidra' }, - mobMods = { [xi.mobMod.DONT_ROAM_HOME] = 1 }, - setup = function(battlefield, mobs) + stationary = true, + setup = function(battlefield, mobs) local positions = { { x = -222.52, y = -0.50, z = -414.11, rot = 38 }, @@ -298,13 +301,21 @@ content.groups = for i, mob in ipairs(mobs) do local position = positions[i] - mob:setPos(position.x, position.y, position.z, position.rot) + mob:setSpawn(position.x, position.y, position.z, position.rot) + + mob:timer(1000, function(mobArg) + mobArg:setPos(position.x, position.y, position.z, position.rot) + end) end local position = positions[#positions] - local mob = GetMobByID(ID.mob.SW_BOSS_JIDRA) - if mob then - mob:setPos(position.x, position.y, position.z, position.rot) + local bossMob = GetMobByID(ID.mob.SW_BOSS_JIDRA) + if bossMob then + bossMob:setSpawn(position.x, position.y, position.z, position.rot) + + bossMob:timer(1000, function(mobArg) + mobArg:setPos(position.x, position.y, position.z, position.rot) + end) end end, @@ -340,6 +351,22 @@ content.groups = }, spawned = false, + stationary = true, + setup = function(battlefield, mobs) + -- Select one mob to have buffed HP + local buffableMobs = {} + for _, mob in ipairs(mobs) do + local name = mob:getName() + if name ~= 'Arboricole_Raven' then + table.insert(buffableMobs, mob) + end + end + + local buffedMob = buffableMobs[math.random(#buffableMobs)] + buffedMob:setMaxHP(8500) + buffedMob:setHP(8500) + end, + death = function(battlefield, mob, count) if count == 7 then npcUtil.showCrate(GetNPCByID(ID.SW_APOLLYON.npc.ITEM_CRATES[2])) @@ -351,20 +378,12 @@ content.groups = -- Floor 3 { - mobs = { 'Armoury_Crate_Mimic' }, - mobMods = - { - [xi.mobMod.NO_MOVE ] = 1, - [xi.mobMod.NO_DESPAWN] = 1, - [xi.mobMod.NO_AGGRO ] = 1, - }, - + mobs = { 'Armoury_Crate_Mimic' }, setup = function(battlefield, mobs) local shuffled = utils.shuffle(mobs) shuffled[1]:setLocalVar('time', 1) shuffled[2]:setLocalVar('item', 1) shuffled[3]:setLocalVar('recover', 1) - shuffled[4]:setLocalVar('vortex', 1) for _, mob in ipairs(mobs) do mob:hideName(true) @@ -372,6 +391,7 @@ content.groups = mob:setMobMod(xi.mobMod.NO_AGGRO, 1) mob:setMobMod(xi.mobMod.NO_LINK, 1) mob:setAnimationSub(0) + mob:setMobFlags(0) -- Clear MonsterFlag bit to prevent ranged attacks local swapWithCrate = function(crate) crate:setPos(mob:getXPos(), mob:getYPos(), mob:getZPos(), mob:getRotPos()) @@ -394,6 +414,7 @@ content.groups = mob:setStatus(xi.status.UPDATE) mob:setAnimationSub(1) mob:setMobMod(xi.mobMod.NO_AGGRO, 0) + mob:setMobFlags(1) -- Set MonsterFlag bit to enable combat mob:updateClaim(player) end end) @@ -401,8 +422,9 @@ content.groups = end, death = function(battlefield, mob) - if mob:getLocalVar('vortex') == 1 then - content:openDoor(mob:getBattlefield(), 3) + if battlefield:getLocalVar('floor3DoorOpened') == 0 then + battlefield:setLocalVar('floor3DoorOpened', 1) + content:openDoor(battlefield, 3) end end }, @@ -471,19 +493,19 @@ content.loot = { { quantity = 5, - { itemId = xi.item.ANCIENT_BEASTCOIN, weight = xi.loot.weight.NORMAL }, + { itemId = xi.item.ANCIENT_BEASTCOIN, weight = xi.loot.weight.NORMAL }, }, { - { itemId = xi.item.NONE, weight = xi.loot.weight.NORMAL }, - { itemId = xi.item.ANCIENT_BEASTCOIN, weight = xi.loot.weight.NORMAL }, + { itemId = xi.item.NONE, weight = xi.loot.weight.NORMAL }, + { itemId = xi.item.ANCIENT_BEASTCOIN, weight = xi.loot.weight.NORMAL }, }, { - { itemId = xi.item.ANCIENT_BRASS_INGOT, weight = xi.loot.weight.NORMAL }, - { itemId = xi.item.SPOOL_OF_DIABOLIC_YARN, weight = xi.loot.weight.NORMAL }, - { itemId = xi.item.FETID_LANOLIN_CUBE, weight = xi.loot.weight.NORMAL }, - { itemId = xi.item.GOLD_STUD, weight = xi.loot.weight.NORMAL }, + { itemId = xi.item.ANCIENT_BRASS_INGOT, weight = xi.loot.weight.NORMAL }, + { itemId = xi.item.SPOOL_OF_DIABOLIC_YARN, weight = xi.loot.weight.NORMAL }, + { itemId = xi.item.FETID_LANOLIN_CUBE, weight = xi.loot.weight.NORMAL }, + -- { itemId = xi.item.GOLD_STUD, weight = xi.loot.weight.NORMAL }, }, { @@ -499,27 +521,27 @@ content.loot = { { quantity = 5, - { itemId = xi.item.ANCIENT_BEASTCOIN, weight = xi.loot.weight.NORMAL }, + { itemId = xi.item.ANCIENT_BEASTCOIN, weight = xi.loot.weight.NORMAL }, }, { - { itemId = xi.item.NONE, weight = xi.loot.weight.NORMAL }, - { itemId = xi.item.ANCIENT_BEASTCOIN, weight = xi.loot.weight.NORMAL }, + { itemId = xi.item.NONE, weight = xi.loot.weight.NORMAL }, + { itemId = xi.item.ANCIENT_BEASTCOIN, weight = xi.loot.weight.NORMAL }, }, { - { itemId = xi.item.SPOOL_OF_LIGHT_FILAMENT, weight = xi.loot.weight.NORMAL }, - { itemId = xi.item.BLACK_RIVET, weight = xi.loot.weight.NORMAL }, - { itemId = xi.item.BLUE_RIVET, weight = xi.loot.weight.NORMAL }, - { itemId = xi.item.ELECTRUM_STUD, weight = xi.loot.weight.NORMAL }, + { itemId = xi.item.SPOOL_OF_LIGHT_FILAMENT, weight = xi.loot.weight.NORMAL }, + { itemId = xi.item.BLACK_RIVET, weight = xi.loot.weight.NORMAL }, + { itemId = xi.item.BLUE_RIVET, weight = xi.loot.weight.NORMAL }, + -- { itemId = xi.item.ELECTRUM_STUD, weight = xi.loot.weight.NORMAL }, }, { - { itemId = xi.item.NONE, weight = xi.loot.weight.VERY_HIGH }, - { itemId = xi.item.SPOOL_OF_DIABOLIC_YARN, weight = xi.loot.weight.LOW }, - { itemId = xi.item.FETID_LANOLIN_CUBE, weight = xi.loot.weight.LOW }, - { itemId = xi.item.SQUARE_OF_ASTRAL_LEATHER, weight = xi.loot.weight.LOW }, - { itemId = xi.item.SQUARE_OF_CANVAS_TOILE, weight = xi.loot.weight.LOW }, + { itemId = xi.item.NONE, weight = xi.loot.weight.VERY_HIGH }, + { itemId = xi.item.SPOOL_OF_DIABOLIC_YARN, weight = xi.loot.weight.LOW }, + { itemId = xi.item.FETID_LANOLIN_CUBE, weight = xi.loot.weight.LOW }, + { itemId = xi.item.SQUARE_OF_ASTRAL_LEATHER, weight = xi.loot.weight.LOW }, + { itemId = xi.item.SQUARE_OF_CANVAS_TOILE, weight = xi.loot.weight.LOW }, }, }, @@ -527,20 +549,20 @@ content.loot = { { quantity = 5, - { itemId = xi.item.ANCIENT_BEASTCOIN, weight = xi.loot.weight.NORMAL }, + { itemId = xi.item.ANCIENT_BEASTCOIN, weight = xi.loot.weight.NORMAL }, }, { quantity = 2, - { itemId = xi.item.NONE, weight = xi.loot.weight.NORMAL }, - { itemId = xi.item.ANCIENT_BEASTCOIN, weight = xi.loot.weight.NORMAL }, + { itemId = xi.item.NONE, weight = xi.loot.weight.NORMAL }, + { itemId = xi.item.ANCIENT_BEASTCOIN, weight = xi.loot.weight.NORMAL }, }, { - { itemId = xi.item.SQUARE_OF_CARDINAL_CLOTH, weight = xi.loot.weight.NORMAL }, - { itemId = xi.item.WHITE_RIVET, weight = xi.loot.weight.NORMAL }, - { itemId = xi.item.SQUARE_OF_BROWN_DOESKIN, weight = xi.loot.weight.NORMAL }, - { itemId = xi.item.SQUARE_OF_CANVAS_TOILE, weight = xi.loot.weight.NORMAL }, + { itemId = xi.item.SQUARE_OF_CARDINAL_CLOTH, weight = xi.loot.weight.NORMAL }, + { itemId = xi.item.WHITE_RIVET, weight = xi.loot.weight.NORMAL }, + { itemId = xi.item.SQUARE_OF_BROWN_DOESKIN, weight = xi.loot.weight.NORMAL }, + { itemId = xi.item.SQUARE_OF_CANVAS_TOILE, weight = xi.loot.weight.NORMAL }, }, { @@ -552,24 +574,24 @@ content.loot = }, { - { itemId = xi.item.NONE, weight = xi.loot.weight.VERY_HIGH }, - { itemId = xi.item.BLACK_RIVET, weight = xi.loot.weight.LOW }, - { itemId = xi.item.SHEET_OF_KUROGANE, weight = xi.loot.weight.LOW }, - { itemId = xi.item.BLUE_RIVET, weight = xi.loot.weight.LOW }, - { itemId = xi.item.GOLD_STUD, weight = xi.loot.weight.LOW }, + { itemId = xi.item.NONE, weight = xi.loot.weight.VERY_HIGH }, + { itemId = xi.item.BLACK_RIVET, weight = xi.loot.weight.LOW }, + { itemId = xi.item.SHEET_OF_KUROGANE, weight = xi.loot.weight.LOW }, + { itemId = xi.item.BLUE_RIVET, weight = xi.loot.weight.LOW }, + -- { itemId = xi.item.GOLD_STUD, weight = xi.loot.weight.LOW }, }, { quantity = 2, - { itemId = xi.item.NONE, weight = xi.loot.weight.VERY_HIGH }, - { itemId = xi.item.CHUNK_OF_ADAMAN_ORE, weight = xi.loot.weight.VERY_LOW }, - { itemId = xi.item.HANDFUL_OF_CLOT_PLASMA, weight = xi.loot.weight.VERY_LOW }, - { itemId = xi.item.DARKSTEEL_SHEET, weight = xi.loot.weight.VERY_LOW }, - { itemId = xi.item.CHUNK_OF_DARKSTEEL_ORE, weight = xi.loot.weight.VERY_LOW }, - { itemId = xi.item.PIECE_OF_OXBLOOD, weight = xi.loot.weight.VERY_LOW }, - { itemId = xi.item.LIGHT_STEEL_INGOT, weight = xi.loot.weight.VERY_LOW }, - { itemId = xi.item.SPOOL_OF_RAINBOW_THREAD, weight = xi.loot.weight.VERY_LOW }, - { itemId = xi.item.PONZE_OF_SHELL_POWDER, weight = xi.loot.weight.VERY_LOW }, + { itemId = xi.item.NONE, weight = xi.loot.weight.VERY_HIGH }, + { itemId = xi.item.CHUNK_OF_ADAMAN_ORE, weight = xi.loot.weight.VERY_LOW }, + { itemId = xi.item.HANDFUL_OF_CLOT_PLASMA, weight = xi.loot.weight.VERY_LOW }, + { itemId = xi.item.DARKSTEEL_SHEET, weight = xi.loot.weight.VERY_LOW }, + { itemId = xi.item.CHUNK_OF_DARKSTEEL_ORE, weight = xi.loot.weight.VERY_LOW }, + { itemId = xi.item.PIECE_OF_OXBLOOD, weight = xi.loot.weight.VERY_LOW }, + { itemId = xi.item.LIGHT_STEEL_INGOT, weight = xi.loot.weight.VERY_LOW }, + { itemId = xi.item.SPOOL_OF_RAINBOW_THREAD, weight = xi.loot.weight.VERY_LOW }, + { itemId = xi.item.PONZE_OF_SHELL_POWDER, weight = xi.loot.weight.VERY_LOW }, }, }, @@ -577,7 +599,7 @@ content.loot = { { quantity = 5, - { itemId = xi.item.ANCIENT_BEASTCOIN, weight = xi.loot.weight.NORMAL }, + { itemId = xi.item.ANCIENT_BEASTCOIN, weight = xi.loot.weight.NORMAL }, }, { @@ -595,20 +617,20 @@ content.loot = }, { - { itemId = xi.item.NONE, weight = xi.loot.weight.VERY_HIGH }, - { itemId = xi.item.SQUARE_OF_CARDINAL_CLOTH, weight = xi.loot.weight.LOW }, - { itemId = xi.item.WHITE_RIVET, weight = xi.loot.weight.LOW }, - { itemId = xi.item.SQUARE_OF_BROWN_DOESKIN, weight = xi.loot.weight.LOW }, - { itemId = xi.item.ELECTRUM_STUD, weight = xi.loot.weight.LOW }, + { itemId = xi.item.NONE, weight = xi.loot.weight.VERY_HIGH }, + { itemId = xi.item.SQUARE_OF_CARDINAL_CLOTH, weight = xi.loot.weight.LOW }, + { itemId = xi.item.WHITE_RIVET, weight = xi.loot.weight.LOW }, + { itemId = xi.item.SQUARE_OF_BROWN_DOESKIN, weight = xi.loot.weight.LOW }, + -- { itemId = xi.item.ELECTRUM_STUD, weight = xi.loot.weight.LOW }, }, { - { itemId = xi.item.CHARCOAL_CHIP, weight = xi.loot.weight.NORMAL }, + { itemId = xi.item.CHARCOAL_CHIP, weight = xi.loot.weight.NORMAL }, }, { - { itemId = xi.item.NONE, weight = xi.loot.weight.VERY_HIGH }, - { itemId = xi.item.METAL_CHIP, weight = xi.loot.weight.VERY_LOW }, + { itemId = xi.item.NONE, weight = xi.loot.weight.VERY_HIGH }, + { itemId = xi.item.METAL_CHIP, weight = xi.loot.weight.VERY_LOW }, }, }, } diff --git a/scripts/zones/Apollyon/mobs/Air_Elemental.lua b/scripts/zones/Apollyon/mobs/Air_Elemental.lua new file mode 100644 index 00000000000..a208915a703 --- /dev/null +++ b/scripts/zones/Apollyon/mobs/Air_Elemental.lua @@ -0,0 +1,18 @@ +----------------------------------- +-- Area: Apollyon SW +-- Mob: Air Elemental +----------------------------------- +---@type TMobEntity +local entity = {} + +entity.onMobInitialize = function(mob) + mob:addImmunity(xi.immunity.LIGHT_SLEEP) + mob:addImmunity(xi.immunity.GRAVITY) + mob:addImmunity(xi.immunity.SILENCE) + mob:addImmunity(xi.immunity.SLOW) + mob:addImmunity(xi.immunity.ELEGY) + mob:addImmunity(xi.immunity.TERROR) + mob:addImmunity(xi.immunity.PETRIFY) +end + +return entity diff --git a/scripts/zones/Apollyon/mobs/Apollyon_Sapling.lua b/scripts/zones/Apollyon/mobs/Apollyon_Sapling.lua new file mode 100644 index 00000000000..ec0f127d23d --- /dev/null +++ b/scripts/zones/Apollyon/mobs/Apollyon_Sapling.lua @@ -0,0 +1,19 @@ +----------------------------------- +-- Area: Apollyon SW +-- Mob: Apollyon Sapling +----------------------------------- +---@type TMobEntity +local entity = {} + +entity.onMobInitialize = function(mob) + mob:addImmunity(xi.immunity.PLAGUE) + mob:addImmunity(xi.immunity.TERROR) + mob:addImmunity(xi.immunity.LIGHT_SLEEP) + mob:setMod(xi.mod.UDMGBREATH, -2500) +end + +entity.onMobSpawn = function(mob) + mob:setMobMod(xi.mobMod.BASE_DAMAGE_MULTIPLIER, 150) +end + +return entity diff --git a/scripts/zones/Apollyon/mobs/Arboricole_Beetle.lua b/scripts/zones/Apollyon/mobs/Arboricole_Beetle.lua new file mode 100644 index 00000000000..aa779ef049b --- /dev/null +++ b/scripts/zones/Apollyon/mobs/Arboricole_Beetle.lua @@ -0,0 +1,18 @@ +----------------------------------- +-- Area: Apollyon SW +-- Mob: Arboricole Beetle +----------------------------------- +---@type TMobEntity +local entity = {} + +entity.onMobInitialize = function(mob) + mob:addImmunity(xi.immunity.PLAGUE) + mob:addImmunity(xi.immunity.TERROR) + mob:addImmunity(xi.immunity.LIGHT_SLEEP) +end + +entity.onMobSpawn = function(mob) + mob:setMobMod(xi.mobMod.BASE_DAMAGE_MULTIPLIER, 150) +end + +return entity diff --git a/scripts/zones/Apollyon/mobs/Arboricole_Crawler.lua b/scripts/zones/Apollyon/mobs/Arboricole_Crawler.lua new file mode 100644 index 00000000000..b4a3e22ede6 --- /dev/null +++ b/scripts/zones/Apollyon/mobs/Arboricole_Crawler.lua @@ -0,0 +1,18 @@ +----------------------------------- +-- Area: Apollyon SW +-- Mob: Arboricole Crawler +----------------------------------- +---@type TMobEntity +local entity = {} + +entity.onMobInitialize = function(mob) + mob:addImmunity(xi.immunity.PLAGUE) + mob:addImmunity(xi.immunity.TERROR) + mob:addImmunity(xi.immunity.LIGHT_SLEEP) +end + +entity.onMobSpawn = function(mob) + mob:setMobMod(xi.mobMod.BASE_DAMAGE_MULTIPLIER, 150) +end + +return entity diff --git a/scripts/zones/Apollyon/mobs/Arboricole_Hornet.lua b/scripts/zones/Apollyon/mobs/Arboricole_Hornet.lua new file mode 100644 index 00000000000..7c0a97b4b2a --- /dev/null +++ b/scripts/zones/Apollyon/mobs/Arboricole_Hornet.lua @@ -0,0 +1,18 @@ +----------------------------------- +-- Area: Apollyon SW +-- Mob: Arboricole Hornet +----------------------------------- +---@type TMobEntity +local entity = {} + +entity.onMobInitialize = function(mob) + mob:addImmunity(xi.immunity.PLAGUE) + mob:addImmunity(xi.immunity.TERROR) + mob:addImmunity(xi.immunity.LIGHT_SLEEP) +end + +entity.onMobSpawn = function(mob) + mob:setMobMod(xi.mobMod.BASE_DAMAGE_MULTIPLIER, 150) +end + +return entity diff --git a/scripts/zones/Apollyon/mobs/Arboricole_Opo-opo.lua b/scripts/zones/Apollyon/mobs/Arboricole_Opo-opo.lua new file mode 100644 index 00000000000..a14d75e281e --- /dev/null +++ b/scripts/zones/Apollyon/mobs/Arboricole_Opo-opo.lua @@ -0,0 +1,18 @@ +----------------------------------- +-- Area: Apollyon SW +-- Mob: Arboricole Opo-opo +----------------------------------- +---@type TMobEntity +local entity = {} + +entity.onMobInitialize = function(mob) + mob:addImmunity(xi.immunity.PLAGUE) + mob:addImmunity(xi.immunity.TERROR) + mob:addImmunity(xi.immunity.LIGHT_SLEEP) +end + +entity.onMobSpawn = function(mob) + mob:setMobMod(xi.mobMod.BASE_DAMAGE_MULTIPLIER, 150) +end + +return entity diff --git a/scripts/zones/Apollyon/mobs/Arboricole_Raven.lua b/scripts/zones/Apollyon/mobs/Arboricole_Raven.lua new file mode 100644 index 00000000000..2a7cc72c637 --- /dev/null +++ b/scripts/zones/Apollyon/mobs/Arboricole_Raven.lua @@ -0,0 +1,18 @@ +----------------------------------- +-- Area: Apollyon SW +-- Mob: Arboricole Raven +----------------------------------- +---@type TMobEntity +local entity = {} + +entity.onMobInitialize = function(mob) + mob:addImmunity(xi.immunity.PLAGUE) + mob:addImmunity(xi.immunity.TERROR) + mob:addImmunity(xi.immunity.LIGHT_SLEEP) +end + +entity.onMobSpawn = function(mob) + mob:setMobMod(xi.mobMod.BASE_DAMAGE_MULTIPLIER, 150) +end + +return entity diff --git a/scripts/zones/Apollyon/mobs/Arboricole_Spider.lua b/scripts/zones/Apollyon/mobs/Arboricole_Spider.lua new file mode 100644 index 00000000000..7c8cfbaea36 --- /dev/null +++ b/scripts/zones/Apollyon/mobs/Arboricole_Spider.lua @@ -0,0 +1,23 @@ +----------------------------------- +-- Area: Apollyon SW +-- Mob: Arboricole Spider +----------------------------------- +---@type TMobEntity +local entity = {} + +entity.onMobInitialize = function(mob) + mob:addImmunity(xi.immunity.PLAGUE) + mob:addImmunity(xi.immunity.TERROR) + mob:addImmunity(xi.immunity.LIGHT_SLEEP) + mob:setMobMod(xi.mobMod.ADD_EFFECT, 1) +end + +entity.onMobSpawn = function(mob) + mob:setMobMod(xi.mobMod.BASE_DAMAGE_MULTIPLIER, 150) +end + +entity.onAdditionalEffect = function(mob, target, damage) + return xi.mob.onAddEffect(mob, target, damage, xi.mob.ae.HP_DRAIN) +end + +return entity diff --git a/scripts/zones/Apollyon/mobs/Armoury_Crate_Mimic.lua b/scripts/zones/Apollyon/mobs/Armoury_Crate_Mimic.lua index b618dd7d53e..5260ba846c4 100644 --- a/scripts/zones/Apollyon/mobs/Armoury_Crate_Mimic.lua +++ b/scripts/zones/Apollyon/mobs/Armoury_Crate_Mimic.lua @@ -5,7 +5,34 @@ ---@type TMobEntity local entity = {} +entity.onMobInitialize = function(mob) + mob:addImmunity(xi.immunity.DARK_SLEEP) + mob:setMod(xi.mod.SLASH_SDT, -5000) + mob:setMod(xi.mod.PIERCE_SDT, -5000) + mob:setMod(xi.mod.IMPACT_SDT, -5000) + mob:setMod(xi.mod.HTH_SDT, -5000) +end + +entity.onMobSpawn = function(mob) + mob:setMobMod(xi.mobMod.NO_MOVE, 1) + mob:setMobMod(xi.mobMod.NO_DESPAWN, 1) + mob:setMobMod(xi.mobMod.NO_AGGRO, 1) + mob:setMod(xi.mod.MDEF, 50) +end + entity.onMobFight = function(mob, target) + -- Ignore pets, redirect to master + if target:isPet() then + local master = target:getMaster() + + if master and master:isAlive() then + mob:resetEnmity(target) + mob:updateEnmity(master) + + return + end + end + local distance = mob:checkDistance(target) local drawInTable = { diff --git a/scripts/zones/Apollyon/mobs/Dark_Elemental.lua b/scripts/zones/Apollyon/mobs/Dark_Elemental.lua new file mode 100644 index 00000000000..f7e0f3cd181 --- /dev/null +++ b/scripts/zones/Apollyon/mobs/Dark_Elemental.lua @@ -0,0 +1,17 @@ +----------------------------------- +-- Area: Apollyon SW +-- Mob: Dark Elemental +----------------------------------- +---@type TMobEntity +local entity = {} + +entity.onMobInitialize = function(mob) + mob:addImmunity(xi.immunity.BLIND) + mob:addImmunity(xi.immunity.DARK_SLEEP) + mob:addImmunity(xi.immunity.LIGHT_SLEEP) + mob:addImmunity(xi.immunity.SILENCE) + mob:addImmunity(xi.immunity.TERROR) + mob:addImmunity(xi.immunity.PETRIFY) +end + +return entity diff --git a/scripts/zones/Apollyon/mobs/Earth_Elemental.lua b/scripts/zones/Apollyon/mobs/Earth_Elemental.lua new file mode 100644 index 00000000000..9565758302d --- /dev/null +++ b/scripts/zones/Apollyon/mobs/Earth_Elemental.lua @@ -0,0 +1,17 @@ +----------------------------------- +-- Area: Apollyon SW +-- Mob: Earth Elemental +----------------------------------- +---@type TMobEntity +local entity = {} + +entity.onMobInitialize = function(mob) + mob:addImmunity(xi.immunity.STUN) + mob:addImmunity(xi.immunity.SILENCE) + mob:addImmunity(xi.immunity.SLOW) + mob:addImmunity(xi.immunity.ELEGY) + mob:addImmunity(xi.immunity.TERROR) + mob:addImmunity(xi.immunity.PETRIFY) +end + +return entity diff --git a/scripts/zones/Apollyon/mobs/Fir_Bholg_BLM.lua b/scripts/zones/Apollyon/mobs/Fir_Bholg_BLM.lua index 8378c0491fb..a0b636fd7c6 100644 --- a/scripts/zones/Apollyon/mobs/Fir_Bholg_BLM.lua +++ b/scripts/zones/Apollyon/mobs/Fir_Bholg_BLM.lua @@ -7,7 +7,16 @@ mixins = { require('scripts/mixins/job_special') } ---@type TMobEntity local entity = {} +entity.onMobInitialize = function(mob) + mob:addImmunity(xi.immunity.PLAGUE) + mob:addImmunity(xi.immunity.TERROR) +end + entity.onMobSpawn = function(mob) + mob:setMobMod(xi.mobMod.NO_STANDBACK, 1) + mob:setMod(xi.mod.MDEF, 100) + mob:setMobMod(xi.mobMod.BASE_DAMAGE_MULTIPLIER, 150) + xi.mix.jobSpecial.config(mob, { specials = { @@ -16,7 +25,19 @@ entity.onMobSpawn = function(mob) }) end -entity.onMobDeath = function(mob, player, optParams) +entity.onMobMobskillChoose = function(mob) + -- TODO: Migrate to upstream mob_skills.lua + local tpList = + { + 241, -- NETHERSPIKES + 242, -- CARNAL_NIGHTMARE + 243, -- AEGIS_SCHISM + 244, -- DANCING_CHAINS + xi.mobSkill.BARBED_CRESCENT_1, + 248, -- FOXFIRE + } + + return tpList[math.random(1, #tpList)] end return entity diff --git a/scripts/zones/Apollyon/mobs/Fir_Bholg_PLD.lua b/scripts/zones/Apollyon/mobs/Fir_Bholg_PLD.lua index 8668c41a8f6..05f9f5282eb 100644 --- a/scripts/zones/Apollyon/mobs/Fir_Bholg_PLD.lua +++ b/scripts/zones/Apollyon/mobs/Fir_Bholg_PLD.lua @@ -7,7 +7,14 @@ mixins = { require('scripts/mixins/job_special') } ---@type TMobEntity local entity = {} +entity.onMobInitialize = function(mob) + mob:addImmunity(xi.immunity.PLAGUE) + mob:addImmunity(xi.immunity.TERROR) +end + entity.onMobSpawn = function(mob) + mob:setMobMod(xi.mobMod.BASE_DAMAGE_MULTIPLIER, 150) + xi.mix.jobSpecial.config(mob, { specials = { @@ -16,7 +23,19 @@ entity.onMobSpawn = function(mob) }) end -entity.onMobDeath = function(mob, player, optParams) +entity.onMobMobskillChoose = function(mob) + -- TODO: Migrate to upstream mob_skills.lua + local tpList = + { + 241, -- NETHERSPIKES + 242, -- CARNAL_NIGHTMARE + 243, -- AEGIS_SCHISM + 244, -- DANCING_CHAINS + xi.mobSkill.BARBED_CRESCENT_1, + 247, -- FOXFIRE + } + + return tpList[math.random(1, #tpList)] end return entity diff --git a/scripts/zones/Apollyon/mobs/Fir_Bholg_RDM.lua b/scripts/zones/Apollyon/mobs/Fir_Bholg_RDM.lua index 5d6c85bae9f..2a5fd5f41f1 100644 --- a/scripts/zones/Apollyon/mobs/Fir_Bholg_RDM.lua +++ b/scripts/zones/Apollyon/mobs/Fir_Bholg_RDM.lua @@ -7,7 +7,15 @@ mixins = { require('scripts/mixins/job_special') } ---@type TMobEntity local entity = {} +entity.onMobInitialize = function(mob) + mob:addImmunity(xi.immunity.PLAGUE) + mob:addImmunity(xi.immunity.TERROR) +end + entity.onMobSpawn = function(mob) + mob:setMod(xi.mod.MDEF, 212) + mob:setMobMod(xi.mobMod.BASE_DAMAGE_MULTIPLIER, 150) + xi.mix.jobSpecial.config(mob, { specials = { @@ -16,7 +24,19 @@ entity.onMobSpawn = function(mob) }) end -entity.onMobDeath = function(mob, player, optParams) +entity.onMobMobskillChoose = function(mob) + -- TODO: Migrate to upstream mob_skills.lua + local tpList = + { + 241, -- NETHERSPIKES + 242, -- CARNAL_NIGHTMARE + 243, -- AEGIS_SCHISM + 244, -- DANCING_CHAINS + xi.mobSkill.BARBED_CRESCENT_1, + 247, -- FOXFIRE + } + + return tpList[math.random(1, #tpList)] end return entity diff --git a/scripts/zones/Apollyon/mobs/Fir_Bholg_SAM.lua b/scripts/zones/Apollyon/mobs/Fir_Bholg_SAM.lua index e5e86a1c6e6..11b292894e3 100644 --- a/scripts/zones/Apollyon/mobs/Fir_Bholg_SAM.lua +++ b/scripts/zones/Apollyon/mobs/Fir_Bholg_SAM.lua @@ -7,7 +7,14 @@ mixins = { require('scripts/mixins/job_special') } ---@type TMobEntity local entity = {} +entity.onMobInitialize = function(mob) + mob:addImmunity(xi.immunity.PLAGUE) + mob:addImmunity(xi.immunity.TERROR) +end + entity.onMobSpawn = function(mob) + mob:setMobMod(xi.mobMod.BASE_DAMAGE_MULTIPLIER, 150) + xi.mix.jobSpecial.config(mob, { specials = { @@ -16,7 +23,19 @@ entity.onMobSpawn = function(mob) }) end -entity.onMobDeath = function(mob, player, optParams) +entity.onMobMobskillChoose = function(mob) + -- TODO: Migrate to upstream mob_skills.lua + local tpList = + { + 241, -- NETHERSPIKES + 242, -- CARNAL_NIGHTMARE + 243, -- AEGIS_SCHISM + 244, -- DANCING_CHAINS + xi.mobSkill.BARBED_CRESCENT_1, + 248, -- GRIM_HALO + } + + return tpList[math.random(1, #tpList)] end return entity diff --git a/scripts/zones/Apollyon/mobs/Fir_Bholg_THF.lua b/scripts/zones/Apollyon/mobs/Fir_Bholg_THF.lua index fdb51c41697..69c13ea5cda 100644 --- a/scripts/zones/Apollyon/mobs/Fir_Bholg_THF.lua +++ b/scripts/zones/Apollyon/mobs/Fir_Bholg_THF.lua @@ -7,7 +7,14 @@ mixins = { require('scripts/mixins/job_special') } ---@type TMobEntity local entity = {} +entity.onMobInitialize = function(mob) + mob:addImmunity(xi.immunity.PLAGUE) + mob:addImmunity(xi.immunity.TERROR) +end + entity.onMobSpawn = function(mob) + mob:setMobMod(xi.mobMod.BASE_DAMAGE_MULTIPLIER, 150) + xi.mix.jobSpecial.config(mob, { specials = { @@ -16,7 +23,19 @@ entity.onMobSpawn = function(mob) }) end -entity.onMobDeath = function(mob, player, optParams) +entity.onMobMobskillChoose = function(mob) + -- TODO: Migrate to upstream mob_skills.lua + local tpList = + { + 241, -- NETHERSPIKES + 242, -- CARNAL_NIGHTMARE + 243, -- AEGIS_SCHISM + 244, -- DANCING_CHAINS + xi.mobSkill.BARBED_CRESCENT_1, + 247, -- FOXFIRE + } + + return tpList[math.random(1, #tpList)] end return entity diff --git a/scripts/zones/Apollyon/mobs/Fire_Elemental.lua b/scripts/zones/Apollyon/mobs/Fire_Elemental.lua new file mode 100644 index 00000000000..49363e01efd --- /dev/null +++ b/scripts/zones/Apollyon/mobs/Fire_Elemental.lua @@ -0,0 +1,17 @@ +----------------------------------- +-- Area: Apollyon SW +-- Mob: Fire Elemental +----------------------------------- +---@type TMobEntity +local entity = {} + +entity.onMobInitialize = function(mob) + mob:addImmunity(xi.immunity.BIND) + mob:addImmunity(xi.immunity.PARALYZE) + mob:addImmunity(xi.immunity.SILENCE) + mob:addImmunity(xi.immunity.LIGHT_SLEEP) + mob:addImmunity(xi.immunity.TERROR) + mob:addImmunity(xi.immunity.PETRIFY) +end + +return entity diff --git a/scripts/zones/Apollyon/mobs/Ice_Elemental.lua b/scripts/zones/Apollyon/mobs/Ice_Elemental.lua new file mode 100644 index 00000000000..482bf2a342f --- /dev/null +++ b/scripts/zones/Apollyon/mobs/Ice_Elemental.lua @@ -0,0 +1,18 @@ +----------------------------------- +-- Area: Apollyon SW +-- Mob: Ice Elemental +----------------------------------- +---@type TMobEntity +local entity = {} + +entity.onMobInitialize = function(mob) + mob:addImmunity(xi.immunity.GRAVITY) + mob:addImmunity(xi.immunity.BIND) + mob:addImmunity(xi.immunity.SILENCE) + mob:addImmunity(xi.immunity.PARALYZE) + mob:addImmunity(xi.immunity.LIGHT_SLEEP) + mob:addImmunity(xi.immunity.TERROR) + mob:addImmunity(xi.immunity.PETRIFY) +end + +return entity diff --git a/scripts/zones/Apollyon/mobs/Jidra.lua b/scripts/zones/Apollyon/mobs/Jidra.lua new file mode 100644 index 00000000000..e051c60fbba --- /dev/null +++ b/scripts/zones/Apollyon/mobs/Jidra.lua @@ -0,0 +1,20 @@ +----------------------------------- +-- Area: Apollyon SW +-- Mob: Jidra +----------------------------------- +---@type TMobEntity +local entity = {} + +entity.onMobInitialize = function(mob) + mob:addImmunity(xi.immunity.PLAGUE) + mob:addImmunity(xi.immunity.TERROR) + mob:addImmunity(xi.immunity.LIGHT_SLEEP) + mob:setMod(xi.mod.UDMGBREATH, -2500) +end + +entity.onMobSpawn = function(mob) + mob:setMobMod(xi.mobMod.ROAM_DISTANCE, 0) + mob:setMobMod(xi.mobMod.BASE_DAMAGE_MULTIPLIER, 200) +end + +return entity diff --git a/scripts/zones/Apollyon/mobs/Jidra_Boss.lua b/scripts/zones/Apollyon/mobs/Jidra_Boss.lua new file mode 100644 index 00000000000..5b9dea210b1 --- /dev/null +++ b/scripts/zones/Apollyon/mobs/Jidra_Boss.lua @@ -0,0 +1,21 @@ +----------------------------------- +-- Area: Apollyon SW +-- Mob: Jidra (Boss) +----------------------------------- +---@type TMobEntity +local entity = {} + +entity.onMobInitialize = function(mob) + mob:addImmunity(xi.immunity.PLAGUE) + mob:addImmunity(xi.immunity.TERROR) + mob:addImmunity(xi.immunity.BIND) + mob:setMod(xi.mod.UDMGBREATH, -2500) +end + +entity.onMobSpawn = function(mob) + mob:setMobMod(xi.mobMod.ROAM_DISTANCE, 0) + mob:setMod(xi.mod.DEF, 750) + mob:setMobMod(xi.mobMod.BASE_DAMAGE_MULTIPLIER, 250) +end + +return entity diff --git a/scripts/zones/Apollyon/mobs/Light_Elemental.lua b/scripts/zones/Apollyon/mobs/Light_Elemental.lua new file mode 100644 index 00000000000..e7e88cf27ad --- /dev/null +++ b/scripts/zones/Apollyon/mobs/Light_Elemental.lua @@ -0,0 +1,15 @@ +----------------------------------- +-- Area: Apollyon SW +-- Mob: Light Elemental +----------------------------------- +---@type TMobEntity +local entity = {} + +entity.onMobInitialize = function(mob) + mob:addImmunity(xi.immunity.SILENCE) + mob:addImmunity(xi.immunity.LIGHT_SLEEP) + mob:addImmunity(xi.immunity.TERROR) + mob:addImmunity(xi.immunity.PETRIFY) +end + +return entity diff --git a/scripts/zones/Apollyon/mobs/Thunder_Elemental.lua b/scripts/zones/Apollyon/mobs/Thunder_Elemental.lua new file mode 100644 index 00000000000..3ef32a31c78 --- /dev/null +++ b/scripts/zones/Apollyon/mobs/Thunder_Elemental.lua @@ -0,0 +1,17 @@ +----------------------------------- +-- Area: Apollyon SW +-- Mob: Thunder Elemental +----------------------------------- +---@type TMobEntity +local entity = {} + +entity.onMobInitialize = function(mob) + mob:addImmunity(xi.immunity.STUN) + mob:addImmunity(xi.immunity.POISON) + mob:addImmunity(xi.immunity.SILENCE) + mob:addImmunity(xi.immunity.LIGHT_SLEEP) + mob:addImmunity(xi.immunity.TERROR) + mob:addImmunity(xi.immunity.PETRIFY) +end + +return entity diff --git a/scripts/zones/Apollyon/mobs/Water_Elemental.lua b/scripts/zones/Apollyon/mobs/Water_Elemental.lua new file mode 100644 index 00000000000..f81cd6d303b --- /dev/null +++ b/scripts/zones/Apollyon/mobs/Water_Elemental.lua @@ -0,0 +1,16 @@ +----------------------------------- +-- Area: Apollyon SW +-- Mob: Water Elemental +----------------------------------- +---@type TMobEntity +local entity = {} + +entity.onMobInitialize = function(mob) + mob:addImmunity(xi.immunity.POISON) + mob:addImmunity(xi.immunity.SILENCE) + mob:addImmunity(xi.immunity.LIGHT_SLEEP) + mob:addImmunity(xi.immunity.TERROR) + mob:addImmunity(xi.immunity.PETRIFY) +end + +return entity