Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LUA/SQL] Add Floral Bouquet mobskill #5747

Draft
wants to merge 1 commit into
base: base
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions scripts/actions/mobskills/floral_bouquet.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
-----------------------------------
-- Floral Bouquet
-- Puts enemies in area of effect to sleep. Charms nearby vermin.
-----------------------------------
local mobskillObject = {}

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

mobskillObject.onMobWeaponSkill = function(target, mob, skill)
if target:isMob() and not target:isPet() then
if target:getFamily() == 48 then
Copy link
Contributor

@UmeboshiXI UmeboshiXI May 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When we were discussing on how to implement Floral Bouquet on discord, we found from caps that this skill seems to affect more than just Bees. It seems to charm all Vermin(Crawlers, Flies etc) so could probably update this to use target:getEcosystem() == xi.ecosystem.VERMIN .

local mobTarget = mob:getTarget()

if mobTarget ~= nil then
target:engage(mobTarget:getTargID())
end

skill:setMsg(xi.msg.basic.SKILL_ENFEEB_IS)

return xi.effect.CHARM_I
else
skill:setMsg(xi.msg.basic.SKILL_NO_EFFECT)

return 0
end
end

skill:setMsg(xi.mobskills.mobStatusEffectMove(mob, target, xi.effect.SLEEP_I, 1, 0, 30))

return xi.effect.SLEEP_I
end

return mobskillObject
2 changes: 1 addition & 1 deletion sql/mob_skills.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2179,7 +2179,7 @@ INSERT INTO `mob_skills` VALUES (2162,1571,'emetic_discharge',0,7.0,2000,1000,4,
INSERT INTO `mob_skills` VALUES (2163,1549,'seedspray',0,11.5,2000,1500,4,0,0,0,0,0,0);
INSERT INTO `mob_skills` VALUES (2164,1550,'viscid_emission',4,10.0,2000,1500,4,0,0,0,0,0,0);
-- INSERT INTO `mob_skills` VALUES (2165,1551,'rotten_stench',0,7.0,2000,1500,4,0,0,0,0,0,0);
-- INSERT INTO `mob_skills` VALUES (2166,1552,'floral_bouquet',0,7.0,2000,1500,4,0,0,0,0,0,0);
INSERT INTO `mob_skills` VALUES (2166,1552,'floral_bouquet',1,10.0,2000,1500,2048,8,0,0,0,0,0);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just added this and Mowford's target type PR on my local to test it out.

  1. Floral Bouquet will need its mob_valid_targets set to 2052 if combined with Mow's PR. (Mob wouldn't use it otherwise for me)

INSERT INTO `mob_skills` VALUES (2167,1553,'bloody_caress',0,10.0,2000,1500,4,0,0,0,0,0,0);
-- INSERT INTO `mob_skills` VALUES (2169,1554,'soothing_aroma',0,7.0,2000,1500,4,0,0,0,0,0,0);
INSERT INTO `mob_skills` VALUES (2170,1589,'fevered_pitch',0,7.0,2000,1500,4,0,0,0,0,0,0);
Expand Down
Loading