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