Commit 7b5cfda1 authored by Tachibana's avatar Tachibana

ybb

parent fc2a8213
......@@ -19,7 +19,7 @@ function cm.tstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0 end
end
function cm.sumfilter(c)
return c:IsRace(RACE_DRAGON) and c:IsLevel(5) and c:IsSummonable(true,nil,1)
return c:IsSummonable(true,nil) and c:IsRace(RACE_DRAGON) and c:IsLevelAbove(5)
end
function cm.tsop(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,1-tp,aux.Stringid(m,3))
......@@ -28,13 +28,15 @@ function cm.tsop(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=g:GetFirst()
if tc then
Duel.SSet(tp,tc,1-tp)
local g=Duel.GetMatchingGroup(cm.sumfilter,tp,LOCATION_HAND,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
if Duel.IsExistingMatchingCard(cm.sumfilter,tp,LOCATION_HAND,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local sc=g:Select(tp,1,1,nil):GetFirst()
Duel.ShuffleHand(tp)
Duel.Summon(tp,sc,true,nil,1)
local sg=Duel.SelectMatchingCard(tp,cm.sumfilter,tp,LOCATION_HAND,0,1,1,nil)
if sg:GetCount()>0 then
local tc=sg:GetFirst()
Duel.Summon(tp,tc,true,nil)
end
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