Skip to content

Commit de75f80

Browse files
authored
Added new card script
1 parent 5ccee74 commit de75f80

1 file changed

Lines changed: 73 additions & 0 deletions

File tree

pre-release/c100200289.lua

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
--黒陽竜イリオス
2+
--Ilios the Black Sun Dragon
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--You can reveal 3 Dragon monsters in your Extra Deck with 3000 or more ATK and different names; Special Summon this card from your hand
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
10+
e1:SetType(EFFECT_TYPE_IGNITION)
11+
e1:SetRange(LOCATION_HAND)
12+
e1:SetCountLimit(1,{id,0})
13+
e1:SetCost(s.spcost)
14+
e1:SetTarget(s.sptg)
15+
e1:SetOperation(s.spop)
16+
c:RegisterEffect(e1)
17+
--If this card is sent to the GY: You can target 1 Dragon Fusion, Synchro, Xyz, or Link Monster you control; your opponent cannot target it with card effects this turn. Neither player can activate cards or effects in response to this effect's activation
18+
local e2=Effect.CreateEffect(c)
19+
e2:SetDescription(aux.Stringid(id,1))
20+
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
21+
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
22+
e2:SetCode(EVENT_TO_GRAVE)
23+
e2:SetCountLimit(1,{id,1})
24+
e2:SetTarget(s.efftg)
25+
e2:SetOperation(s.effop)
26+
c:RegisterEffect(e2)
27+
end
28+
function s.spcostfilter(c)
29+
return c:IsRace(RACE_DRAGON) and c:IsAttackAbove(3000) and not c:IsPublic()
30+
end
31+
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
32+
local g=Duel.GetMatchingGroup(s.spcostfilter,tp,LOCATION_EXTRA,0,nil)
33+
if chk==0 then return #g>=3 and aux.SelectUnselectGroup(g,e,tp,3,3,aux.dncheck,0) end
34+
local sg=aux.SelectUnselectGroup(g,e,tp,3,3,aux.dncheck,1,tp,HINTMSG_CONFIRM)
35+
Duel.ConfirmCards(1-tp,sg)
36+
Duel.ShuffleExtra(tp)
37+
end
38+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
39+
local c=e:GetHandler()
40+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
41+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
42+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0)
43+
end
44+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
45+
local c=e:GetHandler()
46+
if c:IsRelateToEffect(e) then
47+
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
48+
end
49+
end
50+
function s.tgfilter(c)
51+
return c:IsRace(RACE_DRAGON) and c:IsType(TYPE_EXTRA) and c:IsFaceup()
52+
end
53+
function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
54+
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.tgfilter(chkc) end
55+
if chk==0 then return Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,0,1,nil) end
56+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
57+
Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_MZONE,0,1,1,nil)
58+
Duel.SetChainLimit(aux.FALSE)
59+
end
60+
function s.effop(e,tp,eg,ep,ev,re,r,rp)
61+
local tc=Duel.GetFirstTarget()
62+
if tc:IsRelateToEffect(e) then
63+
--Your opponent cannot target it with card effects this turn
64+
local e1=Effect.CreateEffect(e:GetHandler())
65+
e1:SetDescription(3061)
66+
e1:SetType(EFFECT_TYPE_SINGLE)
67+
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
68+
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
69+
e1:SetValue(aux.tgoval)
70+
e1:SetReset(RESETS_STANDARD_PHASE_END)
71+
tc:RegisterEffect(e1)
72+
end
73+
end

0 commit comments

Comments
 (0)