Commit c08bef22 authored by Nemo Ma's avatar Nemo Ma

fix

parent 198942d4
...@@ -40,7 +40,7 @@ function cm.filter(c) ...@@ -40,7 +40,7 @@ function cm.filter(c)
return c:IsPreviousLocation(LOCATION_DECK+LOCATION_GRAVE) return c:IsPreviousLocation(LOCATION_DECK+LOCATION_GRAVE)
end end
function cm.adcon(e,tp,eg,ep,ev,re,r,rp) function cm.adcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.filter,1,nil) and not e:GetHandler():IsPublic() return eg:IsExists(cm.filter,1,nil)
end end
function cm.adop(e,tp,eg,ep,ev,re,r,rp) function cm.adop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -40,7 +40,7 @@ function cm.filter(c) ...@@ -40,7 +40,7 @@ function cm.filter(c)
return c:IsPreviousLocation(LOCATION_HAND+LOCATION_ONFIELD) return c:IsPreviousLocation(LOCATION_HAND+LOCATION_ONFIELD)
end end
function cm.adcon(e,tp,eg,ep,ev,re,r,rp) function cm.adcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.filter,1,nil) and not e:GetHandler():IsPublic() return eg:IsExists(cm.filter,1,nil)
end end
function cm.adop(e,tp,eg,ep,ev,re,r,rp) function cm.adop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -49,7 +49,7 @@ function cm.filter(c) ...@@ -49,7 +49,7 @@ function cm.filter(c)
return c:IsFaceup() return c:IsFaceup()
end end
function cm.adcon(e,tp,eg,ep,ev,re,r,rp) function cm.adcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.filter,1,nil) and not e:GetHandler():IsPublic() return eg:IsExists(cm.filter,1,nil)
end end
function cm.adop(e,tp,eg,ep,ev,re,r,rp) function cm.adop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -67,10 +67,10 @@ function cm.initial_effect(c) ...@@ -67,10 +67,10 @@ function cm.initial_effect(c)
c:RegisterEffect(e12) c:RegisterEffect(e12)
end end
function cm.adcon(e,tp,eg,ep,ev,re,r,rp) function cm.adcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsPublic() return true
end end
function cm.adcon2(e,tp,eg,ep,ev,re,r,rp) function cm.adcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsFacedown,1,nil) and not e:GetHandler():IsPublic() return eg:IsExists(Card.IsFacedown,1,nil)
end end
function cm.adop(e,tp,eg,ep,ev,re,r,rp) function cm.adop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -35,7 +35,7 @@ function cm.initial_effect(c) ...@@ -35,7 +35,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function cm.adcon(e,tp,eg,ep,ev,re,r,rp) function cm.adcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsPublic() return true
end end
function cm.adop(e,tp,eg,ep,ev,re,r,rp) function cm.adop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -35,7 +35,7 @@ function cm.initial_effect(c) ...@@ -35,7 +35,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function cm.adcon(e,tp,eg,ep,ev,re,r,rp) function cm.adcon(e,tp,eg,ep,ev,re,r,rp)
return (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and not e:GetHandler():IsPublic() return (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE))
end end
function cm.adop(e,tp,eg,ep,ev,re,r,rp) function cm.adop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -39,6 +39,11 @@ function cm.initial_effect(c) ...@@ -39,6 +39,11 @@ function cm.initial_effect(c)
e4:SetTarget(cm.drtg) e4:SetTarget(cm.drtg)
e4:SetOperation(cm.drop) e4:SetOperation(cm.drop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--act in hand
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
c:RegisterEffect(e5)
end end
function cm.actarget(e,te,tp) function cm.actarget(e,te,tp)
return te:GetHandler()==e:GetHandler() and te==e:GetLabelObject() return te:GetHandler()==e:GetHandler() and te==e:GetLabelObject()
...@@ -77,7 +82,21 @@ function cm.condition2(e,tp,eg,ep,ev,re,r,rp) ...@@ -77,7 +82,21 @@ function cm.condition2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_END and Duel.GetCurrentChain()==0 and Duel.GetTurnPlayer()==1-tp return Duel.GetCurrentPhase()==PHASE_END and Duel.GetCurrentChain()==0 and Duel.GetTurnPlayer()==1-tp
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckActivateEffect(false,false,false)~=nil and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end local c=e:GetHandler()
if chk==0 then
local res=true
if Card.SetCardData then
Duel.DisableActionCheck(true)
local dc=Duel.CreateToken(tp,m)
Duel.DisableActionCheck(false)
dc:SetCardData(CARDDATA_TYPE,TYPE_QUICKPLAY+TYPE_SPELL)
res=dc:GetActivateEffect():IsActivatable(tp)
dc:SetCardData(CARDDATA_TYPE,TYPE_SPELL)
else
res=(c:CheckActivateEffect(false,false,false)~=nil)
end
return res and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
end
end end
function cm.filter(c) function cm.filter(c)
return c:GetTurnID()==Duel.GetTurnCount() and not c:IsReason(REASON_RETURN) and c:IsType(TYPE_MONSTER) return c:GetTurnID()==Duel.GetTurnCount() and not c:IsReason(REASON_RETURN) and c:IsType(TYPE_MONSTER)
......
...@@ -38,7 +38,7 @@ function cm.matfilter(c) ...@@ -38,7 +38,7 @@ function cm.matfilter(c)
end end
function cm.costcon(e) function cm.costcon(e)
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
if Duel.GetFieldGroupCount(tp,LOCATION_GRAVE,0)==0 then return false end if Duel.GetFieldGroupCount(tp,0,LOCATION_GRAVE)==0 then return false end
return true return true
end end
function cm.costchk(e,te_or_c,tp) function cm.costchk(e,te_or_c,tp)
......
...@@ -72,7 +72,7 @@ end ...@@ -72,7 +72,7 @@ end
function cm.immval(e,te_or_c) function cm.immval(e,te_or_c)
local res=aux.GetValueType(te_or_c)~="Effect" or (te_or_c:IsActivated() and te_or_c:GetOwner()~=e:GetHandler()) local res=aux.GetValueType(te_or_c)~="Effect" or (te_or_c:IsActivated() and te_or_c:GetOwner()~=e:GetHandler())
if res then if res then
if te_or_c:IsActivated() then Duel.Hint(HINT_CARD,0,m) end if aux.GetValueType(te_or_c)=="Effect" then Duel.Hint(HINT_CARD,0,m) end
local c=e:GetHandler() local c=e:GetHandler()
local flag=c:GetFlagEffectLabel(m) local flag=c:GetFlagEffectLabel(m)
if flag then if flag then
......
...@@ -32,10 +32,10 @@ function cm.retfilter(c) ...@@ -32,10 +32,10 @@ function cm.retfilter(c)
return Duel.GetLocationCount(p,LOCATION_MZONE)>0 return Duel.GetLocationCount(p,LOCATION_MZONE)>0
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and cm.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and cm.tffilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_REMOVED,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(cm.tffilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_REMOVED,0,1,1,nil) local g=Duel.SelectTarget(tp,cm.tffilter,tp,LOCATION_REMOVED,0,1,1,nil)
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
......
...@@ -26,6 +26,9 @@ function cm.initial_effect(c) ...@@ -26,6 +26,9 @@ function cm.initial_effect(c)
e2:SetOperation(cm.spop) e2:SetOperation(cm.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
elements={{"tama_elements",{{TAMA_ELEMENT_WATER,1},{TAMA_ELEMENT_LIFE,2}}}}
cm[c]=elements
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) 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 aux.NegateEffectMonsterFilter(chkc) end if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and aux.NegateEffectMonsterFilter(chkc) end
...@@ -42,7 +45,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,7 +45,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
else else
local hb=true local hb=true
local tc1=nil local tc1=nil
if Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 and Duel.SelectYesNo(1-tp,aux.Stringid(m,1)) then if Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 and not Duel.SelectYesNo(1-tp,aux.Stringid(m,1)) then
Duel.DiscardHand(1-tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD) Duel.DiscardHand(1-tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD)
tc1=Duel.GetOperatedGroup() tc1=Duel.GetOperatedGroup()
hb=false hb=false
......
...@@ -34,7 +34,7 @@ function cm.spcon(e,c) ...@@ -34,7 +34,7 @@ function cm.spcon(e,c)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil) return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c) function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_GRAVE,0,nil)
Duel.SendtoDeck(g,nil,2,REASON_COST) Duel.SendtoDeck(g,nil,2,REASON_COST)
end end
function cm.descon(e,tp,eg,ep,ev,re,r,rp) function cm.descon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -33,7 +33,6 @@ function cm.initial_effect(c) ...@@ -33,7 +33,6 @@ function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_CHAIN_SOLVED) e1:SetCode(EVENT_CHAIN_SOLVED)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(cm.accon) e1:SetCondition(cm.accon)
e1:SetOperation(cm.acop) e1:SetOperation(cm.acop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
......
...@@ -76,7 +76,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -76,7 +76,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
local wg=Duel.GetMatchingGroup(s.copfilter,tp,LOCATION_MZONE,LOCATION_MZONE,c) local wg=Duel.GetMatchingGroup(s.copfilter,tp,LOCATION_MZONE,LOCATION_MZONE,c)
for wbc in aux.Next(wg) do for wbc in aux.Next(wg) do
if c:IsFaceup() then if c:IsFaceup() then
local cid=c:CopyEffect(wbc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD_DISABLE,1) local cid=c:CopyEffect(wbc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE,1)
wbc:RegisterFlagEffect(id,0,0,0,cid) wbc:RegisterFlagEffect(id,0,0,0,cid)
end end
end end
......
...@@ -27,14 +27,14 @@ function s.initial_effect(c) ...@@ -27,14 +27,14 @@ function s.initial_effect(c)
e3:SetCondition(s.imcon) e3:SetCondition(s.imcon)
e3:SetValue(s.efilter) e3:SetValue(s.efilter)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e33=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e33:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e33:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_IGNORE_IMMUNE)
e33:SetCode(EFFECT_CANNOT_ACTIVATE) e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e33:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e33:SetTargetRange(0,1) e2:SetTargetRange(0,1)
e33:SetValue(s.aclimit) e2:SetValue(s.aclimit)
c:RegisterEffect(e33) c:RegisterEffect(e2)
--攻击力上升 --攻击力上升
local e6=Effect.CreateEffect(c) local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(id,7)) e6:SetDescription(aux.Stringid(id,7))
...@@ -85,4 +85,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -85,4 +85,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp)
end end
function s.aclimit(e,re,tp) function s.aclimit(e,re,tp)
return re:GetActivateLocation()==LOCATION_GRAVE return re:GetActivateLocation()==LOCATION_GRAVE
end end
\ No newline at end of file
......
...@@ -9,7 +9,8 @@ function s.initial_effect(c) ...@@ -9,7 +9,8 @@ function s.initial_effect(c)
e3:SetDescription(aux.Stringid(id,0)) e3:SetDescription(aux.Stringid(id,0))
e3:SetCategory(CATEGORY_REMOVE) e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCountLimit(1,id) e3:SetCountLimit(1,id)
e3:SetCondition(s.remcon) e3:SetCondition(s.remcon)
e3:SetTarget(s.remtg) e3:SetTarget(s.remtg)
...@@ -19,6 +20,7 @@ function s.initial_effect(c) ...@@ -19,6 +20,7 @@ function s.initial_effect(c)
e6:SetDescription(aux.Stringid(id,1)) e6:SetDescription(aux.Stringid(id,1))
e6:SetCategory(CATEGORY_REMOVE) e6:SetCategory(CATEGORY_REMOVE)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e6:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e6:SetCode(EVENT_SPSUMMON_SUCCESS) e6:SetCode(EVENT_SPSUMMON_SUCCESS)
e6:SetCountLimit(1,id) e6:SetCountLimit(1,id)
e6:SetCondition(s.remcon) e6:SetCondition(s.remcon)
...@@ -30,6 +32,7 @@ function s.initial_effect(c) ...@@ -30,6 +32,7 @@ function s.initial_effect(c)
e5:SetDescription(aux.Stringid(id,2)) e5:SetDescription(aux.Stringid(id,2))
e5:SetCategory(CATEGORY_REMOVE) e5:SetCategory(CATEGORY_REMOVE)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e5:SetCode(EVENT_SPSUMMON_SUCCESS) e5:SetCode(EVENT_SPSUMMON_SUCCESS)
e5:SetCountLimit(1,id) e5:SetCountLimit(1,id)
e5:SetCondition(s.remcon) e5:SetCondition(s.remcon)
...@@ -45,8 +48,8 @@ function s.initial_effect(c) ...@@ -45,8 +48,8 @@ function s.initial_effect(c)
e33:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e33:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e33:SetCountLimit(1,{id,1}) e33:SetCountLimit(1,{id,1})
e33:SetCondition(s.sccon) e33:SetCondition(s.sccon)
e33:SetTarget(s.sctg) e33:SetTarget(s.sptg)
e33:SetOperation(s.scop) e33:SetOperation(s.spop)
c:RegisterEffect(e33) c:RegisterEffect(e33)
end end
--Remove --Remove
...@@ -97,18 +100,17 @@ function s.filter(c,e,tp) ...@@ -97,18 +100,17 @@ function s.filter(c,e,tp)
return c:IsSetCard(0x20ab) and c:IsLevelBelow(9) and c:IsType(TYPE_SYNCHRO) return c:IsSetCard(0x20ab) and c:IsLevelBelow(9) and c:IsType(TYPE_SYNCHRO)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false)
end end
function s.sctg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
local pg=aux.GetMustBeMaterialGroup(tp,Group.CreateGroup(),tp,nil,nil,REASON_SYNCHRO) and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,nil,e,tp) end
return #pg<=0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA+LOCATION_GRAVE)
end end
function s.scop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local pg=aux.GetMustBeMaterialGroup(tp,Group.CreateGroup(),tp,nil,nil,REASON_SYNCHRO) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if #pg>0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,1,nil,e,tp)
if tc and Duel.SpecialSummon(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)>0 then local tc=g:GetFirst()
tc:CompleteProcedure() if tc then
Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP)
end end
end end
...@@ -16,13 +16,13 @@ function s.initial_effect(c) ...@@ -16,13 +16,13 @@ function s.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--特殊召唤 --特殊召唤
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0)) e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE) e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SUMMON_SUCCESS) e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetTarget(s.sptg1) e3:SetTarget(s.sptg1)
e3:SetCountLimit(1,id) e3:SetCountLimit(1,{id,1})
e3:SetOperation(s.spop1) e3:SetOperation(s.spop1)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=e3:Clone() local e4=e3:Clone()
......
...@@ -41,7 +41,7 @@ function s.initial_effect(c) ...@@ -41,7 +41,7 @@ function s.initial_effect(c)
end end
s.listed_series={0x20ab} s.listed_series={0x20ab}
function s.filter(c) function s.filter(c)
return c:IsFaceup() and c:HasLevel() and c:IsSetCard(0x20ab) return c:IsFaceup() and c:IsSetCard(0x20ab)
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end
......
...@@ -50,11 +50,11 @@ function s.setfilter(c) ...@@ -50,11 +50,11 @@ function s.setfilter(c)
return c:IsFaceup() and c:IsSetCard(0x20ab) and c:IsType(TYPE_SYNCHRO) return c:IsFaceup() and c:IsSetCard(0x20ab) and c:IsType(TYPE_SYNCHRO)
end end
function s.setcon(e,tp,eg,ep,ev,re,r,rp) function s.setcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_END and Duel.IsTurnPlayer(tp) return Duel.GetCurrentPhase()==PHASE_END and Duel.GetTurnPlayer(tp)
and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function s.costfilter(c) function s.costfilter(c)
return c:IsMonster() and c:IsRace(RACE_WARRIOR) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) return c:IsRace(RACE_WARRIOR) and c:IsAbleToRemoveAsCost()
end end
function s.setcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.setcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_GRAVE,0,1,nil) end
......
...@@ -52,7 +52,7 @@ function c33200951.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -52,7 +52,7 @@ function c33200951.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local mg=Duel.GetRitualMaterial(tp):Filter(c33200951.refilter,nil) local mg=Duel.GetRitualMaterial(tp):Filter(c33200951.refilter,nil)
local mg2=Duel.GetMatchingGroup(Card.IsReleasable,tp,LOCATION_PZONE,0,e:GetHandler()) local mg2=Duel.GetMatchingGroup(Card.IsReleasable,tp,LOCATION_PZONE,0,e:GetHandler())
mg:Merge(mg2) mg:Merge(mg2)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 and mg:GetCount()>0 end if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 and mg:GetCount()>0 end
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 c33200951.spop(e,tp,eg,ep,ev,re,r,rp) function c33200951.spop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -55,7 +55,7 @@ function c33200952.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -55,7 +55,7 @@ function c33200952.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local mg=Duel.GetRitualMaterial(tp):Filter(c33200951.refilter,nil) local mg=Duel.GetRitualMaterial(tp):Filter(c33200951.refilter,nil)
local mg2=Duel.GetMatchingGroup(Card.IsReleasable,tp,LOCATION_PZONE,0,e:GetHandler()) local mg2=Duel.GetMatchingGroup(Card.IsReleasable,tp,LOCATION_PZONE,0,e:GetHandler())
mg:Merge(mg2) mg:Merge(mg2)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 and mg:GetCount()>0 end if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 and mg:GetCount()>0 end
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 c33200952.spop(e,tp,eg,ep,ev,re,r,rp) function c33200952.spop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -55,7 +55,7 @@ function c33200953.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -55,7 +55,7 @@ function c33200953.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local mg=Duel.GetRitualMaterial(tp):Filter(c33200951.refilter,nil) local mg=Duel.GetRitualMaterial(tp):Filter(c33200951.refilter,nil)
local mg2=Duel.GetMatchingGroup(Card.IsReleasable,tp,LOCATION_PZONE,0,e:GetHandler()) local mg2=Duel.GetMatchingGroup(Card.IsReleasable,tp,LOCATION_PZONE,0,e:GetHandler())
mg:Merge(mg2) mg:Merge(mg2)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 and mg:GetCount()>0 end if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 and mg:GetCount()>0 end
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 c33200953.spop(e,tp,eg,ep,ev,re,r,rp) function c33200953.spop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -55,7 +55,7 @@ function c33200954.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -55,7 +55,7 @@ function c33200954.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local mg=Duel.GetRitualMaterial(tp):Filter(c33200951.refilter,nil) local mg=Duel.GetRitualMaterial(tp):Filter(c33200951.refilter,nil)
local mg2=Duel.GetMatchingGroup(Card.IsReleasable,tp,LOCATION_PZONE,0,e:GetHandler()) local mg2=Duel.GetMatchingGroup(Card.IsReleasable,tp,LOCATION_PZONE,0,e:GetHandler())
mg:Merge(mg2) mg:Merge(mg2)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 and mg:GetCount()>0 end if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 and mg:GetCount()>0 end
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 c33200954.spop(e,tp,eg,ep,ev,re,r,rp) function c33200954.spop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -55,7 +55,7 @@ function c33200955.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -55,7 +55,7 @@ function c33200955.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local mg=Duel.GetRitualMaterial(tp):Filter(c33200951.refilter,nil) local mg=Duel.GetRitualMaterial(tp):Filter(c33200951.refilter,nil)
local mg2=Duel.GetMatchingGroup(Card.IsReleasable,tp,LOCATION_PZONE,0,e:GetHandler()) local mg2=Duel.GetMatchingGroup(Card.IsReleasable,tp,LOCATION_PZONE,0,e:GetHandler())
mg:Merge(mg2) mg:Merge(mg2)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 and mg:GetCount()>0 end if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 and mg:GetCount()>0 end
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 c33200955.spop(e,tp,eg,ep,ev,re,r,rp) function c33200955.spop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -54,7 +54,7 @@ function c33200956.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -54,7 +54,7 @@ function c33200956.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local mg=Duel.GetRitualMaterial(tp):Filter(c33200951.refilter,nil) local mg=Duel.GetRitualMaterial(tp):Filter(c33200951.refilter,nil)
local mg2=Duel.GetMatchingGroup(Card.IsReleasable,tp,LOCATION_PZONE,0,e:GetHandler()) local mg2=Duel.GetMatchingGroup(Card.IsReleasable,tp,LOCATION_PZONE,0,e:GetHandler())
mg:Merge(mg2) mg:Merge(mg2)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 and mg:GetCount()>0 end if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 and mg:GetCount()>0 end
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 c33200956.spop(e,tp,eg,ep,ev,re,r,rp) function c33200956.spop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -88,7 +88,7 @@ function c33200959.spop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -88,7 +88,7 @@ function c33200959.spop2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(tp,5) local g=Duel.GetDecktopGroup(tp,5)
local ct=g:GetCount() local ct=g:GetCount()
local atk=c:GetAttack() local atk=c:GetAttack()
if ct>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and g:FilterCount(c33200959.dspfilter,nil,e,tp,atk)>0 if ct>0 and g:FilterCount(c33200959.dspfilter,nil,e,tp,atk)>0
and Duel.SelectYesNo(tp,aux.Stringid(33200959,2)) then and Duel.SelectYesNo(tp,aux.Stringid(33200959,2)) then
Duel.DisableShuffleCheck() Duel.DisableShuffleCheck()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......
...@@ -85,23 +85,20 @@ function cm.top(e,tp) ...@@ -85,23 +85,20 @@ function cm.top(e,tp)
local g=Duel.GetOperatedGroup() local g=Duel.GetOperatedGroup()
local sg=g:Filter(Card.IsLocation,nil,LOCATION_GRAVE) local sg=g:Filter(Card.IsLocation,nil,LOCATION_GRAVE)
Duel.BreakEffect() Duel.BreakEffect()
if sg:GetClassCount(Card.GetCode)==#sg then if sg:GetClassCount(Card.GetCode)==#sg and sg:IsExists(cm.rfilter2,1,nil) then
local rct=sg:FilterCount(cm.rfilter2,nil) local rg=sg:Filter(cm.rfilter2,nil)
local num=Duel.GetMatchingGroupCount(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,nil)
if rct==0 or num==0 then return end
if rct>num then rct=num end
if not Duel.SelectYesNo(tp,aux.Stringid(9910024,0)) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg1=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,rct,nil) local sg1=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,#rg,nil)
if sg1:GetCount()>0 then if sg1:GetCount()>0 then
Duel.SendtoHand(sg1,nil,REASON_EFFECT) Duel.SendtoHand(sg1,nil,REASON_EFFECT)
end end
else else
local num=Duel.GetMatchingGroupCount(Card.IsAbleToGrave,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil) local num=Duel.GetMatchingGroupCount(Card.IsAbleToGrave,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
if num<1 then return end if num<1 then return end
if num>#sg then num=#sg end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg1=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_ONFIELD+LOCATION_HAND,0,num,num,nil) local ct=math.min(#sg,num)
local sg1=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_ONFIELD+LOCATION_HAND,0,ct,ct,nil)
if sg1:GetCount()>0 then if sg1:GetCount()>0 then
Duel.SendtoGrave(sg1,REASON_EFFECT) Duel.SendtoGrave(sg1,REASON_EFFECT)
end end
......
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