diff --git a/RootDesk/MyDesk/SlayDeckController.codeblock b/RootDesk/MyDesk/SlayDeckController.codeblock index 130a2b1..04e8f96 100644 --- a/RootDesk/MyDesk/SlayDeckController.codeblock +++ b/RootDesk/MyDesk/SlayDeckController.codeblock @@ -3666,7 +3666,7 @@ "Name": "amount" } ], - "Code": "if self.Monsters == nil then\n\treturn false\nend\nlocal killCount = 0\nfor i = 1, #self.Monsters do\n\tlocal m = self.Monsters[i]\n\tif m ~= nil and m.alive == true then\n\t\tlocal dmg = amount\n\t\tif m.vuln > 0 then\n\t\t\tdmg = math.floor(dmg * 1.5)\n\t\tend\n\t\tif m.block > 0 then\n\t\t\tlocal absorbed = math.min(m.block, dmg)\n\t\t\tm.block = m.block - absorbed\n\t\t\tdmg = dmg - absorbed\n\t\tend\n\t\tm.hp = m.hp - dmg\n\t\tif dmg > 0 then\n\t\t\tself.DamageDealtThisTurn = (self.DamageDealtThisTurn or 0) + dmg\n\t\tend\n\t\tself:ShowDmgPop(i, dmg)\n\t\tself:MonsterHitMotion(i)\n\t\tif m.hp <= 0 then\n\t\t\tm.hp = 0\n\t\t\tself:KillMonster(m.slot)\n\t\t\tkillCount = killCount + 1\n\t\tend\n\tend\nend\nif killCount > 0 and self.ActiveKillReward ~= nil and self.ActiveKillReward > 0 then\n\tself.BonusRewardScreens = (self.BonusRewardScreens or 0) + (killCount * self.ActiveKillReward)\nend\nself:RenderCombat()\nself:CheckCombatEnd()\nreturn killCount > 0", + "Code": "if self.Monsters == nil then\n\treturn false\nend\nlocal killCount = 0\nfor i = 1, #self.Monsters do\n\tlocal m = self.Monsters[i]\n\tif m ~= nil and m.alive == true then\n\t\tlocal dmg = amount\n\t\tif m.vuln > 0 then\n\t\t\tdmg = math.floor(dmg * 1.5)\n\t\tend\n\t\tif m.block > 0 then\n\t\t\tlocal absorbed = math.min(m.block, dmg)\n\t\t\tm.block = m.block - absorbed\n\t\t\tdmg = dmg - absorbed\n\t\tend\n\t\tm.hp = m.hp - dmg\n\t\tif dmg > 0 then\n\t\t\tself.DamageDealtThisTurn = (self.DamageDealtThisTurn or 0) + dmg\n\t\t\tlocal poison = self:AddPowerFieldTotal(\"attackPoison\")\n\t\t\tif poison ~= nil and poison > 0 then\n\t\t\t\tself:ApplyPoisonToMonster(m, poison)\n\t\t\tend\n\t\tend\n\t\tself:ShowDmgPop(i, dmg)\n\t\tself:MonsterHitMotion(i)\n\t\tif m.hp <= 0 then\n\t\t\tm.hp = 0\n\t\t\tself:KillMonster(m.slot)\n\t\t\tkillCount = killCount + 1\n\t\tend\n\tend\nend\nif killCount > 0 and self.ActiveKillReward ~= nil and self.ActiveKillReward > 0 then\n\tself.BonusRewardScreens = (self.BonusRewardScreens or 0) + (killCount * self.ActiveKillReward)\nend\nself:RenderCombat()\nself:CheckCombatEnd()\nreturn killCount > 0", "Scope": 2, "ExecSpace": 6, "Attributes": [], diff --git a/tools/deck/cb/combat.mjs b/tools/deck/cb/combat.mjs index 30b5568..a08a301 100644 --- a/tools/deck/cb/combat.mjs +++ b/tools/deck/cb/combat.mjs @@ -392,6 +392,10 @@ for i = 1, #self.Monsters do m.hp = m.hp - dmg if dmg > 0 then self.DamageDealtThisTurn = (self.DamageDealtThisTurn or 0) + dmg + local poison = self:AddPowerFieldTotal("attackPoison") + if poison ~= nil and poison > 0 then + self:ApplyPoisonToMonster(m, poison) + end end self:ShowDmgPop(i, dmg) self:MonsterHitMotion(i)