Commit e0d1a0f4 authored by songtongtong's avatar songtongtong

fixed

parent 10ee2249
--兵蚁 --兵蚁
function c24400005.initial_effect(c) function c24400005.initial_effect(c)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,24400005) e1:SetCountLimit(1,24400005)
e1:SetCondition(c24400005.spcon) e1:SetCondition(c24400005.spcon)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--nontuner --nontuner
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_NONTUNER) e2:SetCode(EFFECT_NONTUNER)
e2:SetCondition(c24400005.tncon) e2:SetCondition(c24400005.tncon)
e2:SetValue(c24400005.tnval) e2:SetValue(c24400005.tnval)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--tohand --tohand
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_BE_MATERIAL) e3:SetCode(EVENT_BE_MATERIAL)
e3:SetCondition(c24400005.thcon) e3:SetCondition(c24400005.thcon)
e3:SetTarget(c24400005.thtg) e3:SetTarget(c24400005.thtg)
e3:SetOperation(c24400005.thop) e3:SetOperation(c24400005.thop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--search --search
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(24400005,1)) e2:SetDescription(aux.Stringid(24400005,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_TO_GRAVE) e2:SetCode(EVENT_TO_GRAVE)
e2:SetTarget(c24400005.thtg1) e2:SetTarget(c24400005.thtg1)
e2:SetOperation(c24400005.thop1) e2:SetOperation(c24400005.thop1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c24400005.named_with_ZhanShuRenXing=true c24400005.named_with_ZhanShuRenXing=true
function c24400005.filter(c) function c24400005.filter(c)
return c:IsFaceup() and c.named_with_ZhanShuRenXing return c:IsFaceup() and c.named_with_ZhanShuRenXing
end end
function c24400005.spcon(e,c) function c24400005.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and
Duel.IsExistingMatchingCard(c24400005.filter,c:GetControler(),LOCATION_MZONE,0,1,nil) Duel.IsExistingMatchingCard(c24400005.filter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end end
function c24400005.tnckfil(c) function c24400005.tnckfil(c)
return c:IsRace(RACE_MACHINE) and c:IsFaceup() return c:IsRace(RACE_MACHINE) and c:IsFaceup()
end end
function c24400005.tncon(e,c) function c24400005.tncon(e,c)
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
return Duel.GetMatchingGroup(c24400005.tnckfil,tp,LOCATION_MZONE,0,e:GetHandler()):GetCount()==0 return Duel.GetMatchingGroup(c24400005.tnckfil,tp,LOCATION_MZONE,0,e:GetHandler()):GetCount()==0
end end
function c24400005.tnval(e,c) function c24400005.tnval(e,c)
return e:GetHandler():IsControler(c:GetControler()) return e:GetHandler():IsControler(c:GetControler())
end end
function c24400005.thcon(e,tp,eg,ep,ev,re,r,rp) function c24400005.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO
end end
function c24400005.thfilter(c) function c24400005.thfilter(c)
return c.named_with_ZhanShuRenXing and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return c.named_with_ZhanShuRenXing and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end end
function c24400005.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c24400005.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24400005.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c24400005.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c24400005.thop(e,tp,eg,ep,ev,re,r,rp) function c24400005.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c24400005.thfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c24400005.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
function c24400005.xthfilter(c) function c24400005.xthfilter(c)
return c:IsCode(23100005) and c:IsAbleToHand() return c:IsCode(24400005) and c:IsAbleToHand()
end end
function c24400005.thtg1(e,tp,eg,ep,ev,re,r,rp,chk) function c24400005.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c24400005.thop1(e,tp,eg,ep,ev,re,r,rp) function c24400005.thop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=Duel.GetFirstMatchingCard(c24400005.xthfilter,tp,LOCATION_DECK,0,nil) local tc=Duel.GetFirstMatchingCard(c24400005.xthfilter,tp,LOCATION_DECK,0,nil)
if tc then if tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
end end
end end
--虚拟神使 miko --虚拟神使 miko
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--fusion material --fusion material
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsRace,RACE_CYBERSE),2,true) aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsRace,RACE_CYBERSE),2,true)
c:EnableReviveLimit() c:EnableReviveLimit()
--Special Summon --Special Summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(2) e1:SetDescription(2)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(s.tkcon) e1:SetCondition(s.tkcon)
e1:SetTarget(s.tktg) e1:SetTarget(s.tktg)
e1:SetOperation(s.tkop) e1:SetOperation(s.tkop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--special summon --special summon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(2) e2:SetDescription(2)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetHintTiming(0,TIMING_END_PHASE+TIMINGS_CHECK_MONSTER) e2:SetHintTiming(0,TIMING_END_PHASE+TIMINGS_CHECK_MONSTER)
e2:SetCountLimit(1,id) e2:SetCountLimit(1,id)
e2:SetCost(s.bfgcost) e2:SetCost(s.bfgcost)
e2:SetTarget(s.target) e2:SetTarget(s.target)
e2:SetOperation(s.operation) e2:SetOperation(s.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.tkcon(e,tp,eg,ep,ev,re,r,rp) function s.tkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return re and re:IsActiveType(TYPE_MONSTER) and c:IsSummonType(SUMMON_TYPE_FUSION) return re and re:IsActiveType(TYPE_MONSTER) and c:IsSummonType(SUMMON_TYPE_FUSION)
end end
function s.tktg(e,tp,eg,ep,ev,re,r,rp,chk) function s.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
local res1=Duel.GetLocationCount(tp,LOCATION_MZONE)>1 local res1=Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsPlayerCanSpecialSummonMonster(tp,31300021,nil,TYPES_TOKEN_MONSTER,35,35,4,RACE_CYBERSE,ATTRIBUTE_FIRE,POS_FACEUP) and Duel.IsPlayerCanSpecialSummonMonster(tp,31300021,nil,TYPES_TOKEN_MONSTER,35,35,4,RACE_CYBERSE,ATTRIBUTE_FIRE,POS_FACEUP)
and Duel.IsPlayerCanSpecialSummonMonster(tp,31300022,nil,TYPES_TOKEN_MONSTER,35,35,4,RACE_CYBERSE,ATTRIBUTE_FIRE,POS_FACEUP) and Duel.IsPlayerCanSpecialSummonMonster(tp,31300022,nil,TYPES_TOKEN_MONSTER,35,35,4,RACE_CYBERSE,ATTRIBUTE_FIRE,POS_FACEUP)
local res2=Duel.GetLocationCount(1-tp,LOCATION_MZONE)>1 local res2=Duel.GetLocationCount(1-tp,LOCATION_MZONE)>1
and Duel.IsPlayerCanSpecialSummonMonster(1-tp,31300021,nil,TYPES_TOKEN_MONSTER,35,35,4,RACE_CYBERSE,ATTRIBUTE_FIRE,POS_FACEUP) and Duel.IsPlayerCanSpecialSummonMonster(1-tp,31300021,nil,TYPES_TOKEN_MONSTER,35,35,4,RACE_CYBERSE,ATTRIBUTE_FIRE,POS_FACEUP)
and Duel.IsPlayerCanSpecialSummonMonster(1-tp,31300022,nil,TYPES_TOKEN_MONSTER,35,35,4,RACE_CYBERSE,ATTRIBUTE_FIRE,POS_FACEUP) and Duel.IsPlayerCanSpecialSummonMonster(1-tp,31300022,nil,TYPES_TOKEN_MONSTER,35,35,4,RACE_CYBERSE,ATTRIBUTE_FIRE,POS_FACEUP)
return res1 or res2 end return res1 or res2 end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0)
end end
function s.tkop(e,tp,eg,ep,ev,re,r,rp) function s.tkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
local res1=Duel.GetLocationCount(tp,LOCATION_MZONE)>1 local res1=Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsPlayerCanSpecialSummonMonster(tp,31300021,nil,TYPES_TOKEN_MONSTER,35,35,3,RACE_CYBERSE,ATTRIBUTE_FIRE,POS_FACEUP) and Duel.IsPlayerCanSpecialSummonMonster(tp,31300021,nil,TYPES_TOKEN_MONSTER,35,35,3,RACE_CYBERSE,ATTRIBUTE_FIRE,POS_FACEUP)
and Duel.IsPlayerCanSpecialSummonMonster(tp,31300022,nil,TYPES_TOKEN_MONSTER,35,35,3,RACE_CYBERSE,ATTRIBUTE_FIRE,POS_FACEUP) and Duel.IsPlayerCanSpecialSummonMonster(tp,31300022,nil,TYPES_TOKEN_MONSTER,35,35,3,RACE_CYBERSE,ATTRIBUTE_FIRE,POS_FACEUP)
local res2=Duel.GetLocationCount(1-tp,LOCATION_MZONE)>1 local res2=Duel.GetLocationCount(1-tp,LOCATION_MZONE)>1
and Duel.IsPlayerCanSpecialSummonMonster(1-tp,31300021,nil,TYPES_TOKEN_MONSTER,35,35,3,RACE_CYBERSE,ATTRIBUTE_FIRE,POS_FACEUP) and Duel.IsPlayerCanSpecialSummonMonster(1-tp,31300021,nil,TYPES_TOKEN_MONSTER,35,35,3,RACE_CYBERSE,ATTRIBUTE_FIRE,POS_FACEUP)
and Duel.IsPlayerCanSpecialSummonMonster(1-tp,31300022,nil,TYPES_TOKEN_MONSTER,35,35,3,RACE_CYBERSE,ATTRIBUTE_FIRE,POS_FACEUP) and Duel.IsPlayerCanSpecialSummonMonster(1-tp,31300022,nil,TYPES_TOKEN_MONSTER,35,35,3,RACE_CYBERSE,ATTRIBUTE_FIRE,POS_FACEUP)
local off=1 local off=1
local ops={} local ops={}
local opval={} local opval={}
if res1 then if res1 then
ops[off]=aux.Stringid(id,0) ops[off]=aux.Stringid(id,0)
opval[off-1]=1 opval[off-1]=1
off=off+1 off=off+1
end end
if res2 then if res2 then
ops[off]=aux.Stringid(id,1) ops[off]=aux.Stringid(id,1)
opval[off-1]=2 opval[off-1]=2
off=off+1 off=off+1
end end
local op=Duel.SelectOption(tp,table.unpack(ops)) local op=Duel.SelectOption(tp,table.unpack(ops))
local sel=opval[op] local sel=opval[op]
local p=tp local p=tp
if sel~=1 then p=1-tp end if sel~=1 then p=1-tp end
for i=1,2 do for i=1,2 do
local token=Duel.CreateToken(tp,31300020+i) local token=Duel.CreateToken(tp,31300020+i)
Duel.SpecialSummonStep(token,0,tp,p,false,false,POS_FACEUP) Duel.SpecialSummonStep(token,0,tp,p,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UNRELEASABLE_SUM) e1:SetCode(EFFECT_UNRELEASABLE_SUM)
e1:SetValue(1) e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e1,true) token:RegisterEffect(e1,true)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_UNRELEASABLE_NONSUM) e2:SetCode(EFFECT_UNRELEASABLE_NONSUM)
token:RegisterEffect(e2,true) token:RegisterEffect(e2,true)
local e3=e2:Clone() local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) e3:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
token:RegisterEffect(e3,true) token:RegisterEffect(e3,true)
local e4=e2:Clone() local e4=e2:Clone()
e4:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL) e4:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
token:RegisterEffect(e4,true) token:RegisterEffect(e4,true)
end end
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
end end
function s.bfgcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.bfgcost(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_FACEDOWN,REASON_COST) Duel.Remove(e:GetHandler(),POS_FACEDOWN,REASON_COST)
end end
function s.filter0(c) function s.filter0(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck() return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck()
end end
function s.filter1(c,e) function s.filter1(c,e)
return c:IsFaceupEx() and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck() and not c:IsImmuneToEffect(e) return c:IsFaceupEx() and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck() and not c:IsImmuneToEffect(e)
end end
function s.filter2(c,e,tp,m,f,chkf,check) function s.filter2(c,e,tp,m,f,chkf,check)
return c:IsType(TYPE_FUSION) and (check or c:IsAttack(35)) and (not f or f(c)) return c:IsType(TYPE_FUSION) and (check or c:GetBaseAttack(35)) 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) and c:CheckFusionMaterial(m,nil,chkf)
end end
function s.checkfilter(c) function s.checkfilter(c)
return c:IsAttack(35) and c:IsFaceup() return c:GetBaseAttack(35) and c:IsFaceup()
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then if chk==0 then
local chkf=tp if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end
local check=Duel.IsExistingMatchingCard(s.checkfilter,tp,LOCATION_MZONE,0,1,nil) local chkf=tp
local mg=Duel.GetMatchingGroup(s.filter0,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,c) local check=Duel.IsExistingMatchingCard(s.checkfilter,tp,LOCATION_MZONE,0,1,nil)
local res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg,nil,chkf,check) local mg=Duel.GetMatchingGroup(s.filter0,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,c)
if not res then local res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg,nil,chkf,check)
local ce=Duel.GetChainMaterial(tp) if not res then
if ce~=nil then local ce=Duel.GetChainMaterial(tp)
local fgroup=ce:GetTarget() if ce~=nil then
local mg3=fgroup(ce,e,tp) local fgroup=ce:GetTarget()
local mf=ce:GetValue() local mg3=fgroup(ce,e,tp)
res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf,check) local mf=ce:GetValue()
end res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf,check)
end end
return res end
end return res
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) end
end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
function s.operation(e,tp,eg,ep,ev,re,r,rp) end
local c=e:GetHandler() function s.operation(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp local c=e:GetHandler()
local check=Duel.IsExistingMatchingCard(s.checkfilter,tp,LOCATION_MZONE,0,1,nil) local chkf=tp
local mg=Duel.GetMatchingGroup(s.filter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,c,e) local check=Duel.IsExistingMatchingCard(s.checkfilter,tp,LOCATION_MZONE,0,1,nil)
local sg1=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg,nil,chkf,check) local mg=Duel.GetMatchingGroup(s.filter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,c,e)
local mg3=nil local sg1=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg,nil,chkf,check)
local sg2=nil local mg3=nil
local ce=Duel.GetChainMaterial(tp) local sg2=nil
if ce~=nil then local ce=Duel.GetChainMaterial(tp)
local fgroup=ce:GetTarget() if ce~=nil then
mg3=fgroup(ce,e,tp) local fgroup=ce:GetTarget()
local mf=ce:GetValue() mg3=fgroup(ce,e,tp)
sg2=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf,check) local mf=ce:GetValue()
end sg2=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf,check)
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then end
local sg=sg1:Clone() if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
if sg2 then sg:Merge(sg2) end local sg=sg1:Clone()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) if sg2 then sg:Merge(sg2) end
local tg=sg:Select(tp,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=tg:GetFirst() local tg=sg:Select(tp,1,1,nil)
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then local tc=tg:GetFirst()
local mat=Duel.SelectFusionMaterial(tp,tc,mg,nil,chkf) if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
tc:SetMaterial(mat) local mat=Duel.SelectFusionMaterial(tp,tc,mg,nil,chkf)
Duel.SendtoDeck(mat,nil,SEQ_DECKSHUFFLE,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) tc:SetMaterial(mat)
Duel.BreakEffect() Duel.SendtoDeck(mat,nil,SEQ_DECKSHUFFLE,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) Duel.BreakEffect()
else Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf) else
local fop=ce:GetOperation() local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
fop(ce,e,tp,tc,mat2) local fop=ce:GetOperation()
end fop(ce,e,tp,tc,mat2)
tc:CompleteProcedure() end
end tc:CompleteProcedure()
end end
end
--完美且究极的MiComet --完美且究极的MiComet
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,s.ffilter,2,true) aux.AddFusionProcFunRep(c,s.ffilter,2,true)
--immune --immune
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCondition(s.imcon) e1:SetCondition(s.imcon)
e1:SetValue(s.efilter) e1:SetValue(s.efilter)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--atk --atk
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCondition(s.imcon) e2:SetCondition(s.imcon)
e2:SetValue(s.atkval) e2:SetValue(s.atkval)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--check special summon method --check special summon method
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetOperation(s.checkop) e3:SetOperation(s.checkop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--special summon --special summon
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(2) e4:SetDescription(2)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e4:SetType(EFFECT_TYPE_QUICK_O) e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN) e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_GRAVE) e4:SetRange(LOCATION_GRAVE)
e4:SetHintTiming(0,TIMING_END_PHASE+TIMINGS_CHECK_MONSTER) e4:SetHintTiming(0,TIMING_END_PHASE+TIMINGS_CHECK_MONSTER)
e4:SetCountLimit(1,id) e4:SetCountLimit(1,id)
e4:SetCost(s.bfgcost) e4:SetCost(s.bfgcost)
e4:SetTarget(s.target) e4:SetTarget(s.target)
e4:SetOperation(s.operation) e4:SetOperation(s.operation)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function s.ffilter(c,fc,sub,mg,sg) function s.ffilter(c,fc,sub,mg,sg)
return c:IsRace(RACE_CYBERSE) and (not sg or not sg:IsExists(Card.IsFusionAttribute,1,c,c:GetFusionAttribute())) return c:IsRace(RACE_CYBERSE) and (not sg or not sg:IsExists(Card.IsFusionAttribute,1,c,c:GetFusionAttribute()))
end end
function s.checkop(e,tp,eg,ep,ev,re,r,rp) function s.checkop(e,tp,eg,ep,ev,re,r,rp)
if not re then return end if not re then return end
if re:IsActiveType(TYPE_MONSTER) then if re:IsActiveType(TYPE_MONSTER) then
e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD-RESET_TEMP_REMOVE,0,1) e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD-RESET_TEMP_REMOVE,0,1)
end end
end end
function s.imcon(e) function s.imcon(e)
return e:GetHandler():GetFlagEffect(id)>0 and e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) return e:GetHandler():GetFlagEffect(id)>0 and e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end end
function s.efilter(e,te) function s.efilter(e,te)
return te:GetOwner()~=e:GetOwner() return te:GetOwner()~=e:GetOwner()
end end
function s.matcheck(e,c) function s.matcheck(e,c)
local mat=c:GetMaterial() local mat=c:GetMaterial()
local ct=mat:GetSum(Card.GetLevel,nil) local ct=mat:GetSum(Card.GetLevel,nil)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(ct*350) e1:SetValue(ct*350)
e1:SetReset(RESET_EVENT+0xff0000) e1:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function s.atkval(e,c) function s.atkval(e,c)
local mat=c:GetMaterial() local mat=c:GetMaterial()
local ct=mat:GetSum(Card.GetLevel,nil) local ct=mat:GetSum(Card.GetLevel,nil)
return ct*350 return ct*350
end end
function s.bfgcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.bfgcost(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_FACEDOWN,REASON_COST) Duel.Remove(e:GetHandler(),POS_FACEDOWN,REASON_COST)
end end
function s.filter0(c) function s.filter0(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck() return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck()
end end
function s.filter1(c,e) function s.filter1(c,e)
return c:IsFaceupEx() and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck() and not c:IsImmuneToEffect(e) return c:IsFaceupEx() and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck() and not c:IsImmuneToEffect(e)
end end
function s.filter2(c,e,tp,m,f,chkf,check) function s.filter2(c,e,tp,m,f,chkf,check)
return c:IsType(TYPE_FUSION) and (check or c:IsAttack(35)) and (not f or f(c)) return c:IsType(TYPE_FUSION) and (check or c:GetBaseAttack(35)) 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) and c:CheckFusionMaterial(m,nil,chkf)
end end
function s.checkfilter(c) function s.checkfilter(c)
return c:IsAttack(35) and c:IsFaceup() return c:GetBaseAttack(35) and c:IsFaceup()
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then if chk==0 then
local chkf=tp if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end
local check=Duel.IsExistingMatchingCard(s.checkfilter,tp,LOCATION_MZONE,0,1,nil) local chkf=tp
local mg=Duel.GetMatchingGroup(s.filter0,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,c) local check=Duel.IsExistingMatchingCard(s.checkfilter,tp,LOCATION_MZONE,0,1,nil)
local res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg,nil,chkf,check) local mg=Duel.GetMatchingGroup(s.filter0,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,c)
if not res then local res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg,nil,chkf,check)
local ce=Duel.GetChainMaterial(tp) if not res then
if ce~=nil then local ce=Duel.GetChainMaterial(tp)
local fgroup=ce:GetTarget() if ce~=nil then
local mg3=fgroup(ce,e,tp) local fgroup=ce:GetTarget()
local mf=ce:GetValue() local mg3=fgroup(ce,e,tp)
res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf,check) local mf=ce:GetValue()
end res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf,check)
end end
return res end
end return res
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) end
end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
function s.operation(e,tp,eg,ep,ev,re,r,rp) end
local c=e:GetHandler() function s.operation(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp local c=e:GetHandler()
local check=Duel.IsExistingMatchingCard(s.checkfilter,tp,LOCATION_MZONE,0,1,nil) local chkf=tp
local mg=Duel.GetMatchingGroup(s.filter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,c,e) local check=Duel.IsExistingMatchingCard(s.checkfilter,tp,LOCATION_MZONE,0,1,nil)
local sg1=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg,nil,chkf,check) local mg=Duel.GetMatchingGroup(s.filter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,c,e)
local mg3=nil local sg1=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg,nil,chkf,check)
local sg2=nil local mg3=nil
local ce=Duel.GetChainMaterial(tp) local sg2=nil
if ce~=nil then local ce=Duel.GetChainMaterial(tp)
local fgroup=ce:GetTarget() if ce~=nil then
mg3=fgroup(ce,e,tp) local fgroup=ce:GetTarget()
local mf=ce:GetValue() mg3=fgroup(ce,e,tp)
sg2=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf,check) local mf=ce:GetValue()
end sg2=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf,check)
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then end
local sg=sg1:Clone() if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
if sg2 then sg:Merge(sg2) end local sg=sg1:Clone()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) if sg2 then sg:Merge(sg2) end
local tg=sg:Select(tp,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=tg:GetFirst() local tg=sg:Select(tp,1,1,nil)
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then local tc=tg:GetFirst()
local mat=Duel.SelectFusionMaterial(tp,tc,mg,nil,chkf) if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
tc:SetMaterial(mat) local mat=Duel.SelectFusionMaterial(tp,tc,mg,nil,chkf)
Duel.SendtoDeck(mat,nil,SEQ_DECKSHUFFLE,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) tc:SetMaterial(mat)
Duel.BreakEffect() Duel.SendtoDeck(mat,nil,SEQ_DECKSHUFFLE,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) Duel.BreakEffect()
else Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf) else
local fop=ce:GetOperation() local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
fop(ce,e,tp,tc,mat2) local fop=ce:GetOperation()
end fop(ce,e,tp,tc,mat2)
tc:CompleteProcedure() end
end tc:CompleteProcedure()
end end
end
--菁樱巫女 miko --菁樱巫女 miko
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--fusion material --fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,s.ffilter,aux.FilterBoolFunction(Card.IsFusionType,TYPE_EFFECT),1,true,true) aux.AddFusionProcCodeFun(c,s.ffilter,aux.FilterBoolFunction(Card.IsFusionType,TYPE_EFFECT),1,true,true)
--Special Summon --Special Summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE) e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(s.tgcon) e1:SetCondition(s.tgcon)
e1:SetTarget(s.tgtg) e1:SetTarget(s.tgtg)
e1:SetOperation(s.tgop) e1:SetOperation(s.tgop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--special summon --special summon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(2) e2:SetDescription(2)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetHintTiming(0,TIMING_END_PHASE+TIMINGS_CHECK_MONSTER) e2:SetHintTiming(0,TIMING_END_PHASE+TIMINGS_CHECK_MONSTER)
e2:SetCountLimit(1,id) e2:SetCountLimit(1,id)
e2:SetCost(s.bfgcost) e2:SetCost(s.bfgcost)
e2:SetTarget(s.target) e2:SetTarget(s.target)
e2:SetOperation(s.operation) e2:SetOperation(s.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.ffilter(c) function s.ffilter(c)
return c:IsRace(RACE_CYBERSE) or c:IsFusionAttribute(ATTRIBUTE_FIRE) return c:IsRace(RACE_CYBERSE) or c:IsFusionAttribute(ATTRIBUTE_FIRE)
end end
function s.tgcon(e,tp,eg,ep,ev,re,r,rp) function s.tgcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return re and re:IsActiveType(TYPE_MONSTER) and c:IsSummonType(SUMMON_TYPE_FUSION) return re and re:IsActiveType(TYPE_MONSTER) and c:IsSummonType(SUMMON_TYPE_FUSION)
end end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_REMOVED,0,nil) local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_REMOVED,0,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,5,0,0) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,5,0,0)
end end
function s.tgop(e,tp,eg,ep,ev,re,r,rp) function s.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_REMOVED,0,nil) local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_REMOVED,0,nil)
if g:GetCount()>=5 then if g:GetCount()>=5 then
local sg=g:RandomSelect(tp,5) local sg=g:RandomSelect(tp,5)
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_RETURN) Duel.SendtoGrave(sg,REASON_EFFECT+REASON_RETURN)
end end
end end
function s.bfgcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.bfgcost(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_FACEDOWN,REASON_COST) Duel.Remove(e:GetHandler(),POS_FACEDOWN,REASON_COST)
end end
function s.filter0(c) function s.filter0(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck() return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck()
end end
function s.filter1(c,e) function s.filter1(c,e)
return c:IsFaceupEx() and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck() and not c:IsImmuneToEffect(e) return c:IsFaceupEx() and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck() and not c:IsImmuneToEffect(e)
end end
function s.filter2(c,e,tp,m,f,chkf,check) function s.filter2(c,e,tp,m,f,chkf,check)
return c:IsType(TYPE_FUSION) and (check or c:IsAttack(35)) and (not f or f(c)) return c:IsType(TYPE_FUSION) and (check or c:GetBaseAttack(35)) 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) and c:CheckFusionMaterial(m,nil,chkf)
end end
function s.checkfilter(c) function s.checkfilter(c)
return c:IsAttack(35) and c:IsFaceup() return c:GetBaseAttack(35) and c:IsFaceup()
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then if chk==0 then
local chkf=tp if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end
local check=Duel.IsExistingMatchingCard(s.checkfilter,tp,LOCATION_MZONE,0,1,nil) local chkf=tp
local mg=Duel.GetMatchingGroup(s.filter0,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,c) local check=Duel.IsExistingMatchingCard(s.checkfilter,tp,LOCATION_MZONE,0,1,nil)
local res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg,nil,chkf,check) local mg=Duel.GetMatchingGroup(s.filter0,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,c)
if not res then local res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg,nil,chkf,check)
local ce=Duel.GetChainMaterial(tp) if not res then
if ce~=nil then local ce=Duel.GetChainMaterial(tp)
local fgroup=ce:GetTarget() if ce~=nil then
local mg3=fgroup(ce,e,tp) local fgroup=ce:GetTarget()
local mf=ce:GetValue() local mg3=fgroup(ce,e,tp)
res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf,check) local mf=ce:GetValue()
end res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf,check)
end end
return res end
end return res
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) end
end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
function s.operation(e,tp,eg,ep,ev,re,r,rp) end
local c=e:GetHandler() function s.operation(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp local c=e:GetHandler()
local check=Duel.IsExistingMatchingCard(s.checkfilter,tp,LOCATION_MZONE,0,1,nil) local chkf=tp
local mg=Duel.GetMatchingGroup(s.filter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,c,e) local check=Duel.IsExistingMatchingCard(s.checkfilter,tp,LOCATION_MZONE,0,1,nil)
local sg1=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg,nil,chkf,check) local mg=Duel.GetMatchingGroup(s.filter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,c,e)
local mg3=nil local sg1=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg,nil,chkf,check)
local sg2=nil local mg3=nil
local ce=Duel.GetChainMaterial(tp) local sg2=nil
if ce~=nil then local ce=Duel.GetChainMaterial(tp)
local fgroup=ce:GetTarget() if ce~=nil then
mg3=fgroup(ce,e,tp) local fgroup=ce:GetTarget()
local mf=ce:GetValue() mg3=fgroup(ce,e,tp)
sg2=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf,check) local mf=ce:GetValue()
end sg2=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf,check)
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then end
local sg=sg1:Clone() if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
if sg2 then sg:Merge(sg2) end local sg=sg1:Clone()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) if sg2 then sg:Merge(sg2) end
local tg=sg:Select(tp,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=tg:GetFirst() local tg=sg:Select(tp,1,1,nil)
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then local tc=tg:GetFirst()
local mat=Duel.SelectFusionMaterial(tp,tc,mg,nil,chkf) if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
tc:SetMaterial(mat) local mat=Duel.SelectFusionMaterial(tp,tc,mg,nil,chkf)
Duel.SendtoDeck(mat,nil,SEQ_DECKSHUFFLE,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) tc:SetMaterial(mat)
Duel.BreakEffect() Duel.SendtoDeck(mat,nil,SEQ_DECKSHUFFLE,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) Duel.BreakEffect()
else Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf) else
local fop=ce:GetOperation() local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
fop(ce,e,tp,tc,mat2) local fop=ce:GetOperation()
end fop(ce,e,tp,tc,mat2)
tc:CompleteProcedure() end
end tc:CompleteProcedure()
end end
end
--菁樱魔法师 miko --菁樱魔法师 miko
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--fusion material --fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,s.ffilter,aux.FilterBoolFunction(Card.IsFusionType,TYPE_EFFECT),1,true,true) aux.AddFusionProcCodeFun(c,s.ffilter,aux.FilterBoolFunction(Card.IsFusionType,TYPE_EFFECT),1,true,true)
--damage --damage
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING) e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetCondition(s.damcon) e1:SetCondition(s.damcon)
e1:SetOperation(s.damop) e1:SetOperation(s.damop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--special summon --special summon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(2) e2:SetDescription(2)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetHintTiming(0,TIMING_END_PHASE+TIMINGS_CHECK_MONSTER) e2:SetHintTiming(0,TIMING_END_PHASE+TIMINGS_CHECK_MONSTER)
e2:SetCountLimit(1,id) e2:SetCountLimit(1,id)
e2:SetCost(s.bfgcost) e2:SetCost(s.bfgcost)
e2:SetTarget(s.target) e2:SetTarget(s.target)
e2:SetOperation(s.operation) e2:SetOperation(s.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--check special summon method --check special summon method
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetOperation(s.checkop) e3:SetOperation(s.checkop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function s.ffilter(c) function s.ffilter(c)
return c:IsRace(RACE_CYBERSE) or c:IsFusionAttribute(ATTRIBUTE_FIRE) return c:IsRace(RACE_CYBERSE) or c:IsFusionAttribute(ATTRIBUTE_FIRE)
end end
function s.damcon(e,tp,eg,ep,ev,re,r,rp) function s.damcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(id)>0 and e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) return e:GetHandler():GetFlagEffect(id)>0 and e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and rp==tp
end end
function s.damop(e,tp,eg,ep,ev,re,r,rp) function s.damop(e,tp,eg,ep,ev,re,r,rp)
--becomes doubled --becomes doubled
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE) e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1) e1:SetTargetRange(0,1)
e1:SetValue(s.damval) e1:SetValue(s.damval)
e1:SetReset(RESET_EVENT+RESET_CHAIN) e1:SetReset(RESET_EVENT+RESET_CHAIN)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function s.damval(e,re,val,r,rp,rc) function s.damval(e,re,val,r,rp,rc)
if r&REASON_EFFECT==REASON_EFFECT then if r&REASON_EFFECT==REASON_EFFECT then
return val*2 return val*2
else return val end else return val end
end end
function s.checkop(e,tp,eg,ep,ev,re,r,rp) function s.checkop(e,tp,eg,ep,ev,re,r,rp)
if not re then return end if not re then return end
if re:IsActiveType(TYPE_MONSTER) then if re:IsActiveType(TYPE_MONSTER) then
e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD-RESET_TEMP_REMOVE,0,1) e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD-RESET_TEMP_REMOVE,0,1)
end end
end end
function s.bfgcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.bfgcost(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_FACEDOWN,REASON_COST) Duel.Remove(e:GetHandler(),POS_FACEDOWN,REASON_COST)
end end
function s.filter0(c) function s.filter0(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck() return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck()
end end
function s.filter1(c,e) function s.filter1(c,e)
return c:IsFaceupEx() and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck() and not c:IsImmuneToEffect(e) return c:IsFaceupEx() and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck() and not c:IsImmuneToEffect(e)
end end
function s.filter2(c,e,tp,m,f,chkf,check) function s.filter2(c,e,tp,m,f,chkf,check)
return c:IsType(TYPE_FUSION) and (check or c:IsAttack(35)) and (not f or f(c)) return c:IsType(TYPE_FUSION) and (check or c:GetBaseAttack(35)) 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) and c:CheckFusionMaterial(m,nil,chkf)
end end
function s.checkfilter(c) function s.checkfilter(c)
return c:IsAttack(35) and c:IsFaceup() return c:GetBaseAttack(35) and c:IsFaceup()
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then if chk==0 then
local chkf=tp if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end
local check=Duel.IsExistingMatchingCard(s.checkfilter,tp,LOCATION_MZONE,0,1,nil) local chkf=tp
local mg=Duel.GetMatchingGroup(s.filter0,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,c) local check=Duel.IsExistingMatchingCard(s.checkfilter,tp,LOCATION_MZONE,0,1,nil)
local res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg,nil,chkf,check) local mg=Duel.GetMatchingGroup(s.filter0,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,c)
if not res then local res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg,nil,chkf,check)
local ce=Duel.GetChainMaterial(tp) if not res then
if ce~=nil then local ce=Duel.GetChainMaterial(tp)
local fgroup=ce:GetTarget() if ce~=nil then
local mg3=fgroup(ce,e,tp) local fgroup=ce:GetTarget()
local mf=ce:GetValue() local mg3=fgroup(ce,e,tp)
res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf,check) local mf=ce:GetValue()
end res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf,check)
end end
return res end
end return res
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) end
end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
function s.operation(e,tp,eg,ep,ev,re,r,rp) end
local c=e:GetHandler() function s.operation(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp local c=e:GetHandler()
local check=Duel.IsExistingMatchingCard(s.checkfilter,tp,LOCATION_MZONE,0,1,nil) local chkf=tp
local mg=Duel.GetMatchingGroup(s.filter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,c,e) local check=Duel.IsExistingMatchingCard(s.checkfilter,tp,LOCATION_MZONE,0,1,nil)
local sg1=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg,nil,chkf,check) local mg=Duel.GetMatchingGroup(s.filter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,c,e)
local mg3=nil local sg1=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg,nil,chkf,check)
local sg2=nil local mg3=nil
local ce=Duel.GetChainMaterial(tp) local sg2=nil
if ce~=nil then local ce=Duel.GetChainMaterial(tp)
local fgroup=ce:GetTarget() if ce~=nil then
mg3=fgroup(ce,e,tp) local fgroup=ce:GetTarget()
local mf=ce:GetValue() mg3=fgroup(ce,e,tp)
sg2=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf,check) local mf=ce:GetValue()
end sg2=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf,check)
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then end
local sg=sg1:Clone() if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
if sg2 then sg:Merge(sg2) end local sg=sg1:Clone()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) if sg2 then sg:Merge(sg2) end
local tg=sg:Select(tp,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=tg:GetFirst() local tg=sg:Select(tp,1,1,nil)
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then local tc=tg:GetFirst()
local mat=Duel.SelectFusionMaterial(tp,tc,mg,nil,chkf) if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
tc:SetMaterial(mat) local mat=Duel.SelectFusionMaterial(tp,tc,mg,nil,chkf)
Duel.SendtoDeck(mat,nil,SEQ_DECKSHUFFLE,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) tc:SetMaterial(mat)
Duel.BreakEffect() Duel.SendtoDeck(mat,nil,SEQ_DECKSHUFFLE,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) Duel.BreakEffect()
else Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf) else
local fop=ce:GetOperation() local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
fop(ce,e,tp,tc,mat2) local fop=ce:GetOperation()
end fop(ce,e,tp,tc,mat2)
tc:CompleteProcedure() end
end tc:CompleteProcedure()
end end
end
--樱火龙 miko --樱火龙 miko
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--fusion material --fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,s.ffilter,aux.FilterBoolFunction(Card.IsFusionType,TYPE_EFFECT),1,true,true) aux.AddFusionProcCodeFun(c,s.ffilter,aux.FilterBoolFunction(Card.IsFusionType,TYPE_EFFECT),1,true,true)
--Special Summon --Special Summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DAMAGE) e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(s.damcon) e1:SetCondition(s.damcon)
e1:SetTarget(s.damtg) e1:SetTarget(s.damtg)
e1:SetOperation(s.damop) e1:SetOperation(s.damop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--special summon --special summon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(2) e2:SetDescription(2)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetHintTiming(0,TIMING_END_PHASE+TIMINGS_CHECK_MONSTER) e2:SetHintTiming(0,TIMING_END_PHASE+TIMINGS_CHECK_MONSTER)
e2:SetCountLimit(1,id) e2:SetCountLimit(1,id)
e2:SetCost(s.bfgcost) e2:SetCost(s.bfgcost)
e2:SetTarget(s.target) e2:SetTarget(s.target)
e2:SetOperation(s.operation) e2:SetOperation(s.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.ffilter(c) function s.ffilter(c)
return c:IsRace(RACE_CYBERSE) or c:IsFusionAttribute(ATTRIBUTE_FIRE) return c:IsRace(RACE_CYBERSE) or c:IsFusionAttribute(ATTRIBUTE_FIRE)
end end
function s.damcon(e,tp,eg,ep,ev,re,r,rp) function s.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return re and re:IsActiveType(TYPE_MONSTER) and c:IsSummonType(SUMMON_TYPE_FUSION) return re and re:IsActiveType(TYPE_MONSTER) and c:IsSummonType(SUMMON_TYPE_FUSION)
end end
function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0)
end end
function s.damop(e,tp,eg,ep,ev,re,r,rp) function s.damop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local d=Duel.TossDice(tp,1)*350 local d=Duel.TossDice(tp,1)*350
Duel.Damage(tp,d,REASON_EFFECT) Duel.Damage(1-tp,d,REASON_EFFECT)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetValue(d) e1:SetValue(d)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE) e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.bfgcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.bfgcost(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_FACEDOWN,REASON_COST) Duel.Remove(e:GetHandler(),POS_FACEDOWN,REASON_COST)
end end
function s.filter0(c) function s.filter0(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck() return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck()
end end
function s.filter1(c,e) function s.filter1(c,e)
return c:IsFaceupEx() and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck() and not c:IsImmuneToEffect(e) return c:IsFaceupEx() and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck() and not c:IsImmuneToEffect(e)
end end
function s.filter2(c,e,tp,m,f,chkf,check) function s.filter2(c,e,tp,m,f,chkf,check)
return c:IsType(TYPE_FUSION) and (check or c:IsAttack(35)) and (not f or f(c)) return c:IsType(TYPE_FUSION) and (check or c:GetBaseAttack(35)) 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) and c:CheckFusionMaterial(m,nil,chkf)
end end
function s.checkfilter(c) function s.checkfilter(c)
return c:IsAttack(35) and c:IsFaceup() return c:GetBaseAttack(35) and c:IsFaceup()
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then if chk==0 then
local chkf=tp if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end
local check=Duel.IsExistingMatchingCard(s.checkfilter,tp,LOCATION_MZONE,0,1,nil) local chkf=tp
local mg=Duel.GetMatchingGroup(s.filter0,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,c) local check=Duel.IsExistingMatchingCard(s.checkfilter,tp,LOCATION_MZONE,0,1,nil)
local res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg,nil,chkf,check) local mg=Duel.GetMatchingGroup(s.filter0,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,c)
if not res then local res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg,nil,chkf,check)
local ce=Duel.GetChainMaterial(tp) if not res then
if ce~=nil then local ce=Duel.GetChainMaterial(tp)
local fgroup=ce:GetTarget() if ce~=nil then
local mg3=fgroup(ce,e,tp) local fgroup=ce:GetTarget()
local mf=ce:GetValue() local mg3=fgroup(ce,e,tp)
res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf,check) local mf=ce:GetValue()
end res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf,check)
end end
return res end
end return res
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) end
end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
function s.operation(e,tp,eg,ep,ev,re,r,rp) end
local c=e:GetHandler() function s.operation(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp local c=e:GetHandler()
local check=Duel.IsExistingMatchingCard(s.checkfilter,tp,LOCATION_MZONE,0,1,nil) local chkf=tp
local mg=Duel.GetMatchingGroup(s.filter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,c,e) local check=Duel.IsExistingMatchingCard(s.checkfilter,tp,LOCATION_MZONE,0,1,nil)
local sg1=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg,nil,chkf,check) local mg=Duel.GetMatchingGroup(s.filter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,c,e)
local mg3=nil local sg1=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg,nil,chkf,check)
local sg2=nil local mg3=nil
local ce=Duel.GetChainMaterial(tp) local sg2=nil
if ce~=nil then local ce=Duel.GetChainMaterial(tp)
local fgroup=ce:GetTarget() if ce~=nil then
mg3=fgroup(ce,e,tp) local fgroup=ce:GetTarget()
local mf=ce:GetValue() mg3=fgroup(ce,e,tp)
sg2=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf,check) local mf=ce:GetValue()
end sg2=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf,check)
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then end
local sg=sg1:Clone() if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
if sg2 then sg:Merge(sg2) end local sg=sg1:Clone()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) if sg2 then sg:Merge(sg2) end
local tg=sg:Select(tp,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=tg:GetFirst() local tg=sg:Select(tp,1,1,nil)
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then local tc=tg:GetFirst()
local mat=Duel.SelectFusionMaterial(tp,tc,mg,nil,chkf) if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
tc:SetMaterial(mat) local mat=Duel.SelectFusionMaterial(tp,tc,mg,nil,chkf)
Duel.SendtoDeck(mat,nil,SEQ_DECKSHUFFLE,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) tc:SetMaterial(mat)
Duel.BreakEffect() Duel.SendtoDeck(mat,nil,SEQ_DECKSHUFFLE,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) Duel.BreakEffect()
else Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf) else
local fop=ce:GetOperation() local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
fop(ce,e,tp,tc,mat2) local fop=ce:GetOperation()
end fop(ce,e,tp,tc,mat2)
tc:CompleteProcedure() end
end tc:CompleteProcedure()
end end
end
--Miko的残机-1 --Miko的残机-1
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE) e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(s.target) e1:SetTarget(s.target)
e1:SetOperation(s.activate) e1:SetOperation(s.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--lock zones --lock zones
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_REMOVE) e2:SetCode(EVENT_REMOVE)
e2:SetCountLimit(1,id) e2:SetCountLimit(1,id)
e2:SetCondition(s.lzcon) e2:SetCondition(s.lzcon)
e2:SetTarget(s.lztg) e2:SetTarget(s.lztg)
e2:SetOperation(s.lzop) e2:SetOperation(s.lzop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.tgfilter(c) function s.egfilter(c)
return c:IsAbleToGrave() and c:IsAttack(35) and c:IsType(TYPE_FUSION) return c:IsAbleToGrave() and c:IsAttack(35) and c:IsType(TYPE_FUSION)
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_EXTRA,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.egfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_EXTRA)
end end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_EXTRA,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,s.egfilter,tp,LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_EFFECT)
end end
end end
function s.cfilter(c,tp) function s.cfilter(c,tp)
return c:IsFacedown() return c:IsFacedown()
end end
function s.lzcon(e,tp,eg,ep,ev,re,r,rp) function s.lzcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil,tp) return eg:IsExists(s.cfilter,1,nil,tp)
end end
function s.tgfilter(c) function s.tgfilter(c)
return c:IsFacedown() and c:IsAbleToGrave() return c:IsFacedown() and c:IsAbleToGrave()
end end
function s.lztg(e,tp,eg,ep,ev,re,r,rp,chk) function s.lztg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local b1=c:IsAbleToDeck() and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_REMOVED,0,1,nil) local b1=c:IsAbleToDeck() and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_REMOVED,0,1,nil)
local b2=c:IsAbleToHand() local b2=c:IsAbleToHand()
if chk==0 then return b1 or b2 end if chk==0 then return b1 or b2 end
end end
function s.lzop(e,tp,eg,ep,ev,re,r,rp) function s.lzop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_REMOVED,0,nil) local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_REMOVED,0,nil)
local b1=c:IsAbleToDeck() and #g>0 local b1=c:IsAbleToDeck() and #g>0
local b2=c:IsAbleToHand() local b2=c:IsAbleToHand()
local off=1 local off=1
local ops={} local ops={}
local opval={} local opval={}
if b1 then if b1 then
ops[off]=1105 ops[off]=1105
opval[off-1]=1 opval[off-1]=1
off=off+1 off=off+1
end end
if b2 then if b2 then
ops[off]=1190 ops[off]=1190
opval[off-1]=2 opval[off-1]=2
off=off+1 off=off+1
end end
local op=Duel.SelectOption(tp,table.unpack(ops)) local op=Duel.SelectOption(tp,table.unpack(ops))
local sel=opval[op] local sel=opval[op]
if sel==1 then if sel==1 then
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
local sg=g:RandomSelect(tp,1) local sg=g:RandomSelect(tp,1)
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_RETURN) Duel.SendtoGrave(sg,REASON_EFFECT+REASON_RETURN)
else else
Duel.SendtoHand(c,nil,REASON_EFFECT) Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
--PON的一手 --PON的一手
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(s.target) e1:SetTarget(s.target)
e1:SetOperation(s.activate) e1:SetOperation(s.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--lock zones --lock zones
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_REMOVE) e2:SetCode(EVENT_REMOVE)
e2:SetCountLimit(1,id) e2:SetCountLimit(1,id)
e2:SetCondition(s.lzcon) e2:SetCondition(s.lzcon)
e2:SetTarget(s.lztg) e2:SetTarget(s.lztg)
e2:SetOperation(s.lzop) e2:SetOperation(s.lzop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.spfilter(c,e,tp) function s.spfilter(c,e,tp)
return c:IsAttack(35) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) return c:IsAttack(35) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) 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 s.adfilter(c) function s.adfilter(c)
return c:IsSummonable(true,nil,1) or c:IsMSetable(true,nil,1) return c:IsSummonable(true,nil,1) or c:IsMSetable(true,nil,1)
end end
function s.filter1(c,e) function s.filter1(c,e)
return not c:IsImmuneToEffect(e) return not c:IsImmuneToEffect(e)
end end
function s.filter2(c,e,tp,m,f,chkf) function s.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c)) return c:IsType(TYPE_FUSION) 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) and c:CheckFusionMaterial(m,nil,chkf)
end end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local chkf=tp local chkf=tp
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
if Duel.GetLocationCount(1-tp,LOCATION_MZONE)>1 and Duel.IsPlayerCanSpecialSummonMonster(1-tp,31300032,0,TYPES_TOKEN_MONSTER,35,35,3,RACE_CYBERSE,ATTRIBUTE_FIRE,POS_FACEUP) and Duel.SelectYesNo(1-tp,2) then if Duel.GetLocationCount(1-tp,LOCATION_MZONE)>1 and Duel.IsPlayerCanSpecialSummonMonster(1-tp,31300032,0,TYPES_TOKEN_MONSTER,35,35,3,RACE_CYBERSE,ATTRIBUTE_FIRE,POS_FACEUP) and Duel.SelectYesNo(1-tp,2) then
local token=Duel.CreateToken(tp,31300032) local token=Duel.CreateToken(tp,31300032)
if Duel.SpecialSummon(token,0,1-tp,1-tp,false,false,POS_FACEUP)~=0 then if Duel.SpecialSummon(token,0,1-tp,1-tp,false,false,POS_FACEUP)~=0 then
s.gb(e,tp,eg,ep,ev,re,r,rp) s.gb(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
end end
function s.xyzfilter(c) function s.xyzfilter(c)
return c:IsXyzSummonable(nil) return c:IsXyzSummonable(nil)
end end
function s.linkfilter(c) function s.linkfilter(c)
return c:IsLinkSummonable(nil) return c:IsLinkSummonable(nil)
end end
function s.gb(e,tp,eg,ep,ev,re,r,rp) function s.gb(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local chkf=tp local chkf=tp
local b1=Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,1-tp,LOCATION_EXTRA,0,1,nil,nil) local b1=Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,1-tp,LOCATION_EXTRA,0,1,nil,nil)
local b2=Duel.IsExistingMatchingCard(s.xyzfilter,tp,LOCATION_EXTRA,0,1,nil) local b2=Duel.IsExistingMatchingCard(s.xyzfilter,1-tp,LOCATION_EXTRA,0,1,nil)
local b3=Duel.IsExistingMatchingCard(s.linkfilter,tp,LOCATION_EXTRA,0,1,nil) local b3=Duel.IsExistingMatchingCard(s.linkfilter,1-tp,LOCATION_EXTRA,0,1,nil)
local b4=Duel.IsExistingMatchingCard(s.adfilter,1-tp,LOCATION_HAND,0,1,nil) local b4=Duel.IsExistingMatchingCard(s.adfilter,1-tp,LOCATION_HAND,0,1,nil)
local emg1=Duel.GetFusionMaterial(1-tp) local emg1=Duel.GetFusionMaterial(1-tp)
local b5=Duel.IsExistingMatchingCard(s.filter2,1-tp,LOCATION_EXTRA,0,1,nil,e,1-tp,emg1,nil,chkf) local b5=Duel.IsExistingMatchingCard(s.filter2,1-tp,LOCATION_EXTRA,0,1,nil,e,1-tp,emg1,nil,chkf)
if not b5 then if not b5 then
local ce=Duel.GetChainMaterial(1-tp) local ce=Duel.GetChainMaterial(1-tp)
if ce~=nil then if ce~=nil then
local fgroup=ce:GetTarget() local fgroup=ce:GetTarget()
local emg2=fgroup(ce,e,1-tp) local emg2=fgroup(ce,e,1-tp)
local mf=ce:GetValue() local mf=ce:GetValue()
b5=Duel.IsExistingMatchingCard(s.filter2,1-tp,LOCATION_EXTRA,0,1,nil,e,1-tp,emg2,mf,chkf) b5=Duel.IsExistingMatchingCard(s.filter2,1-tp,LOCATION_EXTRA,0,1,nil,e,1-tp,emg2,mf,chkf)
end end
end end
if not (b1 or b2 or b3 or b4 or b5) then return end if not (b1 or b2 or b3 or b4 or b5) then return end
local off=1 local off=1
local ops={} local ops={}
local opval={} local opval={}
if b1 then if b1 then
ops[off]=1164 ops[off]=1164
opval[off-1]=1 opval[off-1]=1
off=off+1 off=off+1
end end
if b2 then if b2 then
ops[off]=1165 ops[off]=1165
opval[off-1]=2 opval[off-1]=2
off=off+1 off=off+1
end end
if b3 then if b3 then
ops[off]=1166 ops[off]=1166
opval[off-1]=3 opval[off-1]=3
off=off+1 off=off+1
end end
if b4 then if b4 then
ops[off]=1167 ops[off]=1167
opval[off-1]=4 opval[off-1]=4
off=off+1 off=off+1
end end
if b5 then if b5 then
ops[off]=1169 ops[off]=1169
opval[off-1]=5 opval[off-1]=5
off=off+1 off=off+1
end end
local op=Duel.SelectOption(1-tp,table.unpack(ops)) local op=Duel.SelectOption(1-tp,table.unpack(ops))
local sel=opval[op] local sel=opval[op]
if sel==1 then if sel==1 then
local syg=Duel.GetMatchingGroup(Card.IsSynchroSummonable,1-tp,LOCATION_EXTRA,0,nil,nil) local syg=Duel.GetMatchingGroup(Card.IsSynchroSummonable,1-tp,LOCATION_EXTRA,0,nil,nil)
if syg:GetCount()>0 then if syg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON)
local sg=syg:Select(1-tp,1,1,nil) local sg=syg:Select(1-tp,1,1,nil)
Duel.SynchroSummon(1-tp,sg:GetFirst(),nil) Duel.SynchroSummon(1-tp,sg:GetFirst(),nil)
end end
elseif sel==2 then elseif sel==2 then
local xyzg=Duel.GetMatchingGroup(Card.IsXyzSummonable,1-tp,LOCATION_EXTRA,0,nil) local xyzg=Duel.GetMatchingGroup(Card.IsXyzSummonable,1-tp,LOCATION_EXTRA,0,nil)
if xyzg:GetCount()>0 then if xyzg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON)
local tg=xyzg:Select(1-tp,1,1,nil) local tg=xyzg:Select(1-tp,1,1,nil)
Duel.XyzSummon(1-tp,tg:GetFirst(),nil) Duel.XyzSummon(1-tp,tg:GetFirst(),nil)
end end
elseif sel==3 then elseif sel==3 then
local lkg=Duel.GetMatchingGroup(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,nil,nil) local lkg=Duel.GetMatchingGroup(Card.IsLinkSummonable,1-tp,LOCATION_EXTRA,0,nil,nil)
if lkg:GetCount()>0 then if lkg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON)
local sg=lkg:Select(1-tp,1,1,nil) local sg=lkg:Select(1-tp,1,1,nil)
Duel.LinkSummon(1-tp,sg:GetFirst(),nil) Duel.LinkSummon(1-tp,sg:GetFirst(),nil)
end end
elseif sel==4 then elseif sel==4 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(1-tp,s.adfilter,1-tp,LOCATION_HAND,0,1,1,nil) local g=Duel.SelectMatchingCard(1-tp,s.adfilter,1-tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
local s1=tc:IsSummonable(true,nil,1) local s1=tc:IsSummonable(true,nil,1)
local s2=tc:IsMSetable(true,nil,1) local s2=tc:IsMSetable(true,nil,1)
if (s1 and s2 and Duel.SelectPosition(1-tp,tc,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)==POS_FACEUP_ATTACK) or not s2 then if (s1 and s2 and Duel.SelectPosition(1-tp,tc,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)==POS_FACEUP_ATTACK) or not s2 then
Duel.Summon(1-tp,tc,true,nil,1) Duel.Summon(1-tp,tc,true,nil,1)
else else
Duel.MSet(1-tp,tc,true,nil,1) Duel.MSet(1-tp,tc,true,nil,1)
end end
end end
elseif sel==5 then elseif sel==5 then
local emg1=Duel.GetFusionMaterial(1-tp):Filter(s.filter1,nil,e) local emg1=Duel.GetFusionMaterial(1-tp):Filter(s.filter1,nil,e)
local esg1=Duel.GetMatchingGroup(s.filter2,1-tp,LOCATION_EXTRA,0,nil,e,1-tp,emg1,nil,chkf) local esg1=Duel.GetMatchingGroup(s.filter2,1-tp,LOCATION_EXTRA,0,nil,e,1-tp,emg1,nil,chkf)
local emg2=nil local emg2=nil
local esg2=nil local esg2=nil
local ce=Duel.GetChainMaterial(1-tp) local ce=Duel.GetChainMaterial(1-tp)
if ce~=nil then if ce~=nil then
local fgroup=ce:GetTarget() local fgroup=ce:GetTarget()
emg2=fgroup(ce,e,1-tp) emg2=fgroup(ce,e,1-tp)
local mf=ce:GetValue() local mf=ce:GetValue()
esg2=Duel.GetMatchingGroup(s.filter2,1-tp,LOCATION_EXTRA,0,nil,e,1-tp,emg2,mf,chkf) esg2=Duel.GetMatchingGroup(s.filter2,1-tp,LOCATION_EXTRA,0,nil,e,1-tp,emg2,mf,chkf)
end end
if esg1:GetCount()>0 or (esg2~=nil and esg2:GetCount()>0) then if esg1:GetCount()>0 or (esg2~=nil and esg2:GetCount()>0) then
local esg=esg1:Clone() local esg=esg1:Clone()
if esg2 then esg:Merge(esg2) end if esg2 then esg:Merge(esg2) end
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON)
local tg=esg:Select(1-tp,1,1,nil) local tg=esg:Select(1-tp,1,1,nil)
local tc=tg:GetFirst() local tc=tg:GetFirst()
if esg1:IsContains(tc) and (esg2==nil or not esg2:IsContains(tc) or not Duel.SelectYesNo(1-tp,ce:GetDescription())) then if esg1:IsContains(tc) and (esg2==nil or not esg2:IsContains(tc) or not Duel.SelectYesNo(1-tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(1-tp,tc,emg1,nil,chkf) local mat1=Duel.SelectFusionMaterial(1-tp,tc,emg1,nil,chkf)
tc:SetMaterial(mat1) tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect() Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,1-tp,1-tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,1-tp,1-tp,false,false,POS_FACEUP)
else else
local mat2=Duel.SelectFusionMaterial(1-tp,tc,emg2,nil,chkf) local mat2=Duel.SelectFusionMaterial(1-tp,tc,emg2,nil,chkf)
local fop=ce:GetOperation() local fop=ce:GetOperation()
fop(ce,e,1-tp,tc,mat2) fop(ce,e,1-tp,tc,mat2)
end end
tc:CompleteProcedure() tc:CompleteProcedure()
end end
end end
end end
function s.cfilter(c,tp) function s.cfilter(c,tp)
return c:IsFacedown() return c:IsFacedown()
end end
function s.lzcon(e,tp,eg,ep,ev,re,r,rp) function s.lzcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil,tp) return eg:IsExists(s.cfilter,1,nil,tp)
end end
function s.tgfilter(c) function s.tgfilter(c)
return c:IsFacedown() and c:IsAbleToGrave() return c:IsFacedown() and c:IsAbleToGrave()
end end
function s.lztg(e,tp,eg,ep,ev,re,r,rp,chk) function s.lztg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local b1=c:IsAbleToDeck() and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_REMOVED,0,1,nil) local b1=c:IsAbleToDeck() and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_REMOVED,0,1,nil)
local b2=c:IsAbleToHand() local b2=c:IsAbleToHand()
if chk==0 then return b1 or b2 end if chk==0 then return b1 or b2 end
end end
function s.lzop(e,tp,eg,ep,ev,re,r,rp) function s.lzop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_REMOVED,0,nil) local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_REMOVED,0,nil)
local b1=c:IsAbleToDeck() and #g>0 local b1=c:IsAbleToDeck() and #g>0
local b2=c:IsAbleToHand() local b2=c:IsAbleToHand()
local off=1 local off=1
local ops={} local ops={}
local opval={} local opval={}
if b1 then if b1 then
ops[off]=1105 ops[off]=1105
opval[off-1]=1 opval[off-1]=1
off=off+1 off=off+1
end end
if b2 then if b2 then
ops[off]=1190 ops[off]=1190
opval[off-1]=2 opval[off-1]=2
off=off+1 off=off+1
end end
local op=Duel.SelectOption(tp,table.unpack(ops)) local op=Duel.SelectOption(tp,table.unpack(ops))
local sel=opval[op] local sel=opval[op]
if sel==1 then if sel==1 then
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
local sg=g:RandomSelect(tp,1) local sg=g:RandomSelect(tp,1)
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_RETURN) Duel.SendtoGrave(sg,REASON_EFFECT+REASON_RETURN)
else else
Duel.SendtoHand(c,nil,REASON_EFFECT) Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
--Miko的岩浆桶 --Miko的岩浆桶
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DAMAGE) e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id) e1:SetTarget(s.target)
e1:SetTarget(s.target) e1:SetOperation(s.activate)
e1:SetOperation(s.activate) c:RegisterEffect(e1)
c:RegisterEffect(e1) --lock zones
--lock zones local e2=Effect.CreateEffect(c)
local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetRange(LOCATION_GRAVE)
e2:SetRange(LOCATION_GRAVE) e2:SetCode(EVENT_REMOVE)
e2:SetCode(EVENT_REMOVE) e2:SetCountLimit(1,id)
e2:SetCountLimit(1,id+1) e2:SetCondition(s.lzcon)
e2:SetCondition(s.lzcon) e2:SetTarget(s.lztg)
e2:SetTarget(s.lztg) e2:SetOperation(s.lzop)
e2:SetOperation(s.lzop) c:RegisterEffect(e2)
c:RegisterEffect(e2) end
end function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end
if chk==0 then return true end end
end function s.activate(e,tp,eg,ep,ev,re,r,rp)
function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=Duel.TossCoin(tp,1)
local c=Duel.TossCoin(tp,1) local p=tp
local p=tp if c>0 then p=1-tp end
if c>0 then p=1-tp end local d=Duel.TossDice(tp,1)
local d=Duel.TossDice(tp,1) for i=1,d do
for i=1,d do Duel.Damage(p,350,REASON_EFFECT)
Duel.Damage(p,350,REASON_EFFECT) end
end end
end function s.cfilter(c,tp)
function s.cfilter(c,tp) return c:IsFacedown()
return c:IsFacedown() end
end function s.lzcon(e,tp,eg,ep,ev,re,r,rp)
function s.lzcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp)
return eg:IsExists(s.cfilter,1,nil,tp) end
end function s.tgfilter(c)
function s.tgfilter(c) return c:IsFacedown() and c:IsAbleToGrave()
return c:IsFacedown() and c:IsAbleToGrave() end
end function s.lztg(e,tp,eg,ep,ev,re,r,rp,chk)
function s.lztg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler()
local c=e:GetHandler() local b1=c:IsAbleToDeck() and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_REMOVED,0,1,nil)
local b1=c:IsAbleToDeck() and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_REMOVED,0,1,nil) local b2=c:IsAbleToHand()
local b2=c:IsAbleToHand() if chk==0 then return b1 or b2 end
if chk==0 then return b1 or b2 end end
end function s.lzop(e,tp,eg,ep,ev,re,r,rp)
function s.lzop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler()
local c=e:GetHandler() local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_REMOVED,0,nil)
local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_REMOVED,0,nil) local b1=c:IsAbleToDeck() and #g>0
local b1=c:IsAbleToDeck() and #g>0 local b2=c:IsAbleToHand()
local b2=c:IsAbleToHand() local off=1
local off=1 local ops={}
local ops={} local opval={}
local opval={} if b1 then
if b1 then ops[off]=1105
ops[off]=1105 opval[off-1]=1
opval[off-1]=1 off=off+1
off=off+1 end
end if b2 then
if b2 then ops[off]=1190
ops[off]=1190 opval[off-1]=2
opval[off-1]=2 off=off+1
off=off+1 end
end local op=Duel.SelectOption(tp,table.unpack(ops))
local op=Duel.SelectOption(tp,table.unpack(ops)) local sel=opval[op]
local sel=opval[op] if sel==1 then
if sel==1 then Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) local sg=g:RandomSelect(tp,1)
local sg=g:RandomSelect(tp,1) Duel.SendtoGrave(sg,REASON_EFFECT+REASON_RETURN)
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_RETURN) else
else Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.SendtoHand(c,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g)
Duel.ConfirmCards(1-tp,g) end
end end
end
--Miko的呆火鳄 --Miko的呆火鳄
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--splimit --splimit
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION) e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(s.splimit) e1:SetValue(s.splimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--special summon --special summon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(14509651,0)) e2:SetDescription(aux.Stringid(14509651,0))
e2:SetCategory(CATEGORY_REMOVE+CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_REMOVE+CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND) e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,id) e2:SetCountLimit(1,id)
e2:SetTarget(s.rmtg) e2:SetCost(s.rmcost)
e2:SetOperation(s.rmop) e2:SetTarget(s.rmtg)
c:RegisterEffect(e2) e2:SetOperation(s.rmop)
end c:RegisterEffect(e2)
function s.splimit(e,se,sp,st) end
return se:IsHasType(EFFECT_TYPE_ACTIONS) function s.splimit(e,se,sp,st)
end return se:IsHasType(EFFECT_TYPE_ACTIONS)
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) end
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_EXTRA,0,1,nil) end function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_EXTRA,0,nil) local c=e:GetHandler()
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) if chk==0 then return c:IsDiscardable() end
end Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
function s.filter(c,e,tp) end
return c:IsType(TYPE_FUSION) and c:IsAttack(35) and c:CheckFusionMaterial() function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_EXTRA,0,1,nil) end
end local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_EXTRA,0,nil)
function s.rmop(e,tp,eg,ep,ev,re,r,rp) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_EXTRA,0,nil) function s.filter(c,e,tp)
if g:GetCount()>0 then return c:IsType(TYPE_FUSION) and c:IsAttack(35) and c:CheckFusionMaterial()
local sg=g:RandomSelect(tp,1) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
Duel.Remove(sg,POS_FACEDOWN,REASON_EFFECT) end
local sel=0 function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local exg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_EXTRA,0,nil,e,tp) local sel=0
for i=0,5 do for i=0,5 do
if sel==5 then return end if sel==5 then return end
local dg=Duel.GetDecktopGroup(tp,1) local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_EXTRA,0,nil)
Duel.ConfirmDecktop(tp,1) if g:GetCount()>0 then
Duel.DisableShuffleCheck() local sg=g:RandomSelect(tp,1)
local tc=dg:GetFirst() if Duel.Remove(sg,POS_FACEDOWN,REASON_EFFECT)~=0 then
if tc:IsCode(id) and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) and #exg>0 then local dg=Duel.GetDecktopGroup(tp,1)
sel=5 Duel.ConfirmDecktop(tp,1)
local ec=exg:Select(tp,1,1,nil) Duel.DisableShuffleCheck()
if Duel.SpecialSummon(ec,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)~=0 then local tc=dg:GetFirst()
Duel.BreakEffect() local exg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_EXTRA,0,nil,e,tp)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) if tc:IsCode(id) and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) and #exg>0 then
end sel=5
else local ec=exg:Select(tp,1,1,nil)
Duel.SendtoGrave(tc,REASON_EFFECT+REASON_REVEAL) if Duel.SpecialSummon(ec,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)~=0 then
sel=sel+1 Duel.BreakEffect()
end Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end end
end else
Duel.SendtoGrave(tc,REASON_EFFECT+REASON_REVEAL)
sel=sel+1
end
end
end
end
end end
\ No newline at end of file
...@@ -8,8 +8,9 @@ function s.initial_effect(c) ...@@ -8,8 +8,9 @@ function s.initial_effect(c)
--counter --counter
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVED) e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCondition(s.cocon) e1:SetCondition(s.cocon)
e1:SetOperation(s.counter) e1:SetOperation(s.counter)
c:RegisterEffect(e1) c:RegisterEffect(e1)
......
--妖精乡的创成 --妖精乡的创成
local s,id=GetID() local s,id=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--activate --activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetCost(s.cost) e1:SetCost(s.cost)
e1:SetTarget(s.target) e1:SetTarget(s.target)
e1:SetOperation(s.activate) e1:SetOperation(s.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter)
end end
function s.counterfilter(c) function s.counterfilter(c)
return not (c:IsSummonLocation(LOCATION_HAND) or c:IsSummonLocation(LOCATION_GRAVE)) or (c:IsSetCard(0x43e) or c:IsSetCard(0x43f)) return not (c:IsSummonLocation(LOCATION_HAND) or c:IsSummonLocation(LOCATION_GRAVE)) or (c:IsSetCard(0x43e) or c:IsSetCard(0x43f))
end end
function s.cfilter(c,tp) function s.cfilter(c,tp)
return c:IsAbleToGraveAsCost() and c:IsLevel(9,10) and c:IsType(TYPE_SYNCHRO) return c:IsAbleToGraveAsCost() and c:IsLevel(9,10) and c:IsType(TYPE_SYNCHRO)
end end
function s.plfilter(c) function s.plfilter(c)
return c:IsCode(47344564) return c:IsCode(47344564)
end end
function s.splimitoath(e,c) function s.splimitoath(e,c)
return c:IsLocation(LOCATION_GRAVE+LOCATION_HAND) and not (c:IsSetCard(0x43e) or c:IsSetCard(0x43f)) return c:IsLocation(LOCATION_GRAVE+LOCATION_HAND) and not (c:IsSetCard(0x43e) or c:IsSetCard(0x43f))
end end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0
and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_EXTRA,0,1,nil,tp) and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_EXTRA,0,1,nil,tp)
and Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,tp) end and Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,tp) end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetTarget(s.splimitoath) e1:SetTarget(s.splimitoath)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_EXTRA,0,1,1,nil,tp) local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_EXTRA,0,1,1,nil,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
Duel.SendtoGrave(tc,REASON_COST) Duel.SendtoGrave(tc,REASON_COST)
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,tp) end if chk==0 then return Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN+CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN+CATEGORY_SPECIAL_SUMMON,nil,1,tp,0)
end end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,s.plfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil):GetFirst() local tc=Duel.SelectMatchingCard(tp,s.plfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil):GetFirst()
if tc then if tc then
Duel.SSet(tp,tc) Duel.SSet(tp,tc)
end end
Duel.BreakEffect() Duel.BreakEffect()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,47344599,0x43e,TYPES_TOKEN_MONSTER,0,0,5,RACE_FAIRY,ATTRIBUTE_LIGHT) then and Duel.IsPlayerCanSpecialSummonMonster(tp,47344599,0x43e,TYPES_TOKEN_MONSTER,0,0,5,RACE_FAIRY,ATTRIBUTE_LIGHT) then
local token=Duel.CreateToken(tp,47344599) local token=Duel.CreateToken(tp,47344599)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetAbsoluteRange(tp,1,0) e1:SetAbsoluteRange(tp,1,0)
e1:SetTarget(s.splimit) e1:SetTarget(s.splimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e1,true) token:RegisterEffect(e1,true)
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
end end
end end
function s.splimit(e,c) function s.splimit(e,c)
return not c:IsType(TYPE_SYNCHRO+TYPE_XYZ) and c:IsLocation(LOCATION_EXTRA) return not c:IsType(TYPE_SYNCHRO+TYPE_XYZ) and c:IsLocation(LOCATION_EXTRA)
end end
\ No newline at end of file
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