Skip to content

Commit 72a8f6b

Browse files
committed
added new rush cards
1 parent c80892a commit 72a8f6b

File tree

2 files changed

+124
-0
lines changed

2 files changed

+124
-0
lines changed

rush/c160020064.lua

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
--ボーン・スパイン・ウィップ
2+
--Bone Spine Whip
3+
--Scripted by YoshiDuels
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Set 1 "Fusion" or "Fusion Cancel"
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetType(EFFECT_TYPE_ACTIVATE)
10+
e1:SetCode(EVENT_SUMMON_SUCCESS)
11+
e1:SetProperty(EFFECT_FLAG_DELAY)
12+
e1:SetCondition(s.condition)
13+
e1:SetTarget(s.target)
14+
e1:SetOperation(s.activate)
15+
c:RegisterEffect(e1)
16+
local e2=e1:Clone()
17+
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
18+
c:RegisterEffect(e2)
19+
end
20+
function s.condition(e,tp,eg,ep,ev,re,r,rp)
21+
return eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp)
22+
end
23+
function s.filter(c,e,tp)
24+
return c:IsRace(RACE_ZOMBIE) and c:IsLevelBelow(5)
25+
and (c:IsAbleToHand() or (Duel.GetMZoneCount(tp)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)))
26+
end
27+
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
28+
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
29+
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0)
30+
Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
31+
Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
32+
end
33+
function s.cfilter2(c)
34+
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WIND)
35+
end
36+
function s.thfilter(c)
37+
return c:IsLevelAbove(8) and c:IsAbleToHand() and not c:IsMaximumModeSide()
38+
end
39+
function s.activate(e,tp,eg,ep,ev,re,r,rp)
40+
--Effect
41+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
42+
local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst()
43+
if tc then
44+
aux.ToHandOrElse(tc,tp,
45+
function()
46+
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false)
47+
end,
48+
function()
49+
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
50+
end,
51+
aux.Stringid(id,2)
52+
)
53+
if not Duel.IsExistingMatchingCard(s.cfilter2,tp,LOCATION_MZONE,0,1,nil) then return end
54+
local g2=Duel.GetMatchingGroup(s.thfilter,tp,0,LOCATION_MZONE,nil)
55+
if #g2>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
56+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
57+
local sg=g2:Select(tp,1,1,nil)
58+
sg=sg:AddMaximumCheck()
59+
Duel.HintSelection(sg)
60+
if #sg>0 then
61+
Duel.SendtoHand(sg,nil,REASON_EFFECT)
62+
end
63+
end
64+
end
65+
end

rush/c160213051.lua

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
--奇跡の超進化
2+
--Ultra Evolution Miracle
3+
--Scripted by YoshiDuels
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Activate
7+
local params={aux.FilterBoolFunction(s.fusfilter),s.mfilter,s.fextra,Fusion.ShuffleMaterial,mincount=2,maxcount=2}
8+
local e1=Effect.CreateEffect(c)
9+
e1:SetDescription(aux.Stringid(id,0))
10+
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
11+
e1:SetType(EFFECT_TYPE_ACTIVATE)
12+
e1:SetCode(EVENT_DRAW)
13+
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
14+
e1:SetCondition(s.condition)
15+
e1:SetTarget(s.target)
16+
e1:SetOperation(s.operation(Fusion.SummonEffTG(table.unpack(params)),Fusion.SummonEffOP(table.unpack(params))))
17+
c:RegisterEffect(e1)
18+
end
19+
function s.fusfilter(c)
20+
return c:IsRace(RACE_DINOSAUR) and c:IsLevelBelow(9)
21+
end
22+
function s.mfilter(c)
23+
return c:IsLocation(LOCATION_GRAVE) and c:IsRace(RACE_DINOSAUR) and c:IsAbleToDeck()
24+
end
25+
function s.fextra(e,tp,mg)
26+
return Duel.GetMatchingGroup(s.mfilter,tp,LOCATION_GRAVE,0,nil)
27+
end
28+
function s.condition(e,tp,eg,ep,ev,re,r,rp)
29+
return ep==1-tp and Duel.IsTurnPlayer(1-tp)
30+
end
31+
function s.filter(c)
32+
return c:IsRace(RACE_DINOSAUR) and c:IsFaceup() and c:IsNotMaximumModeSide()
33+
end
34+
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
35+
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil) end
36+
end
37+
function s.operation(fustg,fusop)
38+
return function(e,tp,eg,ep,ev,re,r,rp)
39+
--Effect
40+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
41+
local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil):GetFirst()
42+
if not tc then return end
43+
Duel.HintSelection(tc)
44+
--Cannot be destroyed by opponent's card effects
45+
local e1=Effect.CreateEffect(e:GetHandler())
46+
e1:SetType(EFFECT_TYPE_SINGLE)
47+
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
48+
e1:SetDescription(3001)
49+
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
50+
e1:SetRange(LOCATION_MZONE)
51+
e1:SetReset(RESETS_STANDARD_PHASE_END)
52+
e1:SetValue(1)
53+
tc:RegisterEffect(e1)
54+
if fustg(e,tp,eg,ep,ev,re,r,rp,0) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
55+
Duel.BreakEffect()
56+
fusop(e,tp,eg,ep,ev,re,r,rp)
57+
end
58+
end
59+
end

0 commit comments

Comments
 (0)