Skip to content

Commit f381272

Browse files
committed
added new rush cards
1 parent ec87a0c commit f381272

File tree

3 files changed

+90
-0
lines changed

3 files changed

+90
-0
lines changed

rush/c160020014.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ function s.initial_effect(c)
77
local e1=Effect.CreateEffect(c)
88
e1:SetType(EFFECT_TYPE_SINGLE)
99
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
10+
e1:SetRange(LOCATION_MZONE)
1011
e1:SetCondition(s.condition)
1112
e1:SetValue(s.indes)
1213
c:RegisterEffect(e1)

rush/c160020038.lua

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
--ミュリネス・パワー・ビートル
2+
--Mulliness Power Beetle
3+
--Scripted by YoshiDuels
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Special summon
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
9+
e1:SetType(EFFECT_TYPE_IGNITION)
10+
e1:SetRange(LOCATION_MZONE)
11+
e1:SetCountLimit(1)
12+
e1:SetCondition(s.condition)
13+
e1:SetTarget(s.target)
14+
e1:SetOperation(s.operation)
15+
c:RegisterEffect(e1)
16+
end
17+
function s.cfilter(c)
18+
return c:IsRace(RACE_INSECT) and c:IsAttribute(ATTRIBUTE_DARK)
19+
end
20+
function s.condition(e,tp,eg,ep,ev,re,r,rp)
21+
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE,0,4,nil)
22+
end
23+
function s.spfilter(c,e,tp)
24+
return c:IsRace(RACE_INSECT) and c:IsDefense(400) and c:HasContinuousRushEffect() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
25+
end
26+
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
27+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
28+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
29+
end
30+
function s.operation(e,tp,eg,ep,ev,re,r,rp)
31+
--Effect
32+
local ft=Duel.GetMZoneCount(tp)
33+
if ft<=0 then return end
34+
if ft>=2 then ft=2 end
35+
if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end
36+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
37+
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE,0,1,ft,nil,e,tp)
38+
if #g>0 then
39+
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
40+
end
41+
end

rush/c160020039.lua

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
--コクーン・キング・ビートル
2+
--Cocoon King Beetle
3+
--Scripted by YoshiDuels
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Draw
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_DRAW|CATEGORY_TOHAND)
10+
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
11+
e1:SetType(EFFECT_TYPE_IGNITION)
12+
e1:SetRange(LOCATION_MZONE)
13+
e1:SetCountLimit(1)
14+
e1:SetCondition(s.condition)
15+
e1:SetCost(s.cost)
16+
e1:SetTarget(s.target)
17+
e1:SetOperation(s.operation)
18+
c:RegisterEffect(e1)
19+
end
20+
function s.condition(e,tp,eg,ep,ev,re,r,rp)
21+
return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=10
22+
end
23+
function s.cfilter(c)
24+
return c:IsMonster() and c:IsRace(RACE_INSECT) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToGraveAsCost()
25+
end
26+
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
27+
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end
28+
end
29+
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
30+
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
31+
Duel.SetTargetPlayer(tp)
32+
Duel.SetTargetParam(1)
33+
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
34+
end
35+
function s.operation(e,tp,eg,ep,ev,re,r,rp)
36+
--Requirement
37+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
38+
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND,0,1,1,nil)
39+
if Duel.SendtoGrave(g,REASON_COST)<1 then return end
40+
--Effect
41+
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
42+
if Duel.Draw(p,d,REASON_EFFECT)>0 and Duel.IsPlayerCanDiscardDeck(tp,3)
43+
and Duel.IsExistingMatchingCard(Card.IsAttribute,tp,LOCATION_GRAVE,0,2,nil,ATTRIBUTE_DARK)
44+
and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
45+
Duel.BreakEffect()
46+
Duel.DiscardDeck(tp,3,REASON_EFFECT)
47+
end
48+
end

0 commit comments

Comments
 (0)