Commit d8e6b226 authored by 伊蕾娜's avatar 伊蕾娜

fix:咕咕元素融合修复+金卡罔两『违背常识的另一侧』bug修复

parent f2922b55
Pipeline #14961 passed with stage
in 49 seconds
...@@ -46,10 +46,14 @@ function c22234.mfilter1(c) ...@@ -46,10 +46,14 @@ function c22234.mfilter1(c)
return c:IsRace(RACE_SPELLCASTER) return c:IsRace(RACE_SPELLCASTER)
end end
function c22234.mfilter2(c) function c22234.mfilter2(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) or ((c:IsFusionSetCard(0x183) or (c:IsFusionCode(22200) and not c:IsLocation(LOCATION_DECK))) and Duel.IsPlayerAffectedByEffect(c:GetControler(),22248)) or (c:IsFusionCode(22200) and Duel.IsPlayerAffectedByEffect(c:GetControler(),22251)) local deck_check = 1
if Duel.IsPlayerAffectedByEffect(tp,22161) then deck_check = 0 end
return c:IsAttribute(ATTRIBUTE_LIGHT) or (Duel.IsPlayerAffectedByEffect(tp,22249) and ((c:IsSetCard(0x183) or c:IsCode(22200)) and (deck_check == 1 or not c:IsLocation(LOCATION_DECK))))
end end
function c22234.mfilter3(c) function c22234.mfilter3(c)
return c:IsAttribute(ATTRIBUTE_EARTH) or ((c:IsFusionSetCard(0x182) or (c:IsFusionCode(22200) and not c:IsLocation(LOCATION_DECK))) and Duel.IsPlayerAffectedByEffect(c:GetControler(),22248)) or (c:IsFusionCode(22200) and (Duel.IsPlayerAffectedByEffect(c:GetControler(),22250) or Duel.IsPlayerAffectedByEffect(c:GetControler(),22252))) local deck_check = 1
if Duel.IsPlayerAffectedByEffect(tp,22135) then deck_check = 0 end
return c:IsAttribute(ATTRIBUTE_EARTH) or (Duel.IsPlayerAffectedByEffect(tp,22249) and ((c:IsSetCard(0x182) or c:IsCode(22200)) and (deck_check == 1 or not c:IsLocation(LOCATION_DECK))))
end end
function c22234.filter(c) function c22234.filter(c)
return c:IsSetCard(0xb046) and c:IsAbleToHand() return c:IsSetCard(0xb046) and c:IsAbleToHand()
......
...@@ -44,10 +44,14 @@ function c22236.mfilter1(c) ...@@ -44,10 +44,14 @@ function c22236.mfilter1(c)
return c:IsRace(RACE_SPELLCASTER) return c:IsRace(RACE_SPELLCASTER)
end end
function c22236.mfilter2(c) function c22236.mfilter2(c)
return c:IsAttribute(ATTRIBUTE_DARK) or ((c:IsFusionSetCard(0x184) or (c:IsFusionCode(22200) and not c:IsLocation(LOCATION_DECK))) and Duel.IsPlayerAffectedByEffect(c:GetControler(),22248)) or (c:IsFusionCode(22200) and (Duel.IsPlayerAffectedByEffect(c:GetControler(),22249) or Duel.IsPlayerAffectedByEffect(c:GetControler(),22251))) local deck_check = 1
if Duel.IsPlayerAffectedByEffect(tp,22162) then deck_check = 0 end
return c:IsAttribute(ATTRIBUTE_DARK) or (Duel.IsPlayerAffectedByEffect(tp,22249) and ((c:IsSetCard(0x184) or c:IsCode(22200)) and (deck_check == 1 or not c:IsLocation(LOCATION_DECK))))
end end
function c22236.mfilter3(c) function c22236.mfilter3(c)
return c:IsAttribute(ATTRIBUTE_EARTH) or ((c:IsFusionSetCard(0x182) or (c:IsFusionCode(22200) and not c:IsLocation(LOCATION_DECK))) and Duel.IsPlayerAffectedByEffect(c:GetControler(),22248)) or (c:IsFusionCode(22200) and (Duel.IsPlayerAffectedByEffect(c:GetControler(),22250) or Duel.IsPlayerAffectedByEffect(c:GetControler(),22252))) local deck_check = 1
if Duel.IsPlayerAffectedByEffect(tp,22135) then deck_check = 0 end
return c:IsAttribute(ATTRIBUTE_EARTH) or (Duel.IsPlayerAffectedByEffect(tp,22249) and ((c:IsSetCard(0x182) or c:IsCode(22200)) and (deck_check == 1 or not c:IsLocation(LOCATION_DECK))))
end end
function c22236.thfilter1(c) function c22236.thfilter1(c)
return c:IsSetCard(0xb046) and c:IsAbleToHand() return c:IsSetCard(0xb046) and c:IsAbleToHand()
......
...@@ -39,13 +39,19 @@ function c22238.initial_effect(c) ...@@ -39,13 +39,19 @@ function c22238.initial_effect(c)
end end
-- --
function c22238.mfilter1(c) function c22238.mfilter1(c)
return c:IsAttribute(ATTRIBUTE_WIND) or ((c:IsFusionSetCard(0x180) or (c:IsFusionCode(22200) and not c:IsLocation(LOCATION_DECK))) and Duel.IsPlayerAffectedByEffect(c:GetControler(),22248)) or (c:IsFusionCode(22200) and Duel.IsPlayerAffectedByEffect(c:GetControler(),22252)) local deck_check = 1
if Duel.IsPlayerAffectedByEffect(tp,22133) then deck_check = 0 end
return c:IsAttribute(ATTRIBUTE_WIND) or (Duel.IsPlayerAffectedByEffect(tp,22249) and ((c:IsSetCard(0x180) or c:IsCode(22200)) and (deck_check == 1 or not c:IsLocation(LOCATION_DECK))))
end end
function c22238.mfilter2(c) function c22238.mfilter2(c)
return c:IsAttribute(ATTRIBUTE_WATER) or ((c:IsFusionSetCard(0x179) or (c:IsFusionCode(22200) and not c:IsLocation(LOCATION_DECK))) and Duel.IsPlayerAffectedByEffect(c:GetControler(),22248)) or (c:IsFusionCode(22200) and (Duel.IsPlayerAffectedByEffect(c:GetControler(),22249) or Duel.IsPlayerAffectedByEffect(c:GetControler(),22252))) local deck_check = 1
if Duel.IsPlayerAffectedByEffect(tp,22132) then deck_check = 0 end
return c:IsAttribute(ATTRIBUTE_WATER) or (Duel.IsPlayerAffectedByEffect(tp,22249) and ((c:IsSetCard(0x179) or c:IsCode(22200)) and (deck_check == 1 or not c:IsLocation(LOCATION_DECK))))
end end
function c22238.mfilter3(c) function c22238.mfilter3(c)
return c:IsAttribute(ATTRIBUTE_FIRE) or ((c:IsFusionSetCard(0x178) or (c:IsFusionCode(22200) and not c:IsLocation(LOCATION_DECK))) and Duel.IsPlayerAffectedByEffect(c:GetControler(),22248)) or (c:IsFusionCode(22200) and (Duel.IsPlayerAffectedByEffect(c:GetControler(),22249) or Duel.IsPlayerAffectedByEffect(c:GetControler(),22250))) local deck_check = 1
if Duel.IsPlayerAffectedByEffect(tp,22131) then deck_check = 0 end
return c:IsAttribute(ATTRIBUTE_FIRE) or (Duel.IsPlayerAffectedByEffect(tp,22249) and ((c:IsSetCard(0x178) or c:IsCode(22200)) and (deck_check == 1 or not c:IsLocation(LOCATION_DECK))))
end end
-- --
function c22238.filters(c) function c22238.filters(c)
......
...@@ -39,13 +39,19 @@ function c22240.initial_effect(c) ...@@ -39,13 +39,19 @@ function c22240.initial_effect(c)
end end
-- --
function c22240.mfilter1(c) function c22240.mfilter1(c)
return c:IsAttribute(ATTRIBUTE_DARK) or ((c:IsFusionSetCard(0x184) or (c:IsFusionCode(22200) and not c:IsLocation(LOCATION_DECK))) and Duel.IsPlayerAffectedByEffect(c:GetControler(),22248)) or (c:IsFusionCode(22200) and (Duel.IsPlayerAffectedByEffect(c:GetControler(),22249) or Duel.IsPlayerAffectedByEffect(c:GetControler(),22251))) local deck_check = 1
if Duel.IsPlayerAffectedByEffect(tp,22162) then deck_check = 0 end
return c:IsAttribute(ATTRIBUTE_DARK) or (Duel.IsPlayerAffectedByEffect(tp,22249) and ((c:IsSetCard(0x184) or c:IsCode(22200)) and (deck_check == 1 or not c:IsLocation(LOCATION_DECK))))
end end
function c22240.mfilter2(c) function c22240.mfilter2(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) or ((c:IsFusionSetCard(0x183) or (c:IsFusionCode(22200) and not c:IsLocation(LOCATION_DECK))) and Duel.IsPlayerAffectedByEffect(c:GetControler(),22248)) or (c:IsFusionCode(22200) and Duel.IsPlayerAffectedByEffect(c:GetControler(),22251)) local deck_check = 1
if Duel.IsPlayerAffectedByEffect(tp,22161) then deck_check = 0 end
return c:IsAttribute(ATTRIBUTE_LIGHT) or (Duel.IsPlayerAffectedByEffect(tp,22249) and ((c:IsSetCard(0x183) or c:IsCode(22200)) and (deck_check == 1 or not c:IsLocation(LOCATION_DECK))))
end end
function c22240.mfilter3(c) function c22240.mfilter3(c)
return c:IsAttribute(ATTRIBUTE_WIND) or ((c:IsFusionSetCard(0x180) or (c:IsFusionCode(22200) and not c:IsLocation(LOCATION_DECK))) and Duel.IsPlayerAffectedByEffect(c:GetControler(),22248)) or (c:IsFusionCode(22200) and Duel.IsPlayerAffectedByEffect(c:GetControler(),22252)) local deck_check = 1
if Duel.IsPlayerAffectedByEffect(tp,22133) then deck_check = 0 end
return c:IsAttribute(ATTRIBUTE_WIND) or (Duel.IsPlayerAffectedByEffect(tp,22249) and ((c:IsSetCard(0x180) or c:IsCode(22200)) and (deck_check == 1 or not c:IsLocation(LOCATION_DECK))))
end end
-- --
function c22240.filter(c) function c22240.filter(c)
......
...@@ -19,107 +19,48 @@ function c22249.initial_effect(c) ...@@ -19,107 +19,48 @@ function c22249.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c22249.filter0(c) function c22249.filter0(c)
return c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and ((c:IsAttribute(ATTRIBUTE_DARK+ATTRIBUTE_WATER+ATTRIBUTE_FIRE) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x178,0x179,0x184) or c:IsCode(22200)) return ((c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_FIRE+ATTRIBUTE_WATER+ATTRIBUTE_DARK))
end or c:IsSetCard(0x178,0x179,0x184) or c:IsFusionCode(22200)
function c22249.filter00(c) or (c:IsSetCard(0x178,0x179,0x180,0x181,0x182,0x183,0x184) and not c:IsLocation(LOCATION_DECK)))
return c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and (c:IsSetCard(0x178,0x179,0x180,0x181,0x182,0x183,0x184) or c:IsCode(22200)) and c:IsCanBeFusionMaterial() and c:IsAbleToGrave()
end end
function c22249.filter1(c,e) function c22249.filter1(c,e)
return not c:IsImmuneToEffect(e) return not c:IsImmuneToEffect(e)
end end
function c22249.filter2(c,e,tp,m,f,chkf) function c22249.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x811) if not (c:IsType(TYPE_FUSION) and c:IsSetCard(0x811) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)) then return false end
end local res = c:CheckFusionMaterial(m,nil,chkf)
-- return res
function c22249.filter3(c)
return c:IsCanBeFusionMaterial() and c:IsAbleToGrave()
end
--
function c22249.tsfilter00(c,e,tp,m,f,chkf,exg)
return c:IsType(TYPE_FUSION) and c:IsOriginalCodeRule(22234)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end
function c22249.tsfilter01(c)
return (((c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER)) and not c:IsLocation(LOCATION_DECK)) or (c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_DARK+ATTRIBUTE_FIRE+ATTRIBUTE_WATER))) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22249.tsfilter02,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c) and Duel.IsExistingMatchingCard(c22249.tsfilter03,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22249.tsfilter02(c)
return ((c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x183) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22249.tsfilter13,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22249.tsfilter03(c)
return ((c:IsAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x182) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22249.tsfilter10(c,e,tp,m,f,chkf,exg)
return c:IsType(TYPE_FUSION) and c:IsOriginalCodeRule(22236)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end
function c22249.tsfilter11(c)
return (((c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER)) and not c:IsLocation(LOCATION_DECK)) or (c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_DARK+ATTRIBUTE_FIRE+ATTRIBUTE_WATER))) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22249.tsfilter12,c:GetControler(),LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD,0,1,c) and Duel.IsExistingMatchingCard(c22249.tsfilter13,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22249.tsfilter12(c)
return ((c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x184) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22249.tsfilter13,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22249.tsfilter13(c)
return ((c:IsAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x182) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22249.tsfilter20(c,e,tp,m,f,chkf,exg)
return c:IsType(TYPE_FUSION) and c:IsOriginalCodeRule(22238)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end
function c22249.tsfilter21(c)
return ((c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x180) or c:IsCode(22200)) and not c:IsLocation(LOCATION_DECK) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22249.tsfilter22,c:GetControler(),LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD,0,1,c) and Duel.IsExistingMatchingCard(c22249.tsfilter23,c:GetControler(),LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD,0,1,c)
end
function c22249.tsfilter22(c)
return ((c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x179) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22249.tsfilter23,c:GetControler(),LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD,0,1,c)
end
function c22249.tsfilter23(c)
return ((c:IsAttribute(ATTRIBUTE_FIRE) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x178) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22249.tsfilter30(c,e,tp,m,f,chkf,exg)
return c:IsType(TYPE_FUSION) and c:IsOriginalCodeRule(22240)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end
function c22249.tsfilter31(c)
return ((c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x180) or c:IsCode(22200)) and not c:IsLocation(LOCATION_DECK) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22249.tsfilter32,c:GetControler(),LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD,0,1,c) and Duel.IsExistingMatchingCard(c22249.tsfilter33,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22249.tsfilter32(c)
return ((c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_MONSTER))or c:IsSetCard(0x184) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22249.tsfilter33,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22249.tsfilter33(c)
return ((c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x183) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22249.tsfilter40(c,e,tp,m,f,chkf,exg)
return c:IsType(TYPE_FUSION) and c:IsOriginalCodeRule(86379841)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end
function c22249.tsfilter41(c)
return (((c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER)) and not c:IsLocation(LOCATION_DECK)) or (c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_DARK+ATTRIBUTE_FIRE+ATTRIBUTE_WATER))) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22249.tsfilter42,c:GetControler(),LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD,0,1,c) and Duel.IsExistingMatchingCard(c22249.tsfilter43,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22249.tsfilter42(c)
return ((c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x184) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22249.tsfilter43,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end end
function c22249.tsfilter43(c)
return ((c:GetAttribute()==0 and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x181) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22249.target(e,tp,eg,ep,ev,re,r,rp,chk) function c22249.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
--effect flag
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(22249)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
local e4=e1:Clone()
e4:SetCode(22133)
Duel.RegisterEffect(e4,tp)
local e5=e1:Clone()
e5:SetCode(22134)
Duel.RegisterEffect(e5,tp)
local e6=e1:Clone()
e6:SetCode(22135)
Duel.RegisterEffect(e6,tp)
local e7=e1:Clone()
e7:SetCode(22161)
Duel.RegisterEffect(e7,tp)
--
local chkf=tp local chkf=tp
local mg1=Duel.GetFusionMaterial(tp) local mg1=Duel.GetFusionMaterial(tp)
local mg2=Duel.GetMatchingGroup(c22249.filter0,tp,LOCATION_DECK,0,nil) local mg2=Duel.GetMatchingGroup(c22249.filter0,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,nil)
mg1:Merge(mg2) mg1:Merge(mg2)
local res=Duel.IsExistingMatchingCard(c22249.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) local res=Duel.IsExistingMatchingCard(c22249.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
local exg=Duel.GetMatchingGroup(c22249.filter3,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,nil) if not res then
local res0=exg:IsExists(c22249.tsfilter01,1,nil) and Duel.IsExistingMatchingCard(c22249.tsfilter00,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
local res1=exg:IsExists(c22249.tsfilter11,1,nil) and Duel.IsExistingMatchingCard(c22249.tsfilter10,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
local res2=exg:IsExists(c22249.tsfilter21,1,nil) and Duel.IsExistingMatchingCard(c22249.tsfilter20,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
local res3=exg:IsExists(c22249.tsfilter31,1,nil) and Duel.IsExistingMatchingCard(c22249.tsfilter30,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
local res4=exg:IsExists(c22249.tsfilter41,1,nil) and Duel.IsExistingMatchingCard(c22249.tsfilter40,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not (res or res0 or res1 or res2 or res3 or res4) then
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
if ce~=nil then if ce~=nil then
local fgroup=ce:GetTarget() local fgroup=ce:GetTarget()
...@@ -128,7 +69,13 @@ function c22249.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -128,7 +69,13 @@ function c22249.target(e,tp,eg,ep,ev,re,r,rp,chk)
res=Duel.IsExistingMatchingCard(c22249.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf) res=Duel.IsExistingMatchingCard(c22249.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end end
end end
return res or res0 or res1 or res2 or res3 or res4 --flag reset
e1:Reset()
e4:Reset()
e5:Reset()
e6:Reset()
e7:Reset()
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
...@@ -137,22 +84,26 @@ function c22249.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -137,22 +84,26 @@ function c22249.activate(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(22248) e1:SetCode(22249)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler()) local e4=e1:Clone()
e2:SetType(EFFECT_TYPE_FIELD) e4:SetCode(22133)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) Duel.RegisterEffect(e4,tp)
e2:SetCode(22249) local e5=e1:Clone()
e2:SetTargetRange(1,0) e5:SetCode(22134)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e5,tp)
local e6=e1:Clone()
e6:SetCode(22135)
Duel.RegisterEffect(e6,tp)
local e7=e1:Clone()
e7:SetCode(22161)
Duel.RegisterEffect(e7,tp)
-- --
local chkf=tp local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c22249.filter1,nil,e) local mg1=Duel.GetFusionMaterial(tp):Filter(c22249.filter1,nil,e)
local mg2=Duel.GetMatchingGroup(c22249.filter0,tp,LOCATION_DECK,0,nil) local mg2=Duel.GetMatchingGroup(c22249.filter0,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,nil)
mg1:Merge(mg2) mg1:Merge(mg2)
local exg=Duel.GetMatchingGroup(c22249.filter00,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
mg1:Merge(exg)
local sg1=Duel.GetMatchingGroup(c22249.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) local sg1=Duel.GetMatchingGroup(c22249.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=nil local mg3=nil
local sg2=nil local sg2=nil
...@@ -184,7 +135,10 @@ function c22249.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -184,7 +135,10 @@ function c22249.activate(e,tp,eg,ep,ev,re,r,rp)
end end
--flag reset --flag reset
e1:Reset() e1:Reset()
e2:Reset() e4:Reset()
e5:Reset()
e6:Reset()
e7:Reset()
end end
function c22249.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function c22249.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
......
...@@ -19,106 +19,51 @@ function c22250.initial_effect(c) ...@@ -19,106 +19,51 @@ function c22250.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c22250.filter0(c) function c22250.filter0(c)
return c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and ((c:IsAttribute(ATTRIBUTE_EARTH+ATTRIBUTE_FIRE) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x178,0x182) or c:IsCode(22200)) return ((c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_FIRE+ATTRIBUTE_EARTH))
end or c:IsSetCard(0x178,0x182) or c:IsFusionCode(22200)
function c22250.filter00(c) or (c:IsSetCard(0x178,0x179,0x180,0x181,0x182,0x183,0x184) and not c:IsLocation(LOCATION_DECK)))
return c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and (c:IsSetCard(0x178,0x179,0x180,0x181,0x182,0x183,0x184) or c:IsCode(22200)) and c:IsCanBeFusionMaterial() and c:IsAbleToGrave()
end end
function c22250.filter1(c,e) function c22250.filter1(c,e)
return not c:IsImmuneToEffect(e) return not c:IsImmuneToEffect(e)
end end
function c22250.filter2(c,e,tp,m,f,chkf) function c22250.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x811) if not (c:IsType(TYPE_FUSION) and c:IsSetCard(0x811) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)) then return false end
end local res = c:CheckFusionMaterial(m,nil,chkf)
function c22250.filter3(c) return res
return c:IsCanBeFusionMaterial() and c:IsAbleToGrave()
end
--
function c22250.tsfilter00(c,e,tp,m,f,chkf,exg)
return c:IsType(TYPE_FUSION) and c:IsOriginalCodeRule(22234)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end
function c22250.tsfilter01(c)
return (((c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER)) and not c:IsLocation(LOCATION_DECK)) or (c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_FIRE+ATTRIBUTE_EARTH))) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22250.tsfilter02,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c) and Duel.IsExistingMatchingCard(c22250.tsfilter03,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,c)
end
function c22250.tsfilter02(c)
return ((c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x183) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22250.tsfilter13,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,c)
end
function c22250.tsfilter03(c)
return ((c:IsAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x182) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22250.tsfilter10(c,e,tp,m,f,chkf,exg)
return c:IsType(TYPE_FUSION) and c:IsOriginalCodeRule(22236)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end
function c22250.tsfilter11(c)
return (((c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER)) and not c:IsLocation(LOCATION_DECK)) or (c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_EARTH+ATTRIBUTE_FIRE))) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22250.tsfilter12,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c) and Duel.IsExistingMatchingCard(c22250.tsfilter13,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,c)
end
function c22250.tsfilter12(c)
return ((c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_MONSTER))or c:IsSetCard(0x184) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22250.tsfilter13,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,c)
end
function c22250.tsfilter13(c)
return ((c:IsAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x182) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22250.tsfilter20(c,e,tp,m,f,chkf,exg)
return c:IsType(TYPE_FUSION) and c:IsOriginalCodeRule(22238)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end
function c22250.tsfilter21(c)
return ((c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x180)) and not c:IsLocation(LOCATION_DECK) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22250.tsfilter22,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c) and Duel.IsExistingMatchingCard(c22250.tsfilter23,c:GetControler(),LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD,0,1,c)
end
function c22250.tsfilter22(c)
return ((c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x179) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22250.tsfilter23,c:GetControler(),LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD,0,1,c)
end
function c22250.tsfilter23(c)
return ((c:IsAttribute(ATTRIBUTE_FIRE) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x178) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22250.tsfilter30(c,e,tp,m,f,chkf,exg)
return c:IsType(TYPE_FUSION) and c:IsOriginalCodeRule(22240)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end end
function c22250.tsfilter31(c)
return ((c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x180) or c:IsCode(22200)) and not c:IsLocation(LOCATION_DECK) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22250.tsfilter32,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c) and Duel.IsExistingMatchingCard(c22250.tsfilter33,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22250.tsfilter32(c)
return ((c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_MONSTER))or c:IsSetCard(0x184) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22250.tsfilter33,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22250.tsfilter33(c)
return ((c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x183) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22250.tsfilter40(c,e,tp,m,f,chkf,exg)
return c:IsType(TYPE_FUSION) and c:IsOriginalCodeRule(86379841)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end
function c22250.tsfilter41(c)
return (((c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER)) and not c:IsLocation(LOCATION_DECK)) or (c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_FIRE+ATTRIBUTE_EARTH))) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22250.tsfilter42,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c) and Duel.IsExistingMatchingCard(c22250.tsfilter43,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22250.tsfilter42(c)
return ((c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x184) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22250.tsfilter43,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22250.tsfilter43(c)
return ((c:GetAttribute()==0 and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x181) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
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
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(22249)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,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_DECK,0,nil) local mg2=Duel.GetMatchingGroup(c22250.filter0,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,nil)
mg1:Merge(mg2) mg1:Merge(mg2)
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)
local exg=Duel.GetMatchingGroup(c22250.filter3,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,nil) if not res then
local res0=exg:IsExists(c22250.tsfilter01,1,nil) and Duel.IsExistingMatchingCard(c22250.tsfilter00,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
local res1=exg:IsExists(c22250.tsfilter11,1,nil) and Duel.IsExistingMatchingCard(c22250.tsfilter10,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
local res2=exg:IsExists(c22250.tsfilter21,1,nil) and Duel.IsExistingMatchingCard(c22250.tsfilter20,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
local res3=exg:IsExists(c22250.tsfilter31,1,nil) and Duel.IsExistingMatchingCard(c22250.tsfilter30,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
local res4=exg:IsExists(c22250.tsfilter41,1,nil) and Duel.IsExistingMatchingCard(c22250.tsfilter40,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not (res or res0 or res1 or res2 or res3 or res4) then
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
if ce~=nil then if ce~=nil then
local fgroup=ce:GetTarget() local fgroup=ce:GetTarget()
...@@ -127,7 +72,14 @@ function c22250.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -127,7 +72,14 @@ function c22250.target(e,tp,eg,ep,ev,re,r,rp,chk)
res=Duel.IsExistingMatchingCard(c22250.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf) res=Duel.IsExistingMatchingCard(c22250.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end end
end end
return res or res0 or res1 or res2 or res3 or res4 --flag reset
e1:Reset()
e3:Reset()
e4:Reset()
e5:Reset()
e7:Reset()
e8:Reset()
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
...@@ -136,22 +88,29 @@ function c22250.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -136,22 +88,29 @@ function c22250.activate(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(22248) e1:SetCode(22249)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler()) local e3=e1:Clone()
e2:SetType(EFFECT_TYPE_FIELD) e3:SetCode(22132)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) Duel.RegisterEffect(e3,tp)
e2:SetCode(22250) local e4=e1:Clone()
e2:SetTargetRange(1,0) e4:SetCode(22133)
Duel.RegisterEffect(e2,tp) 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_DECK,0,nil) local mg2=Duel.GetMatchingGroup(c22250.filter0,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,nil)
mg1:Merge(mg2) mg1:Merge(mg2)
local exg=Duel.GetMatchingGroup(c22250.filter00,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
mg1:Merge(exg)
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
...@@ -183,8 +142,13 @@ function c22250.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -183,8 +142,13 @@ function c22250.activate(e,tp,eg,ep,ev,re,r,rp)
end end
--flag reset --flag reset
e1:Reset() e1:Reset()
e2: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)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
......
...@@ -19,106 +19,51 @@ function c22251.initial_effect(c) ...@@ -19,106 +19,51 @@ function c22251.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c22251.filter0(c) function c22251.filter0(c)
return c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and ((c:IsAttribute(ATTRIBUTE_DARK+ATTRIBUTE_LIGHT) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x183,0x184) or c:IsCode(22200)) return ((c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK))
end or c:IsSetCard(0x183,0x184) or c:IsFusionCode(22200)
function c22251.filter00(c) or (c:IsSetCard(0x178,0x179,0x180,0x181,0x182,0x183,0x184) and not c:IsLocation(LOCATION_DECK)))
return c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and (c:IsSetCard(0x178,0x179,0x180,0x181,0x182,0x183,0x184) or c:IsCode(22200)) and c:IsCanBeFusionMaterial() and c:IsAbleToGrave()
end end
function c22251.filter1(c,e) function c22251.filter1(c,e)
return not c:IsImmuneToEffect(e) return not c:IsImmuneToEffect(e)
end end
function c22251.filter2(c,e,tp,m,f,chkf) function c22251.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x811) if not (c:IsType(TYPE_FUSION) and c:IsSetCard(0x811) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)) then return false end
end local res = c:CheckFusionMaterial(m,nil,chkf)
function c22251.filter3(c) return res
return c:IsCanBeFusionMaterial() and c:IsAbleToGrave()
end
--
function c22251.tsfilter00(c,e,tp,m,f,chkf,exg)
return c:IsType(TYPE_FUSION) and c:IsOriginalCodeRule(22234)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end
function c22251.tsfilter01(c)
return (((c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER)) and not c:IsLocation(LOCATION_DECK)) or (c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_DARK+ATTRIBUTE_LIGHT))) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22251.tsfilter02,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,c) and Duel.IsExistingMatchingCard(c22251.tsfilter03,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22251.tsfilter02(c)
return ((c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x183) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22251.tsfilter13,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22251.tsfilter03(c)
return ((c:IsAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x182) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22251.tsfilter10(c,e,tp,m,f,chkf,exg)
return c:IsType(TYPE_FUSION) and c:IsOriginalCodeRule(22236)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end
function c22251.tsfilter11(c)
return (((c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER)) and not c:IsLocation(LOCATION_DECK)) or (c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_DARK+ATTRIBUTE_LIGHT))) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22251.tsfilter12,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,c) and Duel.IsExistingMatchingCard(c22251.tsfilter13,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22251.tsfilter12(c)
return ((c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x184) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22251.tsfilter13,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22251.tsfilter13(c)
return ((c:IsAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x182) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22251.tsfilter20(c,e,tp,m,f,chkf,exg)
return c:IsType(TYPE_FUSION) and c:IsOriginalCodeRule(22238)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end
function c22251.tsfilter21(c)
return ((c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x180) or c:IsCode(22200)) and not c:IsLocation(LOCATION_DECK) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22251.tsfilter22,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c) and Duel.IsExistingMatchingCard(c22251.tsfilter23,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22251.tsfilter22(c)
return ((c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x179) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22251.tsfilter23,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22251.tsfilter23(c)
return ((c:IsAttribute(ATTRIBUTE_FIRE) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x178) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22251.tsfilter30(c,e,tp,m,f,chkf,exg)
return c:IsType(TYPE_FUSION) and c:IsOriginalCodeRule(22240)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end
function c22251.tsfilter31(c)
return ((c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x180) or c:IsCode(22200)) and not c:IsLocation(LOCATION_DECK) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22251.tsfilter32,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,c) and Duel.IsExistingMatchingCard(c22251.tsfilter33,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,c)
end end
function c22251.tsfilter32(c)
return ((c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x184) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22251.tsfilter33,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,c)
end
function c22251.tsfilter33(c)
return ((c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x183) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22251.tsfilter40(c,e,tp,m,f,chkf,exg)
return c:IsType(TYPE_FUSION) and c:IsOriginalCodeRule(86379841)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end
function c22251.tsfilter41(c)
return (((c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER)) and not c:IsLocation(LOCATION_DECK)) or (c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK))) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22251.tsfilter42,c:GetControler(),LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD,0,1,c) and Duel.IsExistingMatchingCard(c22251.tsfilter43,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22251.tsfilter42(c)
return ((c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x184) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22251.tsfilter43,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22251.tsfilter43(c)
return ((c:GetAttribute()==0 and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x181) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22251.target(e,tp,eg,ep,ev,re,r,rp,chk) function c22251.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
--effect flag
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(22249)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(22131)
Duel.RegisterEffect(e2,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 e6=e1:Clone()
e6:SetCode(22135)
Duel.RegisterEffect(e6,tp)
--
local chkf=tp local chkf=tp
local mg1=Duel.GetFusionMaterial(tp) local mg1=Duel.GetFusionMaterial(tp)
local mg2=Duel.GetMatchingGroup(c22251.filter0,tp,LOCATION_DECK,0,nil) local mg2=Duel.GetMatchingGroup(c22251.filter0,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,nil)
mg1:Merge(mg2) mg1:Merge(mg2)
local res=Duel.IsExistingMatchingCard(c22251.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) local res=Duel.IsExistingMatchingCard(c22251.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
local exg=Duel.GetMatchingGroup(c22251.filter3,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,nil) if not res then
local res0=exg:IsExists(c22251.tsfilter01,1,nil) and Duel.IsExistingMatchingCard(c22251.tsfilter00,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
local res1=exg:IsExists(c22251.tsfilter11,1,nil) and Duel.IsExistingMatchingCard(c22251.tsfilter10,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
local res2=exg:IsExists(c22251.tsfilter21,1,nil) and Duel.IsExistingMatchingCard(c22251.tsfilter20,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
local res3=exg:IsExists(c22251.tsfilter31,1,nil) and Duel.IsExistingMatchingCard(c22251.tsfilter30,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
local res4=exg:IsExists(c22251.tsfilter41,1,nil) and Duel.IsExistingMatchingCard(c22251.tsfilter40,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not (res or res0 or res1 or res2 or res3 or res4) then
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
if ce~=nil then if ce~=nil then
local fgroup=ce:GetTarget() local fgroup=ce:GetTarget()
...@@ -127,7 +72,14 @@ function c22251.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -127,7 +72,14 @@ function c22251.target(e,tp,eg,ep,ev,re,r,rp,chk)
res=Duel.IsExistingMatchingCard(c22251.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf) res=Duel.IsExistingMatchingCard(c22251.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end end
end end
return res or res0 or res1 or res2 or res3 or res4 --flag reset
e1:Reset()
e2:Reset()
e3:Reset()
e4:Reset()
e5:Reset()
e6:Reset()
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
...@@ -136,22 +88,29 @@ function c22251.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -136,22 +88,29 @@ function c22251.activate(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(22248) e1:SetCode(22249)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler()) local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(22131)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(22251)
e2:SetTargetRange(1,0)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,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 e6=e1:Clone()
e6:SetCode(22135)
Duel.RegisterEffect(e6,tp)
-- --
local chkf=tp local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c22251.filter1,nil,e) local mg1=Duel.GetFusionMaterial(tp):Filter(c22251.filter1,nil,e)
local mg2=Duel.GetMatchingGroup(c22251.filter0,tp,LOCATION_DECK,0,nil) local mg2=Duel.GetMatchingGroup(c22251.filter0,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,nil)
mg1:Merge(mg2) mg1:Merge(mg2)
local exg=Duel.GetMatchingGroup(c22251.filter00,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
mg1:Merge(exg)
local sg1=Duel.GetMatchingGroup(c22251.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) local sg1=Duel.GetMatchingGroup(c22251.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=nil local mg3=nil
local sg2=nil local sg2=nil
...@@ -184,6 +143,10 @@ function c22251.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -184,6 +143,10 @@ function c22251.activate(e,tp,eg,ep,ev,re,r,rp)
--flag reset --flag reset
e1:Reset() e1:Reset()
e2:Reset() e2:Reset()
e3:Reset()
e4:Reset()
e5:Reset()
e6:Reset()
end end
function c22251.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function c22251.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
......
...@@ -19,106 +19,48 @@ function c22252.initial_effect(c) ...@@ -19,106 +19,48 @@ function c22252.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c22252.filter0(c) function c22252.filter0(c)
return c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and ((c:IsAttribute(ATTRIBUTE_WATER+ATTRIBUTE_WIND+ATTRIBUTE_EARTH) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x179,0x180,0x182) or c:IsCode(22200)) return ((c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_WATER+ATTRIBUTE_WIND+ATTRIBUTE_EARTH))
end or c:IsSetCard(0x179,0x180,0x182) or c:IsFusionCode(22200)
function c22252.filter00(c) or (c:IsSetCard(0x178,0x179,0x180,0x181,0x182,0x183,0x184) and not c:IsLocation(LOCATION_DECK)))
return c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and (c:IsSetCard(0x178,0x179,0x180,0x181,0x182,0x183,0x184) or c:IsCode(22200)) and c:IsCanBeFusionMaterial() and c:IsAbleToGrave()
end end
function c22252.filter1(c,e) function c22252.filter1(c,e)
return not c:IsImmuneToEffect(e) return not c:IsImmuneToEffect(e)
end end
function c22252.filter2(c,e,tp,m,f,chkf) function c22252.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x811) if not (c:IsType(TYPE_FUSION) and c:IsSetCard(0x811) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)) then return false end
end local res = c:CheckFusionMaterial(m,nil,chkf)
function c22252.filter3(c) return res
return c:IsCanBeFusionMaterial() and c:IsAbleToGrave()
end
--
function c22252.tsfilter00(c,e,tp,m,f,chkf,exg)
return c:IsType(TYPE_FUSION) and c:IsOriginalCodeRule(22234)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end
function c22252.tsfilter01(c)
return (((c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER)) and not c:IsLocation(LOCATION_DECK)) or (c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_WATER+ATTRIBUTE_WIND+ATTRIBUTE_EARTH))) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22252.tsfilter02,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c) and Duel.IsExistingMatchingCard(c22252.tsfilter03,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,c)
end
function c22252.tsfilter02(c)
return ((c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x183) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22252.tsfilter13,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,c)
end
function c22252.tsfilter03(c)
return ((c:IsAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x182) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22252.tsfilter10(c,e,tp,m,f,chkf,exg)
return c:IsType(TYPE_FUSION) and c:IsOriginalCodeRule(22236)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end
function c22252.tsfilter11(c)
return (((c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER)) and not c:IsLocation(LOCATION_DECK)) or (c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_WATER+ATTRIBUTE_WIND+ATTRIBUTE_EARTH))) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22252.tsfilter12,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c) and Duel.IsExistingMatchingCard(c22252.tsfilter13,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,c)
end
function c22252.tsfilter12(c)
return ((c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x184) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22252.tsfilter13,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,c)
end
function c22252.tsfilter13(c)
return ((c:IsAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x182) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22252.tsfilter20(c,e,tp,m,f,chkf,exg)
return c:IsType(TYPE_FUSION) and c:IsOriginalCodeRule(22238)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end
function c22252.tsfilter21(c)
return ((c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x180) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22252.tsfilter22,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,c) and Duel.IsExistingMatchingCard(c22252.tsfilter23,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22252.tsfilter22(c)
return ((c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x179) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22252.tsfilter23,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22252.tsfilter23(c)
return ((c:IsAttribute(ATTRIBUTE_FIRE) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x178) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22252.tsfilter30(c,e,tp,m,f,chkf,exg)
return c:IsType(TYPE_FUSION) and c:IsOriginalCodeRule(22240)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end
function c22252.tsfilter31(c)
return ((c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x180) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22252.tsfilter32,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c) and Duel.IsExistingMatchingCard(c22252.tsfilter33,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end end
function c22252.tsfilter32(c)
return ((c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x184) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22252.tsfilter33,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22252.tsfilter33(c)
return ((c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x183) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22252.tsfilter40(c,e,tp,m,f,chkf,exg)
return c:IsType(TYPE_FUSION) and c:IsOriginalCodeRule(86379841)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end
function c22252.tsfilter41(c)
return (((c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER)) and not c:IsLocation(LOCATION_DECK)) or (c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_WATER+ATTRIBUTE_WIND+ATTRIBUTE_EARTH))) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22252.tsfilter42,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c) and Duel.IsExistingMatchingCard(c22252.tsfilter43,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22252.tsfilter42(c)
return ((c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x184) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22252.tsfilter43,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22252.tsfilter43(c)
return ((c:GetAttribute()==0 and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x181) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22252.target(e,tp,eg,ep,ev,re,r,rp,chk) function c22252.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
--effect flag
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(22249)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(22131)
Duel.RegisterEffect(e2,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(c22252.filter0,tp,LOCATION_DECK,0,nil) local mg2=Duel.GetMatchingGroup(c22252.filter0,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,nil)
mg1:Merge(mg2) mg1:Merge(mg2)
local res=Duel.IsExistingMatchingCard(c22252.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) local res=Duel.IsExistingMatchingCard(c22252.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
local exg=Duel.GetMatchingGroup(c22252.filter3,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,nil) if not res then
local res0=exg:IsExists(c22252.tsfilter01,1,nil) and Duel.IsExistingMatchingCard(c22252.tsfilter00,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
local res1=exg:IsExists(c22252.tsfilter11,1,nil) and Duel.IsExistingMatchingCard(c22252.tsfilter10,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
local res2=exg:IsExists(c22252.tsfilter21,1,nil) and Duel.IsExistingMatchingCard(c22252.tsfilter20,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
local res3=exg:IsExists(c22252.tsfilter31,1,nil) and Duel.IsExistingMatchingCard(c22252.tsfilter30,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
local res4=exg:IsExists(c22252.tsfilter41,1,nil) and Duel.IsExistingMatchingCard(c22252.tsfilter40,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not (res or res0 or res1 or res2 or res3 or res4) then
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
if ce~=nil then if ce~=nil then
local fgroup=ce:GetTarget() local fgroup=ce:GetTarget()
...@@ -127,7 +69,13 @@ function c22252.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -127,7 +69,13 @@ function c22252.target(e,tp,eg,ep,ev,re,r,rp,chk)
res=Duel.IsExistingMatchingCard(c22252.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf) res=Duel.IsExistingMatchingCard(c22252.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end end
end end
return res or res0 or res1 or res2 or res3 or res4 --flag reset
e1:Reset()
e2:Reset()
e5:Reset()
e7:Reset()
e8:Reset()
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
...@@ -136,22 +84,26 @@ function c22252.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -136,22 +84,26 @@ function c22252.activate(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(22248) e1:SetCode(22249)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler()) local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(22131)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(22252)
e2:SetTargetRange(1,0)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,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(c22252.filter1,nil,e) local mg1=Duel.GetFusionMaterial(tp):Filter(c22252.filter1,nil,e)
local mg2=Duel.GetMatchingGroup(c22252.filter0,tp,LOCATION_DECK,0,nil) local mg2=Duel.GetMatchingGroup(c22252.filter0,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,nil)
mg1:Merge(mg2) mg1:Merge(mg2)
local exg=Duel.GetMatchingGroup(c22252.filter00,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
mg1:Merge(exg)
local sg1=Duel.GetMatchingGroup(c22252.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) local sg1=Duel.GetMatchingGroup(c22252.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=nil local mg3=nil
local sg2=nil local sg2=nil
...@@ -184,6 +136,9 @@ function c22252.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -184,6 +136,9 @@ function c22252.activate(e,tp,eg,ep,ev,re,r,rp)
--flag reset --flag reset
e1:Reset() e1:Reset()
e2:Reset() e2:Reset()
e5:Reset()
e7:Reset()
e8:Reset()
end end
function c22252.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function c22252.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
......
...@@ -40,7 +40,7 @@ function c86379748.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -40,7 +40,7 @@ function c86379748.activate(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 and Duel.Remove(g,POS_FACEUP,REASON_EFFECT)~=0 then if g:GetCount()>0 and Duel.Remove(g,POS_FACEUP,REASON_EFFECT)~=0 then
local tg=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_REMOVED) local tg=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_REMOVED)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(86379748,1) e1:SetDescription(aux.Stringid(86379748,1))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY) e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1) e1:SetCountLimit(1)
...@@ -56,7 +56,7 @@ function c86379748.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,7 +56,7 @@ function c86379748.activate(e,tp,eg,ep,ev,re,r,rp)
end end
tg:KeepAlive() tg:KeepAlive()
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(86379748,0) e2:SetDescription(aux.Stringid(86379748,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY) e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetCountLimit(1) e2:SetCountLimit(1)
......
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