Skip to content

Commit 4c28de5

Browse files
authored
Update "Slash Draw (Anime)"
- Should not be destructible on activation - Minor script polish
1 parent cac42a5 commit 4c28de5

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

unofficial/c511600139.lua

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
--Slash Draw (Anime)
33
local s,id=GetID()
44
function s.initial_effect(c)
5-
--discard deck
5+
--Send cards from the top of your Deck to the Graveyard equal to the total number of cards on the field. Then, draw 1 card. If that card is "Slash Draw", send it to the Graveyard and destroy all cards on the field. Inflict 1000 damage to your opponent for each card destroyed and sent to the Graveyard this way.
66
local e1=Effect.CreateEffect(c)
77
e1:SetCategory(CATEGORY_DECKDES+CATEGORY_DRAW)
88
e1:SetType(EFFECT_TYPE_ACTIVATE)
@@ -11,8 +11,16 @@ function s.initial_effect(c)
1111
e1:SetTarget(s.target)
1212
e1:SetOperation(s.operation)
1313
c:RegisterEffect(e1)
14+
--Cannot be destroyed when activated
15+
local e2=Effect.CreateEffect(c)
16+
e2:SetType(EFFECT_TYPE_SINGLE)
17+
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
18+
e2:SetCondition(function(e) return e:GetHandler():IsFaceup() end)
19+
e2:SetRange(LOCATION_SZONE)
20+
e2:SetValue(1)
21+
c:RegisterEffect(e2)
1422
end
15-
s.listed_names={71344451}
23+
s.listed_names={71344451} --"Slash Draw"
1624
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
1725
local ct=Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)
1826
if chk==0 then return ct>0 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>ct and Duel.IsPlayerCanDiscardDeck(tp,ct)
@@ -40,4 +48,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
4048
Duel.ShuffleHand(tp)
4149
end
4250
end
43-
end
51+
end

0 commit comments

Comments
 (0)