Commit 9947f63f authored by wind2009's avatar wind2009 Committed by GitHub

Fix Duel.ChangePosition (#2845)

parent 83aad219
...@@ -25,8 +25,8 @@ function c60398723.rfilter(c) ...@@ -25,8 +25,8 @@ function c60398723.rfilter(c)
end end
function c60398723.activate(e,tp,eg,ep,ev,re,r,rp) function c60398723.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsControler(1-tp) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:IsControler(1-tp) and tc:IsFaceup()
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) and Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)>0 then
local rg=Duel.GetMatchingGroup(c60398723.rfilter,tp,LOCATION_FZONE,LOCATION_FZONE,nil) local rg=Duel.GetMatchingGroup(c60398723.rfilter,tp,LOCATION_FZONE,LOCATION_FZONE,nil)
if rg:GetCount()~=0 and Duel.SelectYesNo(tp,aux.Stringid(60398723,0)) then if rg:GetCount()~=0 and Duel.SelectYesNo(tp,aux.Stringid(60398723,0)) then
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -32,8 +32,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -32,8 +32,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function s.operation(e,tp,eg,ep,ev,re,r,rp) function s.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsCanTurnSet,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 and Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE)>0 then
Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE)
local g1=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_ONFIELD,nil) local g1=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_ONFIELD,nil)
if g1:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then if g1:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.BreakEffect() Duel.BreakEffect()
......
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