Skip to content

Commit 8081ae3

Browse files
committed
added Police Hound of the Blaze Fiends
1 parent 5349fbf commit 8081ae3

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

rush/c160215035.lua

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
--焔魔の劾狗
2+
--Police Hound of the Blaze Fiends
3+
--scripted by YoshiDuels
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Send the top 4 cards from your Deck to the GY and add 1 card from the GY to the hand
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetType(EFFECT_TYPE_IGNITION)
10+
e1:SetCategory(CATEGORY_DECKDES+CATEGORY_TOHAND)
11+
e1:SetRange(LOCATION_MZONE)
12+
e1:SetCountLimit(1)
13+
e1:SetCost(s.cost)
14+
e1:SetTarget(s.target)
15+
e1:SetOperation(s.operation)
16+
c:RegisterEffect(e1)
17+
end
18+
function s.tgfilter(c)
19+
return c:IsMonster() and c:IsRace(RACE_FIEND) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToGraveAsCost()
20+
end
21+
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
22+
if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_HAND,0,1,nil) end
23+
end
24+
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
25+
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,4) end
26+
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,4)
27+
Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
28+
end
29+
function s.cfilter(c)
30+
return c:IsLocation(LOCATION_GRAVE) and c:IsRace(RACE_FIEND) and c:IsAttribute(ATTRIBUTE_FIRE) and not c:IsAttack(900) and c:IsAbleToHand()
31+
end
32+
function s.operation(e,tp,eg,ep,ev,re,r,rp)
33+
--Requirement
34+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
35+
local tg=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_HAND,0,1,1,nil)
36+
if Duel.SendtoGrave(tg,REASON_COST)==0 then return end
37+
--Effect
38+
Duel.DiscardDeck(tp,4,REASON_EFFECT)
39+
local g=Duel.GetOperatedGroup()
40+
if g:FilterCount(aux.NecroValleyFilter(s.cfilter),nil)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
41+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
42+
local sg=g:FilterSelect(tp,s.cfilter,1,1,nil)
43+
if #sg>0 then
44+
Duel.SendtoHand(sg,nil,REASON_EFFECT)
45+
Duel.ConfirmCards(1-tp,sg)
46+
end
47+
end
48+
end

0 commit comments

Comments
 (0)