Skip to content

Commit 269a9a4

Browse files
committed
added Tail Swipe
1 parent 2c06a13 commit 269a9a4

File tree

2 files changed

+37
-1
lines changed

2 files changed

+37
-1
lines changed

proc_rush.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ local LEGEND_LIST={160001000,160205001,160418001,160002000,160421015,160404001,1
99
160429002,160208063,160208064,160208065,160014065,160446002,160015056,160210001,160207060,160210032,160210029,
1010
160210058,160440010,160016033,160016034,160440011,160211080,160402039,160017033,160402040,160429003,160320014,
1111
160320038,160018036,160212004,160212003,160402044,160212075,160212001,160402045,160019063,160019064,160019065,
12-
160213078,160213082,160402047,160213084}
12+
160213078,160213082,160402047,160213084,160020059}
1313
-- Returns if a card is a Legend. Can be updated if a GetOT function is added to the core
1414
function Card.IsLegend(c)
1515
return c:IsHasEffect(EFFECT_IS_LEGEND) or c:IsOriginalCode(table.unpack(LEGEND_LIST))

rush/c160020059.lua

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
--テールスイング
2+
--Tail Swipe
3+
--Scripted by YoshiDuels
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
-- Grant piercing damage
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_POSITION)
10+
e1:SetType(EFFECT_TYPE_ACTIVATE)
11+
e1:SetCode(EVENT_FREE_CHAIN)
12+
e1:SetTarget(s.target)
13+
e1:SetOperation(s.operation)
14+
c:RegisterEffect(e1)
15+
end
16+
function s.filter(c,tp)
17+
return c:IsFaceup() and c:IsRace(RACE_DINOSAUR) and c:IsLevelAbove(5)
18+
and Duel.IsExistingMatchingCard(s.thfilter,tp,0,LOCATION_MZONE,1,nil,c:GetLevel())
19+
end
20+
function s.thfilter(c,lv)
21+
return (c:IsFacedown() or c:IsLevelBelow(lv-1)) and c:IsNotMaximumModeSide() and c:IsAbleToHand()
22+
end
23+
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
24+
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil,tp) end
25+
end
26+
function s.operation(e,tp,eg,ep,ev,re,r,rp)
27+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
28+
local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil,tp):GetFirst()
29+
if not tc then return end
30+
Duel.HintSelection(tc)
31+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
32+
local sg=Duel.SelectMatchingCard(tp,s.thfilter,tp,0,LOCATION_MZONE,1,2,nil,tc:GetLevel())
33+
sg=sg:AddMaximumCheck()
34+
Duel.HintSelection(sg)
35+
Duel.SendtoHand(sg,nil,REASON_EFFECT)
36+
end

0 commit comments

Comments
 (0)