Commit f028cb49 authored by nanahira's avatar nanahira

Merge branch 'master' of git.mycard.moe:alstroemeria-silentlove/ygopro-222DIY-cards

parents 582a5c73 c322eeb0
No preview for this file type
...@@ -2,29 +2,62 @@ muxu=muxu or {} ...@@ -2,29 +2,62 @@ muxu=muxu or {}
local cm=muxu local cm=muxu
--scripts --scripts
function cm.AddSpsummonSelf(c,fcon,fop,limit,code) function cm.AddSpsummonSelf(c,fcon,fop,limit,code)
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)
if limit then e1:SetCountLimit(limit,code+EFFECT_COUNT_CODE_OATH) end if limit then e1:SetCountLimit(limit,code+EFFECT_COUNT_CODE_OATH) end
e1:SetCondition(cm.AddSpsummonSelfFcon(fcon)) e1:SetCondition(cm.AddSpsummonSelfFcon(fcon)) end
e1:SetOperation(cm.AddSpsummonSelfFop(fop)) e1:SetOperation(cm.AddSpsummonSelfFop(fop)) end
e1:SetValue(SUMMON_VALUE_SELF) e1:SetValue(SUMMON_VALUE_SELF)
c:RegisterEffect(e1) c:RegisterEffect(e1)
return e1 return e1
end end
function cm.AddSpsummonSelfFcon(fcon) function cm.AddSpsummonSelfFcon(fcon)
return return
function(e,c) function(e,c)
if c==nil then return true end if c==nil then return true end
return fcon(e,c) if fcon then return fcon(e,c) end
end return true
end
end end
function cm.AddSpsummonSelfFop(fop) function cm.AddSpsummonSelfFop(fop)
return return
function(e,tp,eg,ep,ev,re,r,rp,c) function(e,tp,eg,ep,ev,re,r,rp,c)
if fop then fop(e,tp,eg,ep,ev,re,r,rp,c) end if fop then fop(e,tp,eg,ep,ev,re,r,rp,c) end
end end
end end
-- --
function cm.CardSingleUpdateAttack(c,tc,val,reset)
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_SET_ATTACK)
if aux.GetValueType(val)=="int" then
e1:SetValue(val)
elseif aux.GetValueType(val)=="function" then
e1:SetValue(cm.CardSingleUpdateAttackVal(val))
end
if reset then e1:SetReset(reset) end
c:RegisterEffect(e1)
end
function cm.CardSingleUpdateDefense(c,tc,val,reset)
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_SET_DEFENSE)
if aux.GetValueType(val)=="int" then
e1:SetValue(val)
elseif aux.GetValueType(val)=="function" then
e1:SetValue(cm.CardSingleUpdateAttackVal(val))
end
if reset then e1:SetReset(reset) end
c:RegisterEffect(e1)
end
function cm.CardSingleUpdateAttackVal(val)
return
function(e,c) return val(e,c) end
end
\ No newline at end of file
...@@ -67,7 +67,7 @@ function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -67,7 +67,7 @@ function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_REMOVED,0,1,nil,tp) end if chk==0 then return Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_REMOVED,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_REMOVED) Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_REMOVED)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,0) e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3))
end end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp) function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
...@@ -78,6 +78,6 @@ Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) ...@@ -78,6 +78,6 @@ Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,cm.refilter,tp,LOCATION_DECK,0,1,1,nil,m1,tp) local g2=Duel.SelectMatchingCard(tp,cm.refilter,tp,LOCATION_DECK,0,1,1,nil,m1,tp)
local tc2=g2:GetFirst() local tc2=g2:GetFirst()
Duel.Remove(tc2,POS_FACEUP,REASON_EFFECT) Duel.Remove(tc2,POS_FACEUP,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -75,13 +75,13 @@ end ...@@ -75,13 +75,13 @@ end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(cm.refilter,tp,LOCATION_DECK,0,1,nil,tp) end if chk==0 then return Duel.IsExistingMatchingCard(cm.refilter,tp,LOCATION_DECK,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,0) e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3))
end end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp) function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,cm.refilter,tp,LOCATION_DECK,0,1,1,nil,tp) local g2=Duel.SelectMatchingCard(tp,cm.refilter,tp,LOCATION_DECK,0,1,1,nil,tp)
local tc2=g2:GetFirst() local tc2=g2:GetFirst()
Duel.Remove(tc2,POS_FACEUP,REASON_EFFECT) Duel.Remove(tc2,POS_FACEUP,REASON_EFFECT)
end end
function cm.con1(e,tp,eg,ep,ev,re,r,rp) function cm.con1(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -55,7 +55,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -55,7 +55,7 @@ function cm.sptg(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.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND+LOCATION_REMOVED,0,1,c,e,tp) end and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND+LOCATION_REMOVED,0,1,c,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_REMOVED) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_REMOVED)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,0) e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3))
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
......
...@@ -55,7 +55,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -55,7 +55,7 @@ function cm.sptg(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.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,c,e,tp) end and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,c,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,0) e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3))
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
......
...@@ -68,7 +68,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -68,7 +68,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and cm.filter1(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and cm.filter1(chkc,e,tp) end
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_MZONE,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)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,0) e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3))
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) then return end if not Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) then return end
......
...@@ -49,7 +49,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -49,7 +49,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,0) e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3))
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 c=e:GetHandler() local c=e:GetHandler()
......
...@@ -82,7 +82,7 @@ function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -82,7 +82,7 @@ function cm.atktg(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.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE,nil,1,tp,LOCATION_MZONE) Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE,nil,1,tp,LOCATION_MZONE)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,0) e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3))
end end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp) function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -90,7 +90,7 @@ function cm.rmtg1(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -90,7 +90,7 @@ function cm.rmtg1(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.IsAbleToRemove,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_GRAVE)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,0) e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3))
end end
function cm.rmop1(e,tp,eg,ep,ev,re,r,rp) function cm.rmop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -133,7 +133,7 @@ end ...@@ -133,7 +133,7 @@ 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 chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,0) e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,5))
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) then return end if not Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) then return end
......
...@@ -137,7 +137,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -137,7 +137,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_ONFIELD) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_ONFIELD) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_ONFIELD)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,0) e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3))
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 c=e:GetHandler() local c=e:GetHandler()
......
...@@ -104,7 +104,7 @@ function cm.dmcon2(e,tp,eg,ep,ev,re,r,rp) ...@@ -104,7 +104,7 @@ function cm.dmcon2(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.dmtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.dmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_MZONE,0,1,nil,0x341) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_MZONE,0,1,nil,0x341) end
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,0) e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,6))
end end
function cm.dmop(e,tp,eg,ep,ev,re,r,rp) function cm.dmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -127,7 +127,7 @@ end ...@@ -127,7 +127,7 @@ end
function cm.settg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and cm.setfilter(chkc,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and cm.setfilter(chkc,tp) end
if chk==0 then return Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_REMOVED,0,1,nil,tp) end if chk==0 then return Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_REMOVED,0,1,nil,tp) end
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,0) e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3))
end end
function cm.setop(e,tp,eg,ep,ev,re,r,rp) function cm.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -80,7 +80,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -80,7 +80,7 @@ function cm.sptg(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.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,0) e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3))
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
......
...@@ -163,7 +163,7 @@ end ...@@ -163,7 +163,7 @@ end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tdfilter1,tp,LOCATION_DECK,0,1,nil,tp) end if chk==0 then return Duel.IsExistingMatchingCard(cm.tdfilter1,tp,LOCATION_DECK,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,0) e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,6))
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsSetCard(0x341) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x341) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -109,7 +109,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -109,7 +109,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(cm.refilter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.refilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_GRAVE)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,0) e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3))
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
......
...@@ -104,7 +104,7 @@ function cm.xdop(e,tp,eg,ep,ev,re,r,rp) ...@@ -104,7 +104,7 @@ function cm.xdop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,tc:GetCode()+40000,RESET_EVENT+RESET_PHASE+PHASE_END,0,0) Duel.RegisterFlagEffect(tp,tc:GetCode()+40000,RESET_EVENT+RESET_PHASE+PHASE_END,0,0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,0,1,1,nil) local dg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.Destroy(dg,REASON_EFFECT) Duel.Destroy(dg,REASON_EFFECT)
end end
end end
end end
...@@ -130,7 +130,7 @@ function cm.xdop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -130,7 +130,7 @@ function cm.xdop2(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,tc:GetCode()+40000,RESET_EVENT+RESET_PHASE+PHASE_END,0,0) Duel.RegisterFlagEffect(tp,tc:GetCode()+40000,RESET_EVENT+RESET_PHASE+PHASE_END,0,0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,0,1,1,nil) local dg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.Destroy(dg,REASON_EFFECT) Duel.Destroy(dg,REASON_EFFECT)
end end
end end
end end
...@@ -202,7 +202,7 @@ function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -202,7 +202,7 @@ function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.refilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,3,nil) and Duel.IsPlayerCanDraw(tp,1) end if chk==0 then return Duel.IsExistingMatchingCard(cm.refilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,3,nil) and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,3,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,3,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,0) e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,4))
end end
function cm.drop(e,tp,eg,ep,ev,re,r,rp) function cm.drop(e,tp,eg,ep,ev,re,r,rp)
if not (Duel.IsExistingMatchingCard(cm.refilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,3,nil) and Duel.IsPlayerCanDraw(tp,1)) then return end if not (Duel.IsExistingMatchingCard(cm.refilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,3,nil) and Duel.IsPlayerCanDraw(tp,1)) then return end
......
...@@ -68,7 +68,7 @@ function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -68,7 +68,7 @@ function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(tp) and cm.refilter2(chkc) end if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(tp) and cm.refilter2(chkc) end
if chk==0 then return Duel.IsExistingMatchingCard(cm.refilter2,tp,LOCATION_ONFIELD,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.refilter2,tp,LOCATION_ONFIELD,0,1,nil) end
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,0) e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3))
end end
function cm.op(e,tp,eg,ep,ev,re,r,rp) function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -59,7 +59,7 @@ function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -59,7 +59,7 @@ function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and cm.refilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_REMOVED) and cm.refilter(chkc) end
if chk==0 then return Duel.IsExistingMatchingCard(cm.refilter,tp,LOCATION_REMOVED,0,1,nil)end if chk==0 then return Duel.IsExistingMatchingCard(cm.refilter,tp,LOCATION_REMOVED,0,1,nil)end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,LOCATION_REMOVED) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,LOCATION_REMOVED)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,0) e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3))
end end
function cm.op(e,tp,eg,ep,ev,re,r,rp) function cm.op(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(cm.refilter,tp,LOCATION_REMOVED,0,1,nil) then return end if not Duel.IsExistingMatchingCard(cm.refilter,tp,LOCATION_REMOVED,0,1,nil) then return end
......
...@@ -51,7 +51,7 @@ function cm.initial_effect(c) ...@@ -51,7 +51,7 @@ function cm.initial_effect(c)
end end
function cm.ffilter(c,fc,sub,mg,sg) function cm.ffilter(c,fc,sub,mg,sg)
return not sg or not (sg:IsExists(Card.IsFusionAttribute,1,c,c:GetFusionAttribute()) or sg:IsExists(Card.IsRace,1,c,c:GetRace())) return not sg or not (sg:IsExists(Card.IsFusionAttribute,1,c,c:GetFusionAttribute()) or sg:IsExists(Card.IsRace,1,c,c:GetRace()))
and c:IsFusionType(TYPE_EFFECT) and c:IsOnField() and c:IsFusionType(TYPE_EFFECT) and c:IsOnField() and c:IsControler(fc:GetControler())
end end
function cm.discon(e,tp,eg,ep,ev,re,r,rp) function cm.discon(e,tp,eg,ep,ev,re,r,rp)
......
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