Skip to content

Commit 1a443bc

Browse files
authored
Add files via upload
1 parent 97eeeb7 commit 1a443bc

39 files changed

Lines changed: 2556 additions & 0 deletions

‎official/c16327715.lua‎

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
--ジャンク・ウォリアー・エクストリーム
2+
--Junk Warrior Extreme
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
c:EnableReviveLimit()
7+
--Synchro Summon procedure: "Junk Synchron" + 1+ non-Tuner monsters
8+
Synchro.AddProcedure(c,s.tunerfilter,1,1,Synchro.NonTuner(nil),1,99)
9+
--Special Summon as many Level 2 or lower monsters from your GY as possible
10+
local e1=Effect.CreateEffect(c)
11+
e1:SetDescription(aux.Stringid(id,0))
12+
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
13+
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
14+
e1:SetProperty(EFFECT_FLAG_DELAY)
15+
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
16+
e1:SetCountLimit(1,id)
17+
e1:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end)
18+
e1:SetTarget(s.gysptg)
19+
e1:SetOperation(s.gyspop)
20+
c:RegisterEffect(e1)
21+
--Special Summon 1 "Junk" Synchro Monster from your Extra Deck (this is treated as a Synchro Summon)
22+
local e2=Effect.CreateEffect(c)
23+
e2:SetDescription(aux.Stringid(id,1))
24+
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
25+
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
26+
e2:SetCode(EVENT_BATTLE_DESTROYING)
27+
e2:SetCountLimit(1,{id,1})
28+
e2:SetCondition(aux.bdocon)
29+
e2:SetCost(Cost.SelfBanish)
30+
e2:SetTarget(s.exsptg)
31+
e2:SetOperation(s.exspop)
32+
c:RegisterEffect(e2)
33+
end
34+
s.material={CARD_JUNK_SYNCHRON}
35+
s.listed_names={CARD_JUNK_SYNCHRON}
36+
s.listed_series={SET_JUNK}
37+
s.material_setcode=SET_SYNCHRON
38+
function s.tunerfilter(c,lc,stype,tp)
39+
return c:IsSummonCode(lc,stype,tp,CARD_JUNK_SYNCHRON) or c:IsHasEffect(20932152)
40+
end
41+
function s.gyspfilter(c,e,tp)
42+
return c:IsLevelBelow(2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
43+
end
44+
function s.gysptg(e,tp,eg,ep,ev,re,r,rp,chk)
45+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
46+
and Duel.IsExistingMatchingCard(s.gyspfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
47+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
48+
end
49+
function s.gyspop(e,tp,eg,ep,ev,re,r,rp)
50+
local c=e:GetHandler()
51+
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
52+
if ft>0 then
53+
local g=Duel.GetMatchingGroup(s.gyspfilter,tp,LOCATION_GRAVE,0,nil,e,tp)
54+
ft=math.min(ft,#g)
55+
if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end
56+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
57+
local sg=Duel.SelectMatchingCard(tp,s.gyspfilter,tp,LOCATION_GRAVE,0,ft,ft,nil,e,tp)
58+
if #sg>0 and Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)>0 then
59+
local og=Duel.GetOperatedGroup()
60+
for sc in og:Iter() do
61+
--They cannot activate their effects this turn
62+
local e1=Effect.CreateEffect(c)
63+
e1:SetDescription(3302)
64+
e1:SetType(EFFECT_TYPE_SINGLE)
65+
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
66+
e1:SetCode(EFFECT_CANNOT_TRIGGER)
67+
e1:SetReset(RESETS_STANDARD_PHASE_END)
68+
sc:RegisterEffect(e1)
69+
end
70+
end
71+
end
72+
--You can only Special Summon once for the rest of this turn
73+
local e1=Effect.CreateEffect(c)
74+
e1:SetDescription(aux.Stringid(id,2))
75+
e1:SetType(EFFECT_TYPE_FIELD)
76+
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
77+
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
78+
e1:SetTargetRange(1,0)
79+
e1:SetTarget(function(e,c,tp) return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)-e:GetLabel()>=1 end)
80+
e1:SetLabel(Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON))
81+
e1:SetReset(RESET_PHASE|PHASE_END)
82+
Duel.RegisterEffect(e1,tp)
83+
local e2=e1:Clone()
84+
e2:SetCode(EFFECT_LEFT_SPSUMMON_COUNT)
85+
e2:SetValue(s.countval)
86+
Duel.RegisterEffect(e2,tp)
87+
end
88+
function s.countval(e,re,tp)
89+
local label=e:GetLabel()
90+
local sp=Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)
91+
if sp-label>=1 then
92+
return 0
93+
else
94+
return 1-sp+label
95+
end
96+
end
97+
function s.exspfilter(c,e,tp,mc)
98+
local pg=aux.GetMustBeMaterialGroup(tp,Group.CreateGroup(),tp,c,nil,REASON_SYNCHRO)
99+
return #pg<=0 and c:IsSetCard(SET_JUNK) and c:IsType(TYPE_SYNCHRO) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
100+
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false)
101+
end
102+
function s.exsptg(e,tp,eg,ep,ev,re,r,rp,chk)
103+
if chk==0 then return Duel.IsExistingMatchingCard(s.exspfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,e:GetHandler()) end
104+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
105+
end
106+
function s.exspop(e,tp,eg,ep,ev,re,r,rp)
107+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
108+
local sc=Duel.SelectMatchingCard(tp,s.exspfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst()
109+
if not sc then return end
110+
sc:SetMaterial(nil)
111+
if Duel.SpecialSummon(sc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)>0 then
112+
sc:CompleteProcedure()
113+
end
114+
end

‎official/c16449363.lua‎

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
--スクラップ・シンクロン
2+
--Scrap Synchron
3+
--Scripted by the Razgriz
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--For a Synchro Summon, you can substitute this card for any 1 "Synchron" Tuner ("Quickdraw Synchron")
7+
local e0=Effect.CreateEffect(c)
8+
e0:SetType(EFFECT_TYPE_SINGLE)
9+
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
10+
e0:SetCode(20932152)
11+
c:RegisterEffect(e0)
12+
--If you Synchro Summon a monster that mentions a "Synchron" Tuner as material, this card in your hand can also be used as material
13+
local e1=Effect.CreateEffect(c)
14+
e1:SetType(EFFECT_TYPE_SINGLE)
15+
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
16+
e1:SetCode(EFFECT_SYNCHRO_MAT_FROM_HAND)
17+
e1:SetRange(LOCATION_HAND)
18+
e1:SetCountLimit(1,id)
19+
e1:SetValue(function(e,mc,sc) return sc:ListsArchetypeAsMaterial(SET_SYNCHRON) end)
20+
c:RegisterEffect(e1)
21+
--If a monster(s) that mentions "Junk Warrior", and/or a Synchro Monster(s) with "Warrior" in its original name, that you control would be destroyed by battle or card effect, you can banish this card from your field or GY instead
22+
local e2=Effect.CreateEffect(c)
23+
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
24+
e2:SetCode(EFFECT_DESTROY_REPLACE)
25+
e2:SetRange(LOCATION_MZONE|LOCATION_GRAVE)
26+
e2:SetCountLimit(1,{id,1})
27+
e2:SetTarget(s.reptg)
28+
e2:SetValue(function(e,c) return s.repfilter(c,e:GetHandlerPlayer()) end)
29+
e2:SetOperation(function(e) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT|REASON_REPLACE) end)
30+
c:RegisterEffect(e2)
31+
end
32+
s.listed_series={SET_SYNCHRON,SET_WARRIOR}
33+
s.listed_names={CARD_JUNK_WARRIOR}
34+
function s.repfilter(c,tp)
35+
return (c:ListsCode(CARD_JUNK_WARRIOR) or (c:IsSynchroMonster() and c:IsOriginalSetCard(SET_WARRIOR))) and c:IsFaceup() and c:IsLocation(LOCATION_MZONE)
36+
and c:IsControler(tp) and c:IsReason(REASON_BATTLE|REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
37+
end
38+
function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
39+
local c=e:GetHandler()
40+
if chk==0 then return not c:IsStatus(STATUS_DESTROY_CONFIRMED)
41+
and c:IsAbleToRemove() and eg:IsExists(s.repfilter,1,nil,tp) end
42+
return Duel.SelectEffectYesNo(tp,c,96)
43+
end

‎official/c17201951.lua‎

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
--フルスピード・ウォリアー
2+
--Fullspeed Warrior
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Add 1 "Junk Synchron" or 1 Spell/Trap that mentions "Junk Warrior" from your Deck to your hand
7+
local e1a=Effect.CreateEffect(c)
8+
e1a:SetDescription(aux.Stringid(id,0))
9+
e1a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
10+
e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
11+
e1a:SetProperty(EFFECT_FLAG_DELAY)
12+
e1a:SetCode(EVENT_SUMMON_SUCCESS)
13+
e1a:SetCountLimit(1,id)
14+
e1a:SetTarget(s.thtg)
15+
e1a:SetOperation(s.thop)
16+
c:RegisterEffect(e1a)
17+
local e1b=e1a:Clone()
18+
e1b:SetCode(EVENT_SPSUMMON_SUCCESS)
19+
c:RegisterEffect(e1b)
20+
--Monsters you control that mention "Junk Warrior", and Synchro Monsters you control with "Warrior" in their original names, gain 900 ATK during your Battle Phase only
21+
local e2=Effect.CreateEffect(c)
22+
e2:SetType(EFFECT_TYPE_FIELD)
23+
e2:SetCode(EFFECT_UPDATE_ATTACK)
24+
e2:SetRange(LOCATION_MZONE)
25+
e2:SetTargetRange(LOCATION_MZONE,0)
26+
e2:SetCondition(function(e) return Duel.IsBattlePhase() and Duel.IsTurnPlayer(e:GetHandlerPlayer()) end)
27+
e2:SetTarget(function(e,c) return c:ListsCode(CARD_JUNK_WARRIOR) or (c:IsType(TYPE_SYNCHRO) and c:IsOriginalSetCard(SET_WARRIOR)) end)
28+
e2:SetValue(900)
29+
c:RegisterEffect(e2)
30+
end
31+
s.listed_names={CARD_JUNK_SYNCHRON,CARD_JUNK_WARRIOR}
32+
s.listed_series={SET_WARRIOR}
33+
function s.thfilter(c)
34+
return (c:IsCode(CARD_JUNK_SYNCHRON) or (c:IsSpellTrap() and c:ListsCode(CARD_JUNK_WARRIOR))) and c:IsAbleToHand()
35+
end
36+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
37+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
38+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
39+
end
40+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
41+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
42+
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
43+
if #g>0 then
44+
Duel.SendtoHand(g,nil,REASON_EFFECT)
45+
Duel.ConfirmCards(1-tp,g)
46+
end
47+
end

‎official/c212652.lua‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
--毒サソリの罠毒
2+
--Trap of the Poisonous Scorpion
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Destroy an opponent's attacking monster, then inflict 300 damage to your opponent
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
10+
e1:SetType(EFFECT_TYPE_ACTIVATE)
11+
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
12+
e1:SetCondition(function(e,tp) return Duel.GetAttacker():IsControler(1-tp) end)
13+
e1:SetTarget(s.target)
14+
e1:SetOperation(s.activate)
15+
c:RegisterEffect(e1)
16+
end
17+
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
18+
if chk==0 then return true end
19+
local bc=Duel.GetAttacker()
20+
e:SetLabelObject(bc)
21+
bc:CreateEffectRelation(e)
22+
Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,tp,0)
23+
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,300)
24+
end
25+
function s.activate(e,tp,eg,ep,ev,re,r,rp)
26+
local bc=e:GetLabelObject()
27+
if bc:IsRelateToEffect(e) and bc:IsMonster() and Duel.Destroy(bc,REASON_EFFECT)>0 then
28+
Duel.BreakEffect()
29+
Duel.Damage(1-tp,300,REASON_EFFECT)
30+
end
31+
end

‎official/c42711820.lua‎

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
--スクラップ・ウォリアー
2+
--Scrap Warrior
3+
--Scripted by the Razgriz
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
c:EnableReviveLimit()
7+
--Synchro Summon procedure: "Scrap Synchron" + 1+ non-Tuner monsters
8+
Synchro.AddProcedure(c,s.tunerfilter,1,1,Synchro.NonTuner(nil),1,99)
9+
--Add to your hand, or send to the GY, 1 "Junk Synchron" or 1 card that mentions "Junk Warrior" from your Deck
10+
local e1=Effect.CreateEffect(c)
11+
e1:SetDescription(aux.Stringid(id,0))
12+
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_TOGRAVE)
13+
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
14+
e1:SetProperty(EFFECT_FLAG_DELAY)
15+
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
16+
e1:SetCountLimit(1,id)
17+
e1:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end)
18+
e1:SetTarget(s.thtgtg)
19+
e1:SetOperation(s.thtgop)
20+
c:RegisterEffect(e1)
21+
--The activated effects of monsters that mention "Junk Warrior", and Synchro Monsters with "Warrior" in their original names, that you control cannot be negated, except "Scrap Warrior"
22+
local e2=Effect.CreateEffect(c)
23+
e2:SetType(EFFECT_TYPE_FIELD)
24+
e2:SetCode(EFFECT_CANNOT_DISEFFECT)
25+
e2:SetRange(LOCATION_MZONE)
26+
e2:SetValue(s.effval)
27+
c:RegisterEffect(e2)
28+
end
29+
s.material={16449363} --"Scrap Synchron"
30+
s.listed_series={SET_WARRIOR}
31+
s.listed_names={16449363,CARD_JUNK_SYNCHRON,CARD_JUNK_WARRIOR,id}
32+
s.material_setcode=SET_SYNCHRON
33+
function s.tunerfilter(c,lc,stype,tp)
34+
return c:IsSummonCode(lc,stype,tp,16449363) or c:IsHasEffect(20932152)
35+
end
36+
function s.thtgfilter(c)
37+
return (c:IsCode(CARD_JUNK_SYNCHRON) or c:ListsCode(CARD_JUNK_WARRIOR)) and (c:IsAbleToHand() or c:IsAbleToGrave())
38+
end
39+
function s.thtgtg(e,tp,eg,ep,ev,re,r,rp,chk)
40+
if chk==0 then return Duel.IsExistingMatchingCard(s.thtgfilter,tp,LOCATION_DECK,0,1,nil) end
41+
Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
42+
Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
43+
end
44+
function s.thtgop(e,tp,eg,ep,ev,re,r,rp)
45+
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,1))
46+
local g=Duel.SelectMatchingCard(tp,s.thtgfilter,tp,LOCATION_DECK,0,1,1,nil)
47+
if #g>0 then
48+
aux.ToHandOrElse(g,tp)
49+
end
50+
end
51+
function s.effval(e,ct)
52+
local trig_e,trig_p,trig_loc=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_LOCATION)
53+
if not (trig_p==e:GetHandlerPlayer() and (trig_loc&LOCATION_MZONE)>0) then return false end
54+
local trig_c=trig_e:GetHandler()
55+
return (trig_c:ListsCode(CARD_JUNK_WARRIOR) or (trig_c:IsSynchroMonster() and trig_c:IsOriginalSetCard(SET_WARRIOR))) and not trig_c:IsCode(id)
56+
end

‎official/c43834302.lua‎

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
--シンクロ・フェローズ
2+
--Synchro Fellows
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Add 1 "Junk Synchron", and 1 monster that mentions "Junk Warrior" or "Stardust Dragon", from your Deck to your hand, then discard 1 card
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES)
10+
e1:SetType(EFFECT_TYPE_ACTIVATE)
11+
e1:SetCode(EVENT_FREE_CHAIN)
12+
e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH)
13+
e1:SetTarget(s.thtg)
14+
e1:SetOperation(s.thop)
15+
c:RegisterEffect(e1)
16+
--Decrease the Level of 1 Synchro Monster you control by 1
17+
local e2=Effect.CreateEffect(c)
18+
e2:SetDescription(aux.Stringid(id,1))
19+
e2:SetCategory(CATEGORY_LVCHANGE)
20+
e2:SetType(EFFECT_TYPE_IGNITION)
21+
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
22+
e2:SetRange(LOCATION_GRAVE)
23+
e2:SetCondition(function(e,tp) return Duel.IsPlayerCanAdditionalSummon(tp) and not Duel.HasFlagEffect(tp,id) end)
24+
e2:SetCost(Cost.SelfBanish)
25+
e2:SetTarget(s.lvtg)
26+
e2:SetOperation(s.lvop)
27+
c:RegisterEffect(e2)
28+
end
29+
s.listed_names={CARD_JUNK_SYNCHRON,CARD_JUNK_WARRIOR,CARD_STARDUST_DRAGON}
30+
s.listed_series={SET_SYNCHRON}
31+
function s.thfilter(c)
32+
return (c:IsCode(CARD_JUNK_SYNCHRON) or (c:IsMonster() and c:ListsCode(CARD_JUNK_WARRIOR,CARD_STARDUST_DRAGON))) and c:IsAbleToHand()
33+
end
34+
function s.rescon(sg,e,tp,mg)
35+
return sg:IsExists(Card.IsCode,1,nil,CARD_JUNK_SYNCHRON) and sg:IsExists(Card.ListsCode,1,nil,CARD_JUNK_WARRIOR,CARD_STARDUST_DRAGON)
36+
end
37+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
38+
local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil)
39+
if chk==0 then return aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) end
40+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK)
41+
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
42+
end
43+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
44+
local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil)
45+
if #g==0 then return end
46+
local sg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,HINTMSG_ATOHAND)
47+
if #sg>0 and Duel.SendtoHand(sg,nil,REASON_EFFECT)>0 then
48+
Duel.ConfirmCards(1-tp,sg)
49+
Duel.ShuffleHand(tp)
50+
Duel.BreakEffect()
51+
Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD)
52+
end
53+
end
54+
function s.lvfilter(c)
55+
return c:IsSynchroMonster() and c:IsLevelAbove(2) and c:IsFaceup()
56+
end
57+
function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
58+
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.lvfilter(chkc) end
59+
if chk==0 then return Duel.IsPlayerCanSummon(tp)
60+
and Duel.IsExistingTarget(s.lvfilter,tp,LOCATION_MZONE,0,1,nil) end
61+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
62+
local g=Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,0,1,1,nil)
63+
Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,g,1,tp,1)
64+
end
65+
function s.lvop(e,tp,eg,ep,ev,re,r,rp)
66+
local c=e:GetHandler()
67+
local tc=Duel.GetFirstTarget()
68+
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsLevelAbove(2) and not tc:IsImmuneToEffect(e) then
69+
--Decrease its Level by 1
70+
local e1=Effect.CreateEffect(c)
71+
e1:SetType(EFFECT_TYPE_SINGLE)
72+
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
73+
e1:SetCode(EFFECT_UPDATE_LEVEL)
74+
e1:SetValue(-1)
75+
e1:SetReset(RESET_EVENT|RESETS_STANDARD)
76+
tc:RegisterEffect(e1)
77+
Duel.BreakEffect()
78+
aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,2))
79+
Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1)
80+
--You can Normal Summon 1 "Synchron" monster during your Main Phase this turn, in addition to your Normal Summon/Set (you can only gain this effect once per turn)
81+
local e2=Effect.CreateEffect(c)
82+
e2:SetType(EFFECT_TYPE_FIELD)
83+
e2:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
84+
e2:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0)
85+
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_SYNCHRON))
86+
e2:SetReset(RESET_PHASE|PHASE_END)
87+
Duel.RegisterEffect(e2,tp)
88+
end
89+
end

0 commit comments

Comments
 (0)