-
Notifications
You must be signed in to change notification settings - Fork 626
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6185 from jmcmorris/shadows_of_the_mind
Shadows of the Mind ISNM
- Loading branch information
Showing
17 changed files
with
296 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
----------------------------------- | ||
-- Boreas Mantle | ||
-- Description: Spawns 4 clones of itself that disappear after 30 seconds | ||
-- Used only by Phantom Puk | ||
----------------------------------- | ||
---@type TMobSkill | ||
local mobskillObject = {} | ||
|
||
mobskillObject.onMobSkillCheck = function(target, mob, skill) | ||
return 0 | ||
end | ||
|
||
mobskillObject.onMobWeaponSkill = function(target, mob, skill) | ||
local mobID = mob:getID() | ||
local player = mob:getTarget() | ||
local clonehp = 500 | ||
local hpp = mob:getHPP() / 100.0 | ||
local maxhp = math.ceil(clonehp / hpp) | ||
for cloneID = mobID + 1, mobID + 4 do | ||
local clone = SpawnMob(cloneID) | ||
if clone then | ||
clone:setMaxHP(maxhp) | ||
clone:setHP(clonehp) | ||
if player then | ||
clone:updateEnmity(player) | ||
end | ||
|
||
clone:setPos(mob:getXPos(), mob:getYPos(), mob:getZPos()) | ||
end | ||
end | ||
|
||
mob:timer(30000, function(mobArg) | ||
for cloneID = mobID + 1, mobID + 4 do | ||
local clone = GetMobByID(cloneID) | ||
if clone then | ||
local action = clone:getCurrentAction() | ||
if action ~= xi.act.NONE and action ~= xi.act.DEATH then | ||
DespawnMob(cloneID) | ||
end | ||
end | ||
end | ||
end) | ||
|
||
skill:setMsg(xi.msg.basic.NONE) | ||
return 0 | ||
end | ||
|
||
return mobskillObject |
100 changes: 100 additions & 0 deletions
100
scripts/battlefields/Jade_Sepulcher/Shadows_of_the_Mind.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
----------------------------------- | ||
-- Shadows of the Mind | ||
-- Jade Sepulcher, Confidential Imperial Order | ||
-- !addkeyitem SECRET_IMPERIAL_ORDER | ||
----------------------------------- | ||
local ID = zones[xi.zone.JADE_SEPULCHER] | ||
----------------------------------- | ||
|
||
local content = Battlefield:new({ | ||
zoneId = xi.zone.JADE_SEPULCHER, | ||
battlefieldId = xi.battlefield.id.SHADOWS_OF_THE_MIND, | ||
maxPlayers = 6, | ||
levelCap = 75, | ||
timeLimit = utils.minutes(30), | ||
index = 1, | ||
entryNpc = '_1v0', | ||
exitNpcs = { '_1v1', '_1v2', '_1v3' }, | ||
requiredKeyItems = { xi.ki.SECRET_IMPERIAL_ORDER, message = ID.text.IMPERIAL_ORDER_BREAKS }, | ||
}) | ||
|
||
content.groups = { | ||
{ | ||
mobs = { 'Phantom_Puk' }, | ||
allDeath = utils.bind(content.handleAllMonstersDefeated, content), | ||
}, | ||
|
||
{ | ||
mobs = { 'Phantom_Puk_Clone' }, | ||
spawned = false, | ||
}, | ||
} | ||
|
||
content.loot = | ||
{ | ||
{ | ||
{ item = xi.item.GIL, weight = xi.loot.weight.NORMAL, amount = 12000 }, | ||
}, | ||
|
||
{ | ||
{ item = xi.item.CHARISMA_POTION, weight = xi.loot.weight.NORMAL }, | ||
{ item = xi.item.ICARUS_WING, weight = xi.loot.weight.NORMAL }, | ||
{ item = xi.item.INTELLIGENCE_POTION, weight = xi.loot.weight.NORMAL }, | ||
{ item = xi.item.MIND_POTION, weight = xi.loot.weight.NORMAL }, | ||
}, | ||
|
||
{ | ||
{ item = xi.item.BOTTLE_OF_SIEGLINDE_PUTTY, weight = xi.loot.weight.NORMAL }, | ||
{ item = xi.item.BRASS_TANK, weight = xi.loot.weight.NORMAL }, | ||
{ item = xi.item.MERROW_SCALE, weight = xi.loot.weight.NORMAL }, | ||
{ item = xi.item.AHRIMAN_WING, weight = xi.loot.weight.NORMAL }, | ||
}, | ||
|
||
{ | ||
{ item = xi.item.SCROLL_OF_ERASE, weight = xi.loot.weight.HIGH }, | ||
{ item = xi.item.SCROLL_OF_PROTECTRA_IV, weight = xi.loot.weight.HIGH }, | ||
{ item = xi.item.SCROLL_OF_BLIZZARD_IV, weight = xi.loot.weight.NORMAL }, | ||
{ item = xi.item.SCROLL_OF_DISPEL, weight = xi.loot.weight.NORMAL }, | ||
{ item = xi.item.SCROLL_OF_PROTECT_IV, weight = xi.loot.weight.NORMAL }, | ||
{ item = xi.item.SCROLL_OF_QUAKE, weight = xi.loot.weight.NORMAL }, | ||
{ item = xi.item.SCROLL_OF_RERAISE_III, weight = xi.loot.weight.NORMAL }, | ||
{ item = xi.item.SCROLL_OF_WATER_IV, weight = xi.loot.weight.NORMAL }, | ||
}, | ||
|
||
{ | ||
{ item = xi.item.CHOCOBO_EGG_SOMEWHAT_WARM, weight = xi.loot.weight.NORMAL }, | ||
}, | ||
|
||
{ | ||
{ item = xi.item.PUK_WING, weight = xi.loot.weight.NORMAL }, | ||
}, | ||
|
||
{ | ||
{ item = xi.item.NONE, weight = xi.loot.weight.EXTREMELY_HIGH }, | ||
{ item = xi.item.COMPANY_FLEURET, weight = xi.loot.weight.LOW }, | ||
{ item = xi.item.MAGNET_KNIFE, weight = xi.loot.weight.LOW }, | ||
{ item = xi.item.SACRIFICE_TORQUE, weight = xi.loot.weight.LOW }, | ||
{ item = xi.item.TOURNAMENT_LANCE, weight = xi.loot.weight.LOW }, | ||
}, | ||
|
||
{ | ||
{ item = xi.item.NONE, weight = xi.loot.weight.EXTREMELY_HIGH }, | ||
{ item = xi.item.PIECE_OF_HABU_SKIN, weight = xi.loot.weight.NORMAL }, | ||
{ item = xi.item.SQUARE_OF_RAINBOW_CLOTH, weight = xi.loot.weight.NORMAL }, | ||
{ item = xi.item.BUFFALO_HORN, weight = xi.loot.weight.LOW }, | ||
{ item = xi.item.SQUARE_OF_WAMOURA_CLOTH, weight = xi.loot.weight.LOW }, | ||
{ item = xi.item.SQUARE_OF_RED_GRASS_CLOTH, weight = xi.loot.weight.VERY_LOW }, | ||
{ item = xi.item.SQUARE_OF_KARAKUL_CLOTH, weight = xi.loot.weight.VERY_LOW }, | ||
{ item = xi.item.SQUARE_OF_RAXA, weight = xi.loot.weight.VERY_LOW }, | ||
{ item = xi.item.POT_OF_URUSHI, weight = xi.loot.weight.VERY_LOW }, | ||
}, | ||
|
||
{ | ||
{ item = xi.item.BEHEMOTH_HORN, weight = xi.loot.weight.NORMAL }, | ||
{ item = xi.item.DRAGON_TALON, weight = xi.loot.weight.NORMAL }, | ||
{ item = xi.item.CHUNK_OF_KHROMA_ORE, weight = xi.loot.weight.NORMAL }, | ||
{ item = xi.item.CHUNK_OF_LUMINIUM_ORE, weight = xi.loot.weight.NORMAL }, | ||
}, | ||
} | ||
|
||
return content:register() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,6 +65,7 @@ xi.mobSkill = | |
RANGED_ATTACK_15 = 1949, | ||
|
||
ECLOSION = 1970, | ||
BOREAS_MANTLE = 1980, | ||
|
||
ROAR_3 = 2406, | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
----------------------------------- | ||
-- Area: Jade Sepulcher | ||
-- NM: Phantom Puk | ||
----------------------------------- | ||
mixins = { require('scripts/mixins/families/puk') } | ||
----------------------------------- | ||
local entity = {} | ||
|
||
entity.onMobInitialize = function(mob) | ||
end | ||
|
||
entity.onMobSpawn = function(mob) | ||
mob:addImmunity(xi.immunity.GRAVITY) | ||
mob:addImmunity(xi.immunity.SILENCE) | ||
mob:addImmunity(xi.immunity.REQUIEM) | ||
mob:addImmunity(xi.immunity.DARK_SLEEP) | ||
mob:addImmunity(xi.immunity.LIGHT_SLEEP) | ||
mob:addImmunity(xi.immunity.PETRIFY) | ||
end | ||
|
||
entity.onMobEngage = function(mob, target) | ||
mob:setLocalVar('boreas_mantle', os.time() + math.random(15, 45)) | ||
end | ||
|
||
entity.onMobFight = function(mob, target) | ||
local now = os.time() | ||
if mob:getLocalVar('boreas_mantle') <= now then | ||
mob:useMobAbility(xi.mobSkill.BOREAS_MANTLE, mob) | ||
mob:setLocalVar('boreas_mantle', now + math.random(60, 90)) | ||
end | ||
end | ||
|
||
entity.onMobDeath = function(mob, player, optParams) | ||
local mobID = mob:getID() | ||
for cloneID = mobID + 1, mobID + 4 do | ||
local clone = GetMobByID(cloneID) | ||
if clone then | ||
local action = clone:getCurrentAction() | ||
if action ~= xi.act.NONE and action ~= xi.act.DEATH then | ||
DespawnMob(cloneID) | ||
end | ||
end | ||
end | ||
end | ||
|
||
return entity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
----------------------------------- | ||
-- Area: Jade Sepulcher | ||
-- NM: Phantom Puk (Clone) | ||
----------------------------------- | ||
mixins = { require('scripts/mixins/families/puk') } | ||
----------------------------------- | ||
local entity = {} | ||
|
||
entity.onMobSpawn = function(mob) | ||
mob:addStatusEffect(xi.effect.BLINK, 3, 0, 180) | ||
mob:setMod(xi.mod.DMG, 20000) | ||
mob:setMod(xi.mod.HP, 0) | ||
end | ||
|
||
entity.onMobDeath = function(mob, player, optParams) | ||
end | ||
|
||
return entity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.