Commit 858d5a5c authored by Nemo Ma's avatar Nemo Ma

fix + minus

parent 4e580fbd
...@@ -186,6 +186,21 @@ ...@@ -186,6 +186,21 @@
90700007 0 90700007 0
90700008 0 90700008 0
90700009 0 90700009 0
#210411
11113127 1
11113131 1
14010079 0
14010153 0
34512010 0
46260002 0
79029120 0
79029293 0
79034052 0
14010062 1
22020490 1
25000127 1
33330080 1
79029233 1
#210404 #210404
14010199 0 14010199 0
22020630 0 22020630 0
...@@ -262,7 +277,6 @@ ...@@ -262,7 +277,6 @@
9910199 1 9910199 1
10170006 1 10170006 1
22020130 1 22020130 1
46260002 1
65010020 1 65010020 1
65010579 1 65010579 1
#65010583 1 #65010583 1
...@@ -293,7 +307,6 @@ ...@@ -293,7 +307,6 @@
79029329 0 79029329 0
79029368 0 79029368 0
79029120 1 79029120 1
79029293 1
33711008 1 33711008 1
#210113 #210113
98704001 0 98704001 0
...@@ -1664,7 +1677,6 @@ ...@@ -1664,7 +1677,6 @@
40008590 1 40008590 1
40008610 1 40008610 1
40008420 1 40008420 1
#46260002 1
60150803 1 60150803 1
60150806 1 60150806 1
65010087 1 65010087 1
...@@ -1795,7 +1807,7 @@ ...@@ -1795,7 +1807,7 @@
117960683 0 117960683 0
9950742 2 9950742 2
65010552 2 65010552 2
#46260002 2
#FORBIDDEN TCG ===Forbidden=== #FORBIDDEN TCG ===Forbidden===
76794549 0 --Astrograph Sorcerer 76794549 0 --Astrograph Sorcerer
......
No preview for this file type
...@@ -92,7 +92,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -92,7 +92,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoDeck(g,nil,1,REASON_EFFECT) Duel.SendtoDeck(g,nil,1,REASON_EFFECT)
Duel.ShuffleDeck(tp) Duel.ShuffleDeck(tp)
end end
if ct~=3 and c:IsAbleToHand() then if ct~=3 and c:IsRelateToEffect(e) and c:IsAbleToHand() then
Duel.BreakEffect() Duel.BreakEffect()
Duel.SendtoHand(c,nil,REASON_EFFECT) Duel.SendtoHand(c,nil,REASON_EFFECT)
end end
......
...@@ -18,6 +18,7 @@ function cm.initial_effect(c) ...@@ -18,6 +18,7 @@ function cm.initial_effect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,15000749) e2:SetCountLimit(1,15000749)
e2:SetCondition(aux.exccon) e2:SetCondition(aux.exccon)
...@@ -59,16 +60,15 @@ end ...@@ -59,16 +60,15 @@ end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_EXTRA) and cm.spfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_EXTRA) and cm.spfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(cm.spfilter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil,e,tp) and c:IsAbleToDeck() end if chk==0 then return Duel.IsExistingTarget(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil,e,tp) and c:IsAbleToDeck() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.spfilter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,0,0)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT)~=0 and tc:IsRelateToEffect(e) and cm.spfilter(tc,e,tp) then if Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT)~=0 and tc:IsRelateToEffect(e) and cm.spfilter(tc,e,tp) then
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_PENDULUM,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,SUMMON_TYPE_PENDULUM,tp,tp,false,false,POS_FACEUP)
end end
end end
\ No newline at end of file
--夕·虚实之笔 ---夕·虚实之笔
function c29065599.initial_effect(c) function c29065599.initial_effect(c)
c:SetUniqueOnField(1,0,29065599) c:SetUniqueOnField(1,0,29065599)
c:EnableCounterPermit(0x11ae) c:EnableCounterPermit(0x11ae)
...@@ -93,7 +93,7 @@ function c29065599.efilter(e,te,c) ...@@ -93,7 +93,7 @@ function c29065599.efilter(e,te,c)
end end
function c29065599.lrop(e,tp,eg,ep,ev,re,r,rp) function c29065599.lrop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) then return false end if not e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) then return false end
Debug.Message("藏点雪星,月隐晦明,拙山枯水大江行!") Debug.Message("星藏点雪,月隐晦明,拙山枯水大江行!")
Debug.Message("XYZ召唤!RANK12!夕•虚实之笔!") Debug.Message("XYZ召唤!RANK12!夕•虚实之笔!")
end end
......
...@@ -33,10 +33,15 @@ function cm.initial_effect(c) ...@@ -33,10 +33,15 @@ function cm.initial_effect(c)
e4:SetType(EFFECT_TYPE_IGNITION) e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1) e4:SetCountLimit(1)
e4:SetCondition(cm.immcon1)
e4:SetCost(cm.spwcost) e4:SetCost(cm.spwcost)
e4:SetTarget(cm.spwtg) e4:SetTarget(cm.spwtg)
e4:SetOperation(cm.spwop) e4:SetOperation(cm.spwop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
local e6=e4:Clone()
e6:SetProperty(EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e6:SetCondition(cm.immcon2)
c:RegisterEffect(e6)
--th --th
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
...@@ -101,53 +106,39 @@ function cm.rmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -101,53 +106,39 @@ function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(sg,POS_FACEUP,REASON_RULE) Duel.Remove(sg,POS_FACEUP,REASON_RULE)
end end
end end
function cm.immcon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_GRAVE,0,1,nil)
end
function cm.immcon2(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_GRAVE,0,1,nil)
end
function cm.spwcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.spwcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_HAND,0,3,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_HAND,0,3,nil) end
local costn=3
if Duel.GetMZoneCount(tp)<1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_HAND,0,3,3,nil) local tc=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_MZONE,0,1,1,nil):GetFirst()
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(tc,POS_FACEUP,REASON_COST)
--imm costn=costn-1
if not Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_GRAVE,0,1,nil) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_INACTIVATE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetValue(cm.effectfilter)
e1:SetLabel(3)
e1:SetReset(RESET_EVENT+RESET_CHAIN)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_DISEFFECT)
e2:SetLabel(4)
Duel.RegisterEffect(e2,tp)
e1:SetLabelObject(e2)
e2:SetLabelObject(e:GetHandler())
end
end
function cm.effectfilter(e,ct)
local te=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT)
local label=e:GetLabel()
local tc
if label==3 then
tc=e:GetLabelObject():GetLabelObject()
else
tc=e:GetLabelObject()
end end
return tc and tc==te:GetHandler() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_HAND,0,costn,costn,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
function cm.spwfilter(c,e,tp) function cm.spwfilter(c,e,tp)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) and (c:IsDefense(0) or c:IsRace(RACE_WYRM)) and c:IsCanBeSpecialSummoned(e,0,tp,true,false,POS_FACEUP) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) and (c:IsDefense(0) or c:IsRace(RACE_WYRM)) and c:IsCanBeSpecialSummoned(e,0,tp,true,false,POS_FACEUP)
end end
function cm.spwtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.spwtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.IsExistingMatchingCard(cm.spwfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(cm.spwfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_REMOVED) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_REMOVED)
end end
function cm.spwop(e,tp,eg,ep,ev,re,r,rp) function cm.spwop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local max=2 local max=2
if Duel.GetLocationCount(tp,LOCATION_MZONE)<max then max=Duel.GetLocationCount(tp,LOCATION_MZONE) end
if max==0 then return end
if e:GetHandler():IsHasEffect(59822133) then max=1 end if e:GetHandler():IsHasEffect(59822133) then max=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spwfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,max,nil,e,tp) local g=Duel.SelectMatchingCard(tp,cm.spwfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,max,nil,e,tp)
...@@ -156,11 +147,13 @@ function cm.spwop(e,tp,eg,ep,ev,re,r,rp) ...@@ -156,11 +147,13 @@ function cm.spwop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP) then if Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EFFECT_DISABLE) e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true) tc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2,true) tc:RegisterEffect(e2,true)
...@@ -199,7 +192,7 @@ end ...@@ -199,7 +192,7 @@ end
function cm.thop(e,tp,eg,ep,ev,re,r,rp) function cm.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,cm.thfilter1,tp,LOCATION_DECK+LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.thfilter1,tp,LOCATION_DECK+LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil)
if g:GetFirst() and Duel.SendtoHand(g,tp,REASON_EFFECT) and e:GetLabel()==1 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then if g:GetFirst() and Duel.SendtoHand(g,tp,REASON_EFFECT) and e:GetLabel()==1 and Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_DECK+LOCATION_REMOVED,LOCATION_REMOVED,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,cm.thfilter2,tp,LOCATION_DECK+LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil) local sg=Duel.SelectMatchingCard(tp,cm.thfilter2,tp,LOCATION_DECK+LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil)
Duel.SendtoHand(sg,tp,REASON_EFFECT) Duel.SendtoHand(sg,tp,REASON_EFFECT)
......
...@@ -34,7 +34,7 @@ function c30000480.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -34,7 +34,7 @@ function c30000480.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c30000480.spop(e,tp,eg,ep,ev,re,r,rp) function c30000480.spop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_DECK,0,e:GetLabel(),nil) if not Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_DECK,0,e:GetLabel(),nil) then return end
local g=Duel.GetDecktopGroup(tp,e:GetLabel()) local g=Duel.GetDecktopGroup(tp,e:GetLabel())
if Duel.SendtoGrave(g,REASON_EFFECT)~0 then if Duel.SendtoGrave(g,REASON_EFFECT)~0 then
local og=Duel.GetOperatedGroup() local og=Duel.GetOperatedGroup()
......
...@@ -137,7 +137,6 @@ function yume.AddYumeFieldGlobal(c,id,ft) ...@@ -137,7 +137,6 @@ function yume.AddYumeFieldGlobal(c,id,ft)
eac:SetType(EFFECT_TYPE_ACTIVATE) eac:SetType(EFFECT_TYPE_ACTIVATE)
eac:SetCode(EVENT_FREE_CHAIN) eac:SetCode(EVENT_FREE_CHAIN)
eac:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH) eac:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
--eac:SetCost(yume.FieldActCostForNow)
c:RegisterEffect(eac) c:RegisterEffect(eac)
--self limitation --self limitation
local esl=Effect.CreateEffect(c) local esl=Effect.CreateEffect(c)
...@@ -160,11 +159,6 @@ function yume.AddYumeFieldGlobal(c,id,ft) ...@@ -160,11 +159,6 @@ function yume.AddYumeFieldGlobal(c,id,ft)
efa:SetOperation(yume.FieldActivationOp) efa:SetOperation(yume.FieldActivationOp)
c:RegisterEffect(efa) c:RegisterEffect(efa)
end end
function yume.FieldActCostForNow(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local num=yume.temp_card_field[c].id
if chk==0 then return Duel.GetFlagEffect(tp,num)==0 end
end
--Against Yume --Against Yume
function yume.YumeFieldLimitCon(e,tp,eg,ep,ev,re,r,rp) function yume.YumeFieldLimitCon(e,tp,eg,ep,ev,re,r,rp)
local ec=re:GetHandler() local ec=re:GetHandler()
...@@ -230,19 +224,18 @@ function yume.FieldActivation(tp,num,ft,loc) ...@@ -230,19 +224,18 @@ function yume.FieldActivation(tp,num,ft,loc)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(71400001,3)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(71400001,3))
local tc=Duel.SelectMatchingCard(tp,yume.FieldActivationFilter,tp,loc,0,1,1,nil,tp,num,ft):GetFirst() local tc=Duel.SelectMatchingCard(tp,yume.FieldActivationFilter,tp,loc,0,1,1,nil,tp,num,ft):GetFirst()
if tc then if tc then
local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5) local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then if fc then
Duel.SendtoGrave(fc,REASON_RULE) Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect() Duel.BreakEffect()
end end
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
local te=tc:GetActivateEffect() local te=tc:GetActivateEffect()
te:UseCountLimit(tp,1,true) te:UseCountLimit(tp,1,true)
local tep=tc:GetControler() local tep=tc:GetControler()
local cost=te:GetCost() local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
local id=yume.temp_card_field[tc].id or 0 local id=yume.temp_card_field[tc].id or 0
--Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1)
Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain()) Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain())
return tc return tc
end end
......
...@@ -47,18 +47,16 @@ function c71400011.filter1(c) ...@@ -47,18 +47,16 @@ function c71400011.filter1(c)
return c:IsSetCard(0x714) return c:IsSetCard(0x714)
end end
function c71400011.xyzfilter(c,e,tp) function c71400011.xyzfilter(c,e,tp)
return c:IsSetCard(0x3715) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x3715) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c71400011.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c71400011.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCountFromEx(tp)>0 if chk==0 then return Duel.IsExistingTarget(c71400011.filter1,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(c71400011.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
and Duel.IsExistingTarget(c71400011.filter1,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(c71400011.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g1=Duel.SelectTarget(tp,c71400011.filter1,tp,LOCATION_GRAVE,0,1,2,nil) local g1=Duel.SelectTarget(tp,c71400011.filter1,tp,LOCATION_GRAVE,0,1,2,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g1,g1:GetCount(),tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g1,g1:GetCount(),tp,LOCATION_GRAVE)
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 c71400011.operation1(e,tp,eg,ep,ev,re,r,rp) function c71400011.operation1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<=0 then return end
local g=Duel.GetMatchingGroup(c71400011.xyzfilter,tp,LOCATION_EXTRA,0,nil,e,tp) local g=Duel.GetMatchingGroup(c71400011.xyzfilter,tp,LOCATION_EXTRA,0,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
......
...@@ -42,12 +42,12 @@ function c71400020.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,12 +42,12 @@ function c71400020.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(71400020,1)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(71400020,1))
local tc=Duel.SelectMatchingCard(tp,c71400020.filter2,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,tp):GetFirst() local tc=Duel.SelectMatchingCard(tp,c71400020.filter2,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,tp):GetFirst()
if tc then if tc then
local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5) local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then if fc then
Duel.SendtoGrave(fc,REASON_RULE) Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect() Duel.BreakEffect()
end end
local flag=Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) local flag=Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
local te=tc:GetActivateEffect() local te=tc:GetActivateEffect()
local tep=tc:GetControler() local tep=tc:GetControler()
local cost=te:GetCost() local cost=te:GetCost()
......
...@@ -39,17 +39,16 @@ function c71400027.filter1(c) ...@@ -39,17 +39,16 @@ function c71400027.filter1(c)
return c:IsPosition(POS_FACEUP_ATTACK) and not c:IsType(TYPE_TOKEN) and c:GetSummonLocation()==LOCATION_EXTRA and c:IsAbleToChangeControler() return c:IsPosition(POS_FACEUP_ATTACK) and not c:IsType(TYPE_TOKEN) and c:GetSummonLocation()==LOCATION_EXTRA and c:IsAbleToChangeControler()
end end
function c71400027.xyzfilter(c,e,tp) function c71400027.xyzfilter(c,e,tp)
return c:IsSetCard(0x3715) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) return c:IsSetCard(0x3715) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c71400027.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c71400027.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c71400027.filter1(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c71400027.filter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(c71400027.filter1,tp,0,LOCATION_MZONE,2,nil) and Duel.GetLocationCountFromEx(tp)>0 and Duel.IsExistingMatchingCard(c71400027.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingTarget(c71400027.filter1,tp,0,LOCATION_MZONE,2,nil) and Duel.IsExistingMatchingCard(c71400027.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c71400027.filter1,tp,0,LOCATION_MZONE,2,2,nil) Duel.SelectTarget(tp,c71400027.filter1,tp,0,LOCATION_MZONE,2,2,nil)
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 c71400027.op1(e,tp,eg,ep,ev,re,r,rp) function c71400027.op1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<1 then return end
local c=e:GetHandler() local c=e:GetHandler()
local xyzg=Duel.GetMatchingGroup(c71400027.xyzfilter,tp,LOCATION_EXTRA,0,nil,e,tp) local xyzg=Duel.GetMatchingGroup(c71400027.xyzfilter,tp,LOCATION_EXTRA,0,nil,e,tp)
local sg=xyzg:Select(tp,1,1,nil) local sg=xyzg:Select(tp,1,1,nil)
......
...@@ -64,14 +64,13 @@ function c71400028.con3(e,tp,eg,ep,ev,re,r,rp) ...@@ -64,14 +64,13 @@ function c71400028.con3(e,tp,eg,ep,ev,re,r,rp)
return r&REASON_EFFECT+REASON_BATTLE~=0 return r&REASON_EFFECT+REASON_BATTLE~=0
end end
function c71400028.filter3(c,e,tp) function c71400028.filter3(c,e,tp)
return c:IsCode(71400030) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(71400030) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c71400028.tg3(e,tp,eg,ep,ev,re,r,rp,chk) function c71400028.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp)>0 end if chk==0 then return Duel.GetLocationCountFromEx(tp)>0 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 c71400028.op3(e,tp,eg,ep,ev,re,r,rp) function c71400028.op3(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c71400028.filter3,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c71400028.filter3,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -78,7 +78,7 @@ function c71400042.filter3(c) ...@@ -78,7 +78,7 @@ function c71400042.filter3(c)
return flag and c:IsAbleToRemoveAsCost() return flag and c:IsAbleToRemoveAsCost()
end end
function c71400042.xyzfilter(c,e,tp) function c71400042.xyzfilter(c,e,tp)
return c:IsSetCard(0x3715) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x3715) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c71400042.cost3(e,tp,eg,ep,ev,re,r,rp,chk) function c71400042.cost3(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -89,11 +89,10 @@ function c71400042.cost3(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -89,11 +89,10 @@ function c71400042.cost3(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetTargetCard(g) e:SetTargetCard(g)
end end
function c71400042.tg3(e,tp,eg,ep,ev,re,r,rp,chk) function c71400042.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp)>0 and Duel.IsExistingMatchingCard(c71400042.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c71400042.xyzfilter,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 c71400042.op3(e,tp,eg,ep,ev,re,r,rp) function c71400042.op3(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<=0 then return end
local g=Duel.GetMatchingGroup(c71400042.xyzfilter,tp,LOCATION_EXTRA,0,nil,e,tp) local g=Duel.GetMatchingGroup(c71400042.xyzfilter,tp,LOCATION_EXTRA,0,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
......
...@@ -47,7 +47,7 @@ function c71400043.con1(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,7 +47,7 @@ function c71400043.con1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end end
function c71400043.filter1(c) function c71400043.filter1(c)
return c:IsSetCard(0x7714) and c:IsAbleToHand() return c:IsSetCard(0x5714) and c:IsAbleToHand()
end end
function c71400043.tg1(e,tp,eg,ep,ev,re,r,rp,chk) function c71400043.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71400043.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c71400043.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
......
local m=82204253
local cm=_G["c"..m]
cm.name="小红帽「女骑士」"
function cm.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_GRAVE+LOCATION_HAND)
e1:SetCountLimit(1,m+10000)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--to grave
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetOperation(cm.regop)
c:RegisterEffect(e2)
end
function cm.costfilter(c)
return c:IsFaceup() and c:IsSetCard(0x5299) and c:IsAbleToGraveAsCost()
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsPreviousLocation(LOCATION_ONFIELD) then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
function cm.thfilter(c,tp)
return c:IsSetCard(0x5299) and c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS)
and (c:IsAbleToHand() or c:GetActivateEffect():IsActivatable(tp))
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,tp)
local tc=g:GetFirst()
if tc then
local b1=tc:IsAbleToHand()
local b2=tc:GetActivateEffect():IsActivatable(tp)
if b1 and (not b2 or Duel.SelectOption(tp,1190,1150)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local te=tc:GetActivateEffect()
local tep=tc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
end
end
end
\ No newline at end of file
local m=82204254
local cm=_G["c"..m]
cm.name="小红帽「女骑士」"
function cm.initial_effect(c)
local e0=Effect.CreateEffect(c)
e0:SetDescription(1166)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(cm.LinkCondition(cm.matfilter,1,2,nil))
e0:SetTarget(cm.LinkTarget(cm.matfilter,1,2,nil))
e0:SetOperation(cm.LinkOperation(cm.matfilter,1,2,nil))
e0:SetValue(SUMMON_TYPE_LINK)
c:RegisterEffect(e0)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(cm.val)
c:RegisterEffect(e1)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,m)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCost(cm.descost)
e3:SetTarget(cm.destg)
e3:SetOperation(cm.desop)
c:RegisterEffect(e3)
end
function cm.matfilter(c)
return c:IsSetCard(0x5299) and (c:IsType(TYPE_MONSTER) or (c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS)))
end
function cm.LConditionFilter(c,f,lc)
return (c:IsFaceup() or not c:IsOnField()) and (c:IsCanBeLinkMaterial(lc) or (c:IsSetCard(0x5299) and c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS))) and (not f or f(c))
end
function cm.LExtraFilter(c,f,lc,tp)
if c:IsLocation(LOCATION_ONFIELD) and not c:IsFaceup() then return false end
return c:IsHasEffect(EFFECT_EXTRA_LINK_MATERIAL,tp) and (c:IsCanBeLinkMaterial(lc) or (c:IsSetCard(0x5299) and c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS))) and (not f or f(c))
end
function cm.GetLinkCount(c)
if c:IsType(TYPE_LINK) and c:GetLink()>1 then
return 1+0x10000*c:GetLink()
else return 1 end
end
function cm.GetLinkMaterials(tp,f,lc)
local mg=Duel.GetMatchingGroup(cm.LConditionFilter,tp,LOCATION_ONFIELD,0,nil,f,lc)
local mg2=Duel.GetMatchingGroup(cm.LExtraFilter,tp,LOCATION_HAND+LOCATION_SZONE,LOCATION_ONFIELD,nil,f,lc,tp)
if mg2:GetCount()>0 then mg:Merge(mg2) end
return mg
end
function cm.LCheckOtherMaterial(c,mg,lc,tp)
local le={c:IsHasEffect(EFFECT_EXTRA_LINK_MATERIAL,tp)}
for _,te in pairs(le) do
local f=te:GetValue()
if f and not f(te,lc,mg) then return false end
end
return true
end
function cm.LUncompatibilityFilter(c,sg,lc,tp)
local mg=sg:Filter(aux.TRUE,c)
return not cm.LCheckOtherMaterial(c,mg,lc,tp)
end
function cm.LCheckGoal(sg,tp,lc,gf,lmat)
return sg:CheckWithSumEqual(cm.GetLinkCount,lc:GetLink(),#sg,#sg)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and (not gf or gf(sg))
and not sg:IsExists(cm.LUncompatibilityFilter,1,nil,sg,lc,tp)
and (not lmat or sg:IsContains(lmat))
end
function cm.LExtraMaterialCount(mg,lc,tp)
for tc in aux.Next(mg) do
local le={tc:IsHasEffect(EFFECT_EXTRA_LINK_MATERIAL,tp)}
for _,te in pairs(le) do
local sg=mg:Filter(aux.TRUE,tc)
local f=te:GetValue()
if not f or f(te,lc,sg) then
te:UseCountLimit(tp)
end
end
end
end
function cm.LinkCondition(f,minc,maxc,gf)
return function(e,c,og,lmat,min,max)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local minc=minc
local maxc=maxc
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local tp=c:GetControler()
local mg=nil
if og then
mg=og:Filter(cm.LConditionFilter,nil,f,c)
else
mg=cm.GetLinkMaterials(tp,f,c)
end
if lmat~=nil then
if not cm.LConditionFilter(lmat,f,c) then return false end
mg:AddCard(lmat)
end
local fg=aux.GetMustMaterialGroup(tp,EFFECT_MUST_BE_LMATERIAL)
if fg:IsExists(aux.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(fg)
return mg:CheckSubGroup(cm.LCheckGoal,minc,maxc,tp,c,gf,lmat)
end
end
function cm.LinkTarget(f,minc,maxc,gf)
return function(e,tp,eg,ep,ev,re,r,rp,chk,c,og,lmat,min,max)
local minc=minc
local maxc=maxc
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local mg=nil
if og then
mg=og:Filter(cm.LConditionFilter,nil,f,c)
else
mg=cm.GetLinkMaterials(tp,f,c)
end
if lmat~=nil then
if not cm.LConditionFilter(lmat,f,c) then return false end
mg:AddCard(lmat)
end
local fg=aux.GetMustMaterialGroup(tp,EFFECT_MUST_BE_LMATERIAL)
Duel.SetSelectedCard(fg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local cancel=Duel.GetCurrentChain()==0
local sg=mg:SelectSubGroup(tp,cm.LCheckGoal,cancel,minc,maxc,tp,c,gf,lmat)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
end
function cm.LinkOperation(f,minc,maxc,gf)
return function(e,tp,eg,ep,ev,re,r,rp,c,og,lmat,min,max)
local g=e:GetLabelObject()
c:SetMaterial(g)
cm.LExtraMaterialCount(g,c,tp)
Duel.SendtoGrave(g,REASON_MATERIAL+REASON_LINK)
g:DeleteGroup()
end
end
function cm.val(e,c)
return Duel.GetMatchingGroupCount(cm.atkfilter,c:GetControler(),LOCATION_MZONE,0,e:GetHandler())*500
end
function cm.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x5299)
end
function cm.descost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD,0,1,1,c)
Duel.SendtoGrave(g,REASON_COST)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
\ No newline at end of file
local m=82204255
local cm=_G["c"..m]
cm.name="小红帽「修女」"
function cm.initial_effect(c)
local e0=Effect.CreateEffect(c)
e0:SetDescription(1166)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(cm.LinkCondition(cm.matfilter,1,2,nil))
e0:SetTarget(cm.LinkTarget(cm.matfilter,1,2,nil))
e0:SetOperation(cm.LinkOperation(cm.matfilter,1,2,nil))
e0:SetValue(SUMMON_TYPE_LINK)
c:RegisterEffect(e0)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(cm.val)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(cm.indtg)
e2:SetValue(1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e3)
end
function cm.matfilter(c)
return c:IsSetCard(0x5299) and (c:IsType(TYPE_MONSTER) or (c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS)))
end
function cm.LConditionFilter(c,f,lc)
return (c:IsFaceup() or not c:IsOnField()) and (c:IsCanBeLinkMaterial(lc) or (c:IsSetCard(0x5299) and c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS))) and (not f or f(c))
end
function cm.LExtraFilter(c,f,lc,tp)
if c:IsLocation(LOCATION_ONFIELD) and not c:IsFaceup() then return false end
return c:IsHasEffect(EFFECT_EXTRA_LINK_MATERIAL,tp) and (c:IsCanBeLinkMaterial(lc) or (c:IsSetCard(0x5299) and c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS))) and (not f or f(c))
end
function cm.GetLinkCount(c)
if c:IsType(TYPE_LINK) and c:GetLink()>1 then
return 1+0x10000*c:GetLink()
else return 1 end
end
function cm.GetLinkMaterials(tp,f,lc)
local mg=Duel.GetMatchingGroup(cm.LConditionFilter,tp,LOCATION_ONFIELD,0,nil,f,lc)
local mg2=Duel.GetMatchingGroup(cm.LExtraFilter,tp,LOCATION_HAND+LOCATION_SZONE,LOCATION_ONFIELD,nil,f,lc,tp)
if mg2:GetCount()>0 then mg:Merge(mg2) end
return mg
end
function cm.LCheckOtherMaterial(c,mg,lc,tp)
local le={c:IsHasEffect(EFFECT_EXTRA_LINK_MATERIAL,tp)}
for _,te in pairs(le) do
local f=te:GetValue()
if f and not f(te,lc,mg) then return false end
end
return true
end
function cm.LUncompatibilityFilter(c,sg,lc,tp)
local mg=sg:Filter(aux.TRUE,c)
return not cm.LCheckOtherMaterial(c,mg,lc,tp)
end
function cm.LCheckGoal(sg,tp,lc,gf,lmat)
return sg:CheckWithSumEqual(cm.GetLinkCount,lc:GetLink(),#sg,#sg)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and (not gf or gf(sg))
and not sg:IsExists(cm.LUncompatibilityFilter,1,nil,sg,lc,tp)
and (not lmat or sg:IsContains(lmat))
end
function cm.LExtraMaterialCount(mg,lc,tp)
for tc in aux.Next(mg) do
local le={tc:IsHasEffect(EFFECT_EXTRA_LINK_MATERIAL,tp)}
for _,te in pairs(le) do
local sg=mg:Filter(aux.TRUE,tc)
local f=te:GetValue()
if not f or f(te,lc,sg) then
te:UseCountLimit(tp)
end
end
end
end
function cm.LinkCondition(f,minc,maxc,gf)
return function(e,c,og,lmat,min,max)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local minc=minc
local maxc=maxc
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local tp=c:GetControler()
local mg=nil
if og then
mg=og:Filter(cm.LConditionFilter,nil,f,c)
else
mg=cm.GetLinkMaterials(tp,f,c)
end
if lmat~=nil then
if not cm.LConditionFilter(lmat,f,c) then return false end
mg:AddCard(lmat)
end
local fg=aux.GetMustMaterialGroup(tp,EFFECT_MUST_BE_LMATERIAL)
if fg:IsExists(aux.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(fg)
return mg:CheckSubGroup(cm.LCheckGoal,minc,maxc,tp,c,gf,lmat)
end
end
function cm.LinkTarget(f,minc,maxc,gf)
return function(e,tp,eg,ep,ev,re,r,rp,chk,c,og,lmat,min,max)
local minc=minc
local maxc=maxc
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local mg=nil
if og then
mg=og:Filter(cm.LConditionFilter,nil,f,c)
else
mg=cm.GetLinkMaterials(tp,f,c)
end
if lmat~=nil then
if not cm.LConditionFilter(lmat,f,c) then return false end
mg:AddCard(lmat)
end
local fg=aux.GetMustMaterialGroup(tp,EFFECT_MUST_BE_LMATERIAL)
Duel.SetSelectedCard(fg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local cancel=Duel.GetCurrentChain()==0
local sg=mg:SelectSubGroup(tp,cm.LCheckGoal,cancel,minc,maxc,tp,c,gf,lmat)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
end
function cm.LinkOperation(f,minc,maxc,gf)
return function(e,tp,eg,ep,ev,re,r,rp,c,og,lmat,min,max)
local g=e:GetLabelObject()
c:SetMaterial(g)
cm.LExtraMaterialCount(g,c,tp)
Duel.SendtoGrave(g,REASON_MATERIAL+REASON_LINK)
g:DeleteGroup()
end
end
function cm.val(e,c)
return Duel.GetMatchingGroupCount(cm.atkfilter,c:GetControler(),LOCATION_MZONE,0,e:GetHandler())*500
end
function cm.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x5299)
end
function cm.indtg(e,c)
return c:IsSetCard(0x5299) and c:GetMutualLinkedGroupCount()>0
end
\ No newline at end of file
local m=82204256
local cm=_G["c"..m]
cm.name="小红帽「小女巫」"
function cm.initial_effect(c)
local e0=Effect.CreateEffect(c)
e0:SetDescription(1166)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(cm.LinkCondition(cm.matfilter,1,2,nil))
e0:SetTarget(cm.LinkTarget(cm.matfilter,1,2,nil))
e0:SetOperation(cm.LinkOperation(cm.matfilter,1,2,nil))
e0:SetValue(SUMMON_TYPE_LINK)
c:RegisterEffect(e0)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(cm.val)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e2:SetCountLimit(1,m)
e2:SetCost(cm.negcost)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
end
function cm.matfilter(c)
return c:IsSetCard(0x5299) and (c:IsType(TYPE_MONSTER) or (c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS)))
end
function cm.LConditionFilter(c,f,lc)
return (c:IsFaceup() or not c:IsOnField()) and (c:IsCanBeLinkMaterial(lc) or (c:IsSetCard(0x5299) and c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS))) and (not f or f(c))
end
function cm.LExtraFilter(c,f,lc,tp)
if c:IsLocation(LOCATION_ONFIELD) and not c:IsFaceup() then return false end
return c:IsHasEffect(EFFECT_EXTRA_LINK_MATERIAL,tp) and (c:IsCanBeLinkMaterial(lc) or (c:IsSetCard(0x5299) and c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS))) and (not f or f(c))
end
function cm.GetLinkCount(c)
if c:IsType(TYPE_LINK) and c:GetLink()>1 then
return 1+0x10000*c:GetLink()
else return 1 end
end
function cm.GetLinkMaterials(tp,f,lc)
local mg=Duel.GetMatchingGroup(cm.LConditionFilter,tp,LOCATION_ONFIELD,0,nil,f,lc)
local mg2=Duel.GetMatchingGroup(cm.LExtraFilter,tp,LOCATION_HAND+LOCATION_SZONE,LOCATION_ONFIELD,nil,f,lc,tp)
if mg2:GetCount()>0 then mg:Merge(mg2) end
return mg
end
function cm.LCheckOtherMaterial(c,mg,lc,tp)
local le={c:IsHasEffect(EFFECT_EXTRA_LINK_MATERIAL,tp)}
for _,te in pairs(le) do
local f=te:GetValue()
if f and not f(te,lc,mg) then return false end
end
return true
end
function cm.LUncompatibilityFilter(c,sg,lc,tp)
local mg=sg:Filter(aux.TRUE,c)
return not cm.LCheckOtherMaterial(c,mg,lc,tp)
end
function cm.LCheckGoal(sg,tp,lc,gf,lmat)
return sg:CheckWithSumEqual(cm.GetLinkCount,lc:GetLink(),#sg,#sg)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and (not gf or gf(sg))
and not sg:IsExists(cm.LUncompatibilityFilter,1,nil,sg,lc,tp)
and (not lmat or sg:IsContains(lmat))
end
function cm.LExtraMaterialCount(mg,lc,tp)
for tc in aux.Next(mg) do
local le={tc:IsHasEffect(EFFECT_EXTRA_LINK_MATERIAL,tp)}
for _,te in pairs(le) do
local sg=mg:Filter(aux.TRUE,tc)
local f=te:GetValue()
if not f or f(te,lc,sg) then
te:UseCountLimit(tp)
end
end
end
end
function cm.LinkCondition(f,minc,maxc,gf)
return function(e,c,og,lmat,min,max)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local minc=minc
local maxc=maxc
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local tp=c:GetControler()
local mg=nil
if og then
mg=og:Filter(cm.LConditionFilter,nil,f,c)
else
mg=cm.GetLinkMaterials(tp,f,c)
end
if lmat~=nil then
if not cm.LConditionFilter(lmat,f,c) then return false end
mg:AddCard(lmat)
end
local fg=aux.GetMustMaterialGroup(tp,EFFECT_MUST_BE_LMATERIAL)
if fg:IsExists(aux.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(fg)
return mg:CheckSubGroup(cm.LCheckGoal,minc,maxc,tp,c,gf,lmat)
end
end
function cm.LinkTarget(f,minc,maxc,gf)
return function(e,tp,eg,ep,ev,re,r,rp,chk,c,og,lmat,min,max)
local minc=minc
local maxc=maxc
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local mg=nil
if og then
mg=og:Filter(cm.LConditionFilter,nil,f,c)
else
mg=cm.GetLinkMaterials(tp,f,c)
end
if lmat~=nil then
if not cm.LConditionFilter(lmat,f,c) then return false end
mg:AddCard(lmat)
end
local fg=aux.GetMustMaterialGroup(tp,EFFECT_MUST_BE_LMATERIAL)
Duel.SetSelectedCard(fg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local cancel=Duel.GetCurrentChain()==0
local sg=mg:SelectSubGroup(tp,cm.LCheckGoal,cancel,minc,maxc,tp,c,gf,lmat)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
end
function cm.LinkOperation(f,minc,maxc,gf)
return function(e,tp,eg,ep,ev,re,r,rp,c,og,lmat,min,max)
local g=e:GetLabelObject()
c:SetMaterial(g)
cm.LExtraMaterialCount(g,c,tp)
Duel.SendtoGrave(g,REASON_MATERIAL+REASON_LINK)
g:DeleteGroup()
end
end
function cm.val(e,c)
return Duel.GetMatchingGroupCount(cm.atkfilter,c:GetControler(),LOCATION_MZONE,0,e:GetHandler())*500
end
function cm.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x5299)
end
function cm.costfilter(c)
return c:IsFaceup() and c:IsSetCard(0x5299) and c:IsAbleToGraveAsCost()
end
function cm.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and aux.disfilter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,aux.disfilter1,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if ((tc:IsFaceup() and not tc:IsDisabled()) or tc:IsType(TYPE_TRAPMONSTER)) and tc:IsRelateToEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
end
end
end
\ No newline at end of file
local m=82204257
local cm=_G["c"..m]
cm.name="小红帽「魔术师」"
function cm.initial_effect(c)
local e0=Effect.CreateEffect(c)
e0:SetDescription(1166)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(cm.LinkCondition(cm.matfilter,1,2,nil))
e0:SetTarget(cm.LinkTarget(cm.matfilter,1,2,nil))
e0:SetOperation(cm.LinkOperation(cm.matfilter,1,2,nil))
e0:SetValue(SUMMON_TYPE_LINK)
c:RegisterEffect(e0)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(cm.val)
c:RegisterEffect(e1)
--direct attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e2)
end
function cm.matfilter(c)
return c:IsSetCard(0x5299) and (c:IsType(TYPE_MONSTER) or (c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS)))
end
function cm.LConditionFilter(c,f,lc)
return (c:IsFaceup() or not c:IsOnField()) and (c:IsCanBeLinkMaterial(lc) or (c:IsSetCard(0x5299) and c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS))) and (not f or f(c))
end
function cm.LExtraFilter(c,f,lc,tp)
if c:IsLocation(LOCATION_ONFIELD) and not c:IsFaceup() then return false end
return c:IsHasEffect(EFFECT_EXTRA_LINK_MATERIAL,tp) and (c:IsCanBeLinkMaterial(lc) or (c:IsSetCard(0x5299) and c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS))) and (not f or f(c))
end
function cm.GetLinkCount(c)
if c:IsType(TYPE_LINK) and c:GetLink()>1 then
return 1+0x10000*c:GetLink()
else return 1 end
end
function cm.GetLinkMaterials(tp,f,lc)
local mg=Duel.GetMatchingGroup(cm.LConditionFilter,tp,LOCATION_ONFIELD,0,nil,f,lc)
local mg2=Duel.GetMatchingGroup(cm.LExtraFilter,tp,LOCATION_HAND+LOCATION_SZONE,LOCATION_ONFIELD,nil,f,lc,tp)
if mg2:GetCount()>0 then mg:Merge(mg2) end
return mg
end
function cm.LCheckOtherMaterial(c,mg,lc,tp)
local le={c:IsHasEffect(EFFECT_EXTRA_LINK_MATERIAL,tp)}
for _,te in pairs(le) do
local f=te:GetValue()
if f and not f(te,lc,mg) then return false end
end
return true
end
function cm.LUncompatibilityFilter(c,sg,lc,tp)
local mg=sg:Filter(aux.TRUE,c)
return not cm.LCheckOtherMaterial(c,mg,lc,tp)
end
function cm.LCheckGoal(sg,tp,lc,gf,lmat)
return sg:CheckWithSumEqual(cm.GetLinkCount,lc:GetLink(),#sg,#sg)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and (not gf or gf(sg))
and not sg:IsExists(cm.LUncompatibilityFilter,1,nil,sg,lc,tp)
and (not lmat or sg:IsContains(lmat))
end
function cm.LExtraMaterialCount(mg,lc,tp)
for tc in aux.Next(mg) do
local le={tc:IsHasEffect(EFFECT_EXTRA_LINK_MATERIAL,tp)}
for _,te in pairs(le) do
local sg=mg:Filter(aux.TRUE,tc)
local f=te:GetValue()
if not f or f(te,lc,sg) then
te:UseCountLimit(tp)
end
end
end
end
function cm.LinkCondition(f,minc,maxc,gf)
return function(e,c,og,lmat,min,max)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local minc=minc
local maxc=maxc
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local tp=c:GetControler()
local mg=nil
if og then
mg=og:Filter(cm.LConditionFilter,nil,f,c)
else
mg=cm.GetLinkMaterials(tp,f,c)
end
if lmat~=nil then
if not cm.LConditionFilter(lmat,f,c) then return false end
mg:AddCard(lmat)
end
local fg=aux.GetMustMaterialGroup(tp,EFFECT_MUST_BE_LMATERIAL)
if fg:IsExists(aux.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(fg)
return mg:CheckSubGroup(cm.LCheckGoal,minc,maxc,tp,c,gf,lmat)
end
end
function cm.LinkTarget(f,minc,maxc,gf)
return function(e,tp,eg,ep,ev,re,r,rp,chk,c,og,lmat,min,max)
local minc=minc
local maxc=maxc
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local mg=nil
if og then
mg=og:Filter(cm.LConditionFilter,nil,f,c)
else
mg=cm.GetLinkMaterials(tp,f,c)
end
if lmat~=nil then
if not cm.LConditionFilter(lmat,f,c) then return false end
mg:AddCard(lmat)
end
local fg=aux.GetMustMaterialGroup(tp,EFFECT_MUST_BE_LMATERIAL)
Duel.SetSelectedCard(fg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local cancel=Duel.GetCurrentChain()==0
local sg=mg:SelectSubGroup(tp,cm.LCheckGoal,cancel,minc,maxc,tp,c,gf,lmat)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
end
function cm.LinkOperation(f,minc,maxc,gf)
return function(e,tp,eg,ep,ev,re,r,rp,c,og,lmat,min,max)
local g=e:GetLabelObject()
c:SetMaterial(g)
cm.LExtraMaterialCount(g,c,tp)
Duel.SendtoGrave(g,REASON_MATERIAL+REASON_LINK)
g:DeleteGroup()
end
end
function cm.val(e,c)
return Duel.GetMatchingGroupCount(cm.atkfilter,c:GetControler(),LOCATION_MZONE,0,e:GetHandler())*500
end
function cm.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x5299)
end
\ No newline at end of file
local m=82204258
local cm=_G["c"..m]
cm.name="小红帽「药剂师」"
function cm.initial_effect(c)
local e0=Effect.CreateEffect(c)
e0:SetDescription(1166)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(cm.LinkCondition(cm.matfilter,1,2,nil))
e0:SetTarget(cm.LinkTarget(cm.matfilter,1,2,nil))
e0:SetOperation(cm.LinkOperation(cm.matfilter,1,2,nil))
e0:SetValue(SUMMON_TYPE_LINK)
c:RegisterEffect(e0)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(cm.val)
c:RegisterEffect(e1)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,m)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
end
function cm.matfilter(c)
return c:IsSetCard(0x5299) and (c:IsType(TYPE_MONSTER) or (c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS)))
end
function cm.LConditionFilter(c,f,lc)
return (c:IsFaceup() or not c:IsOnField()) and (c:IsCanBeLinkMaterial(lc) or (c:IsSetCard(0x5299) and c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS))) and (not f or f(c))
end
function cm.LExtraFilter(c,f,lc,tp)
if c:IsLocation(LOCATION_ONFIELD) and not c:IsFaceup() then return false end
return c:IsHasEffect(EFFECT_EXTRA_LINK_MATERIAL,tp) and (c:IsCanBeLinkMaterial(lc) or (c:IsSetCard(0x5299) and c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS))) and (not f or f(c))
end
function cm.GetLinkCount(c)
if c:IsType(TYPE_LINK) and c:GetLink()>1 then
return 1+0x10000*c:GetLink()
else return 1 end
end
function cm.GetLinkMaterials(tp,f,lc)
local mg=Duel.GetMatchingGroup(cm.LConditionFilter,tp,LOCATION_ONFIELD,0,nil,f,lc)
local mg2=Duel.GetMatchingGroup(cm.LExtraFilter,tp,LOCATION_HAND+LOCATION_SZONE,LOCATION_ONFIELD,nil,f,lc,tp)
if mg2:GetCount()>0 then mg:Merge(mg2) end
return mg
end
function cm.LCheckOtherMaterial(c,mg,lc,tp)
local le={c:IsHasEffect(EFFECT_EXTRA_LINK_MATERIAL,tp)}
for _,te in pairs(le) do
local f=te:GetValue()
if f and not f(te,lc,mg) then return false end
end
return true
end
function cm.LUncompatibilityFilter(c,sg,lc,tp)
local mg=sg:Filter(aux.TRUE,c)
return not cm.LCheckOtherMaterial(c,mg,lc,tp)
end
function cm.LCheckGoal(sg,tp,lc,gf,lmat)
return sg:CheckWithSumEqual(cm.GetLinkCount,lc:GetLink(),#sg,#sg)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and (not gf or gf(sg))
and not sg:IsExists(cm.LUncompatibilityFilter,1,nil,sg,lc,tp)
and (not lmat or sg:IsContains(lmat))
end
function cm.LExtraMaterialCount(mg,lc,tp)
for tc in aux.Next(mg) do
local le={tc:IsHasEffect(EFFECT_EXTRA_LINK_MATERIAL,tp)}
for _,te in pairs(le) do
local sg=mg:Filter(aux.TRUE,tc)
local f=te:GetValue()
if not f or f(te,lc,sg) then
te:UseCountLimit(tp)
end
end
end
end
function cm.LinkCondition(f,minc,maxc,gf)
return function(e,c,og,lmat,min,max)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local minc=minc
local maxc=maxc
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local tp=c:GetControler()
local mg=nil
if og then
mg=og:Filter(cm.LConditionFilter,nil,f,c)
else
mg=cm.GetLinkMaterials(tp,f,c)
end
if lmat~=nil then
if not cm.LConditionFilter(lmat,f,c) then return false end
mg:AddCard(lmat)
end
local fg=aux.GetMustMaterialGroup(tp,EFFECT_MUST_BE_LMATERIAL)
if fg:IsExists(aux.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(fg)
return mg:CheckSubGroup(cm.LCheckGoal,minc,maxc,tp,c,gf,lmat)
end
end
function cm.LinkTarget(f,minc,maxc,gf)
return function(e,tp,eg,ep,ev,re,r,rp,chk,c,og,lmat,min,max)
local minc=minc
local maxc=maxc
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local mg=nil
if og then
mg=og:Filter(cm.LConditionFilter,nil,f,c)
else
mg=cm.GetLinkMaterials(tp,f,c)
end
if lmat~=nil then
if not cm.LConditionFilter(lmat,f,c) then return false end
mg:AddCard(lmat)
end
local fg=aux.GetMustMaterialGroup(tp,EFFECT_MUST_BE_LMATERIAL)
Duel.SetSelectedCard(fg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local cancel=Duel.GetCurrentChain()==0
local sg=mg:SelectSubGroup(tp,cm.LCheckGoal,cancel,minc,maxc,tp,c,gf,lmat)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
end
function cm.LinkOperation(f,minc,maxc,gf)
return function(e,tp,eg,ep,ev,re,r,rp,c,og,lmat,min,max)
local g=e:GetLabelObject()
c:SetMaterial(g)
cm.LExtraMaterialCount(g,c,tp)
Duel.SendtoGrave(g,REASON_MATERIAL+REASON_LINK)
g:DeleteGroup()
end
end
function cm.val(e,c)
return Duel.GetMatchingGroupCount(cm.atkfilter,c:GetControler(),LOCATION_MZONE,0,e:GetHandler())*500
end
function cm.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x5299)
end
function cm.thfilter(c)
return c:IsSetCard(0x5299) and c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
local m=82204259
local cm=_G["c"..m]
cm.name="小红帽「契约师」"
function cm.initial_effect(c)
local e0=Effect.CreateEffect(c)
e0:SetDescription(1166)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(cm.LinkCondition(cm.matfilter,1,2,nil))
e0:SetTarget(cm.LinkTarget(cm.matfilter,1,2,nil))
e0:SetOperation(cm.LinkOperation(cm.matfilter,1,2,nil))
e0:SetValue(SUMMON_TYPE_LINK)
c:RegisterEffect(e0)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(cm.val)
c:RegisterEffect(e1)
--draw
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCountLimit(1,m)
e3:SetCost(cm.drcost)
e3:SetTarget(cm.drtg)
e3:SetOperation(cm.drop)
c:RegisterEffect(e3)
end
function cm.matfilter(c)
return c:IsSetCard(0x5299) and (c:IsType(TYPE_MONSTER) or (c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS)))
end
function cm.LConditionFilter(c,f,lc)
return (c:IsFaceup() or not c:IsOnField()) and (c:IsCanBeLinkMaterial(lc) or (c:IsSetCard(0x5299) and c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS))) and (not f or f(c))
end
function cm.LExtraFilter(c,f,lc,tp)
if c:IsLocation(LOCATION_ONFIELD) and not c:IsFaceup() then return false end
return c:IsHasEffect(EFFECT_EXTRA_LINK_MATERIAL,tp) and (c:IsCanBeLinkMaterial(lc) or (c:IsSetCard(0x5299) and c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS))) and (not f or f(c))
end
function cm.GetLinkCount(c)
if c:IsType(TYPE_LINK) and c:GetLink()>1 then
return 1+0x10000*c:GetLink()
else return 1 end
end
function cm.GetLinkMaterials(tp,f,lc)
local mg=Duel.GetMatchingGroup(cm.LConditionFilter,tp,LOCATION_ONFIELD,0,nil,f,lc)
local mg2=Duel.GetMatchingGroup(cm.LExtraFilter,tp,LOCATION_HAND+LOCATION_SZONE,LOCATION_ONFIELD,nil,f,lc,tp)
if mg2:GetCount()>0 then mg:Merge(mg2) end
return mg
end
function cm.LCheckOtherMaterial(c,mg,lc,tp)
local le={c:IsHasEffect(EFFECT_EXTRA_LINK_MATERIAL,tp)}
for _,te in pairs(le) do
local f=te:GetValue()
if f and not f(te,lc,mg) then return false end
end
return true
end
function cm.LUncompatibilityFilter(c,sg,lc,tp)
local mg=sg:Filter(aux.TRUE,c)
return not cm.LCheckOtherMaterial(c,mg,lc,tp)
end
function cm.LCheckGoal(sg,tp,lc,gf,lmat)
return sg:CheckWithSumEqual(cm.GetLinkCount,lc:GetLink(),#sg,#sg)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and (not gf or gf(sg))
and not sg:IsExists(cm.LUncompatibilityFilter,1,nil,sg,lc,tp)
and (not lmat or sg:IsContains(lmat))
end
function cm.LExtraMaterialCount(mg,lc,tp)
for tc in aux.Next(mg) do
local le={tc:IsHasEffect(EFFECT_EXTRA_LINK_MATERIAL,tp)}
for _,te in pairs(le) do
local sg=mg:Filter(aux.TRUE,tc)
local f=te:GetValue()
if not f or f(te,lc,sg) then
te:UseCountLimit(tp)
end
end
end
end
function cm.LinkCondition(f,minc,maxc,gf)
return function(e,c,og,lmat,min,max)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local minc=minc
local maxc=maxc
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local tp=c:GetControler()
local mg=nil
if og then
mg=og:Filter(cm.LConditionFilter,nil,f,c)
else
mg=cm.GetLinkMaterials(tp,f,c)
end
if lmat~=nil then
if not cm.LConditionFilter(lmat,f,c) then return false end
mg:AddCard(lmat)
end
local fg=aux.GetMustMaterialGroup(tp,EFFECT_MUST_BE_LMATERIAL)
if fg:IsExists(aux.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(fg)
return mg:CheckSubGroup(cm.LCheckGoal,minc,maxc,tp,c,gf,lmat)
end
end
function cm.LinkTarget(f,minc,maxc,gf)
return function(e,tp,eg,ep,ev,re,r,rp,chk,c,og,lmat,min,max)
local minc=minc
local maxc=maxc
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local mg=nil
if og then
mg=og:Filter(cm.LConditionFilter,nil,f,c)
else
mg=cm.GetLinkMaterials(tp,f,c)
end
if lmat~=nil then
if not cm.LConditionFilter(lmat,f,c) then return false end
mg:AddCard(lmat)
end
local fg=aux.GetMustMaterialGroup(tp,EFFECT_MUST_BE_LMATERIAL)
Duel.SetSelectedCard(fg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local cancel=Duel.GetCurrentChain()==0
local sg=mg:SelectSubGroup(tp,cm.LCheckGoal,cancel,minc,maxc,tp,c,gf,lmat)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
end
function cm.LinkOperation(f,minc,maxc,gf)
return function(e,tp,eg,ep,ev,re,r,rp,c,og,lmat,min,max)
local g=e:GetLabelObject()
c:SetMaterial(g)
cm.LExtraMaterialCount(g,c,tp)
Duel.SendtoGrave(g,REASON_MATERIAL+REASON_LINK)
g:DeleteGroup()
end
end
function cm.val(e,c)
return Duel.GetMatchingGroupCount(cm.atkfilter,c:GetControler(),LOCATION_MZONE,0,e:GetHandler())*500
end
function cm.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x5299)
end
function cm.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1500) end
Duel.PayLPCost(tp,1500)
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
\ No newline at end of file
local m=82204260
local cm=_G["c"..m]
cm.name="捕兽夹"
function cm.initial_effect(c)
c:SetUniqueOnField(1,0,m)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
e4:SetCategory(CATEGORY_DAMAGE)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetRange(LOCATION_SZONE)
e4:SetCode(EVENT_ATTACK_ANNOUNCE)
e4:SetCondition(cm.atkcon)
e4:SetTarget(cm.atktg)
e4:SetOperation(cm.atkop)
c:RegisterEffect(e4)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x5299)
end
function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
return tp~=Duel.GetTurnPlayer() and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)>0 end
Duel.SetTargetPlayer(1-tp)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0)
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.Damage(p,Duel.GetFieldGroupCount(p,LOCATION_HAND,0)*500,REASON_EFFECT)
end
\ No newline at end of file
local m=82204261
local cm=_G["c"..m]
cm.name="勇气旗帜"
function cm.initial_effect(c)
c:SetUniqueOnField(1,0,m)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--atkup
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x5299))
e2:SetValue(500)
c:RegisterEffect(e2)
--to grave
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,m)
e3:SetTarget(cm.tgtg)
e3:SetOperation(cm.tgop)
c:RegisterEffect(e3)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x5299)
end
function cm.damcon(e,tp,eg,ep,ev,re,r,rp)
return tp~=Duel.GetTurnPlayer() and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)>0 end
Duel.SetTargetPlayer(1-tp)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0)
end
function cm.damop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.Damage(p,Duel.GetFieldGroupCount(p,LOCATION_HAND,0)*400,REASON_EFFECT)
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
\ No newline at end of file
local m=82204262
local cm=_G["c"..m]
cm.name="灵魂锁链"
function cm.initial_effect(c)
c:SetUniqueOnField(1,0,m)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
--Negate
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAIN_SOLVING)
e3:SetRange(LOCATION_SZONE)
e3:SetCondition(cm.negcon)
e3:SetOperation(cm.negop)
c:RegisterEffect(e3)
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x5299) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x5299)
end
function cm.negcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,m)==0 and rp~=tp and Duel.IsChainDisablable(ev) and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectEffectYesNo(tp,e:GetHandler()) then
Duel.Hint(HINT_CARD,0,m)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
if Duel.NegateEffect(ev) then
Duel.Destroy(re:GetHandler(),REASON_EFFECT)
end
end
end
\ No newline at end of file
local m=82204263
local cm=_G["c"..m]
cm.name="充能棒"
function cm.initial_effect(c)
c:SetUniqueOnField(1,0,m)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.drcon)
e2:SetTarget(cm.drtg)
e2:SetOperation(cm.drop)
c:RegisterEffect(e2)
end
function cm.drcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
e:SetLabel(0)
if c:IsPreviousLocation(LOCATION_ONFIELD) then e:SetLabel(1) end
return true
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=1
if e:GetLabel()==1 then
ct=2
end
if chk==0 then return Duel.IsPlayerCanDraw(tp,ct) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ct)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
\ No newline at end of file
local m=82204264
local cm=_G["c"..m]
cm.name="冥界花"
function cm.initial_effect(c)
c:SetUniqueOnField(1,0,m)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,m)
e2:SetCost(cm.srcost)
e2:SetTarget(cm.srtg)
e2:SetOperation(cm.srop)
c:RegisterEffect(e2)
--todeck
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,m+10000)
e3:SetTarget(cm.tdtg)
e3:SetOperation(cm.tdop)
c:RegisterEffect(e3)
end
function cm.srcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler()) end
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,e:GetHandler())
Duel.SendtoGrave(g,REASON_COST)
end
function cm.srfilter(c)
return c:IsSetCard(0x5299) and c:IsAbleToHand() and not c:IsCode(m)
end
function cm.srtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.srfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.srop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.srfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.tdfilter(c)
return c:IsSetCard(0x5299) and c:IsAbleToDeck()
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.tdfilter(chkc) and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(cm.tdfilter,tp,LOCATION_GRAVE,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,cm.tdfilter,tp,LOCATION_GRAVE,0,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()>0 then
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end
\ No newline at end of file
local m=82204265
local cm=_G["c"..m]
cm.name="银色披风"
function cm.initial_effect(c)
c:SetUniqueOnField(1,0,m)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--extra attack
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1,m)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(cm.condition)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,m+10000)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function cm.filter(c)
return c:IsFaceup() and not c:IsHasEffect(EFFECT_EXTRA_ATTACK) and c:IsSetCard(0x5299)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE,0,1,1,nil)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1:SetValue(1)
tc:RegisterEffect(e1)
end
end
function cm.thfilter(c)
return c:IsSetCard(0x5299) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.thfilter(chkc) and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_GRAVE,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,cm.thfilter,tp,LOCATION_GRAVE,0,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
\ No newline at end of file
local m=82204266
local cm=_G["c"..m]
cm.name="法力翡翠"
function cm.initial_effect(c)
c:SetUniqueOnField(1,0,m)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--dr
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.drcon)
e2:SetTarget(cm.drtg)
e2:SetOperation(cm.drop)
c:RegisterEffect(e2)
--remove
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,m)
e3:SetTarget(cm.rmtg)
e3:SetOperation(cm.rmop)
c:RegisterEffect(e3)
end
function cm.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x5299) and c:IsControler(tp)
end
function cm.drcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,tp)
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then
tc:RegisterFlagEffect(m,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(tc)
e1:SetCountLimit(1)
e1:SetCondition(cm.retcon)
e1:SetOperation(cm.retop)
Duel.RegisterEffect(e1,tp)
end
end
function cm.retcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetLabelObject():GetFlagEffect(m)~=0
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
\ No newline at end of file
local m=82204267
local cm=_G["c"..m]
cm.name="法力翡翠"
function cm.initial_effect(c)
c:SetUniqueOnField(1,0,m)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.atkcon)
e2:SetOperation(cm.atkop)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,m)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetTarget(cm.target)
e3:SetOperation(cm.operation)
c:RegisterEffect(e3)
end
function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttacker()
return at:IsControler(tp) and at:IsSetCard(0x5299)
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local at=Duel.GetAttacker()
if at:IsFaceup() and at:IsRelateToBattle() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE)
at:RegisterEffect(e1)
end
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(-500)
tc:RegisterEffect(e1)
end
end
\ No newline at end of file
local m=82204268
local cm=_G["c"..m]
cm.name="生命护符"
function cm.initial_effect(c)
c:SetUniqueOnField(1,0,m)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--halve damage
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EFFECT_CHANGE_DAMAGE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetCondition(cm.condition)
e2:SetValue(cm.val)
c:RegisterEffect(e2)
--recover
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_RECOVER)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,14169845)
e3:SetTarget(cm.rectg)
e3:SetOperation(cm.recop)
c:RegisterEffect(e3)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x5299)
end
function cm.condition(e)
return Duel.IsExistingMatchingCard(cm.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function cm.val(e,re,dam,r,rp,rc)
return math.floor(dam/2)
end
function cm.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1500)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,500)
end
function cm.recop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
\ No newline at end of file
local m=82204269
local cm=_G["c"..m]
cm.name="水银沙漏"
function cm.initial_effect(c)
c:SetUniqueOnField(1,0,m)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--the world
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,0))
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_SZONE)
e5:SetCountLimit(m,1)
e5:SetCost(cm.skipcost)
e5:SetTarget(cm.skiptg)
e5:SetOperation(cm.skipop)
c:RegisterEffect(e5)
end
function cm.thfilter(c)
return c:IsSetCard(0x5299) and c:IsAbleToHand()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_GRAVE,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
end
end
function cm.costfilter(c)
return c:IsSetCard(0x5299) and c:IsType(TYPE_MONSTER) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsAbleToRemoveAsCost()
end
function cm.skipcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.costfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,nil)
if chk==0 then return g:GetClassCount(Card.GetCode)>=7 end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
aux.GCheckAdditional=aux.dncheck
local rg=g:SelectSubGroup(tp,aux.TRUE,false,7,7)
aux.GCheckAdditional=nil
Duel.Remove(rg,POS_FACEUP,REASON_COST)
end
function cm.skiptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(1-tp,EFFECT_SKIP_TURN) end
end
function cm.skipop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_SKIP_TURN)
e1:SetTargetRange(0,1)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
e1:SetCondition(cm.skipcon)
Duel.RegisterEffect(e1,tp)
end
\ No newline at end of file
#No81DIY #No81DIY
#Nemoma 337 0x440-0x44f #Nemoma 337 0x440-0x44f
!setname 0x440 篝(Kagari !setname 0x440 篝(Kagari
!setname 0x441 GUARDIAN(守护者) !setname 0x441 GUARDIAN(守护者)
!setname 0x442 动物朋友(Anifriends !setname 0x442 动物朋友(Anifriends
!counter 0x442 太阳之道指示物 (Way of the Sun !counter 0x442 太阳之道指示物 (Way of the Sun
!setname 0x443 霓火 (Neonfire !setname 0x443 霓火 (Neonfire
!setname 0x3440 Proto-Summoner (魔物使) !setname 0x3440 Proto-Summoner (魔物使)
!setname 0x6440 Protoform (魔物) !setname 0x6440 Protoform (魔物)
!setname 0x5440 琪比摩斯 (Chibi-Moth !setname 0x5440 琪比摩斯 (Chibi-Moth
!setname 0x1449 无心械姬 (GearGal !setname 0x1449 无心械姬 (GearGal
!setname 0x3449 慧心花姬 (NEXTGal !setname 0x3449 慧心花姬 (NEXTGal
!setname 0x6449 革新者 (Adventer !setname 0x6449 革新者 (Adventer
!setname 0x444 天降妹抖 (Heavenly Maid !setname 0x444 天降妹抖 (Heavenly Maid
!setname 0x5449 阻抗 (Resistor !setname 0x5449 阻抗 (Resistor
!setname 0x344a 妖幻战姬(T.Fairies !setname 0x344a 妖幻战姬(T.Fairies
!setname 0x644a 妖幻幼精(Tzermellend Fairy !setname 0x644a 妖幻幼精(Tzermellend Fairy
!setname 0x144b 虚毒(Voison !setname 0x144b 虚毒(Voison
!setname 0x144c VOICEROIDVOICEROID !setname 0x144c VOICEROIDVOICEROID
!setname 0x344c 虚拟主播(VLiver !setname 0x344c 虚拟主播(VLiver
!setname 0x44f 【背景音台】(【Sound Stage】) !setname 0x44f 【背景音台】(【Sound Stage】)
!setname 0x44e 铁虹(Rainblo !setname 0x44e 铁虹(Rainblo
!setname 0x445 虚拟YouTuberVTuber !setname 0x445 虚拟YouTuberVTuber
!counter 0x144b 虚空指示物(Void Counter !counter 0x144b 虚空指示物(Void Counter
!setname 0x144d 残星倩影(Starspirit !setname 0x144d 残星倩影(Starspirit
!setname 0x144e 晦空士(Sepialife !setname 0x144e 晦空士(Sepialife
!setname 0x8449 破天神狐(Kitsune.Sky.Breaker.) !setname 0x8449 破天神狐(Kitsune.Sky.Breaker.)
#少年 714 0x710-0x71f Sonic_714 #少年 714 0x710-0x71f Sonic_714
!setname 0x714 异梦 !setname 0x714 异梦
!setname 0x3714 异梦境 !setname 0x3714 异梦境
!setname 0xc714 异梦物 !setname 0xc714 异梦物
...@@ -61,14 +48,17 @@ ...@@ -61,14 +48,17 @@
!setname 0x356 飞球 !setname 0x356 飞球
!setname 0x3356 元始飞球 !setname 0x3356 元始飞球
!setname 0x351 超时空战斗机 !setname 0x351 超时空战斗机
!counter 0x351 爆弹指示物
!setname 0x352 超时空武装 !setname 0x352 超时空武装
!counter 0x352 瞬雷指示物
!setname 0x3352 超时空武装 主炮 !setname 0x3352 超时空武装 主炮
!setname 0x5352 超时空武装 装甲 !setname 0x5352 超时空武装 装甲
!setname 0x6352 超时空武装 副炮 !setname 0x6352 超时空武装 副炮
!setname 0x353 宇宙战争机器 !setname 0x353 宇宙战争机器
!counter 0x353 护罩指示物
!counter 0x354 能量指示物
#云云云 995 0xba0-0xbaf #云云云 995 0xba0-0xbaf
!setname 0xba1 永夜抄 !setname 0xba1 永夜抄
!setname 0x3ba1 永夜抄/藤原妹红 !setname 0x3ba1 永夜抄/藤原妹红
!setname 0x5ba1 永夜抄/儚月抄 !setname 0x5ba1 永夜抄/儚月抄
...@@ -158,6 +148,17 @@ ...@@ -158,6 +148,17 @@
!setname 0xabd1 梦比优斯 !setname 0xabd1 梦比优斯
!setname 0x3bd2 妖妖梦 !setname 0x3bd2 妖妖梦
#维他柠檬茶 551 0x551
!setname 0x3551 疫病
!setname 0x5551 大魔法
!setname 0x6551 恶神龙
!setname 0x9551 蚀刻龙
!setname 0xa551 反刻钟
!counter 0x5555 疫病指示物
!counter 0x5556 特命指示物
#零儿/02 648&650
!setname 0x6da0 幻梦迷境
!setname 0x9da0 星光歌剧 !setname 0x9da0 星光歌剧
#LaiBill 601 0xb20-0xb2f #LaiBill 601 0xb20-0xb2f
...@@ -205,7 +206,7 @@ ...@@ -205,7 +206,7 @@
!counter 0x34f 时间指示物 !counter 0x34f 时间指示物
!setname 0x6344 万由里 !setname 0x6344 万由里
#777 #冲浪检察狸/狸z 777&999
!setname 0x723 上古基因 !setname 0x723 上古基因
!setname 0x23a 上古遗迹 !setname 0x23a 上古遗迹
!setname 0x2ba 尼尔机械纪元 !setname 0x2ba 尼尔机械纪元
...@@ -216,6 +217,7 @@ ...@@ -216,6 +217,7 @@
!setname 0x34a2 剑意 !setname 0x34a2 剑意
!setname 0x77a 黑白视界 !setname 0x77a 黑白视界
!setname 0x77a2 暗物质 !setname 0x77a2 暗物质
!setname 0x20df 亡语
#victory reason #victory reason
!victory 0x4a 宣告生命终结! !victory 0x4a 宣告生命终结!
...@@ -229,7 +231,7 @@ ...@@ -229,7 +231,7 @@
!setname 0x9950 韶光 !setname 0x9950 韶光
!setname 0xa950 桃绯 !setname 0xa950 桃绯
!setname 0xc950 远古造物 !setname 0xc950 远古造物
!counter 0x950 韶光指示物 !counter 0x1950 韶光指示物
!counter 0x4950 指示物(比武!) !counter 0x4950 指示物(比武!)
!setname 0x952 战车道 !setname 0x952 战车道
!setname 0x953 幽鬼 !setname 0x953 幽鬼
...@@ -243,7 +245,6 @@ ...@@ -243,7 +245,6 @@
!setname 0x6951 创生 !setname 0x6951 创生
!setname 0x9951 月神 !setname 0x9951 月神
#篁楠 10 0x200-0x20f #篁楠 10 0x200-0x20f
!setname 0xc204 Madoka !setname 0xc204 Madoka
!setname 0x3204 Sayaka Miki !setname 0x3204 Sayaka Miki
...@@ -257,6 +258,14 @@ ...@@ -257,6 +258,14 @@
!setname 0x320e 罪恶王冠 !setname 0x320e 罪恶王冠
!setname 0x520e void !setname 0x520e void
#萌萌尺 333 0x550-0x55f
!setname 0x550 造神计划
!setname 0x556 深界
!setname 0x1556 深界探窟者
!setname 0x3556 深界遗物
!setname 0x557 生骸
!setname 0x558 铁华团
!setname 0x155b 断码者
#沃亚森斯奥克斯 2201771890 300 0x920 #沃亚森斯奥克斯 2201771890 300 0x920
!setname 0x920 邪魂 !setname 0x920 邪魂
...@@ -275,11 +284,14 @@ ...@@ -275,11 +284,14 @@
!setname 0xf18 究极异兽 !setname 0xf18 究极异兽
!counter 0x1f1b 超爆指示物 !counter 0x1f1b 超爆指示物
!setname 0x1f1b 勇机 !setname 0x1f1b 勇机
!setname 0x2f1b 复血鬼
!setname 0x3f1b 龙血师团
!setname 0xf1c 时机 !setname 0xf1c 时机
!counter 0xf1c 时机指示物 !counter 0xf1c 时机指示物
!setname 0x1f1c 时机龙骑 !setname 0x1f1c 时机龙骑
!setname 0x2f1c 时机降神 !setname 0x2f1c 时机降神
!setname 0x3f1d 封龙 !setname 0x3f1d 封龙
!setname 0x5f1d 机械加工
!setname 0x4f1d 时隙淑女 !setname 0x4f1d 时隙淑女
!setname 0x6f1d 连波 !setname 0x6f1d 连波
!setname 0x7f1d 灾漩 !setname 0x7f1d 灾漩
...@@ -296,6 +308,7 @@ ...@@ -296,6 +308,7 @@
!setname 0x1f24 睿智宙蓝 !setname 0x1f24 睿智宙蓝
!setname 0xf27 守护天使 !setname 0xf27 守护天使
!setname 0xc016 恶路程式 !setname 0xc016 恶路程式
!setname 0x3f1d 封龙
#Akashic 25 3204027606 #Akashic 25 3204027606
!setname 0xaf1 根源破灭 !setname 0xaf1 根源破灭
...@@ -313,11 +326,8 @@ ...@@ -313,11 +326,8 @@
!counter 0x1099 源石指示物 !counter 0x1099 源石指示物
!counter 0x190 指示物(使徒·医疗干员-闪灵) !counter 0x190 指示物(使徒·医疗干员-闪灵)
!counter 0x9b 指示物(罗德岛·术士干员-远山) !counter 0x9b 指示物(罗德岛·术士干员-远山)
!setname 0xa900 干员 Arknights !setname 0xa900 干员 Arknights
!setname 0xa901 近卫干员 Arknights !setname 0xa901 近卫干员 Arknights
!setname 0xa902 医疗干员 Arknights !setname 0xa902 医疗干员 Arknights
!setname 0xa903 先锋干员 Arknights !setname 0xa903 先锋干员 Arknights
!setname 0xa904 特种干员 Arknights !setname 0xa904 特种干员 Arknights
...@@ -343,9 +353,9 @@ ...@@ -343,9 +353,9 @@
!setname 0x4901 拉特兰 Arknights !setname 0x4901 拉特兰 Arknights
!setname 0x4902 维多利亚 Arknights !setname 0x4902 维多利亚 Arknights
!setname 0x4903 炎国 Arknights !setname 0x4903 炎国 Arknights
!setname 0x3902 巴别塔 Arknights
#02 1164477469 648 0x250-0x25f !setname 0x2901 拉特兰 Arknights
!setname 0x2048 CiNo
#TYGOC Submissions #TYGOC Submissions
...@@ -370,12 +380,57 @@ ...@@ -370,12 +380,57 @@
!setname 0xcc30 暴噬星皇 インペルード !setname 0xcc30 暴噬星皇 インペルード
!counter 0xcc30 暴噬星皇指示物 !counter 0xcc30 暴噬星皇指示物
#01 822 0x290-0x29f
!setname 0x290 科兹莫
!setname 0x291 精灵王
!setname 0x295 神迹
!setname 0x2299 荒兽
!setname 0x3299 孑影
!setname 0x6299 龙法师
!setname 0x129a 烽火骁骑
!setname 0x29c 邪界幻灵
!setname 0x129d 植占师
!setname 0x29e 辉神兵装
#Real_Scl 101 0x330-0x33f
!setname 0xa331 黯黑魔王
!setname 0xc331 光明之翼
!setname 0xc333 乌托兰
!setname 0x6336 奇妙物语
!setname 0xa336 量子驱动
!setname 0x337 冥魂龙
!setname 0x1337 冥魂龙王
!setname 0x3338 异位魔
!setname 0xa338 暴怒兽
#啖天的烩焗 220 0xff0-0xfff
!setname 0x5098 大魔术师
!setname 0xff1 人理
!setname 0x1ff1 人理之灵
!setname 0x2ff1 人理之基
!setname 0x3ff1 人理之诗
!setname 0xff3 希洛克
!setname 0xff4 超时空
!setname 0xff6 幻梦界
!setname 0xff8 悲叹
!setname 0x1ff8 悲叹之雏
!setname 0x2ff8 悲叹少女
!setname 0xff9 阿尔托莉雅
!counter 0xfec 悲叹指示物
!counter 0xfed 试炼指示物
#廷达的信徒 150 0xf30-0xf3f #廷达的信徒 150 0xf30-0xf3f
!setname 0xf34 星拟 !setname 0xf34 星拟
!setname 0xaf34 星拟龙 !setname 0x3f34 星拟龙
!setname 0x1f35 报丧泣语
!setname 0xf36 RhineIllustelliry(幻智)
!setname 0xf37 永寂 !setname 0xf37 永寂
!setname 0xaf37 永寂之国 !setname 0xaf37 永寂之国
!setname 0xf39 Steinkern(内核)
!setname 0x3f38 Asgabel(盖理)
!setname 0x6f38 Nagtrdoll(噩梦茧机)
!setname 0xf3a Silreticenty(缄默城)
!setname 0xf3b 恶虺
#地狱犬 314&907 #地狱犬 314&907
!victory 0x60 「时计塔」效果胜利 !victory 0x60 「时计塔」效果胜利
...@@ -399,21 +454,20 @@ ...@@ -399,21 +454,20 @@
!counter 0x131f 指示物(掠影之龙战士) !counter 0x131f 指示物(掠影之龙战士)
#某失智の刀客塔 3529764274 1 0xca0-0xcaf #某失智の刀客塔 3529764274 1 0xca0-0xcaf
!setname 0xca1 空洞骑士 !setname 0xa007 ULTRAMAN
!setname 0xca3 后巴别塔
!setname 0xca7 爱国者 !setname 0xca7 爱国者
!setname 0xca8 霜星 !setname 0xca8 霜星
!setname 0xcad 鲨鱼 !setname 0xca9 Hollow Knight
!setname 0x1cad 鲨鱼娘 !setname 0xca12 鲨鱼
!counter 0xcad 鲨鱼指示物 !counter 0xca13 鲨鱼指示物
#洛基卡奥斯 670489248 107 0x7c0-0x7cf #洛基卡奥斯 670489248 107 0xa00-0xa0f
!setname 0x7c1 姬绊连结 !setname 0x3a01 姬绊连结
!setname 0x17c1 夏日连结 !setname 0x3a02 夏日连结
!setname 0x27c1 美食连结 !setname 0x3a03 美食连结
!setname 0x37c1 破晓连结 !setname 0x3a05 墨丘利连结
!setname 0x47c1 墨丘利连结 !setname 0xf1a3 奇术师
!setname 0x7c2 奇术师
!setname 0x17c2 奇术师狂欢节
!setname 0x3911 炼金兽 !setname 0x3911 炼金兽
#Warlus #Warlus
...@@ -433,21 +487,26 @@ ...@@ -433,21 +487,26 @@
!setname 0xf99 替身 !setname 0xf99 替身
!setname 0x1f99 替身使者 !setname 0x1f99 替身使者
#??? #秀儿 087
!setname 0xf36 RhineIllustelliry !setname 0xafa 端午节
!setname 0x87af 方舟之骑士
!counter 0x87ae COST指示物 #其空葵 其空あおい 290 0x7a0-0x7af
!setname 0x3f38 Asgabel(盖理) !setname 0x87aa 灵知隐者
!setname 0xf3b 恶虺 !setname 0x87ab 拟械零骑
!setname 0xf39 Steinkern(内核) !setname 0x87ac 钢铁方舟
!setname 0x3f1d 封龙
!counter 0xf1c 时机指示物
!setname 0xf1c 时机
!setname 0x1f1c 时机龙骑
!setname 0x2f1c 时机降神
!setname 0x5f1d 机械加工
!setname 0x87ad 战械人形 !setname 0x87ad 战械人形
!setname 0x3f1b 龙血师团 !setname 0x87ae 星之光
!setname 0x87af 方舟之骑士
!counter 0x11ae COST指示物
!counter 0x11af 鸽指示物
#空想上の人格保持者
!setname 0xfec1 幼龙
!setname 0xbe1 绫波
!setname 0xbe2
!setname 0xbe3 吹雪
#Atolkas 997 0xd00-0xd0f
!counter 0xfd00 指示物(龙界原始龙种后裔 圣魔龙) !counter 0xfd00 指示物(龙界原始龙种后裔 圣魔龙)
!setname 0xfd00 圣界 !setname 0xfd00 圣界
!setname 0xfd01 星界 !setname 0xfd01 星界
...@@ -457,4 +516,3 @@ ...@@ -457,4 +516,3 @@
!setname 0xfd05 幻界 !setname 0xfd05 幻界
!setname 0xfd06 渊界 !setname 0xfd06 渊界
!setname 0xfd07 源生 !setname 0xfd07 源生
!setname 0x6f38 Nagtrdoll(噩梦茧机)
\ 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