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