Commit 0cbcf6e2 authored by Nemo Ma's avatar Nemo Ma

fix

parent 5a3558dc
......@@ -59,13 +59,13 @@ function cm.check(c,e,tp)
return c:IsRace(RACE_ROCK) and c:IsLevelAbove(8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsSummonableCard()
end
function cm.chtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.check,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK)
if chk==0 then return Duel.IsExistingMatchingCard(cm.check,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.chop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.check,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,cm.check,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
Duel.ConfirmCards(1-tp,g)
......
......@@ -78,6 +78,9 @@ end
function cm.gcheck(g,fg)
return g:GetClassCount(Card.GetRace) == #g and fg:GetClassCount(Card.GetRace)==#g
end
function cm.tgfil(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local fg=eg:Filter(cm.ex,nil,1-tp)
......@@ -112,12 +115,12 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
local og=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_HAND)
local num = og:GetCount()
Duel.BreakEffect()
local ft=Duel.GetMatchingGroupCount(1-tp,LOCATION_HAND)
if ft>num then
--local ft=Duel.GetMatchingGroupCount(1-tp,LOCATION_HAND)
--if ft>num then
ft = num
end
--end
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE)
local sg=Duel.SelectMatchingCard(1-tp,Card.IsAbleToGrave,1-tp,LOCATION_HAND,0,ft,ft,nil)
local sg=Duel.SelectMatchingCard(1-tp,cm.tgfil,1-tp,LOCATION_HAND,0,ft,ft,nil)
Duel.SendtoGrave(sg,REASON_EFFECT)
end
end
......
......@@ -45,10 +45,10 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function s.thfilter(c)
return c.setname=="Zx02" and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
return c.setname=="Zx02" and not c:IsForbidden()
end
function s.mfilter(c)
return c.setname=="Zx02" and c:IsPreviousLocation(LOCATION_MZONE) and c:IsType(TYPE_MONSTER)
return c:IsPreviousLocation(LOCATION_MZONE)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local mc=e:GetHandler():GetMaterial():Filter(s.mfilter,nil):GetCount()
......
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