From 4022267f13e124dca80a622e849a3cd52fe238de Mon Sep 17 00:00:00 2001 From: Aerec Date: Fri, 6 Sep 2024 15:11:50 -0400 Subject: [PATCH] [BCNM] Implement BCNM20 Shooting Fish Co-Authored-By: dallano --- .../actions/mobskills/aqua_ball_knockback.lua | 31 +++++++++++++++++++ .../Horlais_Peak/shooting_fish.lua | 2 -- .../zones/Horlais_Peak/mobs/Archer_Pugil.lua | 16 ++++++++++ .../zones/Horlais_Peak/mobs/Sniper_Pugil.lua | 16 ++++++++++ sql/mob_skill_lists.sql | 5 +++ sql/mob_skills.sql | 2 +- 6 files changed, 69 insertions(+), 3 deletions(-) create mode 100644 scripts/actions/mobskills/aqua_ball_knockback.lua create mode 100644 scripts/zones/Horlais_Peak/mobs/Archer_Pugil.lua create mode 100644 scripts/zones/Horlais_Peak/mobs/Sniper_Pugil.lua diff --git a/scripts/actions/mobskills/aqua_ball_knockback.lua b/scripts/actions/mobskills/aqua_ball_knockback.lua new file mode 100644 index 00000000000..134d14f0776 --- /dev/null +++ b/scripts/actions/mobskills/aqua_ball_knockback.lua @@ -0,0 +1,31 @@ +----------------------------------- +-- Aqua Ball (datmod) +-- Deals ranged water damage that causes knockback. +-- Used by pugils in BCNM: Shooting Fish +----------------------------------- +require("scripts/globals/mobskills") +----------------------------------- +local mobskillObject = {} + +mobskillObject.onMobSkillCheck = function(target, mob, skill) + return 0 +end + +mobskillObject.onMobWeaponSkill = function(target, mob, skill) + local damage = mob:getWeaponDmg() * 3 + local power = 20 + local tick = 3 + local duration = power * tick + + damage = xi.mobskills.mobMagicalMove(mob, target, skill, damage, xi.element.WATER, 1, xi.mobskills.magicalTpBonus.MAB_BONUS, 1.5) + damage = xi.mobskills.mobFinalAdjustments(damage, mob, skill, target, xi.attackType.MAGICAL, xi.damageType.WATER, xi.mobskills.shadowBehavior.IGNORE_SHADOWS) + + target:takeDamage(damage, mob, xi.attackType.MAGICAL, xi.damageType.WATER) + xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.STR_DOWN, power, tick, duration) + skill:setMsg(xi.msg.basic.HIT_DMG) + + + return damage +end + +return mobskillObject diff --git a/scripts/battlefields/Horlais_Peak/shooting_fish.lua b/scripts/battlefields/Horlais_Peak/shooting_fish.lua index 9beab0b5c55..ad64ef8ef03 100644 --- a/scripts/battlefields/Horlais_Peak/shooting_fish.lua +++ b/scripts/battlefields/Horlais_Peak/shooting_fish.lua @@ -16,8 +16,6 @@ local content = Battlefield:new({ entryNpc = 'BC_Entrance', exitNpc = 'Burning_Circle', requiredItems = { xi.item.CLOUDY_ORB, wearMessage = horlaisID.text.A_CRACK_HAS_FORMED, wornMessage = horlaisID.text.ORB_IS_CRACKED }, - - experimental = true, }) content:addEssentialMobs({ 'Sniper_Pugil', 'Archer_Pugil' }) diff --git a/scripts/zones/Horlais_Peak/mobs/Archer_Pugil.lua b/scripts/zones/Horlais_Peak/mobs/Archer_Pugil.lua new file mode 100644 index 00000000000..85fc61238e0 --- /dev/null +++ b/scripts/zones/Horlais_Peak/mobs/Archer_Pugil.lua @@ -0,0 +1,16 @@ +----------------------------------- +-- Area: Horlais Peak +-- Mob: Archer Pugil +-- BCNM: Shooting Fish +----------------------------------- +---@type TMobEntity +local entity = {} + +entity.onMobSpawn = function(mob) + mob:setMobSkillAttack(2014) -- Aquaball Knockback AA Skill +end + +entity.onMobDeath = function(mob, player, optParams) +end + +return entity diff --git a/scripts/zones/Horlais_Peak/mobs/Sniper_Pugil.lua b/scripts/zones/Horlais_Peak/mobs/Sniper_Pugil.lua new file mode 100644 index 00000000000..e968dba108e --- /dev/null +++ b/scripts/zones/Horlais_Peak/mobs/Sniper_Pugil.lua @@ -0,0 +1,16 @@ +----------------------------------- +-- Area: Horlais Peak +-- Mob: Sniper Pugil +-- BCNM: Shooting Fish +----------------------------------- +---@type TMobEntity +local entity = {} + +entity.onMobSpawn = function(mob) + mob:setMobSkillAttack(2014) -- Aquaball Knockback AA Skill +end + +entity.onMobDeath = function(mob, player, optParams) +end + +return entity diff --git a/sql/mob_skill_lists.sql b/sql/mob_skill_lists.sql index facd4d4935c..446cf10d7ad 100644 --- a/sql/mob_skill_lists.sql +++ b/sql/mob_skill_lists.sql @@ -3911,6 +3911,11 @@ INSERT INTO `mob_skill_lists` VALUES ('Avatar_Ifrit_WTB',2013,844); -- Waking th INSERT INTO `mob_skill_lists` VALUES ('Avatar_Ifrit_WTB',2013,845); -- Waking the Beast, fire iv INSERT INTO `mob_skill_lists` VALUES ('Avatar_Ifrit_WTB',2013,847); -- Waking the Beast, meteor_strike +INSERT INTO `mob_skill_lists` VALUES ('Shooting_Fish',2014,313); -- knockback aquaball - BCNM20 Shooting Fish + + +-- Next available ID: 2008 + -- Next available ID: 2014 -- ------------------------------------------------------------ diff --git a/sql/mob_skills.sql b/sql/mob_skills.sql index fe8c241636e..05ffce3ba89 100644 --- a/sql/mob_skills.sql +++ b/sql/mob_skills.sql @@ -326,7 +326,7 @@ INSERT INTO `mob_skills` VALUES (309,53,'spore',0,7.0,2000,1500,4,0,0,0,0,0,0); INSERT INTO `mob_skills` VALUES (310,54,'queasyshroom',0,7.0,2000,1500,4,0,0,0,0,0,0); INSERT INTO `mob_skills` VALUES (311,55,'numbshroom',0,7.0,2000,1500,4,0,0,0,0,0,0); INSERT INTO `mob_skills` VALUES (312,56,'shakeshroom',0,7.0,2000,1500,4,0,0,0,0,0,0); --- INSERT INTO `mob_skills` VALUES (313,57,'counterspore',0,7.0,2000,1500,4,0,0,0,0,0,0); +INSERT INTO `mob_skills` VALUES (313,201,'aqua_ball_knockback',0,14.0,2000,0,4,0,0,7,0,0,0); INSERT INTO `mob_skills` VALUES (314,58,'silence_gas',4,13.5,2000,1500,4,0,0,0,0,0,0); INSERT INTO `mob_skills` VALUES (315,59,'dark_spore',4,13.5,2000,1500,4,0,0,0,0,0,0); INSERT INTO `mob_skills` VALUES (316,60,'impale',0,7.0,2000,1500,4,0,0,0,0,0,0);