Commit c2fd47f8 authored by GuGu's avatar GuGu

Update c22250.lua

parent 7a5e14f7
Pipeline #33332 passed with stage
in 11 seconds
...@@ -20,8 +20,11 @@ function c22250.initial_effect(c) ...@@ -20,8 +20,11 @@ function c22250.initial_effect(c)
end end
function c22250.filter0(c) function c22250.filter0(c)
return ((c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_FIRE+ATTRIBUTE_EARTH)) return ((c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_FIRE+ATTRIBUTE_EARTH))
or c:IsSetCard(0x178,0x182) or c:IsFusionCode(22200) or c:IsCode(22131,22135,22191,22200))
or (c:IsSetCard(0x178,0x179,0x180,0x181,0x182,0x183,0x184) and not c:IsLocation(LOCATION_DECK))) and c:IsCanBeFusionMaterial() and c:IsAbleToGrave()
end
function c22250.filter00(c)
return c:IsCode(22131,22132,22133,22134,22135,22161,22162,22191,22200)
and c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and c:IsCanBeFusionMaterial() and c:IsAbleToGrave()
end end
function c22250.filter1(c,e) function c22250.filter1(c,e)
...@@ -36,32 +39,19 @@ end ...@@ -36,32 +39,19 @@ end
function c22250.target(e,tp,eg,ep,ev,re,r,rp,chk) function c22250.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
--effect flag --effect flag
local e1=Effect.CreateEffect(e:GetHandler()) local e101=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e101:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e101:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(22249) e101:SetCode(22249)
e1:SetTargetRange(1,0) e101:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e101,tp)
local e3=e1:Clone()
e3:SetCode(22132)
Duel.RegisterEffect(e3,tp)
local e4=e1:Clone()
e4:SetCode(22133)
Duel.RegisterEffect(e4,tp)
local e5=e1:Clone()
e5:SetCode(22134)
Duel.RegisterEffect(e5,tp)
local e7=e1:Clone()
e7:SetCode(22161)
Duel.RegisterEffect(e7,tp)
local e8=e1:Clone()
e8:SetCode(22162)
Duel.RegisterEffect(e8,tp)
-- --
local chkf=tp local chkf=tp
local mg1=Duel.GetFusionMaterial(tp) local mg1=Duel.GetFusionMaterial(tp)
local mg2=Duel.GetMatchingGroup(c22250.filter0,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,nil) local mg2=Duel.GetMatchingGroup(c22250.filter0,tp,LOCATION_DECK,0,nil)
mg1:Merge(mg2) mg1:Merge(mg2)
local mg22=Duel.GetMatchingGroup(c22250.filter00,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
mg1:Merge(mg22)
local res=Duel.IsExistingMatchingCard(c22250.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) local res=Duel.IsExistingMatchingCard(c22250.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then if not res then
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
...@@ -73,44 +63,26 @@ function c22250.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -73,44 +63,26 @@ function c22250.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
end end
--flag reset --flag reset
e1:Reset() e101:Reset()
e3:Reset()
e4:Reset()
e5:Reset()
e7:Reset()
e8:Reset()
return res return res
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function c22250.activate(e,tp,eg,ep,ev,re,r,rp) function c22250.activate(e,tp,eg,ep,ev,re,r,rp)
--effect flag --effect flag
local e1=Effect.CreateEffect(e:GetHandler()) local e101=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e101:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e101:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(22249) e101:SetCode(22249)
e1:SetTargetRange(1,0) e101:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e101,tp)
local e3=e1:Clone()
e3:SetCode(22132)
Duel.RegisterEffect(e3,tp)
local e4=e1:Clone()
e4:SetCode(22133)
Duel.RegisterEffect(e4,tp)
local e5=e1:Clone()
e5:SetCode(22134)
Duel.RegisterEffect(e5,tp)
local e7=e1:Clone()
e7:SetCode(22161)
Duel.RegisterEffect(e7,tp)
local e8=e1:Clone()
e8:SetCode(22162)
Duel.RegisterEffect(e8,tp)
-- --
local chkf=tp local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c22250.filter1,nil,e) local mg1=Duel.GetFusionMaterial(tp):Filter(c22250.filter1,nil,e)
local mg2=Duel.GetMatchingGroup(c22250.filter0,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,nil) local mg2=Duel.GetMatchingGroup(c22250.filter0,tp,LOCATION_DECK,0,nil)
mg1:Merge(mg2) mg1:Merge(mg2)
local mg22=Duel.GetMatchingGroup(c22250.filter00,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
mg1:Merge(mg22)
local sg1=Duel.GetMatchingGroup(c22250.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) local sg1=Duel.GetMatchingGroup(c22250.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=nil local mg3=nil
local sg2=nil local sg2=nil
...@@ -141,12 +113,7 @@ function c22250.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -141,12 +113,7 @@ function c22250.activate(e,tp,eg,ep,ev,re,r,rp)
tc:CompleteProcedure() tc:CompleteProcedure()
end end
--flag reset --flag reset
e1:Reset() e101:Reset()
e3:Reset()
e4:Reset()
e5:Reset()
e7:Reset()
e8:Reset()
end end
function c22250.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function c22250.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
......
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