Skip to content

Commit 89d700a

Browse files
committed
added Scissor Hercules
1 parent 640f2d0 commit 89d700a

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed

rush/c160217038.lua

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
--シザー・ヘラクレス
2+
--Scissor Hercules
3+
--scripted by YoshiDuels
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--summon without tribute
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
10+
e1:SetType(EFFECT_TYPE_SINGLE)
11+
e1:SetCode(EFFECT_SUMMON_PROC)
12+
e1:SetCondition(s.ntcon)
13+
c:RegisterEffect(e1)
14+
--Excavate the top 3 cards
15+
local e2=Effect.CreateEffect(c)
16+
e2:SetDescription(aux.Stringid(id,0))
17+
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
18+
e2:SetType(EFFECT_TYPE_IGNITION)
19+
e2:SetRange(LOCATION_MZONE)
20+
e2:SetCountLimit(1)
21+
e2:SetCondition(s.condition)
22+
e2:SetTarget(s.target)
23+
e2:SetOperation(s.operation)
24+
c:RegisterEffect(e2)
25+
end
26+
function s.ntfilter(c)
27+
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_INSECT)
28+
end
29+
function s.ntcon(e,c,minc)
30+
if c==nil then return true end
31+
return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
32+
and Duel.IsExistingMatchingCard(s.ntfilter,c:GetControler(),LOCATION_MZONE,0,1,nil)
33+
end
34+
function s.condition(e,tp,eg,ep,ev,re,r,rp)
35+
local c=e:GetHandler()
36+
return c:IsSummonPhaseMain() and c:IsStatus(STATUS_SUMMON_TURN+STATUS_SPSUMMON_TURN)
37+
end
38+
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
39+
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=3 end
40+
Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
41+
end
42+
function s.filter(c)
43+
return c:IsRace(RACE_INSECT) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsLevel(3,8) and c:IsAbleToHand()
44+
end
45+
function s.operation(e,tp,eg,ep,ev,re,r,rp)
46+
--Effect
47+
local c=e:GetHandler()
48+
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<3 then return end
49+
Duel.ConfirmDecktop(tp,3)
50+
local g=Duel.GetDecktopGroup(tp,3)
51+
Duel.DisableShuffleCheck()
52+
if g:IsExists(s.filter,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
53+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
54+
local tg=g:FilterSelect(tp,s.filter,1,1,nil)
55+
if #tg>0 then
56+
Duel.SendtoHand(tg,nil,REASON_EFFECT)
57+
Duel.ConfirmCards(1-tp,tg)
58+
Duel.ShuffleHand(tp)
59+
g:RemoveCard(tg)
60+
end
61+
end
62+
local ct=#g
63+
if ct>0 then
64+
Duel.MoveToDeckBottom(ct,tp)
65+
Duel.SortDeckbottom(tp,tp,ct)
66+
end
67+
end

0 commit comments

Comments
 (0)