Skip to content

Commit a8339a8

Browse files
committed
added new rush cards
1 parent ed49163 commit a8339a8

2 files changed

Lines changed: 113 additions & 0 deletions

File tree

‎rush/c160220026.lua‎

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
--ディメンション・プラマ
2+
--Dimension Pramma
3+
--scripted by YoshiDuels
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
-- Mill and add to hand
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_DECKDES+CATEGORY_TOHAND)
10+
e1:SetType(EFFECT_TYPE_IGNITION)
11+
e1:SetRange(LOCATION_MZONE)
12+
e1:SetCountLimit(1)
13+
e1:SetTarget(s.target)
14+
e1:SetOperation(s.operation)
15+
c:RegisterEffect(e1)
16+
end
17+
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
18+
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,3) end
19+
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3)
20+
Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
21+
end
22+
function s.thfilter(c)
23+
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_CYBERSE) and c:IsLevel(8) and c:IsAbleToHand()
24+
end
25+
function s.operation(e,tp,eg,ep,ev,re,r,rp)
26+
--Effect
27+
if Duel.DiscardDeck(tp,3,REASON_EFFECT)<1 then return end
28+
local g=Duel.GetMatchingGroup(Card.IsMonster,tp,LOCATION_GRAVE,0,nil)
29+
if g:GetClassCount(Card.GetRace)>=3 and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
30+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
31+
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,1,1,nil)
32+
if #g>0 then
33+
Duel.BreakEffect()
34+
Duel.SendtoHand(g,nil,REASON_EFFECT)
35+
Duel.ConfirmCards(1-tp,g)
36+
end
37+
end
38+
--Prevent from attacking
39+
local e1=Effect.CreateEffect(e:GetHandler())
40+
e1:SetType(EFFECT_TYPE_FIELD)
41+
e1:SetCode(EFFECT_CANNOT_ATTACK)
42+
e1:SetTargetRange(LOCATION_MZONE,0)
43+
e1:SetTarget(function(_,c) return not (c:IsLevelAbove(8) and c:IsRace(RACE_CYBERSE)) end)
44+
e1:SetReset(RESET_PHASE|PHASE_END)
45+
Duel.RegisterEffect(e1,tp)
46+
end

‎rush/c160220028.lua‎

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
--次元の盟友 レイフ
2+
--Reifu the Dimensional Sworn Ally
3+
--scripted by YoshiDuels
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Reduce ATK
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,1))
9+
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DRAW)
10+
e1:SetType(EFFECT_TYPE_IGNITION)
11+
e1:SetRange(LOCATION_MZONE)
12+
e1:SetCountLimit(1)
13+
e1:SetCondition(s.condition)
14+
e1:SetCost(s.cost)
15+
e1:SetTarget(s.target)
16+
e1:SetOperation(s.operation)
17+
c:RegisterEffect(e1)
18+
end
19+
function s.condition(e,tp,eg,ep,ev,re,r,rp)
20+
local c=e:GetHandler()
21+
return c:IsSummonPhaseMain() and c:IsStatus(STATUS_SUMMON_TURN+STATUS_SPSUMMON_TURN)
22+
end
23+
function s.cfilter(c)
24+
return c:IsMonster() and c:IsRace(RACE_CYBERSE) and not c:IsPublic()
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.filter(c,lvl)
30+
return c:IsFaceup() and c:IsNotMaximumModeSide()
31+
end
32+
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
33+
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,0,LOCATION_MZONE,1,nil,e:GetHandler():GetLevel()) end
34+
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,nil,1,tp,-400)
35+
end
36+
function s.thfilter(c)
37+
return c:IsCode(160220034) and c:IsAbleToHand()
38+
end
39+
function s.operation(e,tp,eg,ep,ev,re,r,rp)
40+
local c=e:GetHandler()
41+
--Requirement
42+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
43+
local tc=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND,0,1,1,nil)
44+
Duel.ConfirmCards(1-tp,tc)
45+
Duel.ShuffleHand(tp)
46+
--Effect
47+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF)
48+
local g=Duel.SelectMatchingCard(tp,s.filter,tp,0,LOCATION_MZONE,1,1,nil,c:GetLevel())
49+
if #g>0 then
50+
Duel.HintSelection(g)
51+
local e1=Effect.CreateEffect(c)
52+
e1:SetType(EFFECT_TYPE_SINGLE)
53+
e1:SetCode(EFFECT_UPDATE_ATTACK)
54+
e1:SetValue(-400)
55+
e1:SetReset(RESETS_STANDARD_PHASE_END)
56+
g:GetFirst():RegisterEffect(e1)
57+
if Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
58+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
59+
local g2=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,1,1,nil)
60+
if #g2>0 then
61+
Duel.BreakEffect()
62+
Duel.SendtoHand(g2,nil,REASON_EFFECT)
63+
Duel.ConfirmCards(1-tp,g2)
64+
end
65+
end
66+
end
67+
end

0 commit comments

Comments
 (0)