Commit d9023826 authored by Chen Bill's avatar Chen Bill

add Duel.ShuffleExtra

parent ba099435
...@@ -38,6 +38,7 @@ end ...@@ -38,6 +38,7 @@ end
function c10678778.rmop(e,tp,eg,ep,ev,re,r,rp) function c10678778.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c10678778.rmfilter,tp,0,LOCATION_EXTRA,nil) local g=Duel.GetMatchingGroup(c10678778.rmfilter,tp,0,LOCATION_EXTRA,nil)
if g:GetCount()==0 then return end if g:GetCount()==0 then return end
Duel.ShuffleExtra(1-tp)
local tc=g:RandomSelect(tp,1):GetFirst() local tc=g:RandomSelect(tp,1):GetFirst()
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
local atk=tc:GetAttack() local atk=tc:GetAttack()
......
...@@ -11,6 +11,7 @@ end ...@@ -11,6 +11,7 @@ end
function c21088856.operation(e,tp,eg,ep,ev,re,r,rp) function c21088856.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(1-tp,LOCATION_EXTRA,0) local g=Duel.GetFieldGroup(1-tp,LOCATION_EXTRA,0)
if g:GetCount()==0 then return end if g:GetCount()==0 then return end
Duel.ShuffleExtra(1-tp)
local tc=g:RandomSelect(tp,1):GetFirst() local tc=g:RandomSelect(tp,1):GetFirst()
Duel.ConfirmCards(tp,tc) Duel.ConfirmCards(tp,tc)
local atk=tc:GetAttack() local atk=tc:GetAttack()
......
...@@ -37,6 +37,7 @@ function c29085954.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -37,6 +37,7 @@ function c29085954.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_EXTRA,0) local g=Duel.GetFieldGroup(tp,LOCATION_EXTRA,0)
if g:GetCount()>0 and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) if g:GetCount()>0 and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
and c:IsFaceup() and c:IsRelateToEffect(e) and c:IsControler(tp) and not c:IsImmuneToEffect(e) then and c:IsFaceup() and c:IsRelateToEffect(e) and c:IsControler(tp) and not c:IsImmuneToEffect(e) then
Duel.ShuffleExtra(tp)
local tg=g:RandomSelect(1-tp,1) local tg=g:RandomSelect(1-tp,1)
Duel.ConfirmCards(1-tp,tg) Duel.ConfirmCards(1-tp,tg)
if tg:IsExists(c29085954.filter,1,nil,e,tp,c) then if tg:IsExists(c29085954.filter,1,nil,e,tp,c) then
......
...@@ -51,6 +51,7 @@ function c36092504.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,6 +51,7 @@ function c36092504.activate(e,tp,eg,ep,ev,re,r,rp)
g2=Duel.GetMatchingGroup(aux.NecroValleyFilter(Card.IsAbleToRemove),tp,0,LOCATION_ONFIELD+LOCATION_EXTRA+LOCATION_GRAVE,nil) g2=Duel.GetMatchingGroup(aux.NecroValleyFilter(Card.IsAbleToRemove),tp,0,LOCATION_ONFIELD+LOCATION_EXTRA+LOCATION_GRAVE,nil)
if g1:IsExists(Card.IsType,1,nil,TYPE_SYNCHRO) and g2:IsExists(c36092504.rmfilter1,3,nil) then if g1:IsExists(Card.IsType,1,nil,TYPE_SYNCHRO) and g2:IsExists(c36092504.rmfilter1,3,nil) then
if res~=0 then Duel.BreakEffect() end if res~=0 then Duel.BreakEffect() end
Duel.ShuffleExtra(1-tp)
local rg=g2:Filter(c36092504.rmfilter1,nil):RandomSelect(tp,3) local rg=g2:Filter(c36092504.rmfilter1,nil):RandomSelect(tp,3)
res=Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) res=Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)
end end
......
...@@ -26,6 +26,7 @@ function c48814566.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -26,6 +26,7 @@ function c48814566.activate(e,tp,eg,ep,ev,re,r,rp)
local sg1=g1:Select(tp,1,#g2,nil) local sg1=g1:Select(tp,1,#g2,nil)
if Duel.Remove(sg1,POS_FACEDOWN,REASON_EFFECT)~=0 and sg1:IsExists(Card.IsLocation,1,nil,LOCATION_REMOVED) then if Duel.Remove(sg1,POS_FACEDOWN,REASON_EFFECT)~=0 and sg1:IsExists(Card.IsLocation,1,nil,LOCATION_REMOVED) then
local og1=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_REMOVED) local og1=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_REMOVED)
Duel.ShuffleExtra(1-tp)
local sg2=g2:RandomSelect(tp,#og1) local sg2=g2:RandomSelect(tp,#og1)
if Duel.Remove(sg2,POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY)~=0 and sg2:IsExists(Card.IsLocation,1,nil,LOCATION_REMOVED) then if Duel.Remove(sg2,POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY)~=0 and sg2:IsExists(Card.IsLocation,1,nil,LOCATION_REMOVED) then
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -34,6 +34,7 @@ function c49238328.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -34,6 +34,7 @@ function c49238328.target(e,tp,eg,ep,ev,re,r,rp,chk)
else else
op=Duel.SelectOption(tp,aux.Stringid(49238328,0)) op=Duel.SelectOption(tp,aux.Stringid(49238328,0))
end end
Duel.ShuffleExtra(tp)
local rg=g:RandomSelect(tp,3+op*3) local rg=g:RandomSelect(tp,3+op*3)
Duel.Remove(rg,POS_FACEDOWN,REASON_COST) Duel.Remove(rg,POS_FACEDOWN,REASON_COST)
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
......
...@@ -24,6 +24,7 @@ function c73026394.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -24,6 +24,7 @@ function c73026394.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c73026394.activate(e,tp,eg,ep,ev,re,r,rp) function c73026394.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev) Duel.NegateActivation(ev)
Duel.ShuffleExtra(tp)
local g=Duel.GetMatchingGroup(c73026394.filter,tp,LOCATION_EXTRA,0,nil):RandomSelect(tp,1) local g=Duel.GetMatchingGroup(c73026394.filter,tp,LOCATION_EXTRA,0,nil):RandomSelect(tp,1)
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_EFFECT)
end end
...@@ -28,6 +28,7 @@ function c7925734.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -28,6 +28,7 @@ function c7925734.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c7925734.rmfilter,tp,LOCATION_EXTRA,0,nil) local g=Duel.GetMatchingGroup(c7925734.rmfilter,tp,LOCATION_EXTRA,0,nil)
if g:GetCount()==0 then return end if g:GetCount()==0 then return end
Duel.ShuffleExtra(tp)
local tc=g:RandomSelect(tp,1):GetFirst() local tc=g:RandomSelect(tp,1):GetFirst()
if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_REMOVED) if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_REMOVED)
and c:IsRelateToEffect(e) then and c:IsRelateToEffect(e) 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