Skip to content

Commit

Permalink
Interaction - Battlefield: Sheep in Antlion's Clothing
Browse files Browse the repository at this point in the history
Remove unused variables

Fix Ghelsba Outpost Armoury Crate definitions

Add superlink to when angels fall

Fix Moon Reading phase 2 coordinates

Remove BST pet from required mobs in Head Wind

Fix armoury crates, invalid mob spawn function
  • Loading branch information
claywar committed Jun 1, 2024
1 parent 723cd6c commit d5d35fd
Show file tree
Hide file tree
Showing 18 changed files with 248 additions and 194 deletions.
20 changes: 15 additions & 5 deletions scripts/battlefields/Boneyard_Gully/head_wind.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,29 +35,38 @@ content.groups =
boneyardGullyID.mob.SHIKAREE_Z,
boneyardGullyID.mob.SHIKAREE_Z + 1,
boneyardGullyID.mob.SHIKAREE_Z + 2,
boneyardGullyID.mob.SHIKAREE_Z + 4,
},

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

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

allDeath = function(battlefield, mob)
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 =
Expand All @@ -67,7 +76,8 @@ content.groups =
{ boneyardGullyID.mob.SHIKAREE_Z + 13 },
},

spawned = false,
superlinkGroup = 1,
spawned = false,
},
}

Expand Down
2 changes: 0 additions & 2 deletions scripts/battlefields/Boneyard_Gully/like_the_wind.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
-- Boneyard Gully ENM, Miasma Filter
-- !addkeyitem MIASMA_FILTER
-----------------------------------
local boneyardGullyID = zones[xi.zone.BONEYARD_GULLY]
-----------------------------------

local content = Battlefield:new({
zoneId = xi.zone.BONEYARD_GULLY,
Expand Down
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()
6 changes: 6 additions & 0 deletions scripts/battlefields/Boneyard_Gully/shell_we_dance.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ local content = Battlefield:new({
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,

Expand Down
12 changes: 6 additions & 6 deletions scripts/battlefields/Full_Moon_Fountain/moon_reading.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ local content = BattlefieldMission:new({
function content:onEventFinishBattlefield(player, csid, option, npc)
local playerCoords =
{
[1] = { -400, -201, 419, 61 },
[2] = { 0, -1, 10, 61 },
[3] = { 399, 198, -381, 57 },
[1] = { 340.220, 48.557, -386.114, 190 },
[2] = { -59.877, 10.577, 13.853, 190 },
[3] = { -459.974, -51.423, 373.86, 190 },
}

local ajidoCoords =
{
[1] = { -403, -201, 413, 58 },
[2] = { -3, -1, 4, 61 },
[3] = { 397, 198, -395, 64 },
[1] = { 340.117, 48.752, -383.747, 64 },
[2] = { -59.98, 10.752, 16.22, 64 },
[3] = { -379.826, -51.248, 376.227, 64 },
}

local battlefield = player:getBattlefield()
Expand Down
2 changes: 1 addition & 1 deletion scripts/battlefields/Ghelsba_Outpost/holy_crest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function content:onEventFinishWin(player, csid, option, npc)

player:delKeyItem(xi.ki.DRAGON_CURSE_REMEDY)
player:unlockJob(xi.job.DRG)
player:messageSpecial(ID.text.YOU_CAN_NOW_BECOME_A_DRAGOON)
player:messageSpecial(ghelsbaID.text.YOU_CAN_NOW_BECOME_A_DRAGOON)
player:setPetName(xi.petType.WYVERN, option + 1)
end
end
Expand Down
4 changes: 4 additions & 0 deletions scripts/battlefields/Ghelsba_Outpost/petrifying_pair.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ local content = Battlefield:new({
area = 1,
entryNpc = 'Hut_Door',
requiredItems = { xi.item.SKY_ORB, wearMessage = ghelsbaID.text.A_CRACK_HAS_FORMED, wornMessage = ghelsbaID.text.ORB_IS_CRACKED },
armouryCrates =
{
ghelsbaID.mob.KALAMAINU + 2,
},
})

content:addEssentialMobs({ 'Kalamainu', 'Kilioa' })
Expand Down
4 changes: 4 additions & 0 deletions scripts/battlefields/Ghelsba_Outpost/toadal_recall.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ local content = Battlefield:new({
area = 1,
entryNpc = 'Hut_Door',
requiredItems = { xi.item.SKY_ORB, wearMessage = ghelsbaID.text.A_CRACK_HAS_FORMED, wornMessage = ghelsbaID.text.ORB_IS_CRACKED },
armouryCrates =
{
ghelsbaID.mob.TOADPILLOW + 4,
},
})

-- TODO: Shroom-in-Cap Mechanic
Expand Down
4 changes: 4 additions & 0 deletions scripts/battlefields/Ghelsba_Outpost/wings_of_fury.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ local content = Battlefield:new({
area = 1,
entryNpc = 'Hut_Door',
requiredItems = { xi.item.CLOUDY_ORB, wearMessage = ghelsbaID.text.A_CRACK_HAS_FORMED, wornMessage = ghelsbaID.text.ORB_IS_CRACKED },
armouryCrates =
{
ghelsbaID.mob.COLO_COLO + 3,
},
})

-- TODO: MobSkills Slipstream and Turbulence need to be implemented/applied.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ content.groups =
ruHmetID.mob.IXZDEI_RDM + 3,
},

allDeath = function(battlefield, mob)
superlink = true,
allDeath = function(battlefield, mob)
battlefield:setStatus(xi.battlefield.status.WON)
end,
},
Expand Down
2 changes: 1 addition & 1 deletion scripts/globals/battlefield.lua
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ xi.battlefield.id =
HOLY_COW = 644, -- Converted
HEAD_WIND = 672, -- Converted
LIKE_THE_WIND = 673, -- Experimental
SHEEP_IN_ANTLIONS_CLOTHING = 674,
SHEEP_IN_ANTLIONS_CLOTHING = 674, -- Converted
SHELL_WE_DANCE = 675, -- Experimental
TOTENTANZ = 676,
TANGO_WITH_A_TRACKER = 677,
Expand Down
13 changes: 0 additions & 13 deletions scripts/globals/bcnm.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ xi.bcnm = xi.bcnm or {}

local battlefields =
{
[xi.zone.BONEYARD_GULLY] =
{
{ 2, 674, 0 }, -- Sheep in Antlion's Clothing (ENM)
},

[xi.zone.THE_SHROUDED_MAW] =
{
{ 0, 704, 0 }, -- Darkness Named (PM3-5)
Expand Down Expand Up @@ -49,10 +44,6 @@ local function checkReqs(player, npc, bfid, registrant)
-- Requirements to register a battlefield
local registerReqs =
{
[674] = function() -- ENM: Sheep in Antlion's Clothing
return player:hasKeyItem(xi.ki.MIASMA_FILTER)
end,

[704] = function() -- PM3-5: Darkness Named
return promathiaMission == xi.mission.id.cop.DARKNESS_NAMED and
player:getCharVar('Mission[6][358]Status') == 4
Expand Down Expand Up @@ -90,10 +81,6 @@ local function checkReqs(player, npc, bfid, registrant)
return npc:getXPos() > -721 and npc:getXPos() < 719
end,

[674] = function() -- ENM: Sheep in Antlion's Clothing
return player:hasKeyItem(xi.ki.MIASMA_FILTER)
end,

[1057] = function() -- Quest: Apocalypse Nigh
return player:hasCompletedQuest(xi.questLog.JEUNO, xi.quest.id.jeuno.APOCALYPSE_NIGH) or
(
Expand Down
Loading

0 comments on commit d5d35fd

Please sign in to comment.