Commit 3edfa09c authored by Tachibana's avatar Tachibana

watele

parent bdc5c83f
Pipeline #6615 passed with stages
in 34 minutes and 56 seconds
......@@ -27,6 +27,7 @@ function cm.initial_effect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(cm.condition)
e2:SetCost(cm.cost)
e2:SetTarget(cm.target)
......
......@@ -64,7 +64,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 and g:GetFirst():IsLocation(LOCATION_HAND) then
Duel.ConfirmCards(1-tp,g)
Duel.BreakEffect()
if Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
if Duel.GetMatchingGroupCount(nil,tp,LOCATION_HAND,0,nil)>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_HAND,0,1,1,nil)
local tc2=g2:GetFirst()
......
......@@ -72,7 +72,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,atk)
local tc=g:GetFirst()
if tc and Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)~=0 then
if Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
if Duel.GetMatchingGroupCount(nil,tp,LOCATION_HAND,0,nil)>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)
end
end
......
......@@ -68,7 +68,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,cm.filter0,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,g)
if Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
if Duel.GetMatchingGroupCount(nil,tp,LOCATION_HAND,0,nil)>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)
end
end
......
......@@ -44,7 +44,7 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
end
end
if g2:GetCount()>0 and ct2>0 and Duel.SelectYesNo(1-tp,aux.Stringid(m,3)) then
local g4=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,0,LOCATION_GRAVE,ct2,ct2,nil)
local g4=Duel.SelectMatchingCard(1-tp,Card.IsAbleToHand,1-tp,0,LOCATION_GRAVE,ct2,ct2,nil)
if #g4>=ct2 then
Duel.SendtoHand(g4,nil,REASON_EFFECT)
Duel.ConfirmCards(tp,g)
......
......@@ -25,7 +25,6 @@ function cm.cfilter(c)
return c:IsSummonType(SUMMON_TYPE_ADVANCE)
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
local loc=re:GetActivateLocation()
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
and not Duel.IsExistingMatchingCard(cm.cfilter,tp,0,LOCATION_MZONE,1,nil) and loc==LOCATION_MZONE and re:IsActiveType(TYPE_MONSTER)
......
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