Skip to content

Commit

Permalink
[lua] Sarcopsylla NM
Browse files Browse the repository at this point in the history
  • Loading branch information
MowFord committed May 5, 2024
1 parent 725d24e commit aafb77f
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 2 deletions.
39 changes: 39 additions & 0 deletions scripts/mixins/families/chigoe_nm.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
-- Chigoe family mixin (for NMs that do not instantly die from crit/ws/JA)

require('scripts/globals/mixins')

g_mixins = g_mixins or {}
g_mixins.families = g_mixins.families or {}

local jobAbilities = set{
xi.jobAbility.SHIELD_BASH,
xi.jobAbility.JUMP,
xi.jobAbility.HIGH_JUMP,
xi.jobAbility.WEAPON_BASH,
xi.jobAbility.CHI_BLAST,
xi.jobAbility.TOMAHAWK,
xi.jobAbility.ANGON,
xi.jobAbility.QUICKSTEP,
xi.jobAbility.BOXSTEP,
xi.jobAbility.STUTTER_STEP,
xi.jobAbility.FEATHER_STEP,
}

g_mixins.families.chigoe = function(chigoeMob)
chigoeMob:addListener('SPAWN', 'CHIGOE_SPAWN', function(mob)
mob:hideName(true)
mob:setUntargetable(true)
end)

chigoeMob:addListener('ENGAGE', 'CHIGOE_ENGAGE', function(mob, target)
mob:hideName(false)
mob:setUntargetable(false)
end)

chigoeMob:addListener('DISENGAGE', 'CHIGOE_DISENGAGE', function(mob, target)
mob:hideName(true)
mob:setUntargetable(true)
end)
end

return g_mixins.families.chigoe
6 changes: 4 additions & 2 deletions scripts/zones/Grauberg_[S]/mobs/Sarcopsylla.lua
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
-----------------------------------
-- Area: Grauberg [S]
-- NM: Sarcopsylla
-- https://www.bg-wiki.com/ffxi/Sarcopsylla
-----------------------------------
mixins = { require('scripts/mixins/families/chigoe') }
mixins = { require('scripts/mixins/families/chigoe_nm') }
-----------------------------------
local entity = {}

entity.onMobInitialize = function(mob)
mob:setMod(xi.mod.TRIPLE_ATTACK, 100)
mob:setMobMod(xi.mobMod.ADD_EFFECT, 1)
end

entity.onAdditionalEffect = function(mob, target, damage)
return xi.mob.onAddEffect(mob, target, damage, xi.mob.ae.ENFIRE)
return xi.mob.onAddEffect(mob, target, damage, xi.mob.ae.ENFIRE, { power = math.random(25, 30) })
end

entity.onMobDeath = function(mob, player, optParams)
Expand Down

0 comments on commit aafb77f

Please sign in to comment.