Commit 5d7079a0 authored by DailyShana's avatar DailyShana

fix

parent 98f76284
...@@ -19,13 +19,19 @@ function c11834972.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -19,13 +19,19 @@ function c11834972.condition(e,tp,eg,ep,ev,re,r,rp)
end end
function c11834972.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c11834972.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,1) end if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,1) end
local ct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0) local ct={}
if ct>5 then ct=5 end for i=5,1,-1 do
local t={} if Duel.IsPlayerCanDiscardDeckAsCost(tp,i) then
for i=1,ct do t[i]=i end table.insert(ct,i)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11834972,1)) end
local ac=Duel.AnnounceNumber(tp,table.unpack(t)) end
Duel.DiscardDeck(tp,ac,REASON_COST) if #ct==1 then
Duel.DiscardDeck(tp,ct[1],REASON_COST)
else
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11834972,1))
local ac=Duel.AnnounceNumber(tp,table.unpack(ct))
Duel.DiscardDeck(tp,ac,REASON_COST)
end
local g=Duel.GetOperatedGroup() local g=Duel.GetOperatedGroup()
e:SetLabel(g:FilterCount(Card.IsSetCard,nil,0x39)*200) e:SetLabel(g:FilterCount(Card.IsSetCard,nil,0x39)*200)
end end
......
...@@ -61,15 +61,18 @@ function c42256406.cbop(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,15 +61,18 @@ function c42256406.cbop(e,tp,eg,ep,ev,re,r,rp)
end end
function c42256406.defcost(e,tp,eg,ep,ev,re,r,rp,chk) function c42256406.defcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,1) end if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,1) end
local ct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0) local ct={}
if ct==1 then for i=3,1,-1 do
Duel.DiscardDeck(tp,1,REASON_COST) if Duel.IsPlayerCanDiscardDeckAsCost(tp,i) then
table.insert(ct,i)
end
end
if #ct==1 then
Duel.DiscardDeck(tp,ct[1],REASON_COST)
e:SetLabel(1) e:SetLabel(1)
else else
local ac=0
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(42256406,3)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(42256406,3))
if ct==2 then ac=Duel.AnnounceNumber(tp,1,2) local ac=Duel.AnnounceNumber(tp,table.unpack(ct))
else ac=Duel.AnnounceNumber(tp,1,2,3) end
Duel.DiscardDeck(tp,ac,REASON_COST) Duel.DiscardDeck(tp,ac,REASON_COST)
e:SetLabel(ac) e:SetLabel(ac)
end end
......
...@@ -36,15 +36,18 @@ end ...@@ -36,15 +36,18 @@ end
function c83531441.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) function c83531441.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,1) and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,1) and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
local ct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0) local ct={}
if ct==1 then for i=3,1,-1 do
Duel.DiscardDeck(tp,1,REASON_COST) if Duel.IsPlayerCanDiscardDeckAsCost(tp,i) then
table.insert(ct,i)
end
end
if #ct==1 then
Duel.DiscardDeck(tp,ct[1],REASON_COST)
e:SetLabel(1) e:SetLabel(1)
else else
local ac=0
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(83531441,2)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(83531441,2))
if ct==2 then ac=Duel.AnnounceNumber(tp,2,1) local ac=Duel.AnnounceNumber(tp,table.unpack(ct))
else ac=Duel.AnnounceNumber(tp,3,2,1) end
Duel.DiscardDeck(tp,ac,REASON_COST) Duel.DiscardDeck(tp,ac,REASON_COST)
e:SetLabel(ac) e:SetLabel(ac)
end end
......
...@@ -23,15 +23,18 @@ function c85087012.initial_effect(c) ...@@ -23,15 +23,18 @@ function c85087012.initial_effect(c)
end end
function c85087012.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c85087012.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,1) end if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,1) end
local ct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0) local ct={}
if ct==1 then for i=3,1,-1 do
Duel.DiscardDeck(tp,1,REASON_COST) if Duel.IsPlayerCanDiscardDeckAsCost(tp,i) then
table.insert(ct,i)
end
end
if #ct==1 then
Duel.DiscardDeck(tp,ct[1],REASON_COST)
e:SetLabel(1) e:SetLabel(1)
else else
local ac=0
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(85087012,2)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(85087012,2))
if ct==2 then ac=Duel.AnnounceNumber(tp,2,1) local ac=Duel.AnnounceNumber(tp,table.unpack(ct))
else ac=Duel.AnnounceNumber(tp,3,2,1) end
Duel.DiscardDeck(tp,ac,REASON_COST) Duel.DiscardDeck(tp,ac,REASON_COST)
e:SetLabel(ac) e:SetLabel(ac)
end end
......
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