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

part fix イタチの大暴発 #1785

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
fix イタチの大暴発
  • Loading branch information
mercury233 authored Jan 1, 2022
commit 42cf85865646ab5abbe31e4da78269c047b764d8
10 changes: 8 additions & 2 deletions c31044787.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,16 @@ function c31044787.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c31044787.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c31044787.filter,tp,0,LOCATION_MZONE,nil,1-tp)
local atk=g:GetSum(Card.GetAttack)
local lp=Duel.GetLP(tp)
local mustg=g:Filter(Card.IsAttackAbove,nil,lp)
g:Sub(mustg)
local atk=g:GetSum(Card.GetAttack)
local diff=atk-lp
if diff<=0 then return end
if diff<=0 then
Duel.SendtoDeck(mustg,nil,SEQ_DECKSHUFFLE,REASON_RULE)
return
end
local sg=g:SelectWithSumGreater(1-tp,Card.GetAttack,diff)
sg:Merge(mustg)
Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_RULE)
end