Commit b06ec320 authored by TanakaKotoha's avatar TanakaKotoha

fix

parent 39c9b99a
Pipeline #514 failed with stages
in 12 minutes and 9 seconds
No preview for this file type
......@@ -114,19 +114,15 @@ function cm.ffilter(c)
return not c:IsReason(REASON_DRAW) and c:IsPreviousLocation(LOCATION_DECK)
end
function cm.spcon1(e,tp,eg,ep,ev,re,r,rp)
Debug.Message(e:GetHandler():IsAbleToDeck())
Debug.Message(rp==1-tp)
Debug.Message(eg:IsExists(cm.ffilter,1,nil))
return e:GetHandler():IsAbleToDeck() and rp==1-tp and eg:IsExists(cm.ffilter,1,nil)
end
function cm.spop1(e,tp,eg,ep,ev,re,r,rp)
if eg then
Duel.Remove(eg:Filter(cm.ffilter,nil),POS_FACEUP,REASON_EFFECT)
end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoDeck(c,tp,2,REASON_EFFECT)
c:ReverseInDeck()
if eg then
if Duel.Remove(eg:Filter(cm.ffilter,nil),POS_FACEUP,REASON_EFFECT) ~=0 then
Duel.SendtoDeck(c,tp,2,REASON_EFFECT)
c:ReverseInDeck()
end
end
end
function cm.spcon(e,c)
......
......@@ -73,6 +73,7 @@ function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetTargetRange(1,1)
e5:SetLabelObject(sc)
e5:SetTarget(cm.sumlimit)
e5:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e5,tp)
local e6=e5:Clone()
......@@ -81,4 +82,9 @@ function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
sc=g:GetNext()
end
end
end
function cm.sumlimit(e,rc,sump,sumtype,sumpos,targetp,se)
local c=e:GetHandler()
local sc=e:GetLabelObject
return c:IsCode(sc)
end
\ No newline at end of file
......@@ -42,8 +42,14 @@ end
function cm.sfilter2(c)
return c:IsType(TYPE_MONSTER)
end
--function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
-- return ep==1-tp and eg:IsExists(Card.IsPreviousLocation,1,nil,LOCATION_HAND)
--end
function cm.cfilter(c,tp)
return c:GetSummonPlayer()==1-tp and c:IsPreviousLocation(LOCATION_HAND)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp and eg:IsExists(Card.IsPreviousLocation,1,nil,LOCATION_HAND)
return eg:IsExists(cm.cfilter,1,nil,tp)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
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