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

fix

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