Skip to content

Commit 13d1937

Browse files
authored
Added new card scripts
1 parent 4903406 commit 13d1937

File tree

2 files changed

+163
-0
lines changed

2 files changed

+163
-0
lines changed

pre-release/c100296301.lua

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
--エンディミオンの侍女ヴェール
2+
--Verre, the Maid of Endymion
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Gains 2300 ATK while you have "Regulus, the Prince of Endymion" in your field or GY
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetType(EFFECT_TYPE_SINGLE)
9+
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
10+
e1:SetCode(EFFECT_UPDATE_ATTACK)
11+
e1:SetRange(LOCATION_MZONE)
12+
e1:SetCondition(function(e) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,100200282),e:GetHandlerPlayer(),LOCATION_ONFIELD|LOCATION_GRAVE,0,1,nil) end)
13+
e1:SetValue(2300)
14+
c:RegisterEffect(e1)
15+
--Special Summon this card from your hand
16+
local e2=Effect.CreateEffect(c)
17+
e2:SetDescription(aux.Stringid(id,0))
18+
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
19+
e2:SetType(EFFECT_TYPE_IGNITION)
20+
e2:SetRange(LOCATION_HAND)
21+
e2:SetCountLimit(1,{id,0})
22+
e2:SetCondition(function() return Duel.GetCustomActivityCount(id,0,ACTIVITY_CHAIN)>0 or Duel.GetCustomActivityCount(id,1,ACTIVITY_CHAIN)>0 end)
23+
e2:SetTarget(s.sptg)
24+
e2:SetOperation(s.spop)
25+
c:RegisterEffect(e2)
26+
--Add 1 "Witchcrafter" Spell/Trap or "Magical Dimension" from your Deck to your hand
27+
local e3=Effect.CreateEffect(c)
28+
e3:SetDescription(aux.Stringid(id,1))
29+
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
30+
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
31+
e3:SetProperty(EFFECT_FLAG_DELAY)
32+
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
33+
e3:SetCountLimit(1,{id,1})
34+
e3:SetTarget(s.thtg)
35+
e3:SetOperation(s.thop)
36+
c:RegisterEffect(e3)
37+
Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,function(re,tp,cid) return not re:IsSpellEffect() end)
38+
end
39+
s.listed_series={SET_WITCHCRAFTER}
40+
s.listed_names={100200282,28553439} --"Regulus, the Prince of Endymion", "Magical Dimension"
41+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
42+
local c=e:GetHandler()
43+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
44+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
45+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0)
46+
end
47+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
48+
local c=e:GetHandler()
49+
if c:IsRelateToEffect(e) then
50+
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
51+
end
52+
end
53+
function s.thfilter(c)
54+
return ((c:IsSetCard(SET_WITCHCRAFTER) and c:IsSpellTrap()) or c:IsCode(28553439)) and c:IsAbleToHand()
55+
end
56+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
57+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
58+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
59+
end
60+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
61+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
62+
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
63+
if #g>0 then
64+
Duel.SendtoHand(g,nil,REASON_EFFECT)
65+
Duel.ConfirmCards(1-tp,g)
66+
end
67+
end

pre-release/c100447065.lua

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
--凍てし心が映す神影
2+
--Lev Shaddoll Fusion
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--When this card is activated: Send 1 Fusion Monster from your Extra Deck to the GY
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_TOGRAVE)
10+
e1:SetType(EFFECT_TYPE_ACTIVATE)
11+
e1:SetCode(EVENT_FREE_CHAIN)
12+
e1:SetCountLimit(1,{id,0})
13+
e1:SetCost(s.effcost)
14+
e1:SetTarget(s.target)
15+
e1:SetOperation(s.activate)
16+
c:RegisterEffect(e1)
17+
--Special Summon 1 "Shaddoll" Fusion Monster with a different Attribute from your Extra Deck (this is treated as a Fusion Summon), but change its ATK to 0
18+
local e2=Effect.CreateEffect(c)
19+
e2:SetDescription(aux.Stringid(id,1))
20+
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE)
21+
e2:SetType(EFFECT_TYPE_IGNITION)
22+
e2:SetRange(LOCATION_SZONE)
23+
e2:SetCountLimit(1,{id,1})
24+
e2:SetCost(Cost.AND(s.spcost,s.effcost))
25+
e2:SetTarget(s.sptg)
26+
e2:SetOperation(s.spop)
27+
c:RegisterEffect(e2)
28+
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,function(c) return not c:IsSummonLocation(LOCATION_EXTRA) or c:IsSetCard(SET_SHADDOLL) end)
29+
end
30+
s.listed_series={SET_SHADDOLL}
31+
function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk)
32+
if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end
33+
--You cannot Special Summon from the Extra Deck the turn you activate either of this card's effects, except "Shaddoll" monsters
34+
local e1=Effect.CreateEffect(e:GetHandler())
35+
e1:SetDescription(aux.Stringid(id,2))
36+
e1:SetType(EFFECT_TYPE_FIELD)
37+
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT)
38+
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
39+
e1:SetTargetRange(1,0)
40+
e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(SET_SHADDOLL) end)
41+
e1:SetReset(RESET_PHASE|PHASE_END)
42+
Duel.RegisterEffect(e1,tp)
43+
end
44+
function s.tgfilter(c)
45+
return c:IsFusionMonster() and c:IsAbleToGrave()
46+
end
47+
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
48+
if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_EXTRA,0,1,nil) end
49+
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_EXTRA)
50+
end
51+
function s.activate(e,tp,eg,ep,ev,re,r,rp)
52+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
53+
local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_EXTRA,0,1,1,nil)
54+
if #g>0 then
55+
Duel.SendtoGrave(g,REASON_EFFECT)
56+
end
57+
end
58+
function s.spcostfilter(c,e,tp)
59+
return c:IsFusionMonster() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetAttribute(),c)
60+
end
61+
function s.spfilter(c,e,tp,attr,cost_c)
62+
return c:IsSetCard(SET_SHADDOLL) and c:IsFusionMonster() and c:IsAttributeExcept(attr)
63+
and c:CheckFusionMaterial() and Duel.GetLocationCountFromEx(tp,tp,cost_c,c)>0
64+
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
65+
end
66+
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
67+
if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.spcostfilter,1,false,nil,nil,e,tp) end
68+
local sc=Duel.SelectReleaseGroupCost(tp,s.spcostfilter,1,1,false,nil,nil,e,tp):GetFirst()
69+
e:SetLabel(sc:GetAttribute())
70+
Duel.Release(sc,REASON_COST)
71+
end
72+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
73+
if chk==0 then return true end
74+
Duel.SetTargetParam(e:GetLabel())
75+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
76+
end
77+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
78+
local attr=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
79+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
80+
local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,attr):GetFirst()
81+
if not sc then return end
82+
sc:SetMaterial(nil)
83+
if Duel.SpecialSummonStep(sc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) then
84+
--Change its ATK to 0
85+
local e1=Effect.CreateEffect(e:GetHandler())
86+
e1:SetType(EFFECT_TYPE_SINGLE)
87+
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
88+
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
89+
e1:SetValue(0)
90+
e1:SetReset(RESET_EVENT|RESETS_STANDARD)
91+
sc:RegisterEffect(e1)
92+
end
93+
if Duel.SpecialSummonComplete()>0 then
94+
sc:CompleteProcedure()
95+
end
96+
end

0 commit comments

Comments
 (0)