Commit bb2db5d6 authored by Nemo Ma's avatar Nemo Ma

fix

parent 7c20916c
No preview for this file type
...@@ -153,12 +153,21 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -153,12 +153,21 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.retfilter2(c,p,loc) function cm.retfilter2(c,p,loc)
if (c:IsPreviousLocation(LOCATION_SZONE) and c:GetPreviousTypeOnField()&TYPE_EQUIP>0) or c:IsPreviousLocation(LOCATION_FZONE) then return false end
return c:IsPreviousControler(p) and c:IsPreviousLocation(loc) return c:IsPreviousControler(p) and c:IsPreviousLocation(loc)
end end
function cm.fselect2(g,pft) function cm.fselect2(g,pft)
return g:FilterCount(Card.IsPreviousLocation,nil,LOCATION_PZONE)<=pft return g:FilterCount(Card.IsPreviousLocation,nil,LOCATION_PZONE)<=pft
end end
function cm.returntofield(tc) function cm.returntofield(tc)
if tc:IsPreviousLocation(LOCATION_FZONE) then
local p=tc:GetPreviousControler()
local gc=Duel.GetFieldCard(p,LOCATION_FZONE,0)
if gc then
Duel.SendtoGrave(gc,REASON_RULE)
Duel.BreakEffect()
end
end
if tc:GetPreviousTypeOnField()&TYPE_EQUIP>0 then if tc:GetPreviousTypeOnField()&TYPE_EQUIP>0 then
Duel.SendtoGrave(tc,REASON_RULE+REASON_RETURN) Duel.SendtoGrave(tc,REASON_RULE+REASON_RETURN)
else else
......
...@@ -157,12 +157,21 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -157,12 +157,21 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.retfilter2(c,p,loc) function cm.retfilter2(c,p,loc)
if (c:IsPreviousLocation(LOCATION_SZONE) and c:GetPreviousTypeOnField()&TYPE_EQUIP>0) or c:IsPreviousLocation(LOCATION_FZONE) then return false end
return c:IsPreviousControler(p) and c:IsPreviousLocation(loc) return c:IsPreviousControler(p) and c:IsPreviousLocation(loc)
end end
function cm.fselect2(g,pft) function cm.fselect2(g,pft)
return g:FilterCount(Card.IsPreviousLocation,nil,LOCATION_PZONE)<=pft return g:FilterCount(Card.IsPreviousLocation,nil,LOCATION_PZONE)<=pft
end end
function cm.returntofield(tc) function cm.returntofield(tc)
if tc:IsPreviousLocation(LOCATION_FZONE) then
local p=tc:GetPreviousControler()
local gc=Duel.GetFieldCard(p,LOCATION_FZONE,0)
if gc then
Duel.SendtoGrave(gc,REASON_RULE)
Duel.BreakEffect()
end
end
if tc:GetPreviousTypeOnField()&TYPE_EQUIP>0 then if tc:GetPreviousTypeOnField()&TYPE_EQUIP>0 then
Duel.SendtoGrave(tc,REASON_RULE+REASON_RETURN) Duel.SendtoGrave(tc,REASON_RULE+REASON_RETURN)
else else
......
...@@ -213,12 +213,21 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -213,12 +213,21 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.retfilter2(c,p,loc) function cm.retfilter2(c,p,loc)
if (c:IsPreviousLocation(LOCATION_SZONE) and c:GetPreviousTypeOnField()&TYPE_EQUIP>0) or c:IsPreviousLocation(LOCATION_FZONE) then return false end
return c:IsPreviousControler(p) and c:IsPreviousLocation(loc) return c:IsPreviousControler(p) and c:IsPreviousLocation(loc)
end end
function cm.fselect2(g,pft) function cm.fselect2(g,pft)
return g:FilterCount(Card.IsPreviousLocation,nil,LOCATION_PZONE)<=pft return g:FilterCount(Card.IsPreviousLocation,nil,LOCATION_PZONE)<=pft
end end
function cm.returntofield(tc) function cm.returntofield(tc)
if tc:IsPreviousLocation(LOCATION_FZONE) then
local p=tc:GetPreviousControler()
local gc=Duel.GetFieldCard(p,LOCATION_FZONE,0)
if gc then
Duel.SendtoGrave(gc,REASON_RULE)
Duel.BreakEffect()
end
end
if tc:GetPreviousTypeOnField()&TYPE_EQUIP>0 then if tc:GetPreviousTypeOnField()&TYPE_EQUIP>0 then
Duel.SendtoGrave(tc,REASON_RULE+REASON_RETURN) Duel.SendtoGrave(tc,REASON_RULE+REASON_RETURN)
else else
......
...@@ -191,12 +191,21 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -191,12 +191,21 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.retfilter2(c,p,loc) function cm.retfilter2(c,p,loc)
if (c:IsPreviousLocation(LOCATION_SZONE) and c:GetPreviousTypeOnField()&TYPE_EQUIP>0) or c:IsPreviousLocation(LOCATION_FZONE) then return false end
return c:IsPreviousControler(p) and c:IsPreviousLocation(loc) return c:IsPreviousControler(p) and c:IsPreviousLocation(loc)
end end
function cm.fselect2(g,pft) function cm.fselect2(g,pft)
return g:FilterCount(Card.IsPreviousLocation,nil,LOCATION_PZONE)<=pft return g:FilterCount(Card.IsPreviousLocation,nil,LOCATION_PZONE)<=pft
end end
function cm.returntofield(tc) function cm.returntofield(tc)
if tc:IsPreviousLocation(LOCATION_FZONE) then
local p=tc:GetPreviousControler()
local gc=Duel.GetFieldCard(p,LOCATION_FZONE,0)
if gc then
Duel.SendtoGrave(gc,REASON_RULE)
Duel.BreakEffect()
end
end
if tc:GetPreviousTypeOnField()&TYPE_EQUIP>0 then if tc:GetPreviousTypeOnField()&TYPE_EQUIP>0 then
Duel.SendtoGrave(tc,REASON_RULE+REASON_RETURN) Duel.SendtoGrave(tc,REASON_RULE+REASON_RETURN)
else else
......
...@@ -212,12 +212,21 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -212,12 +212,21 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.retfilter2(c,p,loc) function cm.retfilter2(c,p,loc)
if (c:IsPreviousLocation(LOCATION_SZONE) and c:GetPreviousTypeOnField()&TYPE_EQUIP>0) or c:IsPreviousLocation(LOCATION_FZONE) then return false end
return c:IsPreviousControler(p) and c:IsPreviousLocation(loc) return c:IsPreviousControler(p) and c:IsPreviousLocation(loc)
end end
function cm.fselect2(g,pft) function cm.fselect2(g,pft)
return g:FilterCount(Card.IsPreviousLocation,nil,LOCATION_PZONE)<=pft return g:FilterCount(Card.IsPreviousLocation,nil,LOCATION_PZONE)<=pft
end end
function cm.returntofield(tc) function cm.returntofield(tc)
if tc:IsPreviousLocation(LOCATION_FZONE) then
local p=tc:GetPreviousControler()
local gc=Duel.GetFieldCard(p,LOCATION_FZONE,0)
if gc then
Duel.SendtoGrave(gc,REASON_RULE)
Duel.BreakEffect()
end
end
if tc:GetPreviousTypeOnField()&TYPE_EQUIP>0 then if tc:GetPreviousTypeOnField()&TYPE_EQUIP>0 then
Duel.SendtoGrave(tc,REASON_RULE+REASON_RETURN) Duel.SendtoGrave(tc,REASON_RULE+REASON_RETURN)
else else
......
...@@ -241,12 +241,21 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -241,12 +241,21 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.retfilter2(c,p,loc) function cm.retfilter2(c,p,loc)
if (c:IsPreviousLocation(LOCATION_SZONE) and c:GetPreviousTypeOnField()&TYPE_EQUIP>0) or c:IsPreviousLocation(LOCATION_FZONE) then return false end
return c:IsPreviousControler(p) and c:IsPreviousLocation(loc) return c:IsPreviousControler(p) and c:IsPreviousLocation(loc)
end end
function cm.fselect2(g,pft) function cm.fselect2(g,pft)
return g:FilterCount(Card.IsPreviousLocation,nil,LOCATION_PZONE)<=pft return g:FilterCount(Card.IsPreviousLocation,nil,LOCATION_PZONE)<=pft
end end
function cm.returntofield(tc) function cm.returntofield(tc)
if tc:IsPreviousLocation(LOCATION_FZONE) then
local p=tc:GetPreviousControler()
local gc=Duel.GetFieldCard(p,LOCATION_FZONE,0)
if gc then
Duel.SendtoGrave(gc,REASON_RULE)
Duel.BreakEffect()
end
end
if tc:GetPreviousTypeOnField()&TYPE_EQUIP>0 then if tc:GetPreviousTypeOnField()&TYPE_EQUIP>0 then
Duel.SendtoGrave(tc,REASON_RULE+REASON_RETURN) Duel.SendtoGrave(tc,REASON_RULE+REASON_RETURN)
else else
......
...@@ -70,7 +70,7 @@ function cm.fselect(g,c,e,tp) ...@@ -70,7 +70,7 @@ function cm.fselect(g,c,e,tp)
return true,zone1,zone2 return true,zone1,zone2
end end
function cm.tgfilter(c,e) function cm.tgfilter(c,e)
return c:IsCanBeEffectTarget(e) and not c:IsLocation(LOCATION_FZONE) return c:IsCanBeEffectTarget(e) --and not c:IsLocation(LOCATION_FZONE)
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -317,7 +317,7 @@ function cm.synop(e,tp,eg,ep,ev,re,r,rp,syncard,f,min,max) ...@@ -317,7 +317,7 @@ function cm.synop(e,tp,eg,ep,ev,re,r,rp,syncard,f,min,max)
oc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid) oc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid)
end end
og:KeepAlive() og:KeepAlive()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(e:GetOwner())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_END)
...@@ -376,7 +376,8 @@ function cm.retop(e,tp,eg,ep,ev,re,r,rp) ...@@ -376,7 +376,8 @@ function cm.retop(e,tp,eg,ep,ev,re,r,rp)
end end
for tc in aux.Next(sg) do for tc in aux.Next(sg) do
if tc:GetPreviousLocation()&LOCATION_ONFIELD>0 then if tc:GetPreviousLocation()&LOCATION_ONFIELD>0 then
Duel.MoveToField(tc,tp,tc:GetPreviousControler(),tc:GetPreviousLocation(),tc:GetPreviousPosition(),true) Duel.ReturnToField(tc)
--Duel.MoveToField(tc,tp,tc:GetPreviousControler(),tc:GetPreviousLocation(),tc:GetPreviousPosition(),true)
elseif tc:IsPreviousLocation(LOCATION_HAND) then elseif tc:IsPreviousLocation(LOCATION_HAND) then
Duel.SendtoHand(tc,tc:GetPreviousControler(),REASON_EFFECT) Duel.SendtoHand(tc,tc:GetPreviousControler(),REASON_EFFECT)
end end
......
...@@ -11,7 +11,10 @@ function cm.initial_effect(c) ...@@ -11,7 +11,10 @@ function cm.initial_effect(c)
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 c=e:GetHandler() local c=e:GetHandler()
local _GetTurnCount=Duel.GetTurnCount
Duel.GetTurnCount=function() if Duel.GetTurnPlayer()==tp then return _GetTurnCount()+2 else return _GetTurnCount()+1 end end
local eset={Duel.IsPlayerAffectedByEffect(tp,EFFECT_SKIP_TURN)} local eset={Duel.IsPlayerAffectedByEffect(tp,EFFECT_SKIP_TURN)}
Duel.GetTurnCount=_GetTurnCount
if #eset>0 then if #eset>0 then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
...@@ -40,7 +43,9 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -40,7 +43,9 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end end
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
Duel.GetTurnCount=function() if Duel.GetTurnPlayer()==1-tp then return _GetTurnCount()+2 else return _GetTurnCount()+1 end end
local eset2={Duel.IsPlayerAffectedByEffect(1-tp,EFFECT_SKIP_TURN)} local eset2={Duel.IsPlayerAffectedByEffect(1-tp,EFFECT_SKIP_TURN)}
Duel.GetTurnCount=_GetTurnCount
if #eset2>0 then if #eset2>0 then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......
...@@ -85,8 +85,8 @@ end ...@@ -85,8 +85,8 @@ end
function c31000013.distg(e,c) function c31000013.distg(e,c)
local tp=e:GetHandler():GetControler() local tp=e:GetHandler():GetControler()
return Duel.IsExistingMatchingCard(c31000013.tkfilter,tp,nil,LOCATION_MZONE,1,nil,c:GetLevel()) return (c:IsType(TYPE_EFFECT) or c:GetOriginalType()&TYPE_EFFECT~=0) and
and (c:IsType(TYPE_EFFECT) or c:GetOriginalType()&TYPE_EFFECT~=0) and not c:IsDisabled() Duel.IsExistingMatchingCard(c31000013.tkfilter,tp,nil,LOCATION_MZONE,1,nil,c:GetLevel())
end end
function c31000013.target(e,tp,eg,ep,ev,re,r,rp,chk) function c31000013.target(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -112,12 +112,8 @@ function c31000013.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -112,12 +112,8 @@ function c31000013.operation(e,tp,eg,ep,ev,re,r,rp)
local sg=g1:Select(tp,1,1,nil) local sg=g1:Select(tp,1,1,nil)
local tc=sg:GetFirst() local tc=sg:GetFirst()
if tc and Duel.IsPlayerCanSendtoHand(tp,tc) then if tc and Duel.IsPlayerCanSendtoHand(tp,tc) then
if tc:IsLocation(LOCATION_DECK) then Duel.SendtoHand(sg,tp,REASON_EFFECT)
Duel.SendtoHand(sg,tp,REASON_EFFECT) Duel.ConfirmCards(1-tp,sg)
Duel.ConfirmCards(1-tp,sg)
else
Duel.SendtoHand(sg,tp,REASON_EFFECT)
end
end end
c31000013.cost(e,tp,eg,ep,ev,re,r,rp) c31000013.cost(e,tp,eg,ep,ev,re,r,rp)
else else
......
...@@ -72,12 +72,12 @@ function c31000014.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -72,12 +72,12 @@ function c31000014.op(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(EFFECT_UPDATE_DEFENSE) e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(vl2) e2:SetValue(vl2)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
if (preatk~=0 or predef~=0) and tc:IsAttack(0) and tc:IsDefense(0) if (preatk~=0 or predef~=0) and tc:IsAttack(0) and tc:IsDefense(0) then
then dg:AddCard(tc) end if Duel.Destroy(tc,REASON_EFFECT)>0 then
if Duel.Destroy(dg,REASON_EFFECT) then for i=1,ev do
for i=1,ev do local tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_PLAYER)
local tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_PLAYER) if tgp~=tp then Duel.NegateEffect(i) end
if tgp~=tp then Duel.NegateEffect(i) end end
end end
end end
end end
......
...@@ -38,7 +38,7 @@ end ...@@ -38,7 +38,7 @@ end
function c31000015.xyzop(e,tp,chk) function c31000015.xyzop(e,tp,chk)
local filter=function(c) local filter=function(c)
return c:IsCode(31000013) return c:IsCode(31000013) and c:IsFaceup()
end end
if chk==0 then return Duel.IsExistingMatchingCard(filter,tp,LOCATION_ONFIELD,nil,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(filter,tp,LOCATION_ONFIELD,nil,1,nil) end
end end
......
...@@ -23,7 +23,7 @@ function c33200709.initial_effect(c) ...@@ -23,7 +23,7 @@ function c33200709.initial_effect(c)
--tohand --tohand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33200709,1)) e2:SetDescription(aux.Stringid(33200709,1))
e2:SetCategory(CATEGORY_TOHAND) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE) e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
......
...@@ -22,9 +22,8 @@ function c33200730.initial_effect(c) ...@@ -22,9 +22,8 @@ function c33200730.initial_effect(c)
e2:SetDescription(aux.Stringid(33200730,1)) e2:SetDescription(aux.Stringid(33200730,1))
e2:SetCategory(CATEGORY_COUNTER) e2:SetCategory(CATEGORY_COUNTER)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_TO_GRAVE) e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,33200731) e2:SetCountLimit(1,33200731)
e2:SetCondition(c33200730.ccon) e2:SetCondition(c33200730.ccon)
e2:SetTarget(c33200730.ctg) e2:SetTarget(c33200730.ctg)
...@@ -83,7 +82,7 @@ end ...@@ -83,7 +82,7 @@ end
--e2 --e2
function c33200730.ccon(e,tp,eg,ep,ev,re,r,rp) function c33200730.ccon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) return e:GetHandler():IsPreviousLocation(LOCATION_MZONE) and e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end end
function c33200730.filter(c) function c33200730.filter(c)
return c:IsFaceup() and c:IsCanAddCounter(0x32a,2) return c:IsFaceup() and c:IsCanAddCounter(0x32a,2)
......
...@@ -20,9 +20,8 @@ function c33200732.initial_effect(c) ...@@ -20,9 +20,8 @@ function c33200732.initial_effect(c)
e2:SetDescription(aux.Stringid(33200732,1)) e2:SetDescription(aux.Stringid(33200732,1))
e2:SetCategory(CATEGORY_COUNTER) e2:SetCategory(CATEGORY_COUNTER)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_TO_GRAVE) e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,33200731) e2:SetCountLimit(1,33200731)
e2:SetCondition(c33200732.ccon) e2:SetCondition(c33200732.ccon)
e2:SetTarget(c33200732.ctg) e2:SetTarget(c33200732.ctg)
......
...@@ -32,9 +32,8 @@ function c33200734.initial_effect(c) ...@@ -32,9 +32,8 @@ function c33200734.initial_effect(c)
e3:SetDescription(aux.Stringid(33200734,2)) e3:SetDescription(aux.Stringid(33200734,2))
e3:SetCategory(CATEGORY_COUNTER) e3:SetCategory(CATEGORY_COUNTER)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_TO_GRAVE) e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,33200736) e3:SetCountLimit(1,33200736)
e3:SetCondition(c33200734.ccon) e3:SetCondition(c33200734.ccon)
e3:SetTarget(c33200734.ctg) e3:SetTarget(c33200734.ctg)
......
...@@ -32,9 +32,8 @@ function c33200737.initial_effect(c) ...@@ -32,9 +32,8 @@ function c33200737.initial_effect(c)
e3:SetDescription(aux.Stringid(33200737,2)) e3:SetDescription(aux.Stringid(33200737,2))
e3:SetCategory(CATEGORY_COUNTER) e3:SetCategory(CATEGORY_COUNTER)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_TO_GRAVE) e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,33200739) e3:SetCountLimit(1,33200739)
e3:SetCondition(c33200737.ccon) e3:SetCondition(c33200737.ccon)
e3:SetTarget(c33200737.ctg) e3:SetTarget(c33200737.ctg)
......
...@@ -23,11 +23,12 @@ function c33200740.initial_effect(c) ...@@ -23,11 +23,12 @@ function c33200740.initial_effect(c)
--counter --counter
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(33200740,1)) e3:SetDescription(aux.Stringid(33200740,1))
e3:SetCategory(CATEGORY_COUNTER) e3:SetCategory(CATEGORY_COUNTER+CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN) e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetHintTiming(0,TIMING_END_PHASE) e3:SetHintTiming(0,TIMING_END_PHASE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,33200741) e3:SetCountLimit(1,33200741)
e3:SetTarget(c33200740.counttg) e3:SetTarget(c33200740.counttg)
e3:SetOperation(c33200740.counter) e3:SetOperation(c33200740.counter)
...@@ -79,18 +80,20 @@ end ...@@ -79,18 +80,20 @@ end
--e3 --e3
function c33200740.counttg(e,tp,eg,ep,ev,re,r,rp,chk) function c33200740.counttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33200740.cfilter,tp,LOCATION_REMOVED,0,2,nil) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and c33200740.cfilter(chkc) end
if chk==0 then return e:GetHandler():IsCanAddCounter(0x32a,2) and Duel.IsExistingTarget(c33200740.cfilter,tp,LOCATION_REMOVED,0,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c33200740.cfilter,tp,LOCATION_REMOVED,0,2,2,nil)
Duel.HintSelection(g)
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,e:GetHandler(),0,0x32a) Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,e:GetHandler(),0,0x32a)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,0,LOCATION_REMOVED) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,2,0,0)
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(33200740,1)) Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(33200740,1))
end end
function c33200740.cfilter(c) function c33200740.cfilter(c)
return c:IsSetCard(0xc32a) and c:IsAbleToDeck() return c:IsSetCard(0xc32a) and c:IsAbleToDeck()
end end
function c33200740.counter(e,tp,eg,ep,ev,re,r,rp) function c33200740.counter(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(c33200740.cfilter,tp,LOCATION_REMOVED,0,2,nil) then return end local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c33200740.cfilter,tp,LOCATION_REMOVED,0,2,2,nil)
if g:GetCount()==2 then if g:GetCount()==2 then
if Duel.SendtoDeck(g,nil,2,REASON_EFFECT)==2 and e:GetHandler():IsRelateToEffect(e) then if Duel.SendtoDeck(g,nil,2,REASON_EFFECT)==2 and e:GetHandler():IsRelateToEffect(e) then
e:GetHandler():AddCounter(0x32a,2) e:GetHandler():AddCounter(0x32a,2)
......
...@@ -29,9 +29,8 @@ function c33200742.initial_effect(c) ...@@ -29,9 +29,8 @@ function c33200742.initial_effect(c)
e3:SetDescription(aux.Stringid(33200742,2)) e3:SetDescription(aux.Stringid(33200742,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_TO_GRAVE) e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,33200743) e3:SetCountLimit(1,33200743)
e3:SetCondition(c33200742.ccon) e3:SetCondition(c33200742.ccon)
e3:SetTarget(c33200742.ctg) e3:SetTarget(c33200742.ctg)
......
...@@ -6,16 +6,22 @@ function cm.initial_effect(c) ...@@ -6,16 +6,22 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_DAMAGE) e1:SetCategory(CATEGORY_REMOVE+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target) e1:SetTarget(cm.target)
e1:SetOperation(cm.activate) e1:SetOperation(cm.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
Debug.Message(Duel.GetTurnCount())
return Duel.GetTurnCount()>=3
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local check1=Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) local check1=Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil)
local check2=Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) or e:GetHandler():IsLocation(LOCATION_HAND) local check2=Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) or e:GetHandler():IsLocation(LOCATION_HAND)
local check3=Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) local check3=Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil)
local check4=Duel.GetDecktopGroup(tp,15):FilterCount(Card.IsAbleToRemove,nil)==15 and Duel.GetDecktopGroup(1-tp,15):FilterCount(Card.IsAbleToRemove,nil)==15 local check4=Duel.GetDecktopGroup(tp,15):FilterCount(Card.IsAbleToRemove,nil)==15 and Duel.GetDecktopGroup(1-tp,15):FilterCount(Card.IsAbleToRemove,nil)==15
if chk==0 then return (check1 or check2 or check3 or check4) and Duel.GetLP(tp)>=4000 end if chk==0 then return (check1 or check2 or check3 or check4) and Duel.GetLP(tp)>=4000 end
Duel.SetChainLimit(aux.FALSE)
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 g1=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_SZONE,LOCATION_SZONE,nil) local g1=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_SZONE,LOCATION_SZONE,nil)
......
...@@ -15,15 +15,25 @@ function c67200287.initial_effect(c) ...@@ -15,15 +15,25 @@ function c67200287.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC) e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA+LOCATION_HAND) e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,67200287+EFFECT_COUNT_CODE_OATH) e2:SetCountLimit(1,67200287+EFFECT_COUNT_CODE_OATH)
e2:SetCondition(c67200287.spcon) e2:SetCondition(c67200287.spcon)
e2:SetOperation(c67200287.spop) e2:SetOperation(c67200287.spop)
e2:SetValue(SUMMON_VALUE_SELF) --e2:SetValue(SUMMON_VALUE_SELF)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_SPSUMMON_PROC)
e3:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e3:SetRange(LOCATION_EXTRA)
e3:SetCountLimit(1,67200287+EFFECT_COUNT_CODE_OATH)
e3:SetCondition(c67200287.spcon2)
e3:SetOperation(c67200287.spop2)
c:RegisterEffect(e3)
--Equip --Equip
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(67200287,2)) e4:SetDescription(aux.Stringid(67200287,5))
e4:SetCategory(CATEGORY_EQUIP) e4:SetCategory(CATEGORY_EQUIP)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY) e4:SetProperty(EFFECT_FLAG_DELAY)
...@@ -49,38 +59,61 @@ function c67200287.repval(e,c) ...@@ -49,38 +59,61 @@ function c67200287.repval(e,c)
return c67200287.repfilter(c,e:GetHandlerPlayer()) return c67200287.repfilter(c,e:GetHandlerPlayer())
end end
-- --
function c67200287.spfilter1(c,tp) function c67200287.rfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x674) and c:IsReleasable() --local tp=c:GetControler()
return c:IsFaceup() and c:IsSetCard(0x674) and c:IsReleasable()
end end
function c67200287.mfilter(c,tp)
--local tp=c:GetControler()
return c:GetSequence()<5 and c:IsLocation(LOCATION_MZONE)
end
function c67200287.spcon(e,c) function c67200287.spcon(e,c)
--
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
local rg=Duel.GetMatchingGroup(c67200287.rfilter,tp,LOCATION_ONFIELD,0,nil,tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=-ft+1 if ft>0 then
if ct>1 then return false end return Duel.IsExistingMatchingCard(c67200287.rfilter,tp,LOCATION_ONFIELD,0,1,nil,tp)
if ct>0 and not Duel.IsExistingMatchingCard(c67200287.spfilter1,tp,LOCATION_SZONE+LOCATION_FZONE,0,ct,nil) then return false end else
return Duel.IsExistingMatchingCard(c67200287.spfilter1,tp,LOCATION_ONFIELD,0,1,nil) and ((c:IsLocation(LOCATION_HAND) and Duel.GetLocationCount(tp,LOCATION_MZONE)>-1) or (c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0)) return rg:GetCount()>1 and rg:IsExists(c67200287.mfilter,1,nil,tp)
end
end end
function c67200287.spop(e,tp,eg,ep,ev,re,r,rp,c) function c67200287.spop(e,tp,eg,ep,ev,re,r,rp,c)
-- local rg=Duel.GetMatchingGroup(c67200287.rfilter,tp,LOCATION_ONFIELD,0,nil,tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=-ft+1 local g=nil
if ct<0 then ct=0 end if ft>0 then
local g=Group.CreateGroup()
if ct>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=Duel.SelectMatchingCard(tp,c67200287.spfilter1,tp,LOCATION_MZONE,0,ct,ct,nil) g=rg:Select(tp,1,1,nil)
g:Merge(sg) else
end
if ct<1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=Duel.SelectMatchingCard(tp,c67200287.spfilter1,tp,LOCATION_ONFIELD,0,1-ct,1-ct,g:GetFirst()) g=rg:FilterSelect(tp,c67200287.mfilter,1,1,nil,tp)
g:Merge(sg) local g2=rg:Select(tp,1,1,g:GetFirst())
g:Merge(g2)
end end
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
-- --
function c67200287.spfilter2(c,tp,mc)
return Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,mc))>0 and c:IsSetCard(0x674) and c:IsReleasable() and c:IsFaceup()
end
function c67200287.spcon2(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c67200287.spfilter2,tp,LOCATION_ONFIELD,0,nil)
return g:IsExists(c67200287.spfilter2,1,nil,tp,g)
end
function c67200287.spop2(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(c67200287.spfilter2,tp,LOCATION_ONFIELD,0,nil,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g1=g:FilterSelect(tp,c67200287.spfilter2,1,1,nil,tp,g)
Duel.Release(g1,REASON_COST)
end
--
function c67200287.tgfilter(c) function c67200287.tgfilter(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsSetCard(0x674) return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsSetCard(0x674)
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