Commit ce57f21e authored by wind2009's avatar wind2009

Fix 磁石の戦士マグネット・テルスリオン

parent b209257e
Pipeline #41106 canceled with stages
in 6 seconds
...@@ -20,7 +20,7 @@ function s.initial_effect(c) ...@@ -20,7 +20,7 @@ function s.initial_effect(c)
e2:SetTarget(s.sptg) e2:SetTarget(s.sptg)
e2:SetOperation(s.spop) e2:SetOperation(s.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--spsummon --target
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1)) e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_CONTROL) e3:SetCategory(CATEGORY_DESTROY+CATEGORY_CONTROL)
...@@ -51,7 +51,7 @@ function s.spcostfilter(c) ...@@ -51,7 +51,7 @@ function s.spcostfilter(c)
return c:IsFaceupEx() and c:IsAbleToRemoveAsCost() and c:IsCode(101303005,101303006) return c:IsFaceupEx() and c:IsAbleToRemoveAsCost() and c:IsCode(101303005,101303006)
end end
function s.gcheck(g,tp) function s.gcheck(g,tp)
return aux.gfcheck(Card.IsCode,101303005,101303006) return aux.gfcheck(g,Card.IsCode,101303005,101303006)
and Duel.GetMZoneCount(tp,g)>0 and Duel.GetMZoneCount(tp,g)>0
end end
function s.spcon(e,c) function s.spcon(e,c)
...@@ -81,14 +81,22 @@ end ...@@ -81,14 +81,22 @@ end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
e:SetLabel(0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
if not tc:IsAttribute(ATTRIBUTE_EARTH) or tc:IsFacedown() then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
else
e:SetLabel(1)
end
end
end end
function s.desop(e,tp,eg,ep,ev,re,r,rp) function s.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToChain() and tc:IsLocation(LOCATION_MZONE) then if tc:IsRelateToChain() and tc:IsLocation(LOCATION_MZONE) then
if tc:IsFaceup() and tc:IsAttribute(ATTRIBUTE_EARTH) if e:GetLabel()==1 and tc:IsControlerCanBeChanged()
and tc:IsControlerCanBeChanged()
and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.GetControl(tc,tp) Duel.GetControl(tc,tp)
else else
......
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