diff --git a/lua/server/events/hp.lua b/lua/server/events/hp.lua index 924a21d2bc0279f77d02b4d0cbcea6012b7da2d4..b88d3d141d7a94828cdad708c6d600388aa4ecb0 100644 --- a/lua/server/events/hp.lua +++ b/lua/server/events/hp.lua @@ -121,12 +121,14 @@ function Damage:main() local room = self.room local logic = room.logic - if not damageStruct.chain and logic:damageByCardEffect(not not damageStruct.from) then + if not damageStruct.chain and logic:damageByCardEffect(false) then local cardEffectData = logic:getCurrentEvent():findParent(GameEvent.CardEffect) if cardEffectData then local cardEffectEvent = cardEffectData.data[1] damageStruct.damage = damageStruct.damage + (cardEffectEvent.additionalDamage or 0) - damageStruct.by_user = true + if damageStruct.from and cardEffectData.from == damageStruct.from.id then + damageStruct.by_user = true + end end end diff --git a/standard_cards/init.lua b/standard_cards/init.lua index 4a3a94d906ee945b23ab3f9bf7ba0cd19727f460..72f6a8f408d74241f7b55bab53ae103b6966c380 100644 --- a/standard_cards/init.lua +++ b/standard_cards/init.lua @@ -723,7 +723,17 @@ local lightningSkill = fk.CreateActiveSkill{ local nextp = to repeat nextp = nextp:getNextAlive(true) - if nextp == to then break end + if nextp == to then + if nextp:isProhibited(nextp, effect.card) then + room:moveCards{ + ids = room:getSubcardsByRule(effect.card, { Card.Processing }), + toArea = Card.DiscardPile, + moveReason = fk.ReasonPut + } + return + end + break + end until not nextp:hasDelayedTrick("lightning") and not nextp:isProhibited(nextp, effect.card)