Commit 4461ada9 authored by nanahira's avatar nanahira Committed by mercury233

Update Contact Out (#970)

parent 4af19647
......@@ -23,15 +23,23 @@ end
function c69270537.spfilter(c,e,tp,fc)
return fc.material and c:IsCode(table.unpack(fc.material)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c69270537.fcheck(sp)
return function(tp,g,c)
local ct=g:GetCount()
return Duel.GetMZoneCount(sp)>=g:GetCount() and not (ct>1 and Duel.IsPlayerAffectedByEffect(tp,59822133))
end
end
function c69270537.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and tc:IsLocation(LOCATION_EXTRA) then
and tc:IsLocation(LOCATION_EXTRA) then
aux.FCheckAdditional=c69270537.fcheck(tp)
local sg=Duel.GetMatchingGroup(c69270537.spfilter,tp,LOCATION_DECK,0,nil,e,tp,tc)
if tc:CheckFusionMaterial(sg) and Duel.SelectYesNo(tp,aux.Stringid(69270537,0)) then
Duel.BreakEffect()
local mats=Duel.SelectFusionMaterial(tp,tc,sg)
Duel.SpecialSummon(mats,0,tp,tp,false,false,POS_FACEUP)
end
aux.FCheckAdditional=nil
end
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