Skip to content

Commit 24d5dad

Browse files
authored
Add files via upload
1 parent 28e2355 commit 24d5dad

82 files changed

Lines changed: 6817 additions & 4 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

archetype_setcode_constants.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -604,13 +604,13 @@ SET_END_OF_THE_WORLD = 0x1d1
604604
SET_FAIRY_TAIL = 0x1d2
605605
SET_ELFNOTE = 0x1d0
606606
SET_GMX = 0x1d4
607-
--Released but the official English name is unconfirmed
608607
SET_CLOWN_CREW = 0x1d3
609-
SET_DARK_TUNER = 0x1d5
610-
--Pre-release archetypes
611608
SET_BLITZCLIQUE = 0x1d6
612609
SET_THEOREALIZE = 0x1d7
613610
SET_ALEISTER = 0x1d8
611+
--Released but the official English name is unconfirmed
612+
SET_DARK_TUNER = 0x1d5
613+
--Pre-release archetypes
614614
SET_WHITE_KNIGHT_NIGHT = 0x1d9
615615
SET_DAEDALUS = 0x1da
616616
SET_ASUTRA = 0x1db

card_counter_constants.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ CARD_GRANDPA_DEMETTO = 44190146
5050
CARD_HARMONIC_OSCILLATION = 31531170
5151
CARD_HARPIE_LADY = 76812113
5252
CARD_HARPIE_LADY_SISTERS = 12206212
53+
CARD_HIDEOUT_IN_THE_SKY_COULOMB = 37654623
5354
CARD_INFERNOBLE_CHARLES = 77656797
5455
CARD_INVOCATION = 74063034
5556
CARD_JACK_KNIGHT = 90876561
@@ -61,6 +62,7 @@ CARD_KING_KNIGHT = 64788463
6162
CARD_KING_SARCOPHAGUS = 16528181
6263
CARD_KURIBOH = 40640057
6364
CARD_LABRYNTH_LABYRINTH = 33407125
65+
CARD_LIGHT_AND_DARKNESS_RITUAL = 33599853
6466
CARD_LIGHT_BARRIER = 73206827
6567
CARD_MACRO_COSMOS = 30241314
6668
CARD_MAGICAL_MIDBREAKER = 71650854
@@ -94,7 +96,6 @@ CARD_REGULUS_THE_PRINCE_OF_ENDYMION = 96228804
9496
CARD_REVEALER_ICEBARRIER = 18319762
9597
CARD_REVERSAL_OF_FATE = 36690018
9698
CARD_RIKKA_KONKON = 76869711
97-
CARD_RITUAL_OF_LIGHT_AND_DARKNESS = 101305044
9899
CARD_SALAMANGREAT_SANCTUARY = 1295111
99100
CARD_SANCTUARY_SKY = 56433456
100101
CARD_SANGA_OF_THE_THUNDER = 25955164

official/c10307853.lua

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
--護石の作庭
2+
--Protective Stone Gardenscaping
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Activate
7+
local e0=Effect.CreateEffect(c)
8+
e0:SetType(EFFECT_TYPE_ACTIVATE)
9+
e0:SetCode(EVENT_FREE_CHAIN)
10+
c:RegisterEffect(e0)
11+
--While you have 5 cards in your Spell & Trap Zone, any battle damage a player takes is halved, also once per turn, you can activate 1 Continuous Trap Card the turn it was Set
12+
local e1a=Effect.CreateEffect(c)
13+
e1a:SetType(EFFECT_TYPE_FIELD)
14+
e1a:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
15+
e1a:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
16+
e1a:SetRange(LOCATION_SZONE)
17+
e1a:SetTargetRange(1,1)
18+
e1a:SetCondition(function(e) return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_STZONE,0)==5 end)
19+
e1a:SetValue(HALF_DAMAGE)
20+
c:RegisterEffect(e1a)
21+
local e1b=e1a:Clone()
22+
e1b:SetDescription(aux.Stringid(id,0))
23+
e1b:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
24+
e1b:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
25+
e1b:SetTargetRange(LOCATION_SZONE,0)
26+
e1b:SetCountLimit(1)
27+
c:RegisterEffect(e1b)
28+
--During the Standby Phase: You can reveal 5 Continuous Traps with different names from your Deck, your opponent randomly picks 1 for you to Set on your field, also shuffle the rest into the Deck. You can only use this effect of "Protective Stone Gardenscaping" once per turn
29+
local e2=Effect.CreateEffect(c)
30+
e2:SetDescription(aux.Stringid(id,1))
31+
e2:SetCategory(CATEGORY_SET)
32+
e2:SetType(EFFECT_TYPE_QUICK_O)
33+
e2:SetCode(EVENT_FREE_CHAIN)
34+
e2:SetRange(LOCATION_SZONE)
35+
e2:SetCountLimit(1,id)
36+
e2:SetCondition(function() return Duel.IsStandbyPhase() end)
37+
e2:SetTarget(s.settg)
38+
e2:SetOperation(s.setop)
39+
e2:SetHintTiming(TIMING_STANDBY_PHASE)
40+
c:RegisterEffect(e2)
41+
end
42+
function s.setfilter(c)
43+
return c:IsContinuousTrap() and c:IsSSetable() and not c:IsPublic()
44+
end
45+
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
46+
local g=Duel.GetMatchingGroup(s.setfilter,tp,LOCATION_DECK,0,nil)
47+
if chk==0 then return #g>=5 and g:GetClassCount(Card.GetCode)>=5 end
48+
Duel.SetOperationInfo(0,CATEGORY_SET,nil,1,tp,LOCATION_DECK)
49+
end
50+
function s.setop(e,tp,eg,ep,ev,re,r,rp)
51+
local g=Duel.GetMatchingGroup(s.setfilter,tp,LOCATION_DECK,0,nil)
52+
if #g<5 then return end
53+
local rg=aux.SelectUnselectGroup(g,e,tp,5,5,aux.dncheck,1,tp,HINTMSG_CONFIRM)
54+
Duel.ConfirmCards(1-tp,rg)
55+
Duel.ShuffleDeck(tp)
56+
local sg=rg:RandomSelect(1-tp,1)
57+
if #sg>0 then
58+
Duel.DisableShuffleCheck()
59+
Duel.SSet(tp,sg,tp,false)
60+
end
61+
end

official/c10529441.lua

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
--嗚呼な落とし穴
2+
--Oh my Trap Hole!
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--When a monster effect is activated on your opponent's field during the turn they Special Summoned a monster(s): Destroy the monster that activated that effect, then destroy all opponent's cards in its adjacent Monster Zones and Spell & Trap Zones (if any)
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_DESTROY)
10+
e1:SetType(EFFECT_TYPE_ACTIVATE)
11+
e1:SetCode(EVENT_CHAINING)
12+
e1:SetCondition(s.condition)
13+
e1:SetTarget(s.target)
14+
e1:SetOperation(s.activate)
15+
c:RegisterEffect(e1)
16+
--Keep track of a player Special Summoning a monster
17+
aux.GlobalCheck(s,function()
18+
local ge1=Effect.CreateEffect(c)
19+
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
20+
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
21+
ge1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
22+
for p=0,1 do
23+
if eg:IsExists(Card.IsSummonPlayer,1,nil,p) then
24+
Duel.RegisterFlagEffect(p,id,RESET_PHASE|PHASE_END,0,1)
25+
end
26+
end
27+
end)
28+
Duel.RegisterEffect(ge1,0)
29+
end)
30+
end
31+
function s.condition(e,tp,eg,ep,ev,re,r,rp)
32+
if not (Duel.HasFlagEffect(1-tp,id) and re:IsMonsterEffect()) then return false end
33+
local trig_loc,trig_ctrl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_CONTROLER)
34+
return trig_ctrl==1-tp and trig_loc==LOCATION_MZONE and re:GetHandler():IsRelateToEffect(re)
35+
end
36+
function s.adjacentfilter(c,tp,rc,seq)
37+
if c:IsControler(tp) then return false end
38+
if c:IsLocation(LOCATION_SZONE) then
39+
return rc:IsInMainMZone() and rc:GetColumnGroup():IsContains(c) and c:IsControler(rc:GetControler())
40+
elseif c:IsLocation(LOCATION_MZONE) then
41+
if c:IsInExtraMZone() or rc:IsInExtraMZone() then
42+
return rc:GetColumnGroup():IsContains(c)
43+
else
44+
return c:IsSequence(seq-1,seq+1) and c:IsControler(rc:GetControler())
45+
end
46+
end
47+
return false
48+
end
49+
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
50+
if chk==0 then return true end
51+
local rc=re:GetHandler()
52+
rc:CreateEffectRelation(e)
53+
local g=rc:GetColumnGroup(1,1):Match(s.adjacentfilter,nil,tp,rc,rc:GetSequence())
54+
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g+rc,#g+1,tp,0)
55+
end
56+
function s.activate(e,tp,eg,ep,ev,re,r,rp)
57+
local rc=re:GetHandler()
58+
if not rc:IsRelateToEffect(re) then return end
59+
local g=rc:GetColumnGroup(1,1):Match(s.adjacentfilter,nil,tp,rc,rc:GetSequence())
60+
if Duel.Destroy(rc,REASON_EFFECT)>0 and #g>0 then
61+
Duel.BreakEffect()
62+
Duel.Destroy(g,REASON_EFFECT)
63+
end
64+
end

official/c10673071.lua

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
--人工神霊ヴィラカム
2+
--Virakam the Artificial Spirit
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--If you have an "Aleister" monster in your field or GY: You can 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:SetCondition(s.spcon)
14+
e1:SetTarget(s.sptg)
15+
e1:SetOperation(s.spop)
16+
c:RegisterEffect(e1)
17+
--If this card is Special Summoned: You can Set 1 "Invocation", or 1 Spell that mentions it, from your Deck
18+
local e2=Effect.CreateEffect(c)
19+
e2:SetDescription(aux.Stringid(id,1))
20+
e2:SetCategory(CATEGORY_SET)
21+
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
22+
e2:SetProperty(EFFECT_FLAG_DELAY)
23+
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
24+
e2:SetCountLimit(1,{id,1})
25+
e2:SetTarget(s.settg)
26+
e2:SetOperation(s.setop)
27+
c:RegisterEffect(e2)
28+
--When your opponent activates a card or effect in response to the activation of your Fusion Monster's effect (Quick Effect): You can banish this card from the field, and if you do, negate that opponent's effect, and if you do that, banish that card
29+
local e3=Effect.CreateEffect(c)
30+
e3:SetDescription(aux.Stringid(id,2))
31+
e3:SetCategory(CATEGORY_REMOVE+CATEGORY_DISABLE)
32+
e3:SetType(EFFECT_TYPE_QUICK_O)
33+
e3:SetCode(EVENT_CHAINING)
34+
e3:SetRange(LOCATION_MZONE)
35+
e3:SetCountLimit(1,{id,2})
36+
e3:SetCondition(s.discon)
37+
e3:SetTarget(s.distg)
38+
e3:SetOperation(s.disop)
39+
c:RegisterEffect(e3)
40+
end
41+
s.listed_names={CARD_INVOCATION}
42+
s.listed_series={SET_ALEISTER}
43+
function s.spconfilter(c)
44+
return c:IsSetCard(SET_ALEISTER) and c:IsMonster() and c:IsFaceup()
45+
end
46+
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
47+
return Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil)
48+
end
49+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
50+
local c=e:GetHandler()
51+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
52+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
53+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0)
54+
end
55+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
56+
local c=e:GetHandler()
57+
if c:IsRelateToEffect(e) then
58+
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
59+
end
60+
end
61+
function s.setfilter(c)
62+
return (c:IsCode(CARD_INVOCATION) or (c:IsSpell() and c:ListsCode(CARD_INVOCATION))) and c:IsSSetable()
63+
end
64+
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
65+
if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end
66+
Duel.SetOperationInfo(0,CATEGORY_SET,nil,1,tp,LOCATION_DECK)
67+
end
68+
function s.setop(e,tp,eg,ep,ev,re,r,rp)
69+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
70+
local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil)
71+
if #g>0 then
72+
Duel.SSet(tp,g)
73+
end
74+
end
75+
function s.discon(e,tp,eg,ep,ev,re,r,rp)
76+
local chainlink=Duel.GetCurrentChain(true)-1
77+
if not (chainlink>0 and Duel.IsChainDisablable(ev) and ep==1-tp) then return false end
78+
local trig_player,trig_type=Duel.GetChainInfo(chainlink,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_TYPE)
79+
return trig_player==tp and (trig_type&TYPE_FUSION)>0
80+
end
81+
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
82+
local c=e:GetHandler()
83+
local rc=re:GetHandler()
84+
local relation=rc:IsRelateToEffect(re)
85+
if chk==0 then return c:IsAbleToRemove() and (rc:IsAbleToRemove(tp)
86+
or (not relation and Duel.IsPlayerCanRemove(tp))) end
87+
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,tp,0)
88+
if relation then
89+
rc:CreateEffectRelation(e)
90+
Duel.SetOperationInfo(0,CATEGORY_REMOVE,Group.FromCards(c,rc),1,tp,0)
91+
else
92+
Duel.SetOperationInfo(0,CATEGORY_REMOVE,c,1,tp,0)
93+
Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,1,rc:GetPreviousControler(),rc:GetPreviousLocation())
94+
end
95+
end
96+
function s.disop(e,tp,eg,ep,ev,re,r,rp)
97+
local c=e:GetHandler()
98+
if c:IsRelateToEffect(e) and Duel.Remove(c,nil,REASON_EFFECT)>0 and c:IsLocation(LOCATION_REMOVED)
99+
and Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then
100+
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
101+
end
102+
end

official/c11642993.lua

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
--S-Force ソート・ワールド
2+
--S-Force Sorted World
3+
--Scripted by Hatter
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Activate
7+
local e0=Effect.CreateEffect(c)
8+
e0:SetType(EFFECT_TYPE_ACTIVATE)
9+
e0:SetCode(EVENT_FREE_CHAIN)
10+
e0:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E)
11+
c:RegisterEffect(e0)
12+
--If you would banish a card(s) from the hand to activate the effect of an "S-Force" monster you control, you can send 1 "S-Force" card from your Deck to the GY instead, except "S-Force Sorted World"
13+
local e1=Effect.CreateEffect(c)
14+
e1:SetDescription(aux.Stringid(id,0))
15+
e1:SetType(EFFECT_TYPE_FIELD)
16+
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
17+
e1:SetCode(EFFECT_COST_REPLACE)
18+
e1:SetRange(LOCATION_SZONE)
19+
e1:SetTargetRange(1,0)
20+
e1:SetCountLimit(1,{id,0})
21+
e1:SetCondition(s.repcon)
22+
e1:SetValue(s.repval)
23+
e1:SetOperation(s.repop)
24+
c:RegisterEffect(e1)
25+
--If another card(s) is banished: You can target 1 card in your opponent's field or GY; banish it, then you can move 1 "S-Force" monster you control to another of your Main Monster Zones
26+
local e2=Effect.CreateEffect(c)
27+
e2:SetDescription(aux.Stringid(id,1))
28+
e2:SetCategory(CATEGORY_REMOVE)
29+
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
30+
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
31+
e2:SetCode(EVENT_REMOVE)
32+
e2:SetRange(LOCATION_SZONE)
33+
e2:SetCountLimit(1,{id,1})
34+
e2:SetCondition(function(e,tp,eg) return eg:IsExists(Card.IsLocation,1,nil,LOCATION_REMOVED) end)
35+
e2:SetTarget(s.bantg)
36+
e2:SetOperation(s.banop)
37+
c:RegisterEffect(e2)
38+
end
39+
s.listed_names={id}
40+
s.listed_series={SET_S_FORCE}
41+
function s.repcostfilter(c,extracon,base,e,tp,eg,ep,ev,re,r,rp)
42+
return c:IsSetCard(SET_S_FORCE) and not c:IsCode(id) and c:IsAbleToGraveAsCost()
43+
and (not extracon or extracon(base,e,tp,eg,ep,ev,re,r,rp,c))
44+
end
45+
function s.repcon(e)
46+
return Duel.IsExistingMatchingCard(s.repcostfilter,e:GetHandlerPlayer(),LOCATION_DECK,0,1,nil)
47+
end
48+
function s.repval(base,extracon,e,tp,eg,ep,ev,re,r,rp,chk)
49+
if chk==0 then
50+
local c=e:GetHandler()
51+
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(SET_S_FORCE)
52+
and Duel.IsExistingMatchingCard(s.repcostfilter,tp,LOCATION_DECK,0,1,nil,extracon,base,e,tp,eg,ep,ev,re,r,rp)
53+
end
54+
return Chain.IsTriggeringControler(0,tp) and Chain.IsTriggeringLocation(0,LOCATION_MZONE)
55+
and Chain.IsTriggeringPosition(0,POS_FACEUP) and Chain.IsTriggeringSetcode(0,SET_S_FORCE)
56+
and Duel.IsExistingMatchingCard(s.repcostfilter,tp,LOCATION_DECK,0,1,nil,extracon,base,e,tp,eg,ep,ev,re,r,rp)
57+
end
58+
function s.repop(base,extracon,e,tp,eg,ep,ev,re,r,rp)
59+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
60+
local g=Duel.SelectMatchingCard(tp,s.repcostfilter,tp,LOCATION_DECK,0,1,1,nil,extracon,base,e,tp,eg,ep,ev,re,r,rp)
61+
Duel.SendtoGrave(g,REASON_COST)
62+
end
63+
function s.bantg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
64+
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_ONFIELD|LOCATION_GRAVE) and chkc:IsAbleToRemove() end
65+
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,1,nil) end
66+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
67+
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,1,1,nil)
68+
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,tp,0)
69+
end
70+
function s.banop(e,tp,eg,ep,ev,re,r,rp)
71+
local tc=Duel.GetFirstTarget()
72+
if tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_REMOVED)
73+
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
74+
local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_S_FORCE),tp,LOCATION_MZONE,0,nil)
75+
if #g==0 or not Duel.SelectYesNo(tp,aux.Stringid(id,2)) then return end
76+
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,3))
77+
local sc=g:Select(tp,1,1,nil):GetFirst()
78+
if not sc then return end
79+
Duel.HintSelection(sc)
80+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
81+
local zone=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
82+
Duel.BreakEffect()
83+
if tc:IsImmuneToEffect(e) then return end
84+
Duel.MoveSequence(sc,math.log(zone,2))
85+
end
86+
end

0 commit comments

Comments
 (0)