Skip to content

Commit 6b1e544

Browse files
committed
added new rush cards
1 parent 25aebeb commit 6b1e544

File tree

2 files changed

+132
-0
lines changed

2 files changed

+132
-0
lines changed

rush/c160217044.lua

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
--癒しの聖風ラーナ
2+
--Lana the Holy Wind of Healing
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:SetType(EFFECT_TYPE_FIELD)
9+
e1:SetCode(EFFECT_SPSUMMON_PROC)
10+
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
11+
e1:SetRange(LOCATION_HAND)
12+
e1:SetTargetRange(POS_FACEUP_DEFENSE,0)
13+
e1:SetCondition(s.spcon)
14+
e1:SetTarget(s.sptg)
15+
e1:SetOperation(s.spop)
16+
c:RegisterEffect(e1)
17+
--Return 1 card on the field to the hand
18+
local e2=Effect.CreateEffect(c)
19+
e2:SetDescription(aux.Stringid(id,0))
20+
e2:SetCategory(CATEGORY_TOHAND)
21+
e2:SetType(EFFECT_TYPE_IGNITION)
22+
e2:SetRange(LOCATION_MZONE)
23+
e2:SetCountLimit(1)
24+
e2:SetCondition(s.condition)
25+
e2:SetCost(s.cost)
26+
e2:SetTarget(s.target)
27+
e2:SetOperation(s.operation)
28+
c:RegisterEffect(e2)
29+
end
30+
function s.spcon(e,c)
31+
if c==nil then return true end
32+
local tp=c:GetControler()
33+
local rg=Duel.GetMatchingGroup(Card.IsDiscardable,tp,LOCATION_HAND,0,e:GetHandler())
34+
return aux.SelectUnselectGroup(rg,e,tp,1,1,aux.ChkfMMZ(1),0,c)
35+
end
36+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,c)
37+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
38+
local rg=Duel.GetMatchingGroup(Card.IsDiscardable,tp,LOCATION_HAND,0,e:GetHandler())
39+
local g=aux.SelectUnselectGroup(rg,e,tp,1,1,aux.ChkfMMZ(1),1,tp,HINTMSG_DISCARD,nil,nil,true)
40+
if #g>0 then
41+
g:KeepAlive()
42+
e:SetLabelObject(g)
43+
return true
44+
end
45+
return false
46+
end
47+
function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
48+
local g=e:GetLabelObject()
49+
if not g then return end
50+
Duel.SendtoGrave(g,REASON_DISCARD+REASON_COST)
51+
g:DeleteGroup()
52+
end
53+
function s.condition(e,tp,eg,ep,ev,re,r,rp)
54+
local c=e:GetHandler()
55+
return c:IsSummonPhaseMain() and c:IsStatus(STATUS_SUMMON_TURN+STATUS_SPSUMMON_TURN)
56+
end
57+
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
58+
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end
59+
end
60+
function s.thfilter(c)
61+
return c:IsSpellTrap() and c:IsAbleToHand()
62+
end
63+
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
64+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,0,LOCATION_ONFIELD,1,nil) end
65+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,1-tp,LOCATION_ONFIELD)
66+
end
67+
function s.operation(e,tp,eg,ep,ev,re,r,rp)
68+
local c=e:GetHandler()
69+
---Requirement
70+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
71+
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,1,nil)
72+
Duel.SendtoGrave(g,REASON_COST)
73+
--Effect
74+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
75+
local rg=Duel.SelectMatchingCard(tp,s.thfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
76+
if #rg>0 then
77+
Duel.HintSelection(rg)
78+
if Duel.SendtoHand(rg,nil,REASON_EFFECT)>0 and c:IsCanChangePosition() and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
79+
Duel.ChangePosition(c,POS_FACEUP_DEFENSE,0,POS_FACEUP_ATTACK,0)
80+
end
81+
end
82+
end

rush/c160217045.lua

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
--霜浄馬ヤブメ
2+
--Yabume the Frost-Purifying Purebreed
3+
--scripted by YoshiDuels
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Set 1 card
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
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.condition(e,tp,eg,ep,ev,re,r,rp)
18+
return e:GetHandler():IsStatus(STATUS_SUMMON_TURN) and Duel.GetMatchingGroupCount(nil,tp,LOCATION_STZONE,0,nil)<=1
19+
end
20+
function s.setfilter(c)
21+
return c:IsNormalSpell() and not c:IsLegend() and c:IsSSetable()
22+
end
23+
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
24+
if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_GRAVE,0,1,nil) end
25+
end
26+
function s.operation(e,tp,eg,ep,ev,re,r,rp)
27+
local c=e:GetHandler()
28+
--Effect
29+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
30+
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.setfilter),tp,LOCATION_GRAVE,0,1,1,nil)
31+
if #g==0 then return end
32+
Duel.SSet(tp,g)
33+
local e1=Effect.CreateEffect(c)
34+
e1:SetType(EFFECT_TYPE_SINGLE)
35+
e1:SetCode(EFFECT_CANNOT_TRIGGER)
36+
e1:SetReset(RESETS_STANDARD_PHASE_END)
37+
e1:SetValue(1)
38+
g:GetFirst():RegisterEffect(e1)
39+
local e2=Effect.CreateEffect(c)
40+
e2:SetType(EFFECT_TYPE_FIELD)
41+
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
42+
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
43+
e2:SetTargetRange(1,0)
44+
e2:SetValue(s.aclimit)
45+
e2:SetReset(RESET_PHASE|PHASE_END)
46+
Duel.RegisterEffect(e2,tp)
47+
end
48+
function s.aclimit(e,re,tp)
49+
return re:GetHandler():IsCode(id)
50+
end

0 commit comments

Comments
 (0)