Commit a510e532 authored by wind2009's avatar wind2009

Merge remote-tracking branch 'upstream/LEDE' into mc_master

parents 44eff41f 087494f5
...@@ -55,9 +55,10 @@ function c30336082.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,9 +55,10 @@ function c30336082.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c30336082.filter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c30336082.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 and g:GetFirst():IsLocation(LOCATION_HAND) then 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.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
Duel.BreakEffect() Duel.BreakEffect()
Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD,nil) local dg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_HAND,0,1,1,nil)
Duel.ShuffleHand(tp)
Duel.SendtoGrave(dg,REASON_EFFECT+REASON_DISCARD)
end end
end end
function c30336082.atkcon(e,tp,eg,ep,ev,re,r,rp) function c30336082.atkcon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -31,21 +31,19 @@ function s.initial_effect(c) ...@@ -31,21 +31,19 @@ function s.initial_effect(c)
Duel.RegisterEffect(ge1,0) Duel.RegisterEffect(ge1,0)
end end
end end
function s.spcfilter1(c) function s.spcfilter(c)
return c:IsReason(REASON_EFFECT) and (c:IsType(TYPE_MONSTER) or c:IsPreviousLocation(LOCATION_MZONE)) return c:IsReason(REASON_EFFECT) and (c:IsType(TYPE_MONSTER) or c:IsPreviousLocation(LOCATION_MZONE))
end and not c:IsPreviousLocation(LOCATION_SZONE)
function s.spcfilter2(c,tp)
return c:IsReason(REASON_EFFECT) and (c:IsType(TYPE_MONSTER) or c:IsPreviousLocation(LOCATION_MZONE))
and c:IsPreviousControler(tp)
end end
function s.regcon(e,tp,eg,ep,ev,re,r,rp) function s.regcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.spcfilter1,1,nil) return eg:IsExists(s.spcfilter,1,nil)
end end
function s.regop(e,tp,eg,ep,ev,re,r,rp) function s.regop(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(s.spcfilter2,1,nil,0) then local g=eg:Filter(s.spcfilter,nil)
if g:IsExists(Card.IsPreviousControler,1,nil,0) then
Duel.RegisterFlagEffect(0,id,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1) Duel.RegisterFlagEffect(0,id,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end end
if eg:IsExists(s.spcfilter2,1,nil,1) then if g:IsExists(Card.IsPreviousControler,1,nil,1) then
Duel.RegisterFlagEffect(1,id,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1) Duel.RegisterFlagEffect(1,id,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end end
end end
......
...@@ -39,7 +39,6 @@ function c66730191.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,7 +39,6 @@ function c66730191.activate(e,tp,eg,ep,ev,re,r,rp)
op=1 op=1
end end
end end
Duel.AdjustAll()
b2=Duel.GetMZoneCount(tp)>0 and Duel.IsExistingMatchingCard(c66730191.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) b2=Duel.GetMZoneCount(tp)>0 and Duel.IsExistingMatchingCard(c66730191.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp)
if b2 and (op==0 or ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and Duel.SelectYesNo(tp,aux.Stringid(66730191,2))) then if b2 and (op==0 or ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and Duel.SelectYesNo(tp,aux.Stringid(66730191,2))) then
if op~=0 then if op~=0 then
......
...@@ -50,7 +50,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,7 +50,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,nil) local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg1=g:SelectSubGroup(tp,aux.dncheck,false,1,2) local tg1=g:SelectSubGroup(tp,aux.dncheck,false,1,2)
if Duel.SendtoHand(tg1,nil,REASON_EFFECT)~=0 then if tg1 and Duel.SendtoHand(tg1,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,tg1) Duel.ConfirmCards(1-tp,tg1)
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
......
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