Skip to content

Commit

Permalink
Add remaining WTB avatar bcnms
Browse files Browse the repository at this point in the history
Co-authored-by: overefined <[email protected]>
Co-Authored-By: dallano <[email protected]>
  • Loading branch information
3 people committed Sep 20, 2024
1 parent d8e00b9 commit 2728316
Show file tree
Hide file tree
Showing 25 changed files with 1,218 additions and 146 deletions.
38 changes: 6 additions & 32 deletions scripts/battlefields/Cloister_of_Flames/waking_the_beast.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
-- Area: Cloister of Flames
-- BCNM: Waking the Beast
-----------------------------------
local cloisterOfFlamesID = zones[xi.zone.CLOISTER_OF_FLAMES]
-----------------------------------

local content = BattlefieldQuest:new({
zoneId = xi.zone.CLOISTER_OF_FLAMES,
Expand All @@ -27,14 +25,7 @@ end
content.groups =
{
{
-- avatar
mobIds =
{
{ cloisterOfFlamesID.mob.IFRIT_PRIME_WTB },
{ cloisterOfFlamesID.mob.IFRIT_PRIME_WTB + 5 },
{ cloisterOfFlamesID.mob.IFRIT_PRIME_WTB + 10 },
},

mobs = { 'Ifrit_Prime_WTB' },
allDeath = function(battlefield, mob)
-- when avatar defeated then all elementals should also die
for i = 1, 4 do
Expand All @@ -49,30 +40,13 @@ content.groups =
},

{
-- elementals
mobIds =
mobs =
{
{
cloisterOfFlamesID.mob.IFRIT_PRIME_WTB + 1,
cloisterOfFlamesID.mob.IFRIT_PRIME_WTB + 2,
cloisterOfFlamesID.mob.IFRIT_PRIME_WTB + 3,
cloisterOfFlamesID.mob.IFRIT_PRIME_WTB + 4,
},

{
cloisterOfFlamesID.mob.IFRIT_PRIME_WTB + 6,
cloisterOfFlamesID.mob.IFRIT_PRIME_WTB + 7,
cloisterOfFlamesID.mob.IFRIT_PRIME_WTB + 8,
cloisterOfFlamesID.mob.IFRIT_PRIME_WTB + 9,
},

{
cloisterOfFlamesID.mob.IFRIT_PRIME_WTB + 11,
cloisterOfFlamesID.mob.IFRIT_PRIME_WTB + 12,
cloisterOfFlamesID.mob.IFRIT_PRIME_WTB + 13,
cloisterOfFlamesID.mob.IFRIT_PRIME_WTB + 14,
},
'Ifrit_Prime_WTB',
'Fire_Elemental',
},
isParty = true,
superlink = true,
},
}

Expand Down
53 changes: 53 additions & 0 deletions scripts/battlefields/Cloister_of_Frost/waking_the_beast.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
-----------------------------------
-- Area: Cloister of Frost
-- BCNM: Waking the Beast
-----------------------------------

local content = BattlefieldQuest:new({
zoneId = xi.zone.CLOISTER_OF_FROST,
battlefieldId = xi.battlefield.id.WAKING_THE_BEAST_CLOISTER_OF_FROST,
canLoseExp = false,
maxPlayers = 18,
timeLimit = utils.minutes(30),
index = 3,
entryNpc = 'IP_Entrance',
exitNpc = 'Ice_Protocrystal',
requiredKeyItems = { xi.ki.RAINBOW_RESONATOR },

questArea = xi.questLog.OTHER_AREAS,
quest = xi.quest.id.otherAreas.WAKING_THE_BEAST,
})

function content:onEventFinishWin(player, csid, option, npc)
npcUtil.giveKeyItem(player, xi.ki.EYE_OF_FROST)
end

content.groups =
{
{
mobs = { 'Shiva_Prime_WTB' },
allDeath = function(battlefield, mob)
-- when avatar defeated then all elementals should also die
for i = 1, 4 do
local elemental = GetMobByID(mob:getID() + i)
if elemental and elemental:isAlive() then
elemental:setHP(0)
end
end

battlefield:setStatus(xi.battlefield.status.WON)
end,
},

{
mobs =
{
'Shiva_Prime_WTB',
'Ice_Elemental',
},
isParty = true,
superlink = true,
},
}

return content:register()
53 changes: 53 additions & 0 deletions scripts/battlefields/Cloister_of_Gales/waking_the_beast.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
-----------------------------------
-- Area: Cloister of Gales
-- BCNM: Waking the Beast
-----------------------------------

local content = BattlefieldQuest:new({
zoneId = xi.zone.CLOISTER_OF_GALES,
battlefieldId = xi.battlefield.id.WAKING_THE_BEAST_CLOISTER_OF_GALES,
canLoseExp = false,
maxPlayers = 18,
timeLimit = utils.minutes(30),
index = 3,
entryNpc = 'WP_Entrance',
exitNpc = 'Wind_Protocrystal',
requiredKeyItems = { xi.ki.RAINBOW_RESONATOR },

questArea = xi.questLog.OTHER_AREAS,
quest = xi.quest.id.otherAreas.WAKING_THE_BEAST,
})

function content:onEventFinishWin(player, csid, option, npc)
npcUtil.giveKeyItem(player, xi.ki.EYE_OF_GALES)
end

content.groups =
{
{
mobs = { 'Garuda_Prime_WTB' },
allDeath = function(battlefield, mob)
-- when avatar defeated then all elementals should also die
for i = 1, 4 do
local elemental = GetMobByID(mob:getID() + i)
if elemental and elemental:isAlive() then
elemental:setHP(0)
end
end

battlefield:setStatus(xi.battlefield.status.WON)
end,
},

{
mobs =
{
'Garuda_Prime_WTB',
'Air_Elemental',
},
isParty = true,
superlink = true,
},
}

return content:register()
53 changes: 53 additions & 0 deletions scripts/battlefields/Cloister_of_Storms/waking_the_beast.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
-----------------------------------
-- Area: Cloister of Storms
-- BCNM: Waking the Beast
-----------------------------------

local content = BattlefieldQuest:new({
zoneId = xi.zone.CLOISTER_OF_STORMS,
battlefieldId = xi.battlefield.id.WAKING_THE_BEAST_CLOISTER_OF_STORMS,
canLoseExp = false,
maxPlayers = 18,
timeLimit = utils.minutes(30),
index = 3,
entryNpc = 'LP_Entrance',
exitNpc = 'Lightning_Protocrystal',
requiredKeyItems = { xi.ki.RAINBOW_RESONATOR },

questArea = xi.questLog.OTHER_AREAS,
quest = xi.quest.id.otherAreas.WAKING_THE_BEAST,
})

function content:onEventFinishWin(player, csid, option, npc)
npcUtil.giveKeyItem(player, xi.ki.EYE_OF_STORMS)
end

content.groups =
{
{
mobs = { 'Ramuh_Prime_WTB' },
allDeath = function(battlefield, mob)
-- when avatar defeated then all elementals should also die
for i = 1, 4 do
local elemental = GetMobByID(mob:getID() + i)
if elemental and elemental:isAlive() then
elemental:setHP(0)
end
end

battlefield:setStatus(xi.battlefield.status.WON)
end,
},

{
mobs =
{
'Ramuh_Prime_WTB',
'Thunder_Elemental',
},
isParty = true,
superlink = true,
},
}

return content:register()
53 changes: 53 additions & 0 deletions scripts/battlefields/Cloister_of_Tides/waking_the_beast.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
-----------------------------------
-- Area: Cloister of Tides
-- BCNM: Waking the Beast
-----------------------------------

local content = BattlefieldQuest:new({
zoneId = xi.zone.CLOISTER_OF_TIDES,
battlefieldId = xi.battlefield.id.WAKING_THE_BEAST_CLOISTER_OF_TIDES,
canLoseExp = false,
maxPlayers = 18,
timeLimit = utils.minutes(30),
index = 2,
entryNpc = 'WP_Entrance',
exitNpc = 'Water_Protocrystal',
requiredKeyItems = { xi.ki.RAINBOW_RESONATOR },

questArea = xi.questLog.OTHER_AREAS,
quest = xi.quest.id.otherAreas.WAKING_THE_BEAST,
})

function content:onEventFinishWin(player, csid, option, npc)
npcUtil.giveKeyItem(player, xi.ki.EYE_OF_TIDES)
end

content.groups =
{
{
mobs = { 'Leviathan_Prime_WTB' },
allDeath = function(battlefield, mob)
-- when avatar defeated then all elementals should also die
for i = 1, 4 do
local elemental = GetMobByID(mob:getID() + i)
if elemental and elemental:isAlive() then
elemental:setHP(0)
end
end

battlefield:setStatus(xi.battlefield.status.WON)
end,
},

{
mobs =
{
'Leviathan_Prime_WTB',
'Water_Elemental',
},
isParty = true,
superlink = true,
},
}

return content:register()
53 changes: 53 additions & 0 deletions scripts/battlefields/Cloister_of_Tremors/waking_the_beast.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
-----------------------------------
-- Area: Cloister of Tremors
-- BCNM: Waking the Beast
-----------------------------------

local content = BattlefieldQuest:new({
zoneId = xi.zone.CLOISTER_OF_TREMORS,
battlefieldId = xi.battlefield.id.WAKING_THE_BEAST_CLOISTER_OF_TREMORS,
canLoseExp = false,
maxPlayers = 18,
timeLimit = utils.minutes(30),
index = 3,
entryNpc = 'EP_Entrance',
exitNpc = 'Earth_Protocrystal',
requiredKeyItems = { xi.ki.RAINBOW_RESONATOR },

questArea = xi.questLog.OTHER_AREAS,
quest = xi.quest.id.otherAreas.WAKING_THE_BEAST,
})

function content:onEventFinishWin(player, csid, option, npc)
npcUtil.giveKeyItem(player, xi.ki.EYE_OF_TREMORS)
end

content.groups =
{
{
mobs = { 'Titan_Prime_WTB' },
allDeath = function(battlefield, mob)
-- when avatar defeated then all elementals should also die
for i = 1, 4 do
local elemental = GetMobByID(mob:getID() + i)
if elemental and elemental:isAlive() then
elemental:setHP(0)
end
end

battlefield:setStatus(xi.battlefield.status.WON)
end,
},

{
mobs =
{
'Titan_Prime_WTB',
'Earth_Elemental',
},
isParty = true,
superlink = true,
},
}

return content:register()
1 change: 0 additions & 1 deletion scripts/zones/Cloister_of_Flames/IDs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ zones[xi.zone.CLOISTER_OF_FLAMES] =
{
IFRIT_PRIME = GetFirstID('Ifrit_Prime_Trial'),
IFRIT_PRIME_ASA = GetFirstID('Ifrit_Prime_ASA'),
IFRIT_PRIME_WTB = GetFirstID('Ifrit_Prime_WTB')
},
npc =
{
Expand Down
3 changes: 1 addition & 2 deletions scripts/zones/Cloister_of_Flames/mobs/Fire_Elemental.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ entity.onMobSpawn = function(mob)
mob:addImmunity(xi.immunity.GRAVITY)
mob:addImmunity(xi.immunity.BIND)
mob:addImmunity(xi.immunity.PARALYZE)
-- mob:setMobMod(xi.mobMod.SKIP_ALLEGIANCE_CHECK, 1)
mob:setMobMod(xi.mobMod.SKIP_ALLEGIANCE_CHECK, 1)
mob:setMobMod(xi.mobMod.ADD_EFFECT, 1)
mob:setMobMod(xi.mobMod.CHECK_AS_NM, 1)
mob:setMobMod(xi.mobMod.MAGIC_DELAY, 12)
mob:setMagicCastingEnabled(false)
end
Expand Down
3 changes: 2 additions & 1 deletion scripts/zones/Cloister_of_Flames/mobs/Ifrit_Prime_WTB.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ entity.onMobSpawn = function(mob)
mob:setMod(xi.mod.FIRE_ABSORB, 100)
-- do not need to set res rank for fire because WTB primes have own
-- mob resistances row that sets it already
mob:addImmunity(xi.immunity.PARALYZE)
mob:addImmunity(xi.immunity.GRAVITY)
mob:addImmunity(xi.immunity.BIND)
mob:addImmunity(xi.immunity.SILENCE)
Expand All @@ -37,6 +36,8 @@ entity.onMobSpawn = function(mob)
mob:addImmunity(xi.immunity.DARK_SLEEP)
mob:addImmunity(xi.immunity.TERROR)
mob:setMobMod(xi.mobMod.ADD_EFFECT, 1)
-- element specific immunities
mob:addImmunity(xi.immunity.PARALYZE)
end

entity.onAdditionalEffect = function(mob, target, damage)
Expand Down
Loading

0 comments on commit 2728316

Please sign in to comment.