Commit 29cf3bf2 authored by Tachibana's avatar Tachibana

得得得得得

parent 13018968
Pipeline #13195 passed with stages
in 22 minutes and 54 seconds
......@@ -93,12 +93,14 @@ function cm.filter(c)
return c:IsAbleToRemove()
end
function cm.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,LOCATION_MZONE,0,nil)
if chkc then return chkc:IsOnField() and cm.filter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,0,LOCATION_MZONE,1,e:GetHandler()) and #g>0 end
local ct=Duel.GetTargetCount(cm.filter,tp,0,LOCATION_MZONE,nil)
local rg=g:Select(tp,1,math.min(#g,ct))
local rg=g:Select(tp,1,math.min(#g,ct),nil)
if Duel.Remove(rg,POS_FACEUP,REASON_COST+REASON_TEMPORARY)~=0 then
rg:KeepAlive()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
......@@ -117,5 +119,8 @@ function cm.spop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
local g=e:GetLabelObject()
for tc in aux.Next(g) do
Duel.ReturnToField(tc)
end
end
\ No newline at end of file
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