Skip to content

Commit

Permalink
Merge pull request #1321 from WinterSolstice8/feature/rune_enchantment
Browse files Browse the repository at this point in the history
Implement Rune Enhancement, elemental resistances and duplicate buffs only
  • Loading branch information
claywar authored Feb 26, 2022
2 parents 28188fe + 5131c0b commit 9c64f9e
Show file tree
Hide file tree
Showing 19 changed files with 424 additions and 30 deletions.
21 changes: 21 additions & 0 deletions scripts/globals/abilities/flabra.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
-----------------------------------
-- Ability: Flabra
-- Increases resistance against earth and deals wind damage.
-- Obtained: Rune Fencer Level 5
-- Recast Time: 0:05
-- Duration: 5:00
-----------------------------------
require("scripts/globals/status")
require("scripts/globals/job_utils/rune_fencer")
-----------------------------------
local ability_object = {}

ability_object.onAbilityCheck = function(player, target, ability)
return 0, 0
end

ability_object.onUseAbility = function(player, target, ability, action)
xi.job_utils.rune_fencer.useRuneEnchantment(player, target, ability, xi.effect.FLABRA)
end

return ability_object
21 changes: 21 additions & 0 deletions scripts/globals/abilities/gelus.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
-----------------------------------
-- Ability: Gelus
-- Increases resistance against wind and deals ice damage.
-- Obtained: Rune Fencer Level 5
-- Recast Time: 0:05
-- Duration: 5:00
-----------------------------------
require("scripts/globals/status")
require("scripts/globals/job_utils/rune_fencer")
-----------------------------------
local ability_object = {}

ability_object.onAbilityCheck = function(player, target, ability)
return 0, 0
end

ability_object.onUseAbility = function(player, target, ability, action)
xi.job_utils.rune_fencer.useRuneEnchantment(player, target, ability, xi.effect.GELUS)
end

return ability_object
21 changes: 21 additions & 0 deletions scripts/globals/abilities/ignis.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
-----------------------------------
-- Ability: Ignis
-- Increases resistance against ice and deals fire damage.
-- Obtained: Rune Fencer Level 5
-- Recast Time: 0:05
-- Duration: 5:00
-----------------------------------
require("scripts/globals/status")
require("scripts/globals/job_utils/rune_fencer")
-----------------------------------
local ability_object = {}

ability_object.onAbilityCheck = function(player, target, ability)
return 0, 0
end

ability_object.onUseAbility = function(player, target, ability, action)
xi.job_utils.rune_fencer.useRuneEnchantment(player, target, ability, xi.effect.IGNIS)
end

return ability_object
21 changes: 21 additions & 0 deletions scripts/globals/abilities/lux.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
-----------------------------------
-- Ability: Lux
-- Increases resistance against dark and deals light damage.
-- Obtained: Rune Fencer Level 5
-- Recast Time: 0:05
-- Duration: 5:00
-----------------------------------
require("scripts/globals/status")
require("scripts/globals/job_utils/rune_fencer")
-----------------------------------
local ability_object = {}

ability_object.onAbilityCheck = function(player, target, ability)
return 0, 0
end

ability_object.onUseAbility = function(player, target, ability, action)
xi.job_utils.rune_fencer.useRuneEnchantment(player, target, ability, xi.effect.LUX)
end

return ability_object
21 changes: 21 additions & 0 deletions scripts/globals/abilities/sulpor.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
-----------------------------------
-- Ability: Sulpor
-- Increases resistance against earth and deals thunder damage.
-- Obtained: Rune Fencer Level 5
-- Recast Time: 0:05
-- Duration: 5:00
-----------------------------------
require("scripts/globals/status")
require("scripts/globals/job_utils/rune_fencer")
-----------------------------------
local ability_object = {}

ability_object.onAbilityCheck = function(player, target, ability)
return 0, 0
end

ability_object.onUseAbility = function(player, target, ability, action)
xi.job_utils.rune_fencer.useRuneEnchantment(player, target, ability, xi.effect.SULPOR)
end

return ability_object
21 changes: 21 additions & 0 deletions scripts/globals/abilities/tellus.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
-----------------------------------
-- Ability: Tellus
-- Increases resistance against thunder and deals earth damage.
-- Obtained: Rune Fencer Level 5
-- Recast Time: 0:05
-- Duration: 5:00
-----------------------------------
require("scripts/globals/status")
require("scripts/globals/job_utils/rune_fencer")
-----------------------------------
local ability_object = {}

ability_object.onAbilityCheck = function(player, target, ability)
return 0, 0
end

ability_object.onUseAbility = function(player, target, ability, action)
xi.job_utils.rune_fencer.useRuneEnchantment(player, target, ability, xi.effect.TELLUS)
end

return ability_object
21 changes: 21 additions & 0 deletions scripts/globals/abilities/tenebrae.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
-----------------------------------
-- Ability: Tenebrae
-- Increases resistance against light and deals dark damage.
-- Obtained: Rune Fencer Level 5
-- Recast Time: 0:05
-- Duration: 5:00
-----------------------------------
require("scripts/globals/status")
require("scripts/globals/job_utils/rune_fencer")
-----------------------------------
local ability_object = {}

ability_object.onAbilityCheck = function(player, target, ability)
return 0, 0
end

ability_object.onUseAbility = function(player, target, ability, action)
xi.job_utils.rune_fencer.useRuneEnchantment(player, target, ability, xi.effect.TENEBRAE)
end

return ability_object
21 changes: 21 additions & 0 deletions scripts/globals/abilities/unda.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
-----------------------------------
-- Ability: Undra
-- Increases resistance against fire and deals water damage.
-- Obtained: Rune Fencer Level 5
-- Recast Time: 0:05
-- Duration: 5:00
-----------------------------------
require("scripts/globals/status")
require("scripts/globals/job_utils/rune_fencer")
-----------------------------------
local ability_object = {}

ability_object.onAbilityCheck = function(player, target, ability)
return 0, 0
end

ability_object.onUseAbility = function(player, target, ability, action)
xi.job_utils.rune_fencer.useRuneEnchantment(player, target, ability, xi.effect.UNDA)
end

return ability_object
22 changes: 22 additions & 0 deletions scripts/globals/effects/flabra.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
-----------------------------------
--
-- xi.effect.FLABRA
--
-----------------------------------
require("scripts/globals/status")
-----------------------------------
local effect_object = {}

effect_object.onEffectGain = function(target, effect)
target:addMod(xi.mod.EARTH_RES, effect:getPower())
end

effect_object.onEffectTick = function(target, effect)
end

effect_object.onEffectLose = function(target, effect)
target:delMod(xi.mod.EARTH_RES, effect:getPower())
end

return effect_object

21 changes: 21 additions & 0 deletions scripts/globals/effects/gelus.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
-----------------------------------
--
-- xi.effect.GELUS
--
-----------------------------------
require("scripts/globals/status")
-----------------------------------
local effect_object = {}

effect_object.onEffectGain = function(target, effect)
target:addMod(xi.mod.WIND_RES, effect:getPower())
end

effect_object.onEffectTick = function(target, effect)
end

effect_object.onEffectLose = function(target, effect)
target:delMod(xi.mod.WIND_RES, effect:getPower())
end

return effect_object
21 changes: 21 additions & 0 deletions scripts/globals/effects/ignis.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
-----------------------------------
--
-- xi.effect.IGNIS
--
-----------------------------------
require("scripts/globals/status")
-----------------------------------
local effect_object = {}

effect_object.onEffectGain = function(target, effect)
target:addMod(xi.mod.ICE_RES, effect:getPower())
end

effect_object.onEffectTick = function(target, effect)
end

effect_object.onEffectLose = function(target, effect)
target:delMod(xi.mod.ICE_RES, effect:getPower())
end

return effect_object
21 changes: 21 additions & 0 deletions scripts/globals/effects/lux.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
-----------------------------------
--
-- xi.effect.LUX
--
-----------------------------------
require("scripts/globals/status")
-----------------------------------
local effect_object = {}

effect_object.onEffectGain = function(target, effect)
target:addMod(xi.mod.DARK_RES, effect:getPower())
end

effect_object.onEffectTick = function(target, effect)
end

effect_object.onEffectLose = function(target, effect)
target:delMod(xi.mod.DARK_RES, effect:getPower())
end

return effect_object
21 changes: 21 additions & 0 deletions scripts/globals/effects/sulpor.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
-----------------------------------
--
-- xi.effect.SULPOR
--
-----------------------------------
require("scripts/globals/status")
-----------------------------------
local effect_object = {}

effect_object.onEffectGain = function(target, effect)
target:addMod(xi.mod.WATER_RES, effect:getPower())
end

effect_object.onEffectTick = function(target, effect)
end

effect_object.onEffectLose = function(target, effect)
target:delMod(xi.mod.WATER_RES, effect:getPower())
end

return effect_object
21 changes: 21 additions & 0 deletions scripts/globals/effects/tellus.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
-----------------------------------
--
-- xi.effect.IGNIS
--
-----------------------------------
require("scripts/globals/status")
-----------------------------------
local effect_object = {}

effect_object.onEffectGain = function(target, effect)
target:addMod(xi.mod.THUNDER_RES, effect:getPower())
end

effect_object.onEffectTick = function(target, effect)
end

effect_object.onEffectLose = function(target, effect)
target:delMod(xi.mod.THUNDER_RES, effect:getPower())
end

return effect_object
21 changes: 21 additions & 0 deletions scripts/globals/effects/tenebrae.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
-----------------------------------
--
-- xi.effect.TENEBRAE
--
-----------------------------------
require("scripts/globals/status")
-----------------------------------
local effect_object = {}

effect_object.onEffectGain = function(target, effect)
target:addMod(xi.mod.LIGHT_RES, effect:getPower())
end

effect_object.onEffectTick = function(target, effect)
end

effect_object.onEffectLose = function(target, effect)
target:delMod(xi.mod.LIGHT_RES, effect:getPower())
end

return effect_object
21 changes: 21 additions & 0 deletions scripts/globals/effects/unda.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
-----------------------------------
--
-- xi.effect.UNDA
--
-----------------------------------
require("scripts/globals/status")
-----------------------------------
local effect_object = {}

effect_object.onEffectGain = function(target, effect)
target:addMod(xi.mod.FIRE_RES, effect:getPower())
end

effect_object.onEffectTick = function(target, effect)
end

effect_object.onEffectLose = function(target, effect)
target:delMod(xi.mod.FIRE_RES, effect:getPower())
end

return effect_object
Loading

0 comments on commit 9c64f9e

Please sign in to comment.