Commit 7ec177be authored by Tachibana's avatar Tachibana

E

parent 73dd39dd
Pipeline #15625 passed with stages
in 28 minutes and 1 second
......@@ -73,24 +73,21 @@ function c33200002.desop(e,tp,eg,ep,ev,re,r,rp)
end
--e4
function c33200002.pffilter0(c,e)
return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e)
end
function c33200002.filter0(c)
return (c:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) or c:IsFaceup()) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck()
function c33200002.filter0(c,e)
return c:IsCanBeFusionMaterial() and c:IsAbleToDeck() and not c:IsImmuneToEffect(e)
end
function c33200002.filter1(c,e)
return (c:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) or c:IsFaceup()) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck() and not c:IsImmuneToEffect(e)
return c:IsCanBeFusionMaterial() and c:IsFusionType(TYPE_MONSTER) and c:IsAbleToDeck() and not c:IsImmuneToEffect(e)
end
function c33200002.filter2(c,e,tp,m,f,chkf)
function c33200002.filter2(c,e,tp,m,f,chkf)
if c:IsSetCard(0x321) then m=Duel.GetMatchingGroup(c33200002.filter0,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,e:GetHandler(),e) end
return c:IsType(TYPE_FUSION) and c:IsRace(RACE_PSYCHO) and c:IsAttribute(ATTRIBUTE_FIRE) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c33200002.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg=Duel.GetMatchingGroup(c33200002.filter0,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,e:GetHandler())
mg:Merge(Duel.GetMatchingGroup(c33200002.pffilter0,tp,LOCATION_PZONE+LOCATION_SZONE,0,e:GetHandler(),e))
local mg=Duel.GetMatchingGroup(c33200002.filter1,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,e:GetHandler(),e)
local res=Duel.IsExistingMatchingCard(c33200002.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
......@@ -109,7 +106,6 @@ end
function c33200002.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg=Duel.GetMatchingGroup(aux.NecroValleyFilter(c33200002.filter1),tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,e:GetHandler(),e)
mg:Merge(Duel.GetMatchingGroup(c33200002.pffilter0,tp,LOCATION_PZONE+LOCATION_SZONE,0,e:GetHandler(),e))
local sg1=Duel.GetMatchingGroup(c33200002.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg,nil,chkf)
local mg3=nil
local sg2=nil
......@@ -126,6 +122,7 @@ function c33200002.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if tc:IsSetCard(0x321) then mg=Duel.GetMatchingGroup(c33200002.filter0,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,e:GetHandler(),e) end
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat=Duel.SelectFusionMaterial(tp,tc,mg,nil,chkf)
tc:SetMaterial(mat)
......
......@@ -61,6 +61,5 @@ function c33200014.negop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
\ No newline at end of file
......@@ -21,6 +21,9 @@ function cm.initial_effect(c)
e3:SetTarget(cm.tg3)
e3:SetOperation(cm.op3)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_REMOVE)
c:RegisterEffect(e4)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
......@@ -48,7 +48,7 @@ function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,16,nil,3,tp,0)
end
function cm.op2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,16)+Duel.GetFieldGroup(tp,32):Filter(Card.IsFaceup,nil)
local g=Duel.GetFieldGroup(tp,16,0)+Duel.GetFieldGroup(tp,32,0):Filter(Card.IsFaceup,nil)
g=g:Filter(Card.IsType,nil,6):Filter(Card.IsSetCard,nil,0x5b82)
Duel.Hint(3,tp,507)
g=g:Select(tp,3,3,nil)
......
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