Commit 6b8408b8 authored by wind2009's avatar wind2009

Fix Swarm of Centipedes

parent 44ee75ab
...@@ -29,18 +29,17 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -29,18 +29,17 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler()) Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler())
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 c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) then if tc and tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) then
if tc:IsPosition(POS_FACEUP_DEFENSE) and c:IsFacedown() then if tc:IsPosition(POS_FACEUP_DEFENSE) then
if Duel.SelectYesNo(tp,aux.Stringid(id,2)) then if tc:IsCanTurnSet() and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
else else
Duel.ChangePosition(tc,POS_FACEUP_ATTACK) Duel.ChangePosition(tc,POS_FACEUP_ATTACK)
end end
elseif c:IsCanTurnSet() then elseif tc:IsCanTurnSet() then
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
elseif c:IsFacedown() then elseif tc:IsFacedown() then
Duel.ChangePosition(tc,POS_FACEUP_ATTACK) Duel.ChangePosition(tc,POS_FACEUP_ATTACK)
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