Commit 526fb959 authored by Tachibana's avatar Tachibana

ybb

parent 1e605ef8
......@@ -44,29 +44,32 @@ function cm.togop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=Duel.GetFirstTarget()
if ct:IsRelateToEffect(e) then
Duel.SendtoHand(ct,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,ct)
if ct:IsLocation(LOCATION_HAND) then
local e12=Effect.CreateEffect(c)
e12:SetDescription(aux.Stringid(m,0))
e12:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e12:SetCode(EFFECT_SUMMON_PROC)
e12:SetCondition(cm.sumcon)
e12:SetOperation(cm.sumop)
e12:SetValue(SUMMON_TYPE_ADVANCE)
e12:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
ct:RegisterEffect(e12)
local e13=e12:Clone()
e13:SetCode(EFFECT_SET_PROC)
ct:RegisterEffect(e13)
local s1=ct:IsSummonable(true,nil,1)
local s2=ct:IsMSetable(true,nil,1)
if (s1 and s2 and Duel.SelectPosition(tp,ct,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)==POS_FACEUP_ATTACK) or not s2 then
Duel.Summon(tp,ct,true,nil,1)
else
Duel.MSet(tp,ct,true,nil,1)
end
end
if ct then
Duel.SendtoHand(ct,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,ct)
if ct:IsLocation(LOCATION_HAND) then
local e12=Effect.CreateEffect(c)
e12:SetDescription(aux.Stringid(m,0))
e12:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e12:SetType(EFFECT_TYPE_SINGLE)
e12:SetCode(EFFECT_SUMMON_PROC)
e12:SetCondition(cm.sumcon)
e12:SetOperation(cm.sumop)
e12:SetValue(SUMMON_TYPE_ADVANCE)
e12:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
ct:RegisterEffect(e12)
local e13=e12:Clone()
e13:SetCode(EFFECT_SET_PROC)
ct:RegisterEffect(e13)
local s1=ct:IsSummonable(true,nil,1)
local s2=ct:IsMSetable(true,nil,1)
if (s1 and s2 and Duel.SelectPosition(tp,ct,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)==POS_FACEUP_ATTACK) or not s2 then
Duel.Summon(tp,ct,true,nil,1)
else
Duel.MSet(tp,ct,true,nil,1)
end
end
end
end
end
function cm.sumcon(e,c)
......
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