Skip to content

Commit 83cda1c

Browse files
authored
Added new card script
1 parent 63d3ea3 commit 83cda1c

1 file changed

Lines changed: 74 additions & 0 deletions

File tree

pre-release/c100444241.lua

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
--聖痕喰らいし竜
2+
--The Stigmata-Devouring Dragon
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
c:EnableReviveLimit()
7+
--Fusion Materials: "Fallen of Albaz" + 1 LIGHT or DARK monster + 1 Effect Monster
8+
Fusion.AddProcMix(c,true,true,CARD_ALBAZ,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_LIGHT|ATTRIBUTE_DARK),aux.FilterBoolFunctionEx(Card.IsType,TYPE_EFFECT))
9+
--While an "Ecclesia" monster is on the field or in either GY, this card gains 500 ATK, also it is unaffected by other cards' effects
10+
local e1a=Effect.CreateEffect(c)
11+
e1a:SetType(EFFECT_TYPE_SINGLE)
12+
e1a:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
13+
e1a:SetCode(EFFECT_UPDATE_ATTACK)
14+
e1a:SetRange(LOCATION_MZONE)
15+
e1a:SetCondition(function() return Duel.IsExistingMatchingCard(aux.AND(Card.IsSetCard,Card.IsMonster),0,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,1,nil,SET_ECCLESIA) end)
16+
e1a:SetValue(500)
17+
c:RegisterEffect(e1a)
18+
local e1b=e1a:Clone()
19+
e1b:SetCode(EFFECT_IMMUNE_EFFECT)
20+
e1b:SetValue(function(e,te) return te:GetOwner()~=e:GetOwner() end)
21+
c:RegisterEffect(e1b)
22+
--Shuffle up to 2 cards from any GY(s) and/or banishment into the Deck
23+
local e2=Effect.CreateEffect(c)
24+
e2:SetDescription(aux.Stringid(id,0))
25+
e2:SetCategory(CATEGORY_TODECK)
26+
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
27+
e2:SetProperty(EFFECT_FLAG_DELAY)
28+
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
29+
e2:SetCountLimit(1,id)
30+
e2:SetTarget(s.tdtg)
31+
e2:SetOperation(s.tdop)
32+
c:RegisterEffect(e2)
33+
--Add 1 "Dogmatika" or "Tri-Brigade" card from your Deck to your hand
34+
local e3=Effect.CreateEffect(c)
35+
e3:SetDescription(aux.Stringid(id,1))
36+
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
37+
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
38+
e3:SetCode(EVENT_PHASE+PHASE_END)
39+
e3:SetRange(LOCATION_GRAVE)
40+
e3:SetCountLimit(1,{id,1})
41+
e3:SetCondition(function(e) return e:GetHandler():GetTurnID()==Duel.GetTurnCount() end)
42+
e3:SetTarget(s.thtg)
43+
e3:SetOperation(s.thop)
44+
c:RegisterEffect(e3)
45+
end
46+
s.listed_names={CARD_ALBAZ}
47+
s.listed_series={SET_ECCLESIA,SET_DOGMATIKA,SET_TRI_BRIGADE}
48+
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
49+
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_GRAVE|LOCATION_REMOVED,LOCATION_GRAVE|LOCATION_REMOVED,1,nil) end
50+
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,PLAYER_EITHER,LOCATION_GRAVE|LOCATION_REMOVED)
51+
end
52+
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
53+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
54+
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(Card.IsAbleToDeck),tp,LOCATION_GRAVE|LOCATION_REMOVED,LOCATION_GRAVE|LOCATION_REMOVED,1,2,nil)
55+
if #g>0 then
56+
Duel.HintSelection(g)
57+
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
58+
end
59+
end
60+
function s.thfilter(c)
61+
return c:IsSetCard({SET_DOGMATIKA,SET_TRI_BRIGADE}) and c:IsAbleToHand()
62+
end
63+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
64+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
65+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
66+
end
67+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
68+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
69+
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
70+
if #g>0 then
71+
Duel.SendtoHand(g,nil,REASON_EFFECT)
72+
Duel.ConfirmCards(1-tp,g)
73+
end
74+
end

0 commit comments

Comments
 (0)