You need to sign in or sign up before continuing.
Commit a8526162 authored by wind2009's avatar wind2009

Fix Merciless Scorpion of Serket

parent b757199e
No preview for this file type
......@@ -28,24 +28,25 @@ function s.initial_effect(c)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_START)
e3:SetTarget(s.destg)
e3:SetOperation(s.desop)
c:RegisterEffect(e3)
end
function s.cfilter(c)
return c:IsAbleToRemove() and c:IsLevelAbove(10)
function s.cfilter(c,tp)
return c:IsAbleToRemove(tp,POS_FACEUP,REASON_SPSUMMON) and c:IsLevelAbove(10)
end
function s.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,c)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,c,tp)
and Duel.IsExistingMatchingCard(aux.AND(Card.IsFaceup,Card.IsCode),tp,LOCATION_ONFIELD,0,1,nil,29762407)
end
function s.sprtg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND+LOCATION_DECK,0,c)
local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND+LOCATION_DECK,0,c,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
......@@ -74,8 +75,8 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=e:GetHandler():GetBattleTarget()
e:SetLabelObject(tc)
if chk==0 then return tc and tc:IsControler(1-tp) end
e:SetLabelObject(tc)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
......
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