Skip to content

Commit 8373907

Browse files
committed
added Dynamajesty Dino Dynakaiser
1 parent 9cfbdda commit 8373907

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed

rush/c160020019.lua

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
--恐竜駕帝ダイナカイザー
2+
--Dynamajesty Dino Dynakaiser
3+
--Scripted by YoshiDuels
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Summon with 1 tribute
7+
local e1=aux.AddNormalSummonProcedure(c,true,true,1,1,SUMMON_TYPE_TRIBUTE,aux.Stringid(id,0),s.cfilter)
8+
--Reduce ATK
9+
local e1=Effect.CreateEffect(c)
10+
e1:SetDescription(aux.Stringid(id,1))
11+
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_TOHAND)
12+
e1:SetType(EFFECT_TYPE_IGNITION)
13+
e1:SetRange(LOCATION_MZONE)
14+
e1:SetCountLimit(1)
15+
e1:SetCost(s.cost)
16+
e1:SetTarget(s.target)
17+
e1:SetOperation(s.operation)
18+
c:RegisterEffect(e1)
19+
end
20+
function s.cfilter(c)
21+
return c:IsRace(RACE_DINOSAUR)
22+
end
23+
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
24+
if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,1) end
25+
end
26+
function s.filter(c)
27+
return c:IsFaceup() and c:IsNotMaximumModeSide()
28+
end
29+
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
30+
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
31+
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,nil,1,tp,-800)
32+
end
33+
function s.thfilter(c)
34+
return c:IsRace(RACE_DINOSAUR) and c:IsType(TYPE_MAXIMUM) and c:IsAbleToHand()
35+
end
36+
function s.operation(e,tp,eg,ep,ev,re,r,rp)
37+
local c=e:GetHandler()
38+
--Requirement
39+
if Duel.DiscardDeck(tp,1,REASON_COST)<1 then return end
40+
--Effect
41+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF)
42+
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
43+
if #g>0 then
44+
Duel.HintSelection(g)
45+
local e1=Effect.CreateEffect(c)
46+
e1:SetType(EFFECT_TYPE_SINGLE)
47+
e1:SetCode(EFFECT_UPDATE_ATTACK)
48+
e1:SetValue(-800)
49+
e1:SetReset(RESETS_STANDARD_PHASE_END)
50+
g:GetFirst():RegisterEffect(e1)
51+
if Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
52+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
53+
local g2=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
54+
if #g2>0 then
55+
Duel.SendtoHand(g2,nil,REASON_EFFECT)
56+
Duel.ConfirmCards(1-tp,g2)
57+
end
58+
end
59+
end
60+
end

0 commit comments

Comments
 (0)