Commit 66a44ff7 authored by mallu11's avatar mallu11 Committed by GitHub

fix バブル・クラッシュ (#1369)

parent 59eda57a
......@@ -4,7 +4,6 @@ function c61622107.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCondition(c61622107.condition)
e1:SetOperation(c61622107.activate)
c:RegisterEffect(e1)
......@@ -13,18 +12,28 @@ function c61622107.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,0xe,0)>=6 or Duel.GetFieldGroupCount(tp,0,0xe)>=6
end
function c61622107.activate(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFieldGroupCount(tp,0xe,0)
local g=Group.CreateGroup()
local p=Duel.GetTurnPlayer()
local ct=Duel.GetFieldGroupCount(p,0xe,0)
local exc=nil
if ct>=6 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=Duel.SelectMatchingCard(tp,nil,tp,0xe,0,ct-5,ct-5,nil)
g:Merge(sg)
if p==tp and e:IsHasType(EFFECT_TYPE_ACTIVATE) then
exc=e:GetHandler()
else
exc=nil
end
ct=Duel.GetFieldGroupCount(1-tp,0xe,0)
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TOGRAVE)
local sg=Duel.SelectMatchingCard(p,nil,p,0xe,0,ct-5,ct-5,exc)
Duel.SendtoGrave(sg,REASON_RULE)
end
ct=Duel.GetFieldGroupCount(1-p,0xe,0)
if ct>=6 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE)
local sg=Duel.SelectMatchingCard(1-tp,nil,1-tp,0xe,0,ct-5,ct-5,nil)
g:Merge(sg)
if 1-p==tp and e:IsHasType(EFFECT_TYPE_ACTIVATE) then
exc=e:GetHandler()
else
exc=nil
end
Duel.Hint(HINT_SELECTMSG,1-p,HINTMSG_TOGRAVE)
local sg=Duel.SelectMatchingCard(1-p,nil,1-p,0xe,0,ct-5,ct-5,exc)
Duel.SendtoGrave(sg,REASON_RULE)
end
Duel.SendtoGrave(g,REASON_EFFECT)
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment