Commit f286bd9c authored by 聖園ミカ's avatar 聖園ミカ 🐟

man!

parent 164822a1
...@@ -33,48 +33,50 @@ end ...@@ -33,48 +33,50 @@ end
function cm.desop(e,tp,eg,ep,ev,re,r,rp) function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
if rp~=tp and loc==LOCATION_ONFIELD and bit.band(loc,re:GetHandler():GetLocation())==0 then if rp~=tp and loc==LOCATION_ONFIELD and bit.band(loc,re:GetHandler():GetLocation())==0 then
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) local hg=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
if g:GetCount()>0 then if hg:GetCount()==0 then return end
Duel.ConfirmCards(tp,g) Duel.ConfirmCards(tp,hg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,1,nil) local g=hg:Select(tp,1,1,nil)
if Duel.Remove(sg,POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY)~=0 then local tc=g:GetFirst()
local tt=Duel.GetOperatedGroup() Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
e:SetLabel(tt:GetCount()) Duel.ShuffleHand(1-tp)
local fid=c:GetFieldID() local c=e:GetHandler()
local og=Duel.GetOperatedGroup() local fid=c:GetFieldID()
local oc=og:GetFirst() local e1=Effect.CreateEffect(c)
while oc do e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
if oc:IsControler(tp) then e1:SetCode(EVENT_PHASE+PHASE_END)
oc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,1,fid) e1:SetCountLimit(1)
else e1:SetLabel(fid)
oc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_OPPO_TURN,0,1,fid) e1:SetLabelObject(tc)
end e1:SetCondition(cm.retcon)
oc=og:GetNext() e1:SetOperation(cm.retop)
end e1:SetReset(RESET_PHASE+PHASE_END)
og:KeepAlive() Duel.RegisterEffect(e1,tp)
local e1=Effect.CreateEffect(c) tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(og)
e1:SetCondition(cm.retcon)
e1:SetOperation(cm.retop)
e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN)
Duel.RegisterEffect(e1,tp)
end
end
end end
end end
function cm.retcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(m)==e:GetLabel() then
return true
else
e:Reset()
return false
end
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,PLAYER_ALL,LOCATION_REMOVED) local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_REMOVED,LOCATION_REMOVED,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),PLAYER_ALL,LOCATION_REMOVED)
end end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp) function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_REMOVED,LOCATION_REMOVED,nil)
local g=Duel.GetFieldGroup(tp,LOCATION_REMOVED,LOCATION_REMOVED) if g:GetCount()>0 then
Duel.SendtoDeck(g,nil,2,REASON_EFFECT) Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK) end
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