Skip to content

Commit

Permalink
Fix wings of fury mob logic
Browse files Browse the repository at this point in the history
Co-Authored-By: dallano <[email protected]>
  • Loading branch information
TracentEden and dallano committed Nov 5, 2024
1 parent fe5d3ee commit 61c11e5
Show file tree
Hide file tree
Showing 11 changed files with 67 additions and 12 deletions.
2 changes: 1 addition & 1 deletion documentation/battlefield_ids.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
18 changes: 18 additions & 0 deletions scripts/actions/mobskills/slipstream.lua
Original file line number Diff line number Diff line change
@@ -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
23 changes: 23 additions & 0 deletions scripts/actions/mobskills/turbulence.lua
Original file line number Diff line number Diff line change
@@ -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
1 change: 0 additions & 1 deletion scripts/battlefields/Ghelsba_Outpost/wings_of_fury.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
4 changes: 4 additions & 0 deletions scripts/zones/Ghelsba_Outpost/mobs/Colo-colo.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions scripts/zones/Ghelsba_Outpost/mobs/Furies.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
local entity = {}

entity.onMobSpawn = function(mob)
mob:setMobMod(xi.mobMod.SOUND_RANGE, 15)
mob:setMobMod(xi.mobMod.CHARMABLE, 1)
end

Expand Down
4 changes: 2 additions & 2 deletions sql/mob_groups.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions sql/mob_pools.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
12 changes: 11 additions & 1 deletion sql/mob_skill_lists.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions sql/mob_skills.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions sql/mob_spawn_points.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 61c11e5

Please sign in to comment.