Skip to content

Commit e980159

Browse files
committed
added new rush cards
1 parent 5369941 commit e980159

2 files changed

Lines changed: 95 additions & 0 deletions

File tree

rush/c160022023.lua

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
--勝敗を分かつ剣士
2+
--The Swordsman Who Doles Out Victory
3+
--scripted by YoshiDuels
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Name becomes "Buster Blader" in the Graveyard
7+
local e0=Effect.CreateEffect(c)
8+
e0:SetType(EFFECT_TYPE_SINGLE)
9+
e0:SetCode(EFFECT_CHANGE_CODE)
10+
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
11+
e0:SetRange(LOCATION_GRAVE)
12+
e0:SetValue(78193831)
13+
c:RegisterEffect(e0)
14+
--Name change
15+
local e1=Effect.CreateEffect(c)
16+
e1:SetDescription(aux.Stringid(id,1))
17+
e1:SetCategory(CATEGORY_TOHAND)
18+
e1:SetType(EFFECT_TYPE_IGNITION)
19+
e1:SetRange(LOCATION_MZONE)
20+
e1:SetCountLimit(1)
21+
e1:SetCost(s.cost)
22+
e1:SetTarget(s.target)
23+
e1:SetOperation(s.operation)
24+
c:RegisterEffect(e1)
25+
end
26+
s.listed_names={78193831,CARD_POLYMERIZATION,160022054}
27+
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
28+
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end
29+
end
30+
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
31+
local c=e:GetHandler()
32+
if chk==0 then return not c:IsCode(78193831) end
33+
end
34+
function s.thfilter(c)
35+
return c:IsCode(CARD_POLYMERIZATION,160022054) and c:IsAbleToHand()
36+
end
37+
function s.operation(e,tp,eg,ep,ev,re,r,rp)
38+
--Requirement
39+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
40+
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,1,nil)
41+
if Duel.SendtoGrave(g,REASON_COST)==0 then return end
42+
--Effect
43+
local c=e:GetHandler()
44+
--Name becomes "Buster Blader"
45+
local e1=Effect.CreateEffect(c)
46+
e1:SetType(EFFECT_TYPE_SINGLE)
47+
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
48+
e1:SetCode(EFFECT_CHANGE_CODE)
49+
e1:SetValue(78193831)
50+
e1:SetReset(RESETS_STANDARD_PHASE_END)
51+
c:RegisterEffect(e1)
52+
if Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
53+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
54+
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
55+
if #g>0 then
56+
Duel.SendtoHand(g,nil,REASON_EFFECT)
57+
Duel.ConfirmCards(1-tp,g)
58+
end
59+
end
60+
--Cannot attack
61+
local e2=Effect.CreateEffect(c)
62+
e2:SetDescription(3206)
63+
e2:SetType(EFFECT_TYPE_SINGLE)
64+
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
65+
e2:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
66+
e2:SetReset(RESETS_STANDARD_PHASE_END)
67+
c:RegisterEffect(e2)
68+
end

rush/c160022054.lua

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
--奇跡の秘術
2+
--Miracle Secret Arts
3+
--scripted by YoshiDuels
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
local e1=Fusion.CreateSummonEff(c,nil,s.mfilter,s.fextra,Fusion.ShuffleMaterial,nil,nil,2)
7+
e1:SetCondition(s.condition)
8+
c:RegisterEffect(e1)
9+
end
10+
function s.condition(e,tp,eg,ep,ev,re,r,rp)
11+
return Duel.IsExistingMatchingCard(Card.IsAttackPos,tp,0,LOCATION_MZONE,1,nil)
12+
end
13+
function s.mfilter(c)
14+
if not c:IsCode(CARD_DARK_MAGICIAN,78193831) then return false end
15+
if c:IsLocation(LOCATION_GRAVE) then return c:IsAbleToDeck() end
16+
return true
17+
end
18+
function s.fcheck(tp,sg,fc)
19+
return sg:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)==1 and sg:FilterCount(Card.IsLocation,nil,LOCATION_GRAVE)==1
20+
end
21+
function s.fextra(e,tp,mg)
22+
local eg=Duel.GetMatchingGroup(s.mfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil)
23+
if #eg>0 then
24+
return eg,s.fcheck
25+
end
26+
return nil
27+
end

0 commit comments

Comments
 (0)