Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interaction - Battlefields: Ghelsba Outpost, Ru'Hmet, Full Moon Fountain, Boneyard Gully #5871

Merged
merged 12 commits into from
Jun 1, 2024
84 changes: 84 additions & 0 deletions scripts/battlefields/Boneyard_Gully/head_wind.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
-----------------------------------
-- Head Wind
-- Boneyard Gully mission battlefield
-----------------------------------
local boneyardGullyID = zones[xi.zone.BONEYARD_GULLY]
-----------------------------------

local content = BattlefieldMission:new({
zoneId = xi.zone.BONEYARD_GULLY,
battlefieldId = xi.battlefield.id.HEAD_WIND,
isMission = true,
maxPlayers = 6,
levelCap = 50,
timeLimit = utils.minutes(30),
index = 0,
entryNpc = '_081',
exitNpcs = { '_082', '_084', '_086' },

missionArea = xi.mission.log_id.COP,
mission = xi.mission.id.cop.THREE_PATHS,
missionStatus = xi.mission.status.COP.ULMIA,
missionStatusArea = xi.mission.log_id.COP,
requiredMissionStatus = 7,

grantXP = 1000,
title = xi.title.DELTA_ENFORCER,
})

content.groups =
{
{
mobIds =
{
{
boneyardGullyID.mob.SHIKAREE_Z,
boneyardGullyID.mob.SHIKAREE_Z + 1,
boneyardGullyID.mob.SHIKAREE_Z + 2,
},

{
boneyardGullyID.mob.SHIKAREE_Z + 5,
boneyardGullyID.mob.SHIKAREE_Z + 6,
boneyardGullyID.mob.SHIKAREE_Z + 7,
},

{
boneyardGullyID.mob.SHIKAREE_Z + 10,
boneyardGullyID.mob.SHIKAREE_Z + 11,
boneyardGullyID.mob.SHIKAREE_Z + 12,
},
},

superlinkGroup = 1,
allDeath = function(battlefield, mob)
battlefield:setStatus(xi.battlefield.status.WON)
end,
},

{
mobIds =
{
{ boneyardGullyID.mob.SHIKAREE_Z + 4 },
{ boneyardGullyID.mob.SHIKAREE_Z + 9, },
{ boneyardGullyID.mob.SHIKAREE_Z + 14, },
},

superlinkGroup = 1,
},

-- NOTE: Rabbit is spawned on start, but wyvern is a result of an on engage action.
{
mobIds =
{
{ boneyardGullyID.mob.SHIKAREE_Z + 3 },
{ boneyardGullyID.mob.SHIKAREE_Z + 8 },
{ boneyardGullyID.mob.SHIKAREE_Z + 13 },
},

superlinkGroup = 1,
spawned = false,
},
}

return content:register()
59 changes: 59 additions & 0 deletions scripts/battlefields/Boneyard_Gully/like_the_wind.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
-----------------------------------
-- Like the Wind
-- Boneyard Gully ENM, Miasma Filter
-- !addkeyitem MIASMA_FILTER
-----------------------------------

local content = Battlefield:new({
zoneId = xi.zone.BONEYARD_GULLY,
battlefieldId = xi.battlefield.id.LIKE_THE_WIND,
maxPlayers = 18,
levelCap = 75,
timeLimit = utils.minutes(15),
index = 1,
entryNpc = '_081',
exitNpcs = { '_082', '_084', '_086' },
requiredKeyItems = { xi.ki.MIASMA_FILTER },

grantXP = 2000,

experimental = true,
})

-- TODO: Race Runner has a constant movement mechanic and different hate rules that need
-- to be implemented. See: https://ffxiclopedia.fandom.com/wiki/Like_the_Wind

content:addEssentialMobs({ 'Race_Runner' })

content.loot =
{
{
{ item = xi.item.NONE, weight = 140 }, -- nothing
{ item = xi.item.POT_OF_VIRIDIAN_URUSHI, weight = 310 }, -- Viridian Urushi
{ item = xi.item.SQUARE_OF_GALATEIA, weight = 241 }, -- Square of Galateia
{ item = xi.item.SQUARE_OF_KEJUSU_SATIN, weight = 310 }, -- Kejusu Satin
},

{
{ item = xi.item.NONE, weight = 862 }, -- nothing
{ item = xi.item.CLOUD_EVOKER, weight = 138 }, -- Cloud Evoker
},

{
{ item = xi.item.NONE, weight = 380 }, -- nothing
{ item = xi.item.MANEATER, weight = 138 }, -- Maneater
{ item = xi.item.WAGH_BAGHNAKHS, weight = 172 }, -- Wagh Baghnakhs
{ item = xi.item.ONIMARU, weight = 138 }, -- Onimaru
{ item = xi.item.SCROLL_OF_ARMYS_PAEON_V, weight = 172 }, -- Army's Paeon V
},

{
{ item = xi.item.NONE, weight = 380 }, -- nothing
{ item = xi.item.MANEATER, weight = 138 }, -- Maneater
{ item = xi.item.WAGH_BAGHNAKHS, weight = 172 }, -- Wagh Baghnakhs
{ item = xi.item.ONIMARU, weight = 138 }, -- Onimaru
{ item = xi.item.SCROLL_OF_ARMYS_PAEON_V, weight = 172 }, -- Army's Paeon V
},
}

return content:register()
151 changes: 151 additions & 0 deletions scripts/battlefields/Boneyard_Gully/sheep_in_antlions_clothing.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
-----------------------------------
-- Sheep in Antlion's Clothing
-- Boneyard Gully ENM, Miasma Filter
-- !addkeyitem MIASMA_FILTER
-----------------------------------
local boneyardGullyID = zones[xi.zone.BONEYARD_GULLY]
-----------------------------------

local content = Battlefield:new({
zoneId = xi.zone.BONEYARD_GULLY,
battlefieldId = xi.battlefield.id.SHEEP_IN_ANTLIONS_CLOTHING,
maxPlayers = 18,
levelCap = 75,
timeLimit = utils.minutes(15),
index = 2,
entryNpc = '_081',
exitNpcs = { '_082', '_084', '_086' },
requiredKeyItems = { xi.ki.MIASMA_FILTER },
armouryCrates =
{
boneyardGullyID.mob.TUCHULCHA + 4,
boneyardGullyID.mob.TUCHULCHA + 9,
boneyardGullyID.mob.TUCHULCHA + 14,
},

grantXP = 2500,
})

-- TODO: Tuchulcha mob script needs refactoring, and a common method
-- to store these IDs without duplicated code (and _not_ in IDs.lua) is
-- needed.

local antlionPositions =
{
[1] =
{
{ -517, 0, -521, 171 },
{ -534, 0, -460, 171 },
{ -552, 2.2, -440, 171 },
{ -572, -3.6, -464, 171 },
{ -573, 2.2, -427, 171 },
{ -562, 0, -484, 171 },
{ -593, 0, -480, 171 },
{ -610, -1.5, -490, 171 },
},

[2] =
{
{ 43, 0, 40, 7 },
{ 26, 0, 100, 7 },
{ 7, 2.2, 118, 7 },
{ -13, -3.6, 95, 7 },
{ -13, 2.2, 133, 7 },
{ -2.3, 0, 76, 7 },
{ -33, 0, 79, 7 },
{ -54, -1.5, 67, 7 },
},

[3] =
{
{ 522, 0, 521, 240 },
{ 506, 0, 580, 240 },
{ 466, 2.2, 614, 240 },
{ 467, -3.6, 57, 240 },
{ 488, 2.2, 598, 240 },
{ 478, 0, 557, 240 },
{ 446, 0, 558, 240 },
{ 430, -1.5, 550, 240 },
},
}

function content:setupBattlefield(battlefield)
local battlefieldArea = battlefield:getArea()
local selectedPositions = utils.permgen(#antlionPositions[battlefieldArea])

-- Set the Hunter Spawn locations
for mobNum = 1, 3 do
GetMobByID(content.groups[2].mobIds[battlefieldArea][mobNum]):setPos(antlionPositions[battlefieldArea][selectedPositions[mobNum]])
end

-- Select Tuchulcha's sandpit positions
local tuchulcha = GetMobByID(content.groups[1].mobIds[battlefieldArea][1])
tuchulcha:setLocalVar('sand_pit1', selectedPositions[4])
tuchulcha:setLocalVar('sand_pit2', selectedPositions[5])
tuchulcha:setLocalVar('sand_pit3', selectedPositions[6])
tuchulcha:setPos(antlionPositions[battlefieldArea][selectedPositions[7]])
end

content.groups =
{
{
mobIds =
{
{ boneyardGullyID.mob.TUCHULCHA },
{ boneyardGullyID.mob.TUCHULCHA + 4 },
{ boneyardGullyID.mob.TUCHULCHA + 8 },
},

superlink = false,
allDeath = utils.bind(content.handleAllMonstersDefeated, content),
},

{
mobIds =
{
{
boneyardGullyID.mob.TUCHULCHA + 1,
boneyardGullyID.mob.TUCHULCHA + 2,
boneyardGullyID.mob.TUCHULCHA + 3,
},

{
boneyardGullyID.mob.TUCHULCHA + 5,
boneyardGullyID.mob.TUCHULCHA + 6,
boneyardGullyID.mob.TUCHULCHA + 7,
},

{
boneyardGullyID.mob.TUCHULCHA + 9,
boneyardGullyID.mob.TUCHULCHA + 10,
boneyardGullyID.mob.TUCHULCHA + 11,
},
},

superlink = false,
},
}

content.loot =
{
{
{ item = xi.item.SQUARE_OF_GALATEIA, weight = 268 }, -- Square of Galateia (26.8% Drop Rate)
{ item = xi.item.SQUARE_OF_KEJUSU_SATIN, weight = 266 }, -- Kejusu Satin
{ item = xi.item.POT_OF_VIRIDIAN_URUSHI, weight = 342 }, -- Viridian Urushi
},

{
{ item = xi.item.NONE, weight = 944 }, -- nothing
{ item = xi.item.CLOUD_EVOKER, weight = 56 }, -- Cloud Evoker
},

{
{ item = xi.item.HAGUN, weight = 82 }, -- Hagun
{ item = xi.item.MARTIAL_AXE, weight = 92 }, -- Martial Axe
{ item = xi.item.MARTIAL_WAND, weight = 63 }, -- Martial Wand
{ item = xi.item.FORAGERS_MANTLE, weight = 105 }, -- Forager's Mantle
{ item = xi.item.HARMONIAS_TORQUE, weight = 121 }, -- Harmonia's Torque
},
}

return content:register()
59 changes: 59 additions & 0 deletions scripts/battlefields/Boneyard_Gully/shell_we_dance.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
-----------------------------------
-- Shell We Dance?
-- Boneyard Gully ENM, Miasma Filter
-- !addkeyitem MIASMA_FILTER
-----------------------------------
local boneyardGullyID = zones[xi.zone.BONEYARD_GULLY]
-----------------------------------

local content = Battlefield:new({
zoneId = xi.zone.BONEYARD_GULLY,
battlefieldId = xi.battlefield.id.SHELL_WE_DANCE,
maxPlayers = 18,
levelCap = 75,
timeLimit = utils.minutes(30),
index = 3,
entryNpc = '_081',
exitNpcs = { '_082', '_084', '_086' },
requiredKeyItems = { xi.ki.MIASMA_FILTER },
armouryCrates =
{
boneyardGullyID.mob.PARATA + 8,
boneyardGullyID.mob.PARATA + 17,
boneyardGullyID.mob.PARATA + 26,
},

grantXP = 2000,

experimental = true,
})

-- TODO: Needs additional cleanup and mixin work (previous comment). Examine
-- mob spawn handling and move hardcoded IDs to this script or the mob and read as necessary.

content:addEssentialMobs({ 'Parata', 'Bladmall' })

content.loot =
{
{
{ item = xi.item.PIECE_OF_CASSIA_LUMBER, weight = 375 },
{ item = xi.item.SQUARE_OF_ELTORO_LEATHER, weight = 328 },
{ item = xi.item.DRAGON_BONE, weight = 263 },
},

{
{ item = xi.item.NONE, weight = 812 },
{ item = xi.item.CLOUD_EVOKER, weight = 188 },
},

{
quantity = 2,
{ item = xi.item.NONE, weight = 199 },
{ item = xi.item.STONE_SPLITTER, weight = 150 },
{ item = xi.item.FRENZY_FIFE, weight = 175 },
{ item = xi.item.BLAU_DOLCH, weight = 238 },
{ item = xi.item.SCROLL_OF_ARMYS_PAEON_V, weight = 238 },
},
}

return content:register()
Loading
Loading