-
Notifications
You must be signed in to change notification settings - Fork 642
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 #1442 from WinterSolstice8/base
[PLD/RUN] Implement Crusade, [RUN] Implement Pflug, partially implement Foil.
- Loading branch information
Showing
14 changed files
with
212 additions
and
6 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,21 @@ | ||
----------------------------------- | ||
-- Ability: Pflug | ||
-- Enhances resistance. The types of resistance enhanced depend upon the runes you harbor. | ||
-- Obtained: Rune Fencer Level 40 | ||
-- Recast Time: 3:00 | ||
-- Duration: 2:00 | ||
----------------------------------- | ||
require("scripts/globals/status") | ||
require("scripts/globals/job_utils/rune_fencer") | ||
----------------------------------- | ||
local ability_object = {} | ||
|
||
ability_object.onAbilityCheck = function(player, target, ability) | ||
return xi.job_utils.rune_fencer.checkHaveRunes(player) | ||
end | ||
|
||
ability_object.onUseAbility = function(player, target, ability, action) | ||
return xi.job_utils.rune_fencer.usePflug(player, target, ability, action) | ||
end | ||
|
||
return ability_object |
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,19 @@ | ||
----------------------------------- | ||
-- xi.effect.FOIL | ||
----------------------------------- | ||
require("scripts/globals/status") | ||
----------------------------------- | ||
local effect_object = {} | ||
|
||
effect_object.onEffectGain = function(target, effect) | ||
effect:addMod(xi.mod.SPECIAL_ATTACK_EVASION, effect:getPower()) | ||
end | ||
|
||
effect_object.onEffectTick = function(target, effect) -- TODO: Determine how Foil ticks down? It's description indicates this. | ||
end | ||
|
||
effect_object.onEffectLose = function(target, effect) | ||
-- intentionally blank. mod removes itself in C++ due to being added to the effect. | ||
end | ||
|
||
return effect_object |
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,20 @@ | ||
----------------------------------- | ||
-- xi.effect.PFLUG | ||
----------------------------------- | ||
require("scripts/globals/status") | ||
require("scripts/globals/job_utils/rune_fencer") | ||
----------------------------------- | ||
local effect_object = {} | ||
|
||
effect_object.onEffectGain = function(target, effect) | ||
xi.job_utils.rune_fencer.onPflugEffectGain(target, effect) | ||
end | ||
|
||
effect_object.onEffectTick = function(target, effect) | ||
end | ||
|
||
effect_object.onEffectLose = function(target, effect) | ||
xi.job_utils.rune_fencer.onPflugEffectLose(target, effect) | ||
end | ||
|
||
return effect_object |
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,16 @@ | ||
----------------------------------- | ||
-- ID: 5103 | ||
-- Scroll of Crusade | ||
-- Teaches the white magic Crusade | ||
----------------------------------- | ||
local item_object = {} | ||
|
||
item_object.onItemCheck = function(target) | ||
return target:canLearnSpell(476) | ||
end | ||
|
||
item_object.onItemUse = function(target) | ||
target:addSpell(476) | ||
end | ||
|
||
return item_object |
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,16 @@ | ||
----------------------------------- | ||
-- ID: 5102 | ||
-- Scroll of Foil | ||
-- Teaches the white magic Foil | ||
----------------------------------- | ||
local item_object = {} | ||
|
||
item_object.onItemCheck = function(target) | ||
return target:canLearnSpell(840) | ||
end | ||
|
||
item_object.onItemUse = function(target) | ||
target:addSpell(840) | ||
end | ||
|
||
return item_object |
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,25 @@ | ||
----------------------------------- | ||
-- Spell: Crusade | ||
----------------------------------- | ||
require("scripts/globals/magic") | ||
require("scripts/globals/msg") | ||
require("scripts/globals/status") | ||
----------------------------------- | ||
local spell_object = {} | ||
|
||
spell_object.onMagicCastingCheck = function(caster, target, spell) | ||
return 0 | ||
end | ||
|
||
spell_object.onSpellCast = function(caster, target, spell) | ||
|
||
if target:addStatusEffect(xi.effect.ENMITY_BOOST, 30, 0, 300) then | ||
spell:setMsg(xi.msg.basic.MAGIC_GAIN_EFFECT) | ||
else | ||
spell:setMsg(xi.msg.basic.MAGIC_NO_EFFECT) | ||
end | ||
|
||
return xi.effect.ENMITY_BOOST | ||
end | ||
|
||
return spell_object |
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,28 @@ | ||
----------------------------------- | ||
-- Spell: Foil | ||
----------------------------------- | ||
require("scripts/globals/magic") | ||
require("scripts/globals/msg") | ||
require("scripts/globals/status") | ||
----------------------------------- | ||
local spell_object = {} | ||
|
||
spell_object.onMagicCastingCheck = function(caster, target, spell) | ||
return 0 | ||
end | ||
|
||
-- TODO: determine mechanics of how Foil's "Special Attack" evasion works. | ||
-- Martel has a post about it here: https://www.bluegartr.com/threads/115399-Rune-Fencer-Findings?p=5665305&viewfull=1#post5665305 | ||
-- More testing is required (such as determining accuracy of the target used for testing) | ||
spell_object.onSpellCast = function(caster, target, spell) | ||
|
||
if target:addStatusEffect(xi.effect.FOIL, 0, 0, 300) then -- power set to 0 because true mechanics are unknown as of now. The primary use of Foil is for enmity anyway. | ||
spell:setMsg(xi.msg.basic.MAGIC_GAIN_EFFECT) | ||
else | ||
spell:setMsg(xi.msg.basic.MAGIC_NO_EFFECT) | ||
end | ||
|
||
return xi.effect.FOIL | ||
end | ||
|
||
return spell_object |
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
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