Skip to content

Commit

Permalink
Merge pull request #5992 from jmcmorris/mamool_ja_family
Browse files Browse the repository at this point in the history
Mamool Ja Family Improvements
  • Loading branch information
claywar authored Jul 10, 2024
2 parents d629323 + 122ac91 commit 8bd9ae8
Show file tree
Hide file tree
Showing 37 changed files with 364 additions and 80 deletions.
6 changes: 2 additions & 4 deletions scripts/actions/mobskills/axe_throw.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,10 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill)
end

mobskillObject.onMobWeaponSkill = function(target, mob, skill)
mob:setAnimationSub(1)

local numhits = 1
local accmod = 1
local dmgmod = 3
local info = xi.mobskills.mobRangedMove(mob, target, skill, numhits, accmod, dmgmod, xi.mobskills.magicalTpBonus.NO_EFFECT)
local dmgmod = 1
local info = xi.mobskills.mobRangedMove(mob, target, skill, numhits, accmod, dmgmod, xi.mobskills.physicalTpBonus.ACC_VARIES)
local dmg = xi.mobskills.mobFinalAdjustments(info.dmg, mob, skill, target, xi.attackType.RANGED, xi.damageType.SLASHING, info.hitslanded)

target:takeDamage(dmg, mob, xi.attackType.RANGED, xi.damageType.SLASHING)
Expand Down
7 changes: 6 additions & 1 deletion scripts/actions/mobskills/firespit.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,14 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill)
end

mobskillObject.onMobWeaponSkill = function(target, mob, skill)
local numhits = math.random(2, 3)
if mob:getMainJob() == xi.job.BLM or mob:getMainJob() == xi.job.WHM then
numhits = xi.mobskills.shadowBehavior.IGNORE_SHADOWS
end

local dmgmod = 1
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.IGNORE_SHADOWS)
local dmg = xi.mobskills.mobFinalAdjustments(info.dmg, mob, skill, target, xi.attackType.MAGICAL, xi.damageType.FIRE, numhits)
target:takeDamage(dmg, mob, xi.attackType.MAGICAL, xi.damageType.FIRE)
return dmg
end
Expand Down
8 changes: 6 additions & 2 deletions scripts/actions/mobskills/forceful_blow.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,18 @@
local mobskillObject = {}

mobskillObject.onMobSkillCheck = function(target, mob, skill)
if mob:getAnimationSub() == 0 then
return 1
end

return 0
end

mobskillObject.onMobWeaponSkill = function(target, mob, skill)
local numhits = 1
local accmod = 1
local dmgmod = 3
local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, dmgmod, xi.mobskills.magicalTpBonus.NO_EFFECT)
local dmgmod = 1
local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, dmgmod, xi.mobskills.physicalTpBonus.DMG_VARIES, 1, 1.5, 2)
local dmg = xi.mobskills.mobFinalAdjustments(info.dmg, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded)
target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT)
return dmg
Expand Down
5 changes: 2 additions & 3 deletions scripts/actions/mobskills/javelin_throw.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill)
end

mobskillObject.onMobWeaponSkill = function(target, mob, skill)
mob:setAnimationSub(1)
local numhits = 1
local accmod = 1
local dmgmod = 3
local info = xi.mobskills.mobRangedMoveMobRangedMove(mob, target, skill, numhits, accmod, dmgmod, xi.mobskills.magicalTpBonus.NO_EFFECT)
local dmgmod = 1
local info = xi.mobskills.mobRangedMove(mob, target, skill, numhits, accmod, dmgmod, xi.mobskills.physicalTpBonus.ACC_VARIES)
local dmg = xi.mobskills.mobFinalAdjustments(info.dmg, mob, skill, target, xi.attackType.RANGED, xi.damageType.PIERCING, info.hitslanded)
target:takeDamage(dmg, mob, xi.attackType.RANGED, xi.damageType.PIERCING)
return dmg
Expand Down
11 changes: 9 additions & 2 deletions scripts/actions/mobskills/rushing_drub.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,20 @@
local mobskillObject = {}

mobskillObject.onMobSkillCheck = function(target, mob, skill)
return 0
if
mob:getAnimationSub() == 0 and
(mob:getMainJob() == xi.job.BLM or mob:getMainJob() == xi.job.WHM)
then
return 0
end

return 1
end

mobskillObject.onMobWeaponSkill = function(target, mob, skill)
local numhits = 4
local accmod = 1
local dmgmod = 1
local dmgmod = 0.75
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.BLUNT, info.hitslanded)
target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT)
Expand Down
2 changes: 1 addition & 1 deletion scripts/actions/mobskills/somersault_kick.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ end
mobskillObject.onMobWeaponSkill = function(target, mob, skill)
local numhits = 1
local accmod = 1
local dmgmod = 2.7
local dmgmod = 1.5
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.BLUNT, info.hitslanded)
target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT)
Expand Down
5 changes: 2 additions & 3 deletions scripts/actions/mobskills/stave_toss.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@ end
mobskillObject.onMobWeaponSkill = function(target, mob, skill)
local numhits = 1
local accmod = 1
local dmgmod = 3
local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, dmgmod, xi.mobskills.magicalTpBonus.NO_EFFECT)
local dmgmod = 1
local info = xi.mobskills.mobPhysicalMove(mob, target, skill, numhits, accmod, dmgmod, xi.mobskills.physicalTpBonus.ACC_VARIES)
local dmg = xi.mobskills.mobFinalAdjustments(info.dmg, mob, skill, target, xi.attackType.PHYSICAL, xi.damageType.BLUNT, info.hitslanded)

mob:setAnimationSub(1) -- Mob loses Staff on using Stave Toss
target:takeDamage(dmg, mob, xi.attackType.PHYSICAL, xi.damageType.BLUNT)
return dmg
end
Expand Down
5 changes: 2 additions & 3 deletions scripts/actions/mobskills/vorpal_blade.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ mobskillObject.onMobSkillCheck = function(target, mob, skill)
then
return 1
elseif mob:getFamily() == 176 then
-- Handle Mamool Ja THF
if mob:getAnimationSub() == 0 and mob:getMainJob() == xi.job.THF then
mob:messageBasic(xi.msg.basic.READIES_WS, 0, skill:getID())
-- Handle Mamool Ja BLU
if mob:getAnimationSub() == 0 and mob:getMainJob() == xi.job.BLU then
return 0
else
return 1
Expand Down
35 changes: 9 additions & 26 deletions scripts/actions/mobskills/warm-up.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,21 @@
local mobskillObject = {}

mobskillObject.onMobSkillCheck = function(target, mob, skill)
-- only brown-skinned mamool should use this move
local mobSkin = mob:getModelId()
if mobSkin == 1639 or mobSkin == 1619 then
return 0
else
return 1
end
return 0
end

mobskillObject.onMobWeaponSkill = function(target, mob, skill)
-- This is nonsensically overpowering: mob:getMainLvl() + 0.05*mob:getMaxHP()*(skill:getTP() / 1000)
local power = 10 -- Power needs redone with retail MOB VERSION formula not players blue magic
local power = 40
local effectID
local rand = math.random() -- 0 to 1..
--[[
After checking retail this mobskill appeared to grant only
1 of the 2 effects unlike the blue magic version
]]

if mob:hasStatusEffect(xi.effect.ACCURACY_BOOST) then
skill:setMsg(xi.mobskills.mobBuffMove(mob, xi.effect.EVASION_BOOST, power, 0, 180))
effectID = xi.effect.EVASION_BOOST
elseif mob:hasStatusEffect(xi.effect.ACCURACY_BOOST) then
skill:setMsg(xi.mobskills.mobBuffMove(mob, xi.effect.ACCURACY_BOOST, power, 0, 180))
skill:setMsg(xi.mobskills.mobBuffMove(mob, xi.effect.ACCURACY_BOOST, power, 0, 60))
effectID = xi.effect.ACCURACY_BOOST
else
if rand < 0.5 then
skill:setMsg(xi.mobskills.mobBuffMove(mob, xi.effect.EVASION_BOOST, power, 0, 180))
effectID = xi.effect.EVASION_BOOST
else
skill:setMsg(xi.mobskills.mobBuffMove(mob, xi.effect.ACCURACY_BOOST, power, 0, 180))
effectID = xi.effect.ACCURACY_BOOST
end
end

if mob:hasStatusEffect(xi.effect.EVASION_BOOST) then
skill:setMsg(xi.mobskills.mobBuffMove(mob, xi.effect.EVASION_BOOST, power, 0, 60))
effectID = xi.effect.EVASION_BOOST
end

return effectID
Expand Down
15 changes: 15 additions & 0 deletions scripts/mixins/families/mamool_ja.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require('scripts/globals/mixins')

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

g_mixins.families.mamoolJa = function(mamoolJaMob)
mamoolJaMob:addListener('WEAPONSKILL_STATE_EXIT', 'MAMOOL_JA_AMBUSH_FINISH', function(mob, skillID)
-- Remove weapon after using Javelin Throw, Axe Throw, or Stave Toss
if skillID == 1735 or skillID == 1736 or skillID == 1925 or skillID == 2361 then
mob:setAnimationSub(2)
end
end)
end

return g_mixins.families.mamoolJa
2 changes: 1 addition & 1 deletion scripts/mixins/weapon_break.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ g_mixins.weapon_break = function(weaponBreakMob)
local animationSub = mob:getAnimationSub()

-- break weapon
if animationSub ~= 1 then
if animationSub == 0 then
mob:setAnimationSub(1)
end
end
Expand Down
12 changes: 12 additions & 0 deletions scripts/zones/Bhaflau_Thickets/mobs/mamool_ja_blusterer.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
-----------------------------------
-- Area: Bhaflau Thickets
-- Mob: Mamool Ja Blusterer
-----------------------------------
mixins = { require('scripts/mixins/families/mamool_ja'), require('scripts/mixins/weapon_break') }
-----------------------------------
local entity = {}

entity.onMobDeath = function(mob, player, optParams)
end

return entity
12 changes: 12 additions & 0 deletions scripts/zones/Bhaflau_Thickets/mobs/mamool_ja_lurker.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
-----------------------------------
-- Area: Bhaflau Thickets
-- Mob: Mamool Ja Lurker
-----------------------------------
mixins = { require('scripts/mixins/weapon_break') }
-----------------------------------
local entity = {}

entity.onMobDeath = function(mob, player, optParams)
end

return entity
12 changes: 12 additions & 0 deletions scripts/zones/Bhaflau_Thickets/mobs/mamool_ja_mimer.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
-----------------------------------
-- Area: Bhaflau Thickets
-- Mob: Mamool Ja Mimer
-----------------------------------
mixins = { require('scripts/mixins/weapon_break') }
-----------------------------------
local entity = {}

entity.onMobDeath = function(mob, player, optParams)
end

return entity
12 changes: 12 additions & 0 deletions scripts/zones/Bhaflau_Thickets/mobs/mamool_ja_philosopher.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
-----------------------------------
-- Area: Bhaflau Thickets
-- Mob: Mamool Ja Philosopher
-----------------------------------
mixins = { require('scripts/mixins/families/mamool_ja'), require('scripts/mixins/weapon_break') }
-----------------------------------
local entity = {}

entity.onMobDeath = function(mob, player, optParams)
end

return entity
12 changes: 12 additions & 0 deletions scripts/zones/Bhaflau_Thickets/mobs/mamool_ja_pikeman.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
-----------------------------------
-- Area: Bhaflau Thickets
-- Mob: Mamool Ja Pikeman
-----------------------------------
mixins = { require('scripts/mixins/families/mamool_ja'), require('scripts/mixins/weapon_break') }
-----------------------------------
local entity = {}

entity.onMobDeath = function(mob, player, optParams)
end

return entity
12 changes: 12 additions & 0 deletions scripts/zones/Bhaflau_Thickets/mobs/mamool_ja_stabler.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
-----------------------------------
-- Area: Bhaflau Thickets
-- Mob: Mamool Ja Stabler
-----------------------------------
mixins = { require('scripts/mixins/families/mamool_ja'), require('scripts/mixins/weapon_break') }
-----------------------------------
local entity = {}

entity.onMobDeath = function(mob, player, optParams)
end

return entity
12 changes: 12 additions & 0 deletions scripts/zones/Mamook/mobs/mamool_ja_blusterer.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
-----------------------------------
-- Area: Mamook
-- Mob: Mamool Ja Blusterer
-----------------------------------
mixins = { require('scripts/mixins/families/mamool_ja'), require('scripts/mixins/weapon_break') }
-----------------------------------
local entity = {}

entity.onMobDeath = function(mob, player, optParams)
end

return entity
12 changes: 12 additions & 0 deletions scripts/zones/Mamook/mobs/mamool_ja_bounder.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
-----------------------------------
-- Area: Mamook
-- Mob: Mamool Ja Bounder
-----------------------------------
mixins = { require('scripts/mixins/weapon_break') }
-----------------------------------
local entity = {}

entity.onMobDeath = function(mob, player, optParams)
end

return entity
12 changes: 12 additions & 0 deletions scripts/zones/Mamook/mobs/mamool_ja_lurker.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
-----------------------------------
-- Area: Mamook
-- Mob: Mamool Ja Lurker
-----------------------------------
mixins = { require('scripts/mixins/weapon_break') }
-----------------------------------
local entity = {}

entity.onMobDeath = function(mob, player, optParams)
end

return entity
12 changes: 12 additions & 0 deletions scripts/zones/Mamook/mobs/mamool_ja_mimer.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
-----------------------------------
-- Area: Mamook
-- Mob: Mamool Ja Mimer
-----------------------------------
mixins = { require('scripts/mixins/weapon_break') }
-----------------------------------
local entity = {}

entity.onMobDeath = function(mob, player, optParams)
end

return entity
12 changes: 12 additions & 0 deletions scripts/zones/Mamook/mobs/mamool_ja_mimicker.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
-----------------------------------
-- Area: Mamook
-- Mob: Mamool Ja Mimicker
-----------------------------------
mixins = { require('scripts/mixins/weapon_break') }
-----------------------------------
local entity = {}

entity.onMobDeath = function(mob, player, optParams)
end

return entity
12 changes: 12 additions & 0 deletions scripts/zones/Mamook/mobs/mamool_ja_philosopher.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
-----------------------------------
-- Area: Mamook
-- Mob: Mamool Ja Philosopher
-----------------------------------
mixins = { require('scripts/mixins/families/mamool_ja'), require('scripts/mixins/weapon_break') }
-----------------------------------
local entity = {}

entity.onMobDeath = function(mob, player, optParams)
end

return entity
12 changes: 12 additions & 0 deletions scripts/zones/Mamook/mobs/mamool_ja_pikeman.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
-----------------------------------
-- Area: Mamook
-- Mob: Mamool Ja Pikeman
-----------------------------------
mixins = { require('scripts/mixins/families/mamool_ja'), require('scripts/mixins/weapon_break') }
-----------------------------------
local entity = {}

entity.onMobDeath = function(mob, player, optParams)
end

return entity
12 changes: 12 additions & 0 deletions scripts/zones/Mamook/mobs/mamool_ja_savant.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
-----------------------------------
-- Area: Mamook
-- Mob: Mamool Ja Savant
-----------------------------------
mixins = { require('scripts/mixins/families/mamool_ja'), require('scripts/mixins/weapon_break') }
-----------------------------------
local entity = {}

entity.onMobDeath = function(mob, player, optParams)
end

return entity
12 changes: 12 additions & 0 deletions scripts/zones/Mamook/mobs/mamool_ja_sophist.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
-----------------------------------
-- Area: Mamook
-- Mob: Mamool Ja Sophist
-----------------------------------
mixins = { require('scripts/mixins/families/mamool_ja'), require('scripts/mixins/weapon_break') }
-----------------------------------
local entity = {}

entity.onMobDeath = function(mob, player, optParams)
end

return entity
Loading

0 comments on commit 8bd9ae8

Please sign in to comment.