Skip to content

Commit

Permalink
Add remaining WTB avatar bcnms
Browse files Browse the repository at this point in the history
Co-Authored-By: dallano <[email protected]>
  • Loading branch information
TracentEden and dallano committed Sep 7, 2024
1 parent d8e00b9 commit e4bc2db
Show file tree
Hide file tree
Showing 28 changed files with 1,233 additions and 143 deletions.
36 changes: 6 additions & 30 deletions scripts/battlefields/Cloister_of_Flames/waking_the_beast.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,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 +42,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
55 changes: 55 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,55 @@
-----------------------------------
-- Area: Cloister of Frost
-- BCNM: Waking the Beast
-----------------------------------
local cloisterOfFrostID = zones[xi.zone.CLOISTER_OF_FROST]
-----------------------------------

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()
55 changes: 55 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,55 @@
-----------------------------------
-- Area: Cloister of Gales
-- BCNM: Waking the Beast
-----------------------------------
local cloisterOfGalesID = zones[xi.zone.CLOISTER_OF_GALES]
-----------------------------------

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()
55 changes: 55 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,55 @@
-----------------------------------
-- Area: Cloister of Storms
-- BCNM: Waking the Beast
-----------------------------------
local cloisterOFStormsID = zones[xi.zone.CLOISTER_OF_STORMS]
-----------------------------------

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()
55 changes: 55 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,55 @@
-----------------------------------
-- Area: Cloister of Tides
-- BCNM: Waking the Beast
-----------------------------------
local cloisterOFTidesID = zones[xi.zone.CLOISTER_OF_TIDES]
-----------------------------------

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()
55 changes: 55 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,55 @@
-----------------------------------
-- Area: Cloister of Tremors
-- BCNM: Waking the Beast
-----------------------------------
local cloisterOFTremorsID = zones[xi.zone.CLOISTER_OF_TREMORS]
-----------------------------------

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()
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
1 change: 1 addition & 0 deletions scripts/zones/Cloister_of_Frost/IDs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ zones[xi.zone.CLOISTER_OF_FROST] =
DRYAD = GetFirstID('Dryad'),
SHIVA_PRIME = GetFirstID('Shiva_Prime_Trial'),
SHIVA_PRIME_ASA = GetFirstID('Shiva_Prime_ASA'),
SHIVA_PRIME_WTB = GetFirstID('Shiva_Prime_WTB')
},
npc =
{
Expand Down
Loading

0 comments on commit e4bc2db

Please sign in to comment.