Commit c83d9163 authored by nekrozar's avatar nekrozar

fix & update Vendread Reunion

- use CheckSubGroup and SelectSubGroup.
- missing Duel.BreakEffect.

https://www.db.yugioh-card.com/yugiohdb/faq_search.action?ope=4&cid=13365

■『儀式召喚する手札の「ヴェンデット」儀式モンスター1体を相手に見せる。レベルの合計が見せた儀式モンスターのレベルと同じになるように、除外されている自分の「ヴェンデット」モンスターを任意の数だけ選び、裏側守備表示で特殊召喚する(同名カードは1枚まで)』処理、『その後、その裏側守備表示モンスターを全てリリースして』の処理、『手札からその儀式モンスターを儀式召喚する』処理、いずれも同時に行われる扱いではありません。
parent ed356397
......@@ -15,19 +15,14 @@ function c2266498.cfilter(c,e,tp,m,ft)
if c.mat_filter then
m=m:Filter(c.mat_filter,nil,tp)
end
local sg=Group.CreateGroup()
return m:IsExists(c2266498.spselect,1,nil,c,0,ft,m,sg)
end
function c2266498.spgoal(mc,ct,sg)
return sg:CheckWithSumEqual(Card.GetRitualLevel,mc:GetLevel(),ct,ct,mc) and sg:GetClassCount(Card.GetCode)==ct
end
function c2266498.spselect(c,mc,ct,ft,m,sg)
sg:AddCard(c)
ct=ct+1
local res=(ft>=ct and c2266498.spgoal(mc,ct,sg)) or m:IsExists(c2266498.spselect,1,sg,mc,ct,ft,m,sg)
sg:RemoveCard(c)
aux.GCheckAdditional=aux.RitualCheckAdditional(c,c:GetLevel(),"Equal")
local res=m:CheckSubGroup(c2266498.fselect,1,math.min(c:GetLevel(),ft),c)
aux.GCheckAdditional=nil
return res
end
function c2266498.fselect(g,mc)
return aux.dncheck(g) and g:CheckWithSumEqual(Card.GetRitualLevel,mc:GetLevel(),g:GetCount(),g:GetCount(),mc)
end
function c2266498.filter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x106) and Duel.IsPlayerCanRelease(tp,c)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
......@@ -55,22 +50,13 @@ function c2266498.activate(e,tp,eg,ep,ev,re,r,rp)
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,nil,tp)
end
local sg=Group.CreateGroup()
for i=0,98 do
local cg=mg:Filter(c2266498.spselect,sg,tc,i,ft,mg,sg)
if cg:GetCount()==0 then break end
local min=1
if c2266498.spgoal(tc,i,sg) then
if not Duel.SelectYesNo(tp,210) then break end
min=0
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=cg:Select(tp,min,1,nil)
if g:GetCount()==0 then break end
sg:Merge(g)
end
if sg:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
aux.GCheckAdditional=aux.RitualCheckAdditional(tc,tc:GetLevel(),"Equal")
local sg=mg:SelectSubGroup(tp,c2266498.fselect,false,1,math.min(tc:GetLevel(),ft),tc)
aux.GCheckAdditional=nil
if not sg or sg:GetCount()==0 then return end
if Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)==sg:GetCount() then
Duel.BreakEffect()
local og=Duel.GetOperatedGroup()
Duel.ConfirmCards(1-tp,og)
tc:SetMaterial(og)
......
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