Skip to content

Commit c6ac4ee

Browse files
[lua] [sql] Implement Dainslaif's add effect
1 parent b89ca28 commit c6ac4ee

2 files changed

Lines changed: 30 additions & 0 deletions

File tree

scripts/items/dainslaif.lua

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
-----------------------------------
2+
-- ID: 17651
3+
-- Item: Dainslaif
4+
-- Additional effect: en-drain
5+
-----------------------------------
6+
---@type TItem
7+
local itemObject = {}
8+
9+
itemObject.onItemAdditionalEffect = function(attacker, defender, baseAttackDamage, item)
10+
local pTable =
11+
{
12+
chance = 22, -- Observed rate is 21% which is close to (0.22 * .95) = 21%~ (resist roll failure)
13+
basePower = 72,
14+
attackType = xi.attackType.PHYSICAL,
15+
physicalElement = xi.damageType.SLASHING,
16+
magicalElement = xi.element.DARK,
17+
canResist = true,
18+
lowestResist = 0.5,
19+
limitUndead = true,
20+
drainHP = true,
21+
animation = xi.subEffect.DARKNESS_DAMAGE,
22+
}
23+
24+
return xi.combat.action.executeAddEffectDamage(attacker, defender, pTable)
25+
end
26+
27+
return itemObject

sql/item_mods.sql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35374,6 +35374,9 @@ INSERT INTO `item_mods` VALUES (17650,951,3); -- ITEM_ADDEFFECT_STATUS: 3
3537435374
INSERT INTO `item_mods` VALUES (17650,952,4); -- ITEM_ADDEFFECT_POWER: 4
3537535375
INSERT INTO `item_mods` VALUES (17650,953,30); -- ITEM_ADDEFFECT_DURATION: 30
3537635376

35377+
-- Dainslaif
35378+
INSERT INTO `item_mods` VALUES (17651,1181,1); -- ITEM_ADDEFFECT_SCRIPTED: 1
35379+
3537735380
-- Joyeuse
3537835381
INSERT INTO `item_mods` VALUES (17652,22,14); -- DARK_MEVA: 14
3537935382

0 commit comments

Comments
 (0)