Skip to content

Commit de508fc

Browse files
committed
added Painful Choice
1 parent dea3a34 commit de508fc

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed

proc_rush.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ local LEGEND_LIST={160001000,160205001,160418001,160002000,160421015,160404001,1
1111
160320038,160018036,160212004,160212003,160402044,160212075,160212001,160402045,160019063,160019064,160019065,
1212
160213078,160213082,160402047,160213084,160020059,160213076,160020001,160020040,160020000,160214052,160323029,
1313
160214020,160021065,160021027,160402052,160215086,160324001,160402055,160324022,160023000,160217058,160024000,
14-
160024029}
14+
160024029,160402062}
1515
-- Returns if a card is a Legend. Can be updated if a GetOT function is added to the core
1616
function Card.IsLegend(c)
1717
return c:IsHasEffect(EFFECT_IS_LEGEND) or c:IsOriginalCode(table.unpack(LEGEND_LIST))

rush/c160402062.lua

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
--苦渋の選択
2+
--Painful Choice
3+
--scripted by YoshiDuels
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
-- Add excavated monster to hand
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
10+
e1:SetType(EFFECT_TYPE_ACTIVATE)
11+
e1:SetCode(EVENT_FREE_CHAIN)
12+
e1:SetTarget(s.target)
13+
e1:SetOperation(s.operation)
14+
c:RegisterEffect(e1)
15+
end
16+
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
17+
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=5 end
18+
Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
19+
end
20+
function s.operation(e,tp,eg,ep,ev,re,r,rp)
21+
--Effect
22+
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<5 then return end
23+
Duel.ConfirmDecktop(tp,5)
24+
local g=Duel.GetDecktopGroup(tp,5)
25+
if g:IsExists(Card.IsAbleToHand,1,nil) then
26+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
27+
local tg=g:FilterSelect(1-tp,Card.IsAbleToHand,1,1,nil)
28+
if #tg>0 then
29+
Duel.DisableShuffleCheck()
30+
Duel.SendtoHand(tg,nil,REASON_EFFECT)
31+
Duel.ConfirmCards(1-tp,tg)
32+
Duel.ShuffleHand(tp)
33+
g:RemoveCard(tg)
34+
end
35+
end
36+
Duel.SendtoGrave(g,REASON_EFFECT|REASON_EXCAVATE)
37+
end

0 commit comments

Comments
 (0)