Skip to content

Commit

Permalink
Merge pull request #4555 from LandSandBoat/zach2good/monstrosity_1
Browse files Browse the repository at this point in the history
[core] Monstrosity part 1: Plumbing
  • Loading branch information
zach2good authored Oct 17, 2023
2 parents a8285d6 + f96dc26 commit 796bf9d
Show file tree
Hide file tree
Showing 74 changed files with 5,017 additions and 436 deletions.
16 changes: 8 additions & 8 deletions documentation/model_ids.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ ID Number Costume Name
25 Diabolos
26 Odin
27 Alexander
28 Mandragora
29 Mandragora
30 Mandragora
28 Cait Sith
29 Atomos
30 Siren
31 Mandragora
32 Hume Male
32 Hume Male with hood
33
34
35
Expand Down Expand Up @@ -404,7 +404,7 @@ ID Number Costume Name
402 Manticore
403 Kirin
404 Behemoth
405 Elsamoth(Abys)
405 Elasamoth(Abys)
406 Crawler 3(Eruca)
407 Genbu
408 Beetle 1(green)
Expand Down Expand Up @@ -1931,7 +1931,7 @@ ID Number Costume Name
1931
1932 Sturdy Pyxis
1933 Samursk(AbysNM)
1934 Leech (Black) Abys
1934 Leech (Black) Abys - Obdella
1935 Wyvern (Red) Abys
1936 Bee (Blue) Abys
1937 Rabbit(Orange) Abys
Expand Down Expand Up @@ -2201,7 +2201,7 @@ ID Number Costume Name
2201 Dancer NPC2(HolidayDeco)
2202 Aphmau White (arm raised)
2203 Lion (dagger toss)
2204 Mandragora
2204 Tiny/Pygmy Mandragora
2205 Dark Ixion
2206 Ruszor
2207 Lynx
Expand Down Expand Up @@ -2453,8 +2453,8 @@ ID Number Costume Name
2468 Altana???
2500
2678 Arciela
2882 FF14 Spriggan
2881 DQ Slime
2882 FF14 Spriggan
2907 DQ She-Slime (Red Slime)
2908 DQ Metal Slime
2909 FF14 Spriggan
Expand Down
17 changes: 17 additions & 0 deletions scripts/actions/abilities/relinquish.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
-----------------------------------
-- Ability: Relinquish
-----------------------------------
require('scripts/globals/monstrosity')
-----------------------------------
local abilityObject = {}

abilityObject.onAbilityCheck = function(player, target, ability)
-- TODO: Block if being attacked
return 0, 0
end

abilityObject.onUseAbility = function(player, target, ability)
xi.monstrosity.relinquishOnAbility(player, target, ability)
end

return abilityObject
36 changes: 36 additions & 0 deletions scripts/commands/addallmonstrosity.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
-----------------------------------
-- func: addallmonstrosity
-- desc: Adds all species, instincts, and variants for monstrosity
-----------------------------------
local commandObj = {}

commandObj.cmdprops =
{
permission = 1,
parameters = 's'
}

local function error(player, msg)
player:PrintToPlayer(msg)
player:PrintToPlayer('!addallmonstrosity (player)')
end

commandObj.onTrigger = function(player, target)
-- validate target
local targ
if target == nil then
targ = player
else
targ = GetPlayerByName(target)
if targ == nil then
error(player, string.format('Player named "%s" not found!', target))
return
end
end

xi.monstrosity.unlockAll(targ)

player:PrintToPlayer(string.format('%s now has all monstrosity data.', targ:getName()))
end

return commandObj
29 changes: 29 additions & 0 deletions scripts/commands/costume2.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
-----------------------------------
-- func: costume2
-- desc: Sets the players current costume2.
-----------------------------------
local commandObj = {}

commandObj.cmdprops =
{
permission = 1,
parameters = 'i'
}

local function error(player, msg)
player:PrintToPlayer(msg)
player:PrintToPlayer('!costume2 <costumeID>')
end

commandObj.onTrigger = function(player, costumeId)
-- validate costumeId
if costumeId == nil or costumeId < 0 then
error(player, 'Invalid costumeID.')
return
end

-- put on costume
player:setCostume2(costumeId)
end

return commandObj
27 changes: 27 additions & 0 deletions scripts/commands/monstrosity.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
-----------------------------------
-- func: monstrosity
-- desc: scripts/globals/monstrosity.lua for a general overview of how Monstrosity works and is designed.
-----------------------------------
local commandObj = {}

commandObj.cmdprops =
{
permission = 1,
parameters = ''
}

commandObj.onTrigger = function(player)
if player:getMainJob() ~= xi.job.MON then
local pos = player:getPos()
player:setMonstrosityEntryData(pos.x, pos.y, pos.z, pos.rot, player:getZoneID(), player:getMainJob(), player:getSubJob())
player:changeJob(xi.job.MON)
else
local data = player:getMonstrosityData()
player:changeJob(data.entry_mjob)
player:changesJob(data.entry_sjob)
end

player:setPos(player:getXPos(), player:getYPos(), player:getZPos(), player:getRotPos(), player:getZoneID())
end

return commandObj
34 changes: 34 additions & 0 deletions scripts/effects/gestation.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
-----------------------------------
-- xi.effect.GESTATION
-- https://ffxiclopedia.fandom.com/wiki/Gestation
--
-- Effects
-- Gestation is a combination of the following:
-- - Completely undetectable, even to True Sight and True Hearing monsters
-- - Quickening
-- - Unable take any actions (attacks, spells, job abilities, etc.)
--
-- Duration
-- - Outside Belligerency: 18 hours
-- - During Belligerency: 1 minute
--
-- How to remove the effect
-- - Wait for the effect to wear off
-- - Remove manually
-----------------------------------
local effectObject = {}

local boostAmount = 50 -- +50% movement speed

effectObject.onEffectGain = function(target, effect)
target:addMod(xi.mod.MOVE, boostAmount)
end

effectObject.onEffectTick = function(target, effect)
end

effectObject.onEffectLose = function(target, effect)
target:delMod(xi.mod.MOVE, boostAmount)
end

return effectObject
3 changes: 2 additions & 1 deletion scripts/enum/job.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ xi.job =
SCH = 20,
GEO = 21,
RUN = 22,
MON = 23,
}

xi.MAX_JOB_TYPE = 23
xi.MAX_JOB_TYPE = 24
3 changes: 3 additions & 0 deletions scripts/enum/msg.lua
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,9 @@ xi.msg.basic =
-- TRUST & ALTER EGO
TRUST_NO_CAST_TRUST = 700, -- You are unable to use Trust magic at this time.
TRUST_NO_CALL_AE = 717, -- You cannot call forth alter egos here.

-- Monstrosity
FERETORY_COUNTDOWN = 679, -- <actor> will return to the Feretory in <n>
}

-- Used to modify certain basic messages.
Expand Down
Loading

0 comments on commit 796bf9d

Please sign in to comment.