Skip to content

Commit

Permalink
Ceizak Battlegrounds NM, Mobskills, HP/MP/ItemLevel
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuchemey committed Oct 4, 2024
1 parent 8d9822d commit f7c23de
Show file tree
Hide file tree
Showing 29 changed files with 928 additions and 48 deletions.
27 changes: 27 additions & 0 deletions scripts/actions/mobskills/Orthopterror.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
-----------------------------------
-- Name: Orthopterror
-- Description: Delivers a threefold attack, Conal AoE, inflicts Terror and Knockback.
-- Type: Physical
-- Utsusemi/Blink absorb: 3 shadows
-----------------------------------
---@type TMobSkill
local mobskillObject = {}

mobskillObject.onMobSkillCheck = function(target, mob, skill)
return 0
end

mobskillObject.onMobWeaponSkill = function(target, mob, skill)
local numhits = 3
local accmod = 1.1
local dmgmod = 2.1
local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, dmgmod, xi.mobskills.magicalTpBonus.NO_EFFECT)
local dmg = xi.mobskills.mobFinalAdjustments(info.dmg, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded)
target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING)

xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.TERROR, 100, 0, 10)

return dmg
end

return mobskillObject
33 changes: 33 additions & 0 deletions scripts/actions/mobskills/Proboscis.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
-----------------------------------
-- Proboscis
-- Description: Drains MP and steal 1 Buff
-- Type: Magical (Element)
-- Range: Conal
-- Utsusemi/Blink absorb: 1 shadow
-----------------------------------
---@type TMobSkill
local mobskillObject = {}

mobskillObject.onMobSkillCheck = function(target, mob, skill)
return 0
end

mobskillObject.onMobWeaponSkill = function(target, mob, skill)
-- Dark magical damage calculation
local dmgmod = 1.5
local info = xi.mobskills.mobMagicalMove(mob, target, skill, mob:getWeaponDmg() * dmgmod, xi.element.DARK, dmgmod, xi.mobskills.magicalTpBonus.MAB_BONUS, 1)
local dmg = xi.mobskills.mobFinalAdjustments(info.dmg, mob, skill, target, xi.attackType.MAGICAL, xi.damageType.DARK, xi.mobskills.shadowBehavior.NUMSHADOWS_1)

-- Convert damage dealt into MP for the mob
mob:addMP(dmg)

-- Steal one buff from the player
xi.mobskills.mobDrainStatusEffectMove(mob, target)

-- Set message to indicate MP drain
skill:setMsg(xi.msg.basic.MP_DRAIN)

return dmg
end

return mobskillObject
33 changes: 33 additions & 0 deletions scripts/actions/mobskills/benumbing_blaze.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
-----------------------------------
-- Benumbing Blaze
-- Description: Very High Fire Damage and Paralysis
-- Yalms: 20'
-- Area: AoE
-- Type: Magical
-- Element: Fire
-- Utsusemi/Blink absorb: Wipes shadows
-----------------------------------
---@type TMobSkill
local mobskillObject = {}

mobskillObject.onMobSkillCheck = function(target, mob, skill)
return 0
end

mobskillObject.onMobWeaponSkill = function(target, mob, skill)
-- Fire damage calculation
local dmgmod = 2.5
local duration = math.random(15, 120)
local info = xi.mobskills.mobMagicalMove(mob, target, skill, mob:getWeaponDmg() * 4, xi.element.FIRE, dmgmod, xi.mobskills.magicalTpBonus.NO_EFFECT)
local dmg = xi.mobskills.mobFinalAdjustments(info.dmg, mob, skill, target, xi.attackType.MAGICAL, xi.damageType.FIRE, xi.mobskills.shadowBehavior.WIPE_SHADOWS)

-- Apply Paralysis (AoE effect can be considered)
xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.PARALYSIS, 10, 3, duration)
-- Apply damage and set message
target:takeDamage(dmg, mob, xi.attackType.MAGICAL, xi.damageType.FIRE)
skill:setMsg(xi.msg.basic.MAGIC_DAMAGE)

return dmg
end

return mobskillObject
26 changes: 26 additions & 0 deletions scripts/actions/mobskills/blackout.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
-----------------------------------
-- Blackout
-- Description: AoE Silence, Paralysis, Blind.
-- Attack Type: Magical
-- Shadows: Ignores
-----------------------------------
---@type TMobSkill
local mobskillObject = {}

mobskillObject.onMobSkillCheck = function(target, mob, skill)
return 0
end

mobskillObject.onMobWeaponSkill = function(target, mob, skill)
local power = math.random(10, 20)
local duration = math.random(60, 180)

xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.PARALYSIS, power, 0, duration)
xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.SILENCE, power, 0, duration)

skill:setMsg(xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.BLINDNESS, power, 0, duration))

return xi.effect.BLINDNESS
end

return mobskillObject
26 changes: 26 additions & 0 deletions scripts/actions/mobskills/booming_bombination.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
-----------------------------------
-- Booming Bombination
-- Description: Deals damage. Additional effect: "Plague", "Def. Down", "M. Def. Down".
-- Type: Magical
-- Utsusemi/Blink absorb: Wipes shadows
-- Range: Aoe
-----------------------------------
local mobskillObject = {}

mobskillObject.onMobSkillCheck = function(target, mob, skill)
return 0
end

mobskillObject.onMobWeaponSkill = function(target, mob, skill)
local power = 10
local duration = math.random(60, 180)

xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.PLAGUE, power, 0, duration)
xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.DEFENSE_DOWN, power, 0, duration)

skill:setMsg(xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.MAGIC_DEF_DOWN, power, 0, duration))

return xi.effect.MAGIC_DEF_DOWN
end

return mobskillObject
28 changes: 28 additions & 0 deletions scripts/actions/mobskills/erosion_dust.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
-----------------------------------
-- Erosion Dust
-- Description: Damage and Dia
-- Yalms: 20'
-- Area: AoE
-- Type: Magical
-- Element: Light
-- Utsusemi/Blink absorb: Wipes shadows
-----------------------------------
---@type TMobSkill
local mobskillObject = {}

mobskillObject.onMobSkillCheck = function(target, mob, skill)
return 0
end

mobskillObject.onMobWeaponSkill = function(target, mob, skill)
local dmgmod = 1.5
local duration = math.random(15, 120)
local info = xi.mobskills.mobMagicalMove(mob, target, skill, mob:getWeaponDmg() * 3.5, xi.element.LIGHT, dmgmod, xi.mobskills.magicalTpBonus.NO_EFFECT)
local dmg = xi.mobskills.mobFinalAdjustments(info.dmg, mob, skill, target, xi.attackType.MAGICAL, xi.damageType.LIGHT, xi.mobskills.shadowBehavior.WIPE_SHADOWS)

xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.DIA, 10, 3, duration)
target:takeDamage(dmg, mob, xi.attackType.MAGICAL, xi.damageType.LIGHT)
return dmg
end

return mobskillObject
1 change: 1 addition & 0 deletions scripts/actions/mobskills/erratic_flutter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
-- Erratic Flutter does overwrite Hojo: Ni, Hojo: Ichi, and Slow.
-- Player Blue magic version is wind element instead of fire.
-----------------------------------
---@type TMobSkill
local mobskillObject = {}

mobskillObject.onMobSkillCheck = function(target, mob, skill)
Expand Down
52 changes: 41 additions & 11 deletions scripts/actions/mobskills/exuviation.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,56 @@
-- Range: Self
-- Notes: Erases all negative effects on the mob and heals an amount for each removed.
-----------------------------------
---@type TMobSkill
local mobskillObject = {}

mobskillObject.onMobSkillCheck = function(target, mob, skill)
return 0
end

mobskillObject.onMobWeaponSkill = function(target, mob, skill)
local baseHeal = 500
local statusHeal = 300
local effectCount = 0
local dispel = mob:eraseStatusEffect()

while (dispel ~= xi.effect.NONE)
do
effectCount = effectCount + 1
dispel = mob:eraseStatusEffect()
local function getRandomHealingPercentage()
local minPercentage = 2.5
local maxPercentage = 7.5
return math.random(minPercentage * 100, maxPercentage * 100) / 100
end

skill:setMsg(xi.msg.basic.SELF_HEAL)
return xi.mobskills.mobHealMove(mob, statusHeal * effectCount + baseHeal)
local maxHP = mob:getMaxHP()

local removables = {
xi.effect.FLASH, xi.effect.BLINDNESS, xi.effect.ELEGY, xi.effect.REQUIEM, xi.effect.PARALYSIS, xi.effect.POISON,
xi.effect.CURSE, xi.effect.DISEASE, xi.effect.PLAGUE, xi.effect.WEIGHT, xi.effect.BIND,
xi.effect.BIO, xi.effect.DIA, xi.effect.BURN, xi.effect.FROST, xi.effect.CHOKE, xi.effect.RASP, xi.effect.SHOCK, xi.effect.DROWN,
xi.effect.STR_DOWN, xi.effect.DEX_DOWN, xi.effect.VIT_DOWN, xi.effect.AGI_DOWN, xi.effect.INT_DOWN, xi.effect.MND_DOWN,
xi.effect.CHR_DOWN, xi.effect.ADDLE, xi.effect.SLOW, xi.effect.HELIX, xi.effect.ACCURACY_DOWN, xi.effect.ATTACK_DOWN,
xi.effect.EVASION_DOWN, xi.effect.DEFENSE_DOWN, xi.effect.MAGIC_ACC_DOWN, xi.effect.MAGIC_ATK_DOWN, xi.effect.MAGIC_EVASION_DOWN,
xi.effect.MAGIC_DEF_DOWN, xi.effect.MAX_TP_DOWN, xi.effect.MAX_MP_DOWN, xi.effect.MAX_HP_DOWN, xi.effect.SILENCE
}

local numEffectsRemoved = 0

for _, effect in ipairs(removables) do
if mob:hasStatusEffect(effect) then
mob:delStatusEffect(effect)
mob:eraseStatusEffect(effect)
numEffectsRemoved = numEffectsRemoved + 1
end
end

local randomHealingPercentage = getRandomHealingPercentage() / 100
local healingAmount = numEffectsRemoved * (maxHP * randomHealingPercentage)

if healingAmount > maxHP then
healingAmount = maxHP
end

if numEffectsRemoved > 0 then
skill:setMsg(xi.msg.basic.SELF_HEAL)
return healingAmount
else
skill:setMsg(xi.msg.basic.NO_EFFECT)
return 0
end
end

return mobskillObject
1 change: 1 addition & 0 deletions scripts/actions/mobskills/fire_break.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
-- Description: Deals fire damage to enemies within a fan-shaped area originating from the caster.
-- Type: Magical (Fire)
-----------------------------------
---@type TMobSkill
local mobskillObject = {}

mobskillObject.onMobSkillCheck = function(target, mob, skill)
Expand Down
20 changes: 20 additions & 0 deletions scripts/actions/mobskills/hell_scissors.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
-----------------------------------
-- Hell Scissors
-- Description: Damage equal to 95% of target's HP.
-- Type: Physical (Slashing)
-----------------------------------
---@type TMobSkill
local mobskillObject = {}

mobskillObject.onMobSkillCheck = function(target, mob, skill)
return 0
end

mobskillObject.onMobWeaponSkill = function(target, mob, skill)
local dmg = target:getHP() * 0.95
target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING)
mob:resetEnmity(target)
return dmg
end

return mobskillObject
1 change: 1 addition & 0 deletions scripts/actions/mobskills/magma_fan.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
-- Description: Deals Fire damage to enemies within a fan-shaped area originating from the caster.
-- Type: Magical Fire (Element)
-----------------------------------
---@type TMobSkill
local mobskillObject = {}

mobskillObject.onMobSkillCheck = function(target, mob, skill)
Expand Down
25 changes: 25 additions & 0 deletions scripts/actions/mobskills/natures_meditation.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
-----------------------------------
-- Nat. Meditation (Mob)
-- Gains an undispellable attack bonus that decays over time.
-----------------------------------
---@type TMobSkill
local mobskillObject = {}

mobskillObject.onMobSkillCheck = function(target, mob, skill)
return 0
end

mobskillObject.onMobWeaponSkill = function(target, mob, skill)
local duration = 30
local attack = mob:getStat(xi.mod.ATT)
local attBoost = attack * 0.3

if not mob:hasStatusEffect(xi.effect.ATTACK_BOOST) then
skill:setMsg(xi.mobskills.mobBuffMove(mob, xi.effect.ATTACK_BOOST, attBoost, 0, duration)) -- Apply attack boost
xi.mobskills.mobBuffMove(mob, xi.effect.ATTACK_BOOST, attBoost, 0, duration)
end

return xi.effect.ATTACK_BOOST
end

return mobskillObject
28 changes: 28 additions & 0 deletions scripts/actions/mobskills/sanguinary_slash.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
-----------------------------------
-- Name: Sanguinary Slash
-- Description: Knockback and Max HP Down.
-- Type: Physical (Slashing)
-----------------------------------
---@type TMobSkill
local mobskillObject = {}

mobskillObject.onMobSkillCheck = function(target, mob, skill)
return 0
end

mobskillObject.onMobWeaponSkill = function(target, mob, skill)
local numhits = 1
local accmod = 2
local dmgmod = 1.5
local duration = math.random(15, 120)
local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, dmgmod, xi.mobskills.physicalTpBonus.DMG_VARIES, 1, 2, 3)
local dmg = xi.mobskills.mobFinalAdjustments(info.dmg, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded, xi.mobskills.shadowBehavior.WIPE_SHADOWS)

target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING)

xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.MAX_HP_DOWN, 10, 0, duration)

return dmg
end

return mobskillObject
23 changes: 23 additions & 0 deletions scripts/actions/mobskills/sensilla_blades.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
-----------------------------------
-- Name: Sensilla Blades
-- Description: Conal with knockback.
-- Type: Physical (Slashing)
-----------------------------------
---@type TMobSkill
local mobskillObject = {}

mobskillObject.onMobSkillCheck = function(target, mob, skill)
return 0
end

mobskillObject.onMobWeaponSkill = function(target, mob, skill)
local numhits = 1
local accmod = 2
local dmgmod = 1.1
local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, dmgmod, xi.mobskills.physicalTpBonus.DMG_VARIES, 1, 2, 3)
local dmg = xi.mobskills.mobFinalAdjustments(info.dmg, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.SLASHING, info.hitslanded)
target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.SLASHING)
return dmg
end

return mobskillObject
27 changes: 27 additions & 0 deletions scripts/actions/mobskills/smouldering_swarm.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
-----------------------------------
-- Smouldering Swarm
--
-- Description: Deals Fire damage to enemies within an area of effect. Additional effect: Knockback
-- Type: Magical (Fire)
-- Utsusemi/Blink absorb: 2-3 shadows
-- Range: 10' radial
-----------------------------------
---@type TMobSkill
local mobskillObject = {}

mobskillObject.onMobSkillCheck = function(target, mob, skill)
return 0
end

mobskillObject.onMobWeaponSkill = function(target, mob, skill)
local dmgmod = 1.5 -- Increased damage modifier for stronger effect
local duration = math.random(15, 90)
local info = xi.mobskills.mobMagicalMove(mob, target, skill, mob:getWeaponDmg() * 3, xi.element.FIRE, dmgmod, xi.mobskills.magicalTpBonus.MAB_BONUS, 1)
local dmg = xi.mobskills.mobFinalAdjustments(info.dmg, mob, skill, target, xi.attackType.MAGICAL, xi.damageType.FIRE, xi.mobskills.shadowBehavior.WIPE_SHADOWS)

target:takeDamage(dmg, mob, xi.attackType.MAGICAL, xi.damageType.FIRE)
target:addStatusEffect(xi.effect.BURN, 20, 3, duration) -- Applying burn effect
return dmg
end

return mobskillObject
Loading

0 comments on commit f7c23de

Please sign in to comment.