Skip to content

Commit 69f85a6

Browse files
committed
added Udzue the Frost-Purifying Purebreed
1 parent efa0636 commit 69f85a6

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

rush/c160456001.lua

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
--霜浄馬ウヅエ
2+
--Udzue the Frost-Purifying Purebreed
3+
--scripted by YoshiDuels
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Add to the hand 1 EARTH Dragon with 1800 ATK from the GY
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_TOHAND)
10+
e1:SetType(EFFECT_TYPE_IGNITION)
11+
e1:SetRange(LOCATION_MZONE)
12+
e1:SetCountLimit(1)
13+
e1:SetCondition(s.condition)
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 e:GetHandler():IsStatus(STATUS_SUMMON_TURN)
20+
end
21+
function s.thfilter(c)
22+
return c:IsNormalTrap() and not c:IsLegend() and c:IsAbleToHand()
23+
end
24+
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
25+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
26+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
27+
end
28+
function s.operation(e,tp,eg,ep,ev,re,r,rp)
29+
--Effect
30+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
31+
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,1,1,nil)
32+
if #g>0 then
33+
Duel.SendtoHand(g,nil,REASON_EFFECT)
34+
Duel.ConfirmCards(1-tp,g)
35+
end
36+
--Cannot Set Spell/Trap from the hand
37+
local e1=Effect.CreateEffect(e:GetHandler())
38+
e1:SetType(EFFECT_TYPE_FIELD)
39+
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
40+
e1:SetCode(EFFECT_CANNOT_SSET)
41+
e1:SetReset(RESET_PHASE|PHASE_END)
42+
e1:SetTargetRange(1,0)
43+
e1:SetTarget(function(_,c) return c:IsLocation(LOCATION_HAND) end)
44+
Duel.RegisterEffect(e1,tp)
45+
end

0 commit comments

Comments
 (0)