Commit c56d6668 authored by CubeRuler's avatar CubeRuler

fixed

parent 7e25a7c4
Pipeline #13456 passed with stages
in 35 minutes and 1 second
......@@ -26,7 +26,7 @@ function c33300362.initial_effect(c)
c:RegisterEffect(e2)
end
function cm.filter(c)
return c:IsFaceup() and c:IsCanTurnSet()
return c:IsCanChangePosition()
end
function cm.filter2(c)
return c:IsSetCard(0x563) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
......@@ -34,7 +34,7 @@ end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and cm.filter(chkc) and Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_DECK,0,1,nil) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
......@@ -47,8 +47,18 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g)
end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
if tc:IsRelateToEffect(e) then
if tc:IsPosition(POS_FACEDOWN_DEFENSE) then
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE)
elseif tc:IsPosition(POS_FACEUP_DEFENSE) then
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
elseif tc:IsPosition(POS_FACEUP_ATTACK) then
if Duel.SelectOption(tp,aux.Stringid(23912837,2),aux.Stringid(23912837,3))==0 then
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE)
else
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
end
end
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