Skip to content

Commit 6708267

Browse files
committed
added Criatura Brazo
1 parent 5b6194a commit 6708267

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

‎rush/c160324005.lua‎

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
--クリアトゥーラ・ブラーゾ
2+
--Criatura Brazo
3+
--scripted by YoshiDuels
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Prevent the activation of a face-down Spell/Trap your opponent controls
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:SetCost(s.cost)
14+
e1:SetTarget(s.target)
15+
e1:SetOperation(s.operation)
16+
c:RegisterEffect(e1)
17+
end
18+
function s.condition(e,tp,eg,ep,ev,re,r,rp)
19+
return Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0 and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==1
20+
end
21+
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
22+
if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,2) end
23+
end
24+
function s.cfilter(c)
25+
return c:IsFacedown() and c:IsSpellTrap()
26+
end
27+
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
28+
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,0,LOCATION_ONFIELD,1,nil) end
29+
end
30+
function s.operation(e,tp,eg,ep,ev,re,r,rp)
31+
--Requirement
32+
if Duel.DiscardDeck(tp,2,REASON_COST)<1 then return end
33+
--Effect
34+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_APPLYTO)
35+
local tc=Duel.SelectMatchingCard(tp,s.cfilter,tp,0,LOCATION_ONFIELD,1,1,nil):GetFirst()
36+
if tc then
37+
Duel.HintSelection(tc,true)
38+
local e1=Effect.CreateEffect(e:GetHandler())
39+
e1:SetType(EFFECT_TYPE_SINGLE)
40+
e1:SetCode(EFFECT_CANNOT_TRIGGER)
41+
e1:SetReset(RESETS_STANDARD_PHASE_END,2)
42+
e1:SetValue(1)
43+
tc:RegisterEffect(e1)
44+
end
45+
end

0 commit comments

Comments
 (0)