Skip to content

Commit

Permalink
[BCNM] Implement BCNM20 Shooting Fish
Browse files Browse the repository at this point in the history
Co-Authored-By: dallano <[email protected]>
  • Loading branch information
The-Aerec and dallano committed Sep 6, 2024
1 parent d79a273 commit e5842f7
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 4 deletions.
30 changes: 30 additions & 0 deletions scripts/actions/mobskills/aqua_ball_knockback.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
-----------------------------------
-- 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
2 changes: 0 additions & 2 deletions scripts/battlefields/Horlais_Peak/shooting_fish.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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' })
Expand Down
16 changes: 16 additions & 0 deletions scripts/zones/Horlais_Peak/mobs/Archer_Pugil.lua
Original file line number Diff line number Diff line change
@@ -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
16 changes: 16 additions & 0 deletions scripts/zones/Horlais_Peak/mobs/Sniper_Pugil.lua
Original file line number Diff line number Diff line change
@@ -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
6 changes: 5 additions & 1 deletion sql/mob_skill_lists.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3911,7 +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

-- Next available ID: 2014
INSERT INTO `mob_skill_lists` VALUES ('Shooting_Fish',2014,313); -- knockback aquaball - BCNM20 Shooting Fish

-- Next available ID: 2008

-- Next available ID: 2015

-- ------------------------------------------------------------
-- Start of Ambuscade section
Expand Down
2 changes: 1 addition & 1 deletion sql/mob_skills.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e5842f7

Please sign in to comment.