From 61c11e5184f95b85fea1ce9490302492fd85a433 Mon Sep 17 00:00:00 2001 From: TracentEden <92269743+TracentEden@users.noreply.github.com> Date: Mon, 4 Nov 2024 22:01:53 +0200 Subject: [PATCH] Fix wings of fury mob logic Co-Authored-By: dallano --- documentation/battlefield_ids.txt | 2 +- scripts/actions/mobskills/slipstream.lua | 18 +++++++++++++++ scripts/actions/mobskills/turbulence.lua | 23 +++++++++++++++++++ .../Ghelsba_Outpost/wings_of_fury.lua | 1 - .../zones/Ghelsba_Outpost/mobs/Colo-colo.lua | 4 ++++ scripts/zones/Ghelsba_Outpost/mobs/Furies.lua | 1 + sql/mob_groups.sql | 4 ++-- sql/mob_pools.sql | 4 ++-- sql/mob_skill_lists.sql | 12 +++++++++- sql/mob_skills.sql | 4 ++-- sql/mob_spawn_points.sql | 6 ++--- 11 files changed, 67 insertions(+), 12 deletions(-) create mode 100644 scripts/actions/mobskills/slipstream.lua create mode 100644 scripts/actions/mobskills/turbulence.lua diff --git a/documentation/battlefield_ids.txt b/documentation/battlefield_ids.txt index 9172573316a..9a1715daeda 100644 --- a/documentation/battlefield_ids.txt +++ b/documentation/battlefield_ids.txt @@ -244,7 +244,7 @@ local battlefields = { { 0, 32, 0 }, -- Save the Children (San d'Oria 1-3) { 1, 33, 0 }, -- The Holy Crest (Quest) - { 2, 34, 1551 }, -- Wings of Fury (BS20) -- TODO: mobskills Slipstream and Turbulence + { 2, 34, 1551 }, -- Wings of Fury (BS20) { 3, 35, 1552 }, -- Petrifying Pair (BS30) { 4, 36, 1552 }, -- Toadal Recall (BS30) -- TODO: shroom-in-cap mechanic -- { 5, 37, 0 }, -- Mirror, Mirror (Quest) diff --git a/scripts/actions/mobskills/slipstream.lua b/scripts/actions/mobskills/slipstream.lua new file mode 100644 index 00000000000..16ba9e68cfa --- /dev/null +++ b/scripts/actions/mobskills/slipstream.lua @@ -0,0 +1,18 @@ +----------------------------------- +-- Slipstream +-- Reduces accuracy of targets in area of effect +----------------------------------- +---@type TMobSkill +local mobskillObject = {} + +mobskillObject.onMobSkillCheck = function(target, mob, skill) + return 0 +end + +mobskillObject.onMobWeaponSkill = function(target, mob, skill) + skill:setMsg(xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.ACCURACY_DOWN, 25, 0, math.random(120, 180))) + + return xi.effect.ACCURACY_DOWN +end + +return mobskillObject diff --git a/scripts/actions/mobskills/turbulence.lua b/scripts/actions/mobskills/turbulence.lua new file mode 100644 index 00000000000..5e8616219fe --- /dev/null +++ b/scripts/actions/mobskills/turbulence.lua @@ -0,0 +1,23 @@ +----------------------------------- +-- Turbulence +-- Deals wind based damage in an area of effect +----------------------------------- +---@type TMobSkill +local mobskillObject = {} + +mobskillObject.onMobSkillCheck = function(target, mob, skill) + return 0 +end + +mobskillObject.onMobWeaponSkill = function(target, mob, skill) + local damage = mob:getWeaponDmg() * 3 + + damage = xi.mobskills.mobMagicalMove(mob, target, skill, damage, xi.element.WIND, 1, 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) + + return damage +end + +return mobskillObject diff --git a/scripts/battlefields/Ghelsba_Outpost/wings_of_fury.lua b/scripts/battlefields/Ghelsba_Outpost/wings_of_fury.lua index 14005b6cf08..ec8940e994f 100644 --- a/scripts/battlefields/Ghelsba_Outpost/wings_of_fury.lua +++ b/scripts/battlefields/Ghelsba_Outpost/wings_of_fury.lua @@ -22,7 +22,6 @@ local content = Battlefield:new({ }, }) --- TODO: MobSkills Slipstream and Turbulence need to be implemented/applied. content:addEssentialMobs({ 'Colo-colo', 'Furies' }) content.loot = diff --git a/scripts/zones/Ghelsba_Outpost/mobs/Colo-colo.lua b/scripts/zones/Ghelsba_Outpost/mobs/Colo-colo.lua index eb8f16c1d6f..d0a229b7243 100644 --- a/scripts/zones/Ghelsba_Outpost/mobs/Colo-colo.lua +++ b/scripts/zones/Ghelsba_Outpost/mobs/Colo-colo.lua @@ -6,6 +6,10 @@ ---@type TMobEntity local entity = {} +entity.onMobSpawn = function(mob) + mob:setMobMod(xi.mobMod.SOUND_RANGE, 15) +end + entity.onMobDeath = function(mob, player, optParams) end diff --git a/scripts/zones/Ghelsba_Outpost/mobs/Furies.lua b/scripts/zones/Ghelsba_Outpost/mobs/Furies.lua index 35ed63a2f61..77d532137e4 100644 --- a/scripts/zones/Ghelsba_Outpost/mobs/Furies.lua +++ b/scripts/zones/Ghelsba_Outpost/mobs/Furies.lua @@ -7,6 +7,7 @@ local entity = {} entity.onMobSpawn = function(mob) + mob:setMobMod(xi.mobMod.SOUND_RANGE, 15) mob:setMobMod(xi.mobMod.CHARMABLE, 1) end diff --git a/sql/mob_groups.sql b/sql/mob_groups.sql index 76da1e3a168..118c0c24c44 100644 --- a/sql/mob_groups.sql +++ b/sql/mob_groups.sql @@ -10066,8 +10066,8 @@ INSERT INTO `mob_groups` VALUES (23,3023,140,'Orcish_Neckchopper',330,0,1928,0,0 INSERT INTO `mob_groups` VALUES (24,3899,140,'Thousandarm_Deshglesh',0,32,2400,400,0,11,13,0); INSERT INTO `mob_groups` VALUES (25,1513,140,'Ghelsba_Pugil',330,0,975,0,0,3,6,0); INSERT INTO `mob_groups` VALUES (26,884,140,'Cyranuce_M_Cutauleon',0,128,0,0,0,20,20,0); -INSERT INTO `mob_groups` VALUES (27,766,140,'Colo-colo',0,128,0,0,0,20,20,0); -INSERT INTO `mob_groups` VALUES (28,1441,140,'Furies',0,128,0,0,0,20,20,0); +INSERT INTO `mob_groups` VALUES (27,766,140,'Colo-colo',0,128,0,1000,0,20,20,0); +INSERT INTO `mob_groups` VALUES (28,1441,140,'Furies',0,128,0,750,0,20,20,0); INSERT INTO `mob_groups` VALUES (29,2181,140,'Kalamainu',0,128,0,0,0,30,30,0); INSERT INTO `mob_groups` VALUES (30,2227,140,'Kilioa',0,128,0,0,0,30,30,0); INSERT INTO `mob_groups` VALUES (31,3937,140,'Toadpillow',0,128,0,0,0,30,30,0); diff --git a/sql/mob_pools.sql b/sql/mob_pools.sql index f9bfde9784c..d8da936c732 100644 --- a/sql/mob_pools.sql +++ b/sql/mob_pools.sql @@ -819,7 +819,7 @@ INSERT INTO `mob_pools` VALUES (762,'Coinbiter_Cjaknokk','Coinbiter_Cjaknokk',33 INSERT INTO `mob_pools` VALUES (763,'Cointeach','Cointeach',73,0x0000310700000000000000000000000000000000,4,1,11,240,100,0,1,0,0,0,0,0,579,131,0,0,2,0,0,0,73); INSERT INTO `mob_pools` VALUES (764,'Cold_Gigas','Cold_Gigas',126,0x0000C40200000000000000000000000000000000,1,1,11,240,100,0,1,0,1,0,0,0,4773,131,0,0,0,0,0,126,126); INSERT INTO `mob_pools` VALUES (765,'Colibri','Colibri',72,0x0000B80600000000000000000000000000000000,5,5,2,220,100,0,0,0,0,0,0,0,99,131,0,0,0,0,0,72,72); -INSERT INTO `mob_pools` VALUES (766,'Colo-colo','Colo-colo',46,0x0000010100000000000000000000000000000000,8,8,7,240,100,0,1,0,1,18,0,0,0,3,0,0,59,0,0,46,46); +INSERT INTO `mob_pools` VALUES (766,'Colo-colo','Colo-colo',46,0x0000010100000000000000000000000000000000,8,8,7,240,100,0,1,0,1,18,0,0,0,3,0,0,59,0,0,2014,46); INSERT INTO `mob_pools` VALUES (767,'Colorful_Leshy','Colorful_Leshy',245,0x0000870100000000000000000000000000000000,1,1,7,240,100,0,1,0,0,2,0,0,0,133,0,0,0,0,0,245,245); INSERT INTO `mob_pools` VALUES (768,'Colorful_Treant','Colorful_Treant',245,0x0000870100000000000000000000000000000000,1,1,7,240,100,0,1,0,0,0,0,0,0,133,0,0,0,0,0,245,245); INSERT INTO `mob_pools` VALUES (769,'Colossal_Calamari','Colossal_Calamari',218,0x0000600100000000000000000000000000000000,2,2,7,360,100,0,1,0,0,0,0,0,449,131,0,0,0,0,0,218,218); @@ -1494,7 +1494,7 @@ INSERT INTO `mob_pools` VALUES (1437,'Funereal_Apkallu','Funereal_Apkallu',27,0x INSERT INTO `mob_pools` VALUES (1438,'Fungus_Beetle','Fungus_Beetle',49,0x0000980100000000000000000000000000000000,7,7,3,240,100,0,0,0,1,2,6144,0,0,133,0,0,0,0,0,49,49); INSERT INTO `mob_pools` VALUES (1439,'Funnel_Antlion','Funnel_Antlion',357,0x0000440500000000000000000000000000000000,1,8,3,240,100,512,1,0,0,0,0,0,0,2179,4,0,0,24,128,357,357); INSERT INTO `mob_pools` VALUES (1440,'Funnel_Bats_BO','Funnel_Bats_BO',47,0x0000040100000000000000000000000000000000,1,1,11,240,100,0,1,0,1,0,0,64,133,643,8,0,0,0,0,47,47); -INSERT INTO `mob_pools` VALUES (1441,'Furies','Furies',47,0x0000040100000000000000000000000000000000,6,8,3,240,100,0,1,0,1,16,0,0,0,3,0,0,60,0,0,47,47); +INSERT INTO `mob_pools` VALUES (1441,'Furies','Furies',47,0x0000040100000000000000000000000000000000,6,8,3,240,100,0,1,0,1,16,0,0,0,3,0,0,60,0,0,2015,47); INSERT INTO `mob_pools` VALUES (1442,'Fusty_Gnole','Fusty_Gnole',132,0x0000F10700000000000000000000000000000000,2,2,1,480,100,0,0,0,1,0,0,0,184,131,5,0,0,0,0,132,132); INSERT INTO `mob_pools` VALUES (1443,'Fyuu_the_Seabellow','Fyuu_the_Seabellow',213,0x00003A0500000000000000000000000000000000,10,10,5,240,100,0,1,0,1,2,0,0,0,0,0,0,6,0,0,213,213); INSERT INTO `mob_pools` VALUES (1444,'Gabblox_Magpietongue','Gabblox_Magpietongue',373,0x00003F0400000000000000000000000000000000,5,5,3,240,100,0,1,0,1,2,0,32,0,159,0,0,3,0,0,373,373); diff --git a/sql/mob_skill_lists.sql b/sql/mob_skill_lists.sql index b0b1a56ba3f..063821d64ec 100644 --- a/sql/mob_skill_lists.sql +++ b/sql/mob_skill_lists.sql @@ -3930,7 +3930,17 @@ INSERT INTO `mob_skill_lists` VALUES ('Avatar_Ifrit_WTB',2013,844); -- Waking th INSERT INTO `mob_skill_lists` VALUES ('Avatar_Ifrit_WTB',2013,845); -- Waking the Beast, fire iv INSERT INTO `mob_skill_lists` VALUES ('Avatar_Ifrit_WTB',2013,847); -- Waking the Beast, meteor_strike --- Next available ID: 2014 +INSERT INTO `mob_skill_lists` VALUES ('Colo-Colo',2014,392); -- ultrasonics +INSERT INTO `mob_skill_lists` VALUES ('Colo-Colo',2014,394); -- blood_drain +INSERT INTO `mob_skill_lists` VALUES ('Colo-Colo',2014,1155); -- subsonics +INSERT INTO `mob_skill_lists` VALUES ('Colo-Colo',2014,1156); -- marrow_drain + +INSERT INTO `mob_skill_lists` VALUES ('Furies',2015,395); -- jetstream +INSERT INTO `mob_skill_lists` VALUES ('Furies',2015,393); -- sonic_boom +INSERT INTO `mob_skill_lists` VALUES ('Furies',2015,1157); -- slipstream +INSERT INTO `mob_skill_lists` VALUES ('Furies',2015,1158); -- turbulence + +-- Next available ID: 2016 -- ------------------------------------------------------------ -- Start of Ambuscade section diff --git a/sql/mob_skills.sql b/sql/mob_skills.sql index 300037b55d6..52404c571b2 100644 --- a/sql/mob_skills.sql +++ b/sql/mob_skills.sql @@ -1171,8 +1171,8 @@ INSERT INTO `mob_skills` VALUES (1151,314,'eagle_eye_shot',0,0.0,25.0,2000,0,4,2 -- INSERT INTO `mob_skills` VALUES (1154,898,'ranged_attack',0,0.0,7.0,2000,1500,4,4,0,0,0,0,0); INSERT INTO `mob_skills` VALUES (1155,337,'subsonics',1,0.0,16.0,2000,1500,4,0,0,0,0,0,0); INSERT INTO `mob_skills` VALUES (1156,338,'marrow_drain',0,0.0,7.0,2000,1500,4,0,0,0,0,0,0); --- INSERT INTO `mob_skills` VALUES (1157,339,'slipstream',0,0.0,7.0,2000,1500,4,0,0,0,0,0,0); --- INSERT INTO `mob_skills` VALUES (1158,340,'turbulence',0,0.0,7.0,2000,1500,4,0,0,0,0,0,0); +INSERT INTO `mob_skills` VALUES (1157,339,'slipstream',1,0.0,7.0,2000,1500,4,0,0,0,0,0,0); +INSERT INTO `mob_skills` VALUES (1158,340,'turbulence',1,0.0,7.0,2000,1500,4,0,0,0,0,0,0); -- INSERT INTO `mob_skills` VALUES (1159,903,'broadside_barrage',0,0.0,7.0,2000,1500,4,0,0,0,0,0,0); -- INSERT INTO `mob_skills` VALUES (1160,904,'blind_side_barrage',0,0.0,7.0,2000,1500,4,0,0,0,0,0,0); -- INSERT INTO `mob_skills` VALUES (1161,343,'damnation_dive',0,0.0,7.0,2000,1500,4,0,0,1,0,0,0); diff --git a/sql/mob_spawn_points.sql b/sql/mob_spawn_points.sql index c3bca4aa3fc..01a79867634 100644 --- a/sql/mob_spawn_points.sql +++ b/sql/mob_spawn_points.sql @@ -50768,9 +50768,9 @@ INSERT INTO `mob_spawn_points` VALUES (17350927,'Cheiroptera','Cheiroptera',19,1 INSERT INTO `mob_spawn_points` VALUES (17350928,'Cyranuce_M_Cutauleon','Cyranuce M Cutauleon',26,-189.000,-10.000,45.000,95); -- Wings of Fury -INSERT INTO `mob_spawn_points` VALUES (17350929,'Colo-colo','Colo-colo',27,-188.000,-10.000,45.000,127); -INSERT INTO `mob_spawn_points` VALUES (17350930,'Furies','Furies',28,-185.000,-10.000,48.000,127); -INSERT INTO `mob_spawn_points` VALUES (17350931,'Furies','Furies',28,-191.000,-10.000,51.000,127); +INSERT INTO `mob_spawn_points` VALUES (17350929,'Colo-colo','Colo-colo',27,-188.97,-10.58,46.15,112); +INSERT INTO `mob_spawn_points` VALUES (17350930,'Furies','Furies',28,-181.60,-10.48,46.38,102); +INSERT INTO `mob_spawn_points` VALUES (17350931,'Furies','Furies',28,-186.19,-10.94,52.07,92); -- Petrifying Pair INSERT INTO `mob_spawn_points` VALUES (17350933,'Kalamainu','Kalamainu',29,-184.401,-10.514,45.113,103);