diff --git a/scripts/actions/mobskills/frozen_mist.lua b/scripts/actions/mobskills/frozen_mist.lua new file mode 100644 index 00000000000..0d159d71d3f --- /dev/null +++ b/scripts/actions/mobskills/frozen_mist.lua @@ -0,0 +1,28 @@ +----------------------------------- +-- Frozen Mist +-- Description: Deals ice damage to enemies around the caster. Additional effect: Terror +-- Type: Magical (Ice) +----------------------------------- +local mobskillObject = {} + +mobskillObject.onMobSkillCheck = function(target, mob, skill) + return 0 +end + +mobskillObject.onMobWeaponSkill = function(target, mob, skill) + local power = 30 + local resist = xi.mobskills.applyPlayerResistance(mob, xi.effect.TERROR, target, mob:getStat(xi.mod.INT) - target:getStat(xi.mod.INT), 0, 0) + local duration = 30 * resist + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.TERROR, power, 0, duration) + + local dmgmod = 1.5 + local info = xi.mobskills.mobMagicalMove(mob, target, skill, mob:getWeaponDmg(), xi.element.ICE, dmgmod, xi.mobskills.magicalTpBonus.NO_EFFECT) + local dmg = xi.mobskills.mobFinalAdjustments(info.dmg, mob, skill, target, xi.attackType.MAGICAL, xi.damageType.ICE, xi.mobskills.shadowBehavior.WIPE_SHADOWS) + + target:takeDamage(dmg, mob, xi.attackType.MAGICAL, xi.damageType.ICE) + + return dmg +end + +return mobskillObject diff --git a/scripts/actions/mobskills/hydro_wave.lua b/scripts/actions/mobskills/hydro_wave.lua new file mode 100644 index 00000000000..5729d7ad896 --- /dev/null +++ b/scripts/actions/mobskills/hydro_wave.lua @@ -0,0 +1,30 @@ +----------------------------------- +-- Hydro Wave +-- Description: Deals water damage to enemies around the caster. +-- Type: Magical (Water) +----------------------------------- +local mobskillObject = {} + +mobskillObject.onMobSkillCheck = function(target, mob, skill) + return 0 +end + +mobskillObject.onMobWeaponSkill = function(target, mob, skill) + local power = math.random(1, 16) + local resist = xi.mobskills.applyPlayerResistance(mob, xi.effect.ENCUMBRANCE_II, target, mob:getStat(xi.mod.INT) - target:getStat(xi.mod.INT), 0, 0) + local duration = 30 * resist + + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.ENCUMBRANCE_II, power, 0, duration) + + local dmgmod = 2.5 + local info = xi.mobskills.mobMagicalMove(mob, target, skill, mob:getWeaponDmg(), xi.element.WATER, dmgmod, xi.mobskills.magicalTpBonus.NO_EFFECT) + local dmg = xi.mobskills.mobFinalAdjustments(info.dmg, mob, skill, target, xi.attackType.MAGICAL, xi.damageType.WATER, xi.mobskills.shadowBehavior.WIPE_SHADOWS) + + target:takeDamage(dmg, mob, xi.attackType.MAGICAL, xi.damageType.WATER) + + mob:addStatusEffect(xi.effect.STONESKIN, 0, 0, 180, 2, 1500) + + return dmg +end + +return mobskillObject diff --git a/scripts/effects/encumbrance.lua b/scripts/effects/encumbrance.lua index 8c568c783a8..fadc0e90b51 100644 --- a/scripts/effects/encumbrance.lua +++ b/scripts/effects/encumbrance.lua @@ -1,5 +1,5 @@ ----------------------------------- --- xi.effect.ENCUMBERANCE +-- xi.effect.ENCUMBRANCE ----------------------------------- local effectObject = {} diff --git a/scripts/mixins/families/ruszor.lua b/scripts/mixins/families/ruszor.lua index d5d293ba15c..44e10b6775b 100644 --- a/scripts/mixins/families/ruszor.lua +++ b/scripts/mixins/families/ruszor.lua @@ -3,9 +3,28 @@ require('scripts/globals/mixins') g_mixins = g_mixins or {} g_mixins.ruszor = function(ruszorMob) + ruszorMob:addListener('WEAPONSKILL_USE', 'AURA', function(mob, target, actionId, tp, action) + local frozenMist = 2438 + local hydroWave = 2439 + + -- Ruszor gain a temporary icy aura following the use of Frozen Mist. + if actionId == frozenMist then + mob:setAnimationSub(1) + mob:setMod(xi.mod.WATER_ABSORB, 0) + mob:setMod(xi.mod.ICE_ABSORB, 100) + -- Ruszor gain a temporary water aura following the use of Hydro Wave. + elseif actionId == hydroWave then + mob:setAnimationSub(2) + mob:setMod(xi.mod.ICE_ABSORB, 0) + mob:setMod(xi.mod.WATER_ABSORB, 100) + end + end) + ruszorMob:addListener('EFFECT_LOSE', 'STONESKIN', function(mob, effect) if effect:getEffectType() == xi.effect.STONESKIN then mob:setAnimationSub(0) + mob:setMod(xi.mod.ICE_ABSORB, 0) + mob:setMod(xi.mod.WATER_ABSORB, 0) end end) end