Commit bf64b21d authored by DailyShana's avatar DailyShana Committed by nekrozar

update EFFECT_OVERLAY_REMOVE_REPLACE (#1200)

parent 3f7bc5d5
......@@ -59,11 +59,5 @@ function c13032689.rcon(e,tp,eg,ep,ev,re,r,rp)
and ep==e:GetOwnerPlayer() and e:GetHandler():GetEquipTarget()==re:GetHandler() and re:GetHandler():GetOverlayCount()>=ev-1
end
function c13032689.rop(e,tp,eg,ep,ev,re,r,rp)
local ct=bit.band(ev,0xffff)
if ct==1 then
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
else
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
re:GetHandler():RemoveOverlayCard(tp,ct-1,ct-1,REASON_COST)
end
return Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
......@@ -23,12 +23,8 @@ function c32999573.rcon(e,tp,eg,ep,ev,re,r,rp)
and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,nil)
end
function c32999573.rop(e,tp,eg,ep,ev,re,r,rp)
local ct=bit.band(ev,0xffff)
e:GetHandler():RegisterFlagEffect(32999573+ep,RESET_PHASE+PHASE_END,0,1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,1,nil)
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
if ct>1 then
re:GetHandler():RemoveOverlayCard(tp,ct-1,ct-1,REASON_COST)
end
e:GetHandler():RegisterFlagEffect(32999573+ep,RESET_PHASE+PHASE_END,0,1)
return Duel.Remove(g,POS_FACEDOWN,REASON_COST)
end
......@@ -21,11 +21,5 @@ function c55067058.rcon(e,tp,eg,ep,ev,re,r,rp)
and ep==e:GetOwnerPlayer() and re:GetHandler():GetOverlayCount()>=ev-1
end
function c55067058.rop(e,tp,eg,ep,ev,re,r,rp)
local ct=bit.band(ev,0xffff)
if ct==1 then
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT)
else
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT)
re:GetHandler():RemoveOverlayCard(tp,ct-1,ct-1,REASON_COST)
end
return e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT)
end
......@@ -71,5 +71,5 @@ function c83880087.rcon(e,tp,eg,ep,ev,re,r,rp)
and ep==e:GetOwnerPlayer() and ev==1
end
function c83880087.rop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
return Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
......@@ -79,9 +79,5 @@ function c94807487.rcon(e,tp,eg,ep,ev,re,r,rp)
and ep==e:GetOwnerPlayer() and e:GetHandler():GetEquipTarget()==re:GetHandler() and re:GetHandler():GetOverlayCount()>=ev-1
end
function c94807487.rop(e,tp,eg,ep,ev,re,r,rp)
local ct=bit.band(ev,0xffff)
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
if ct>1 then
re:GetHandler():RemoveOverlayCard(tp,ct-1,ct-1,REASON_COST)
end
return Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
......@@ -42,9 +42,8 @@ end
function c96592102.descost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) end
local rt=math.min(Duel.GetMatchingGroupCount(aux.TRUE,tp,0,LOCATION_MZONE,nil),c:GetOverlayCount())
c:RemoveOverlayCard(tp,1,rt,REASON_COST)
local ct=Duel.GetOperatedGroup():GetCount()
local rt=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)
local ct=c:RemoveOverlayCard(tp,1,rt,REASON_COST)
e:SetLabel(ct)
end
function c96592102.destg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -37,10 +37,11 @@ function c98918572.rcon(e,tp,eg,ep,ev,re,r,rp)
and Duel.IsExistingMatchingCard(c98918572.rfilter,tp,LOCATION_MZONE,0,1,rc,ev)
end
function c98918572.rop(e,tp,eg,ep,ev,re,r,rp)
local ct=bit.band(ev,0xffff)
local min=ev&0xffff
local max=(ev>>16)&0xffff
local rc=re:GetHandler()
local tg=Duel.SelectMatchingCard(tp,c98918572.rfilter,tp,LOCATION_MZONE,0,1,1,rc,ct)
tg:GetFirst():RemoveOverlayCard(tp,ct,ct,REASON_COST)
local tg=Duel.SelectMatchingCard(tp,c98918572.rfilter,tp,LOCATION_MZONE,0,1,1,rc,min)
return tg:GetFirst():RemoveOverlayCard(tp,min,max,REASON_EFFECT)
end
function c98918572.xyzfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0xf1)
......
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