Commit 705eb050 authored by 聖園ミカ's avatar 聖園ミカ 🐟

byd

parent 4eb2e358
...@@ -31,11 +31,8 @@ function cm.atkval(e,c) ...@@ -31,11 +31,8 @@ function cm.atkval(e,c)
local val=math.max(c:GetBaseAttack(),0) local val=math.max(c:GetBaseAttack(),0)
return val*-1 return val*-1
end end
function cm.thfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function cm.cfilter(c) function cm.cfilter(c)
return c:IsFaceup() and c:GetBaseAttack()==0 return c:IsFaceup() and c:GetBaseAttack()==0 and c:IsType(TYPE_MONSTER)
end end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetMatchingGroupCount(cm.cfilter,tp,LOCATION_MZONE,0,nil) local ct=Duel.GetMatchingGroupCount(cm.cfilter,tp,LOCATION_MZONE,0,nil)
...@@ -43,20 +40,22 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -43,20 +40,22 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
and Duel.GetDecktopGroup(tp,ct):IsExists(Card.IsAbleToHand,1,nil) end and Duel.GetDecktopGroup(tp,ct):IsExists(Card.IsAbleToHand,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function cm.thfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp) function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(cm.cfilter,tp,LOCATION_MZONE,0,nil) local ct=Duel.GetMatchingGroupCount(cm.cfilter,tp,LOCATION_MZONE,0,nil)
Duel.ConfirmDecktop(tp,ct) Duel.ConfirmDecktop(tp,ct)
local g=Duel.GetDecktopGroup(tp,ct) local g=Duel.GetDecktopGroup(tp,ct)
if #g>0 then if #g>0 then
Duel.DisableShuffleCheck() Duel.DisableShuffleCheck()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) if g:IsExists(cm.thfilter,1,nil) then
local sc=g:FilterSelect(tp,cm.thfilter,1,1,nil):GetFirst() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
if sc:IsAbleToHand() then local sg=g:FilterSelect(tp,cm.thfilter,1,1,nil)
Duel.SendtoHand(sc,nil,REASON_EFFECT) Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sc) Duel.ConfirmCards(1-tp,sg)
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
else g:Sub(sg)
Duel.SendtoGrave(sc,REASON_RULE)
end end
end end
if #g>1 then if #g>1 then
......
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