Commit ef6feff4 authored by mercury233's avatar mercury233

fix

parent eb7363fc
......@@ -41,6 +41,7 @@ end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,s.dfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,e,tp)
if #g==0 the return end
local codes={g:GetFirst():GetCode()}
if Duel.Destroy(g,REASON_EFFECT)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
......
......@@ -18,7 +18,7 @@ function s.initial_effect(c)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_MUST_ATTACK_MONSTER)
e3:SetTarget(s.matg)
e3:SetValue(s.atklimit)
c:RegisterEffect(e3)
--disable
local e4=Effect.CreateEffect(c)
......@@ -40,7 +40,7 @@ end
function s.macon(e)
return Duel.IsExistingMatchingCard(s.filter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function s.matg(e,c)
function s.atklimit(e,c)
local g=Duel.GetMatchingGroup(s.filter,e:GetHandlerPlayer(),LOCATION_MZONE,0,nil):GetMaxGroup(Card.GetAttack)
return g and g:IsContains(c)
end
......
......@@ -32,7 +32,7 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp)
end
end
function s.filter(c,e,tp)
local p,seq=tc:GetControler(),tc:GetSequence()
local p,seq=c:GetControler(),c:GetSequence()
return c:IsFaceup() and c:GetFlagEffect(id)>0 and Duel.GetMZoneCount(p,c,tp,LOCATION_REASON_TOFIELD,1<<seq)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,c:GetControler())
end
......
......@@ -21,6 +21,7 @@ function s.initial_effect(c)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e2:SetCountLimit(1)
e2:SetCondition(s.rmcon)
e2:SetTarget(s.rmtg)
e2:SetOperation(s.rmop)
......
......@@ -30,7 +30,7 @@ function s.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,1)
e2:SetCondition(s.lecon)
e2:SetTarget(s.letg)
e2:SetValue(s.aclimit)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
......@@ -48,10 +48,16 @@ function Auxiliary.XyzAlterFilter(c,alterf,xyzc,e,tp,alterop)
return alterf(c,e,tp,xyzc) and c:IsCanBeXyzMaterial(xyzc) and Duel.GetLocationCountFromEx(tp,tp,c,xyzc)>0
and Auxiliary.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) and (not alterop or alterop(e,tp,0,c))
end
function s.chkfilter(c,tp)
return c:IsSummonPlayer(1-tp) and c:IsSummonLocation(LOCATION_EXTRA)
end
function s.chk(e,tp,eg)
for p=0,1 do
if eg:IsExists(Card.IsSummonPlayer,1,nil,1-p) then
Duel.RegisterFlagEffect(p,id,RESET_PHASE+PHASE_END,0,2)
if eg:IsExists(s.chkfilter,1,nil,p) then
Duel.RegisterFlagEffect(p,id,RESET_PHASE+PHASE_END,0,1)
if Duel.GetFlagEffect(p,id)>1 then
Duel.RegisterFlagEffect(p,id+o,RESET_PHASE+PHASE_END,0,2)
end
end
end
end
......@@ -60,7 +66,7 @@ function s.mfilter(c,e,tp)
return g and #g>0 and g:IsContains(c)
end
function s.altop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,id)>1 end
if chk==0 then return Duel.GetFlagEffect(tp,id+o)>0 end
e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_PHASE+PHASE_END,0,1)
end
function s.lscon(e,tp,eg,ep,ev,re,r,rp)
......@@ -83,7 +89,7 @@ end
function s.lecon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function s.letg(e,te)
function s.aclimit(e,te,tp)
return te:IsActiveType(TYPE_MONSTER) and te:GetHandler():IsAttackAbove(3000)
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -68,17 +68,21 @@ end
function s.drmcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp
end
function s.cfilter(c,tp)
return c:IsAbleToRemove() and Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,c)
function s.cfilter1(c,tp)
return c:IsFaceup() and c:IsAbleToRemove()
and Duel.IsExistingTarget(s.cfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,c)
end
function s.cfilter2(c)
return c:IsFaceup() and c:IsAbleToRemove()
end
function s.drmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(s.cfilter,tp,LOCATION_MZONE,0,1,nil,tp) end
if chk==0 then return Duel.IsExistingTarget(s.cfilter1,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,s.cfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
local g=Duel.SelectTarget(tp,s.cfilter1,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,g)
g:Merge(sg)
local g2=Duel.SelectTarget(tp,s.cfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,g)
g:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,2,0,0)
end
function s.drmop(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