Skip to content

Commit bb1c0db

Browse files
committed
added new rush cards
1 parent f3d3324 commit bb1c0db

File tree

2 files changed

+85
-0
lines changed

2 files changed

+85
-0
lines changed

rush/c160213038.lua

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
--恐竜駕ダイナ-ティラノ
2+
--Dynamic Dino Dynatyranno
3+
--Scripted by YoshiDuels
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Destroy 1 spell/trap your opponent controls
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetCategory(CATEGORY_DESTROY)
9+
e1:SetType(EFFECT_TYPE_IGNITION)
10+
e1:SetRange(LOCATION_MZONE)
11+
e1:SetCountLimit(1)
12+
e1:SetCondition(s.condition)
13+
e1:SetCost(s.cost)
14+
e1:SetTarget(s.target)
15+
e1:SetOperation(s.operation)
16+
c:RegisterEffect(e1)
17+
end
18+
function s.filter(c)
19+
return c:IsMonster() and not c:IsRace(RACE_DINOSAUR)
20+
end
21+
function s.condition(e,tp,eg,ep,ev,re,r,rp)
22+
return Duel.IsExistingMatchingCard(Card.IsMonster,tp,LOCATION_GRAVE,0,1,nil)
23+
and not Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE,0,1,nil)
24+
end
25+
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
26+
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD,0,1,nil) end
27+
end
28+
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
29+
local dg=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,nil)
30+
if chk==0 then return #dg>0 end
31+
end
32+
function s.operation(e,tp,eg,ep,ev,re,r,rp)
33+
--Requirement
34+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
35+
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD,0,1,1,nil)
36+
if Duel.SendtoGrave(g,REASON_COST)==0 then return end
37+
--Effect
38+
local dg=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,nil)
39+
if #dg>0 then
40+
local sg=dg:Select(tp,1,1,nil)
41+
Duel.HintSelection(sg)
42+
Duel.Destroy(sg,REASON_EFFECT)
43+
end
44+
end

rush/c160213039.lua

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
--恐竜駕ダイナ-トプス
2+
--Dynamic Dino Dynatops
3+
--Scripted by YoshiDuels
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Add to the hand 1 EARTH Dinosaur Maximum monster from the GY
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_TOHAND)
10+
e1:SetType(EFFECT_TYPE_IGNITION)
11+
e1:SetRange(LOCATION_MZONE)
12+
e1:SetCountLimit(1)
13+
e1:SetCondition(s.condition)
14+
e1:SetTarget(s.target)
15+
e1:SetOperation(s.operation)
16+
c:RegisterEffect(e1)
17+
end
18+
function s.filter(c)
19+
return c:IsMonster() and not c:IsRace(RACE_DINOSAUR)
20+
end
21+
function s.condition(e,tp,eg,ep,ev,re,r,rp)
22+
return Duel.IsExistingMatchingCard(Card.IsMonster,tp,LOCATION_GRAVE,0,1,nil)
23+
and not Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE,0,1,nil)
24+
and e:GetHandler():IsStatus(STATUS_SUMMON_TURN)
25+
end
26+
function s.thfilter(c)
27+
return c:IsRace(RACE_DINOSAUR) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_MAXIMUM) and c:IsAbleToHand()
28+
end
29+
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
30+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
31+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
32+
end
33+
function s.operation(e,tp,eg,ep,ev,re,r,rp)
34+
--Effect
35+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
36+
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,1,1,nil)
37+
if #g>0 then
38+
Duel.SendtoHand(g,nil,REASON_EFFECT)
39+
Duel.ConfirmCards(1-tp,g)
40+
end
41+
end

0 commit comments

Comments
 (0)