Commit 446889c5 authored by salix5's avatar salix5

fix: turn set

parent e37940d1
...@@ -8,13 +8,6 @@ function c12923641.initial_effect(c) ...@@ -8,13 +8,6 @@ function c12923641.initial_effect(c)
e1:SetTarget(c12923641.target) e1:SetTarget(c12923641.target)
e1:SetOperation(c12923641.activate) e1:SetOperation(c12923641.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end
function c12923641.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
c:SetTurnCounter(0)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
--cannot change position --cannot change position
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
...@@ -22,8 +15,14 @@ function c12923641.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -22,8 +15,14 @@ function c12923641.target(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetTargetRange(0,LOCATION_MZONE) e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end
function c12923641.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
c:SetTurnCounter(0)
local g=Duel.GetMatchingGroup(Card.IsCanTurnSet,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
--destroy --destroy
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
...@@ -38,7 +37,7 @@ function c12923641.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -38,7 +37,7 @@ function c12923641.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c12923641.activate(e,tp,eg,ep,ev,re,r,rp) function c12923641.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(Card.IsCanTurnSet,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.ChangePosition(g,POS_FACEDOWN_DEFENCE) Duel.ChangePosition(g,POS_FACEDOWN_DEFENCE)
end end
......
...@@ -10,16 +10,13 @@ function c35480699.initial_effect(c) ...@@ -10,16 +10,13 @@ function c35480699.initial_effect(c)
e1:SetOperation(c35480699.activate) e1:SetOperation(c35480699.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c35480699.filter(c)
return c:IsFaceup() and c:IsCanTurnSet()
end
function c35480699.target(e,tp,eg,ep,ev,re,r,rp,chk) function c35480699.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c35480699.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsCanTurnSet,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(c35480699.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(Card.IsCanTurnSet,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end end
function c35480699.activate(e,tp,eg,ep,ev,re,r,rp) function c35480699.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(Card.IsCanTurnSet,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.ChangePosition(g,POS_FACEDOWN_DEFENCE) Duel.ChangePosition(g,POS_FACEDOWN_DEFENCE)
end end
......
...@@ -27,7 +27,7 @@ function c86516889.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -27,7 +27,7 @@ function c86516889.activate(e,tp,eg,ep,ev,re,r,rp)
local ct=g:FilterCount(Card.IsSetCard,nil,0x8d) local ct=g:FilterCount(Card.IsSetCard,nil,0x8d)
if ct>0 then if ct>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local sg=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,ct,nil) local sg=Duel.SelectMatchingCard(tp,Card.IsCanTurnSet,tp,0,LOCATION_MZONE,1,ct,nil)
if sg:GetCount()>0 then if sg:GetCount()>0 then
Duel.HintSelection(sg) Duel.HintSelection(sg)
Duel.ChangePosition(sg,POS_FACEDOWN_DEFENCE) Duel.ChangePosition(sg,POS_FACEDOWN_DEFENCE)
......
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