Skip to content

Commit e027173

Browse files
authored
Added new card scripts
1 parent 8486cd2 commit e027173

File tree

3 files changed

+249
-0
lines changed

3 files changed

+249
-0
lines changed

pre-release/c100447064.lua

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
--影霊翼騎 ウェンディクルフ
2+
--Reeshaddoll Wendicluhu
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
c:EnableReviveLimit()
7+
c:AddMustFirstBeFusionSummoned()
8+
--Fusion Materials: 1 "Shaddoll" monster + 1 WIND monster
9+
Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_SHADDOLL),s.matfilter)
10+
--Change any number of face-down monsters on the field to face-up Defense Position
11+
local e1=Effect.CreateEffect(c)
12+
e1:SetDescription(aux.Stringid(id,0))
13+
e1:SetCategory(CATEGORY_POSITION)
14+
e1:SetType(EFFECT_TYPE_QUICK_O)
15+
e1:SetCode(EVENT_FREE_CHAIN)
16+
e1:SetRange(LOCATION_MZONE)
17+
e1:SetCountLimit(1,id)
18+
e1:SetTarget(s.postg)
19+
e1:SetOperation(s.posop)
20+
e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E)
21+
c:RegisterEffect(e1)
22+
--Add 1 "Shaddoll" card from your GY to your hand
23+
local e2=Effect.CreateEffect(c)
24+
e2:SetDescription(aux.Stringid(id,1))
25+
e2:SetCategory(CATEGORY_TOHAND)
26+
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
27+
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
28+
e2:SetCode(EVENT_TO_GRAVE)
29+
e2:SetTarget(s.thtg)
30+
e2:SetOperation(s.thop)
31+
c:RegisterEffect(e2)
32+
end
33+
s.listed_series={SET_SHADDOLL}
34+
s.material_setcode=SET_SHADDOLL
35+
function s.matfilter(c,lc,sumtype,tp)
36+
return c:IsAttribute(ATTRIBUTE_WIND,lc,sumtype,tp) or c:IsHasEffect(4904633)
37+
end
38+
function s.posfilter(c)
39+
return c:IsPosition(POS_FACEDOWN_DEFENSE) and c:IsCanChangePosition()
40+
end
41+
function s.postg(e,tp,eg,ep,ev,re,r,rp,chk)
42+
if chk==0 then return Duel.IsExistingMatchingCard(s.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
43+
Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,PLAYER_EITHER,LOCATION_MZONE)
44+
end
45+
function s.posop(e,tp,eg,ep,ev,re,r,rp,chk)
46+
local facedown_ct=Duel.GetMatchingGroupCount(s.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
47+
if facedown_ct==0 then return end
48+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
49+
local g=Duel.SelectMatchingCard(tp,s.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,facedown_ct,nil)
50+
if #g==0 then return end
51+
Duel.HintSelection(g)
52+
if Duel.ChangePosition(g,POS_FACEUP_DEFENSE)==0 then return end
53+
local og=Duel.GetOperatedGroup()
54+
local flip_count=og:FilterCount(Card.IsType,nil,TYPE_FLIP)
55+
if flip_count>0 and Duel.IsExistingMatchingCard(Card.IsCanTurnSet,tp,LOCATION_MZONE,LOCATION_MZONE,1,og)
56+
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
57+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
58+
local pos_g=Duel.SelectMatchingCard(tp,Card.IsCanTurnSet,tp,LOCATION_MZONE,LOCATION_MZONE,1,flip_count,og)
59+
if #pos_g>0 then
60+
Duel.HintSelection(pos_g)
61+
Duel.BreakEffect()
62+
Duel.ChangePosition(pos_g,POS_FACEDOWN_DEFENSE)
63+
end
64+
end
65+
end
66+
function s.thfilter(c)
67+
return c:IsSetCard(SET_SHADDOLL) and c:IsAbleToHand()
68+
end
69+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
70+
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end
71+
if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
72+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
73+
local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
74+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0)
75+
end
76+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
77+
local tc=Duel.GetFirstTarget()
78+
if tc:IsRelateToEffect(e) then
79+
Duel.SendtoHand(tc,nil,REASON_EFFECT)
80+
end
81+
end

pre-release/c101303024.lua

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
--白き竜の落胤
2+
--Fallen of the White Dragon
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Special Summon this card, also you cannot Special Summon from the Extra Deck for the rest of this turn, except Level 8 Fusion or Synchro Monsters
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)
13+
e1:SetCost(s.selfspcost)
14+
e1:SetTarget(s.selfsptg)
15+
e1:SetOperation(s.selfspop)
16+
c:RegisterEffect(e1)
17+
--Special Summon 1 "Ecclesia" monster from your hand, Deck, or GY
18+
local e2a=Effect.CreateEffect(c)
19+
e2a:SetDescription(aux.Stringid(id,1))
20+
e2a:SetCategory(CATEGORY_SPECIAL_SUMMON)
21+
e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
22+
e2a:SetProperty(EFFECT_FLAG_DELAY)
23+
e2a:SetCode(EVENT_SUMMON_SUCCESS)
24+
e2a:SetCountLimit(1,{id,1})
25+
e2a:SetTarget(s.hdgysptg)
26+
e2a:SetOperation(s.hdgyspop)
27+
c:RegisterEffect(e2a)
28+
local e2b=e2a:Clone()
29+
e2b:SetCode(EVENT_SPSUMMON_SUCCESS)
30+
c:RegisterEffect(e2b)
31+
end
32+
s.listed_names={CARD_ALBAZ}
33+
s.listed_series={SET_ECCLESIA}
34+
function s.selfspcostfilter(c)
35+
return c:ListsCode(CARD_ALBAZ) and c:IsAbleToGraveAsCost()
36+
end
37+
function s.selfspcost(e,tp,eg,ep,ev,re,r,rp,chk)
38+
if chk==0 then return Duel.IsExistingMatchingCard(s.selfspcostfilter,tp,LOCATION_EXTRA,0,1,nil) end
39+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
40+
local g=Duel.SelectMatchingCard(tp,s.selfspcostfilter,tp,LOCATION_EXTRA,0,1,1,nil)
41+
Duel.SendtoGrave(g,REASON_COST)
42+
end
43+
function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk)
44+
local c=e:GetHandler()
45+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
46+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
47+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0)
48+
end
49+
function s.selfspop(e,tp,eg,ep,ev,re,r,rp)
50+
local c=e:GetHandler()
51+
if c:IsRelateToEffect(e) then
52+
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
53+
end
54+
--You cannot Special Summon from the Extra Deck for the rest of this turn, except Level 8 Fusion or Synchro Monsters
55+
local e1=Effect.CreateEffect(c)
56+
e1:SetDescription(aux.Stringid(id,2))
57+
e1:SetType(EFFECT_TYPE_FIELD)
58+
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
59+
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
60+
e1:SetTargetRange(1,0)
61+
e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not (c:IsLevel(8) and c:IsType(TYPE_FUSION|TYPE_SYNCHRO)) end)
62+
e1:SetReset(RESET_PHASE|PHASE_END)
63+
Duel.RegisterEffect(e1,tp)
64+
--"Clock Lizard" check
65+
aux.addTempLizardCheck(c,tp,function(e,c) return not (c:IsOriginalLevel(8) and c:IsType(TYPE_FUSION|TYPE_SYNCHRO)) end)
66+
end
67+
function s.hdgyspfilter(c,e,tp)
68+
return c:IsSetCard(SET_ECCLESIA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
69+
end
70+
function s.hdgysptg(e,tp,eg,ep,ev,re,r,rp,chk)
71+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
72+
and Duel.IsExistingMatchingCard(s.hdgyspfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end
73+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE)
74+
end
75+
function s.hdgyspop(e,tp,eg,ep,ev,re,r,rp)
76+
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
77+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
78+
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.hdgyspfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp)
79+
if #g>0 then
80+
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
81+
end
82+
end

pre-release/c101303041.lua

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
--黒き竜のエクレシア
2+
--Ecclesia of the Black Dragon
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
c:EnableReviveLimit()
7+
--Synchro Summon procedure: 1 Tuner + 1+ non-Tuner monsters
8+
Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(nil),1,99)
9+
--Banish this card (until the End Phase), and if you do, Special Summon 1 "Fallen of Albaz" or 1 Level 4 or lower monster that mentions it from your Deck or GY
10+
local e1=Effect.CreateEffect(c)
11+
e1:SetDescription(aux.Stringid(id,0))
12+
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON)
13+
e1:SetType(EFFECT_TYPE_QUICK_O)
14+
e1:SetCode(EVENT_FREE_CHAIN)
15+
e1:SetRange(LOCATION_MZONE)
16+
e1:SetCountLimit(1,{id,0})
17+
e1:SetCondition(function() return Duel.IsMainPhase() end)
18+
e1:SetTarget(s.rmsptg)
19+
e1:SetOperation(s.rmspop)
20+
e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER)
21+
c:RegisterEffect(e1)
22+
--Shuffle both 1 Level 8 Fusion Monster in your GY or banishment and 1 card on the field, and this card into the Deck
23+
local e2=Effect.CreateEffect(c)
24+
e2:SetDescription(aux.Stringid(id,1))
25+
e2:SetCategory(CATEGORY_TODECK+CATEGORY_TOEXTRA)
26+
e2:SetType(EFFECT_TYPE_IGNITION)
27+
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
28+
e2:SetRange(LOCATION_GRAVE)
29+
e2:SetCountLimit(1,{id,1})
30+
e2:SetTarget(s.tdtg)
31+
e2:SetOperation(s.tdop)
32+
c:RegisterEffect(e2)
33+
end
34+
s.listed_names={CARD_ALBAZ}
35+
function s.spfilter(c,e,tp)
36+
return (c:IsCode(CARD_ALBAZ) or (c:IsLevelBelow(4) and c:ListsCode(CARD_ALBAZ))) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
37+
end
38+
function s.rmsptg(e,tp,eg,ep,ev,re,r,rp,chk)
39+
local c=e:GetHandler()
40+
if chk==0 then return c:IsAbleToRemove() and Duel.GetMZoneCount(tp,c)>0
41+
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end
42+
Duel.SetOperationInfo(0,CATEGORY_REMOVE,c,1,tp,0)
43+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE)
44+
end
45+
function s.rmspop(e,tp,eg,ep,ev,re,r,rp)
46+
local c=e:GetHandler()
47+
if c:IsRelateToEffect(e) and aux.RemoveUntil(c,nil,REASON_EFFECT,PHASE_END,id,e,tp,aux.DefaultFieldReturnOp)
48+
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
49+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
50+
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp)
51+
if #g>0 then
52+
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
53+
end
54+
end
55+
end
56+
function s.fustdfilter(c,e)
57+
return c:IsLevel(8) and c:IsFusionMonster() and c:IsFaceup() and c:IsAbleToExtra() and c:IsCanBeEffectTarget(e)
58+
end
59+
function s.fieldtdfilter(c,e)
60+
return c:IsAbleToDeck() and c:IsCanBeEffectTarget(e)
61+
end
62+
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
63+
if chkc then return false end
64+
local c=e:GetHandler()
65+
if chk==0 then return c:IsAbleToExtra()
66+
and Duel.IsExistingMatchingCard(s.fustdfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,c,e)
67+
and Duel.IsExistingMatchingCard(s.fieldtdfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,e) end
68+
local fusiong=Group.CreateGroup()
69+
local fieldg=Group.CreateGroup()
70+
repeat
71+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
72+
fusiong=Duel.SelectMatchingCard(tp,s.fustdfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,c,e)
73+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
74+
fieldg=Duel.SelectMatchingCard(tp,s.fieldtdfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,true,nil,e)
75+
until fieldg~=nil
76+
local tg=fusiong:Merge(fieldg)
77+
Duel.SetTargetCard(tg)
78+
Duel.SetOperationInfo(0,CATEGORY_TODECK,tg+c,3,tp,0)
79+
end
80+
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
81+
local c=e:GetHandler()
82+
local tg=Duel.GetTargetCards(e)
83+
if c:IsRelateToEffect(e) and #tg==2 then
84+
Duel.SendtoDeck(tg+c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
85+
end
86+
end

0 commit comments

Comments
 (0)