Commit 13cc54b6 authored by Tachibana's avatar Tachibana

1145141919810

parent ef1282d3
Pipeline #13592 passed with stages
in 26 minutes and 24 seconds
......@@ -61,31 +61,29 @@ function cm.settg(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
function cm.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,cm.setfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
local c=e:GetHandler()
local tc=g:GetFirst()
local fid=c:GetFieldID()
local tc=Duel.SelectMatchingCard(tp,cm.setfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
if tc then
Duel.SSet(tp,tc)
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(tc)
e1:SetCondition(cm.tgcon)
e1:SetOperation(cm.tgop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.ConfirmCards(1-tp,g)
Duel.ConfirmCards(1-tp,tc)
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,0,1,1,nil)
if g2:GetCount()>0 then
Duel.Destroy(g2,REASON_EFFECT)
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,0,1,1,nil)
if g:GetCount()>0 and Duel.Destroy(g,REASON_EFFECT)~=0 and.tc:IsLocation(LOCATION_ONFIELD) then
local fid=c:GetFieldID()
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(tc)
e1:SetCondition(cm.tgcon)
e1:SetOperation(cm.tgop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
end
......
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