Skip to content

Commit d50f3ce

Browse files
committed
added new rush cards
1 parent 090a769 commit d50f3ce

File tree

2 files changed

+97
-0
lines changed

2 files changed

+97
-0
lines changed

rush/c160217003.lua

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
--髑巌王ヴァルストルム
2+
--Valstorm the Skullcrag King
3+
--scripted by YoshiDuels
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--fusion material
7+
c:EnableReviveLimit()
8+
Fusion.AddProcMixN(c,true,true,s.matfilter,3)
9+
--Cannot be destroyed by your opponent's effects
10+
local e1=Effect.CreateEffect(c)
11+
e1:SetType(EFFECT_TYPE_FIELD)
12+
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
13+
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
14+
e1:SetTargetRange(LOCATION_ONFIELD,0)
15+
e1:SetRange(LOCATION_MZONE)
16+
e1:SetTarget(s.indtg)
17+
e1:SetValue(aux.indoval)
18+
c:RegisterEffect(e1)
19+
--Spells/Traps cannot be returned
20+
local e1=Effect.CreateEffect(c)
21+
e1:SetType(EFFECT_TYPE_FIELD)
22+
e1:SetCode(EFFECT_CANNOT_TO_DECK)
23+
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE)
24+
e1:SetRange(LOCATION_MZONE)
25+
e1:SetCondition(s.indcond)
26+
e1:SetTarget(s.indtg2)
27+
e1:SetTargetRange(LOCATION_ONFIELD,0)
28+
e1:SetValue(s.value)
29+
c:RegisterEffect(e1)
30+
c:AddSideMaximumHandler(e1)
31+
local e2=e1:Clone()
32+
e2:SetCode(EFFECT_CANNOT_TO_HAND)
33+
c:RegisterEffect(e2)
34+
c:AddSideMaximumHandler(e2)
35+
end
36+
function s.matfilter(c,fc,sumtype,tp)
37+
return c:IsLevelBelow(8) and c:IsRace(RACE_ZOMBIE,fc,sumtype,tp)
38+
end
39+
function s.indtg(e,c)
40+
return c:IsSpellTrap()
41+
end
42+
function s.indcond(e)
43+
return Duel.IsTurnPlayer(1-e:GetHandlerPlayer())
44+
end
45+
function s.indtg2(e,c)
46+
return c:IsSpellTrap() or c==e:GetHandler()
47+
end
48+
function s.value(e,re,rp)
49+
return nil~=re
50+
end

rush/c160217015.lua

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
--髑巌襲来
2+
--Skullcrag Incursion
3+
--scripted by YoshiDuels
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Send to the Graveyard and Fusion Summon
7+
local params = {s.filter,s.mfilter,s.fextra,Fusion.ShuffleMaterial}
8+
local e1=Effect.CreateEffect(c)
9+
e1:SetDescription(aux.Stringid(id,0))
10+
e1:SetCategory(CATEGORY_DESTROY)
11+
e1:SetType(EFFECT_TYPE_ACTIVATE)
12+
e1:SetCode(EVENT_FREE_CHAIN)
13+
e1:SetCondition(s.condition)
14+
e1:SetTarget(s.target)
15+
e1:SetOperation(s.operation(Fusion.SummonEffTG(table.unpack(params)),Fusion.SummonEffOP(table.unpack(params))))
16+
c:RegisterEffect(e1)
17+
end
18+
function s.filter(c)
19+
return c:IsRace(RACE_ZOMBIE) and c:IsDefense(0)
20+
end
21+
function s.mfilter(c)
22+
return c:IsRace(RACE_ZOMBIE) and c:IsLocation(LOCATION_GRAVE|LOCATION_MZONE) and c:IsAbleToDeck()
23+
end
24+
function s.fextra(e,tp,mg)
25+
return Duel.GetMatchingGroup(s.mfilter,tp,LOCATION_GRAVE|LOCATION_MZONE,0,nil)
26+
end
27+
function s.condition(e,tp,eg,ep,ev,re,r,rp)
28+
return Duel.GetMatchingGroupCountRush(Card.IsNotMaximumModeSide,tp,LOCATION_MZONE,LOCATION_MZONE,nil)>=3
29+
end
30+
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
31+
local dg=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,nil)
32+
if chk==0 then return #dg>0 end
33+
end
34+
function s.operation(fustg,fusop)
35+
return function(e,tp,eg,ep,ev,re,r,rp)
36+
--Effect
37+
local dg=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,nil)
38+
if #dg>0 then
39+
local sg=dg:Select(tp,1,1,nil)
40+
Duel.HintSelection(sg)
41+
if Duel.Destroy(sg,REASON_EFFECT)>0 and fustg(e,tp,eg,ep,ev,re,r,rp,0) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
42+
Duel.BreakEffect()
43+
fusop(e,tp,eg,ep,ev,re,r,rp)
44+
end
45+
end
46+
end
47+
end

0 commit comments

Comments
 (0)