Commit 612c675b authored by wind2009's avatar wind2009

Fix

parent 784d38f9
Pipeline #32757 passed with stages
in 2 minutes and 20 seconds
...@@ -71,7 +71,8 @@ function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -71,7 +71,8 @@ function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function s.lvop(e,tp,eg,ep,ev,re,r,rp) function s.lvop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) then local label=e:GetLabel()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) and tc:IsLevelAbove(1) and not tc:IsLevel(label) then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetCode(EFFECT_CHANGE_LEVEL)
......
...@@ -22,17 +22,26 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -22,17 +22,26 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.DisableShuffleCheck() Duel.DisableShuffleCheck()
Duel.Remove(g,POS_FACEDOWN,REASON_COST) Duel.Remove(g,POS_FACEDOWN,REASON_COST)
end end
function s.getrmdg(tp)
local cg=Group.CreateGroup()
for ct=1,7 do
local g=Duel.GetDecktopGroup(1-tp,ct)
if not g:FilterCount(Card.IsAbleToRemove,nil,1-tp,POS_FACEDOWN,REASON_RULE)==ct then break end
cg=g
end
return cg
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local rg=Duel.GetDecktopGroup(1-tp,7) local rg=s.getrmdg(tp)
local ct1=Duel.GetMatchingGroupCount(Card.IsAbleToRemove,tp,0,LOCATION_EXTRA,nil,1-tp,POS_FACEDOWN,REASON_RULE) local ct1=Duel.GetMatchingGroupCount(Card.IsAbleToRemove,tp,0,LOCATION_EXTRA,nil,1-tp,POS_FACEDOWN,REASON_RULE)
local ct2=rg:FilterCount(Card.IsAbleToRemove,nil,1-tp,POS_FACEDOWN,REASON_RULE) local ct2=rg:GetCount()
if chk==0 then return ct1+ct2>=7 end if chk==0 then return ct1+ct2>=7 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,7,0,LOCATION_EXTRA+LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,7,0,LOCATION_EXTRA+LOCATION_DECK)
end end
function s.activate(e,tp,eg,ep,ev,re,r,rp,chk) function s.activate(e,tp,eg,ep,ev,re,r,rp,chk)
local dg=Duel.GetDecktopGroup(1-tp,7) local dg=s.getrmdg(tp)
local edg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_EXTRA,nil,1-tp,POS_FACEDOWN,REASON_RULE) local edg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_EXTRA,nil,1-tp,POS_FACEDOWN,REASON_RULE)
local ct1=dg:FilterCount(Card.IsAbleToRemove,nil,1-tp,POS_FACEDOWN,REASON_RULE) local ct1=dg:GetCount()
local ct2=edg:GetCount() local ct2=edg:GetCount()
if ct1+ct2<7 then return end if ct1+ct2<7 then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,1)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,1))
......
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