-
Notifications
You must be signed in to change notification settings - Fork 627
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 #4555 from LandSandBoat/zach2good/monstrosity_1
[core] Monstrosity part 1: Plumbing
- Loading branch information
Showing
74 changed files
with
5,017 additions
and
436 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
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,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 |
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,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 |
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,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 |
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,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 |
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,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 |
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 |
---|---|---|
|
@@ -25,6 +25,7 @@ xi.job = | |
SCH = 20, | ||
GEO = 21, | ||
RUN = 22, | ||
MON = 23, | ||
} | ||
|
||
xi.MAX_JOB_TYPE = 23 | ||
xi.MAX_JOB_TYPE = 24 |
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.