Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 5 additions & 2 deletions archetype_setcode_constants.lua
Original file line number Diff line number Diff line change
Expand Up @@ -588,8 +588,11 @@ SET_REGENESIS = 0x1be
SET_DRAGONTAIL = 0x1c0
SET_YUMMY = 0x1c1
SET_K9 = 0x1c4
--Released but the official English name is unconfirmed
--Pre-release archetypes
SET_TELEPORT = 0x1c5
--Released but the official English name is unconfirmed
SET_IMPRISONED_DEITY = 0x1c6
SET_ARTMEGIA = 0x1c7
--Pre-release archetypes
SET_DOOM_KING = 0x1c8
SET_MAGNIFISTORM = 0x1c9
SET_RB = 0x1ca
5 changes: 4 additions & 1 deletion card_counter_constants.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ CARD_FOSSIL_FUSION = 59419719
CARD_GAIA_CHAMPION = 66889139
CARD_GALAXYEYES_P_DRAGON = 93717133
CARD_GOLDEN_LORD = 95440946
CARD_HARMONIC_OSCILLATION = 31531170
CARD_HARPIE_LADY = 76812113
CARD_HARPIE_LADY_SISTERS = 12206212
CARD_INFERNOBLE_CHARLES = 77656797
Expand All @@ -53,10 +54,11 @@ CARD_LABRYNTH_LABYRINTH = 33407125
CARD_LIGHT_BARRIER = 73206827
CARD_MAGICAL_MIDBREAKER = 71650854
CARD_MAX_METALMORPH = 89812483
CARD_MEDIUS_THE_INNOCENT = 101301008
CARD_MEDIUS_THE_INNOCENT = 97556336
CARD_MEMENTOAL_TECUHTLICA = 23288411
CARD_MILLENNIUM_CROSS = 37613663
CARD_MONSTER_REBORN = 83764718
CARD_MYSTICAL_SPACE_TYPHOON = 5318639
CARD_MYUTANT_ARSENAL = 7574904
CARD_MYUTANT_BEAST = 34695290
CARD_MYUTANT_MIST = 61089209
Expand Down Expand Up @@ -108,6 +110,7 @@ CARD_VIJAM = 15610297
CARD_VISAS_STARFROST = 56099748
CARD_YUBEL = 78371393
CARD_ZARC = 13331639
CARD_ZEFRAATH = 29432356

--Commonly used groups of cards
CARDS_SANGA_KAZEJIN_SUIJIN = {25955164,62340868,98434877}
Expand Down
13 changes: 8 additions & 5 deletions goat/c504700123.lua
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ function s.initial_effect(c)
end)
end)
end
s.listed_names={73915052}
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.GetCurrentChain(true)==0 and Duel.GetActivityCount(tp,ACTIVITY_SUMMON)==0
and Duel.GetActivityCount(tp,ACTIVITY_FLIPSUMMON)==0 and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0) or
Expand All @@ -53,7 +54,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE|PHASE_END)
e1:SetTargetRange(1,0)
e1:SetLabelObject(e)
e1:SetTarget(s.sumlimit)
Expand All @@ -62,7 +63,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e2:SetCode(EFFECT_CANNOT_SUMMON)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetReset(RESET_PHASE|PHASE_END)
e2:SetTargetRange(1,0)
Duel.RegisterEffect(e2,tp)
local e3=e2:Clone()
Expand All @@ -71,7 +72,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local e4=Effect.CreateEffect(e:GetHandler())
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_OATH)
e4:SetDescription(aux.Stringid(id,1))
e4:SetReset(RESET_PHASE+PHASE_END)
e4:SetReset(RESET_PHASE|PHASE_END)
e4:SetTargetRange(1,0)
Duel.RegisterEffect(e4,tp)
end
Expand All @@ -91,12 +92,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
for i=1,4 do
local token=Duel.CreateToken(tp,73915051+i)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
--Cannot be tributed for a tribute summon
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(3304)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UNRELEASABLE_SUM)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetReset(RESET_EVENT|RESETS_STANDARD)
token:RegisterEffect(e1,true)
end
Duel.SpecialSummonComplete()
Expand Down
12 changes: 9 additions & 3 deletions official/c10515412.lua
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp)
e1:SetCondition(function() return not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsType,TYPE_NORMAL),tp,LOCATION_MZONE,0,1,nil) end)
e1:SetReset(RESET_EVENT|RESETS_STANDARD)
tc:RegisterEffect(e1)
--Reset e1 when the card is activated (to allow effects of Continuous Spell/Traps to be used when they are face-up)
--Reset e1 when the card is activated (to allow effects of Continuous Spell/Traps to be used when they are face-up)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
Expand All @@ -80,8 +80,14 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp)
e3:SetCode(EVENT_LEAVE_FIELD_P)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetReset(RESET_EVENT|RESETS_STANDARD)
e3:SetOperation(function(e) if e:GetLabelObject() then e:GetLabelObject():Reset() end end)
e3:SetOperation(s.reseteffect)
e3:SetLabelObject(e2)
tc:RegisterEffect(e3)
end
end
end
function s.reseteffect(e,tp,eg,ep,ev,re,r,rp)
local on_act_eff=e:GetLabelObject()
if on_act_eff and not on_act_eff:IsDeleted() then
on_act_eff:Reset()
end
end
2 changes: 1 addition & 1 deletion official/c11082056.lua
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
end
if Duel.SendtoGrave(mc,REASON_EFFECT)==0 or not mc:IsLocation(LOCATION_GRAVE) then return end
local code=mc:GetCode()
if mc:IsPreviousLocation(LOCATION_ONFIELD) and mc:IsPreviousPosition(POS_FACEUP) then
if mc:IsPreviousLocation(LOCATION_ONFIELD) and mc:IsPreviousPosition(POS_FACEUP) then
code=mc:GetPreviousCodeOnField()
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
Expand Down
4 changes: 2 additions & 2 deletions pre-release/c101301057.lua → official/c1122030.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function s.initial_effect(c)
e3:SetOperation(function(e) Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT|REASON_REPLACE) end)
c:RegisterEffect(e3)
end
s.listed_names={CARD_MEDIUS_THE_INNOCENT,101301054} --"Artmegia the Academy City of Divine Arts"
s.listed_names={CARD_MEDIUS_THE_INNOCENT,74733322} --"Artmegia the Academy City of Divine Arts"
s.listed_series={SET_ARTMEGIA}
function s.thfilter(c)
return c:IsCode(CARD_MEDIUS_THE_INNOCENT) and c:IsAbleToHand()
Expand Down Expand Up @@ -69,7 +69,7 @@ function s.fusmatop(e,tp,eg,ep,ev,re,r,rp)
end
end
function s.repfilter(c,tp)
return c:IsCode(101301054) and c:IsFaceup() and c:IsControler(tp) and c:IsOnField()
return c:IsCode(74733322) and c:IsFaceup() and c:IsControler(tp) and c:IsOnField()
and c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
Expand Down
2 changes: 1 addition & 1 deletion official/c11321089.lua
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function s.drdestg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return hc>0 and fc>0 and Duel.IsPlayerCanDraw(tp,hc) and #dg>=fc end
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,hc)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,#dg,fc,1-tp,LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,fc,1-tp,LOCATION_ONFIELD)
end
function s.drdesop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Expand Down
2 changes: 1 addition & 1 deletion pre-release/c101301050.lua → official/c12067160.lua
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=re:GetHandler()
return re:IsMonsterEffect() and rc:IsRelateToEffect(re) and c:GetLinkedGroup():IsContains(rc) and not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
end
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion pre-release/c101301047.lua → official/c13289758.lua
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ function s.detachop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) and c:GetOverlayCount()>0 then
c:RemoveOverlayCard(tp,1,1,REASON_EFFECT)
end
end
end
File renamed without changes.
59 changes: 28 additions & 31 deletions official/c13735899.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
--Scripted by Eerie Code
local s,id=GetID()
function s.initial_effect(c)
--Fusion Summon
c:EnableReviveLimit()
--Fusion Materials: 1 Spellcaster monster + 1 Dragon monster
Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsRace,RACE_SPELLCASTER),aux.FilterBoolFunctionEx(Card.IsRace,RACE_DRAGON))
--Cannot be used as Fusion Material
local e0=Effect.CreateEffect(c)
Expand All @@ -13,37 +13,38 @@ function s.initial_effect(c)
e0:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e0:SetValue(1)
c:RegisterEffect(e0)
--Decreak ATK by 100 per banished card
--This card loses 100 ATK for each of your banished cards
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(function(e,cc) return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_REMOVED,0)*-100 end)
c:RegisterEffect(e1)
--Banish monsters
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_CUSTOM+id)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id)
e2:SetTarget(s.rmtg)
e2:SetOperation(s.rmop)
c:RegisterEffect(e2)
local g=Group.CreateGroup()
g:KeepAlive()
e2:SetLabelObject(g)
--Register summons
--Banish 1 Special Summoned monster, also banish all monsters from the field with its same original Type
local e2a=Effect.CreateEffect(c)
e2a:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2a:SetCode(EVENT_SPSUMMON_SUCCESS)
e2a:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2a:SetDescription(aux.Stringid(id,0))
e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2a:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2a:SetCode(EVENT_CUSTOM+id)
e2a:SetRange(LOCATION_MZONE)
e2a:SetLabelObject(e2)
e2a:SetOperation(s.regop)
e2a:SetCountLimit(1,id)
e2a:SetCondition(function() return not Duel.IsPhase(PHASE_DAMAGE) end)
e2a:SetTarget(s.rmtg)
e2a:SetOperation(s.rmop)
c:RegisterEffect(e2a)
local g=Group.CreateGroup()
g:KeepAlive()
e2a:SetLabelObject(g)
--Register summons
local e2b=Effect.CreateEffect(c)
e2b:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2b:SetCode(EVENT_SPSUMMON_SUCCESS)
e2b:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2b:SetRange(LOCATION_MZONE)
e2b:SetLabelObject(e2a)
e2b:SetOperation(s.regop)
c:RegisterEffect(e2b)
end
function s.tgfilter(c,rc,e)
return c:IsLocation(LOCATION_MZONE) and (rc==c or (c:IsFaceup() and rc:IsOriginalRace(c:GetOriginalRace())))
Expand All @@ -57,7 +58,6 @@ function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=e:GetLabelObject():Filter(s.tgfilter2,nil,e)
if chkc then return g:IsContains(chkc) and s.tgfilter(chkc,nil) end
if chk==0 then return #g>0 end
Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1)
local tc=nil
if #g==1 then
tc=g:GetFirst()
Expand All @@ -67,21 +67,18 @@ function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
tc=g:Select(tp,1,1,nil)
Duel.SetTargetCard(tc)
end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,tc,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,tc,1,tp,0)
end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local g=Group.FromCards(tc)
if tc:IsFaceup() then
g=g+Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsOriginalRace,tc:GetOriginalRace()),tp,LOCATION_MZONE,LOCATION_MZONE,tc)
end
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsOriginalRace,tc:GetOriginalRace()),tp,LOCATION_MZONE,LOCATION_MZONE,tc)+tc
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.HasFlagEffect(tp,id) or eg:IsContains(c) then return end
if eg:IsContains(c) then return end
local rc=re:GetHandler()
if not (re and re:IsActivated() and re:IsMonsterEffect() and rc) then return end
local tg=eg:Filter(s.tgfilter,nil,rc)
Expand Down
2 changes: 1 addition & 1 deletion pre-release/c101301044.lua → official/c14301396.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ end
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc~=c end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,c)
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion official/c14604710.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
e:SetProperty(0)
e:SetOperation(s.spop1)
s.sptg1(e,tp,eg,ep,ev,re,r,rp,1)
else
elseif op==2 then
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
e:SetOperation(s.spop2)
s.sptg2(e,tp,eg,ep,ev,re,r,rp,1)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion official/c18861006.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--紅天馬ファイヤー・ウイング・ペガサス
--Firewing Pegasus, the Crimson Heavenly Horse
--Crimson Firewing Pegasus
--scripted by Naim
local s,id=GetID()
function s.initial_effect(c)
Expand Down
2 changes: 1 addition & 1 deletion pre-release/c100444001.lua → official/c19222426.lua
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@ function s.valcheck(e,c)
if mg:IsExists(Card.IsType,1,nil,TYPE_NORMAL) then
c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD&~(RESET_TOFIELD|RESET_TEMP_REMOVE|RESET_LEAVE),0,1)
end
end
end
2 changes: 1 addition & 1 deletion official/c19715246.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--サイバー・ヨルムンガンド
--Cyber Jormungandr
--Cyber Jormungardr
--scripted by Naim
local s,id=GetID()
function s.initial_effect(c)
Expand Down
12 changes: 7 additions & 5 deletions official/c20584712.lua
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
--SPYRAL Tough
--SPYRAL-タフネス
--SPYRAL Tough
local s,id=GetID()
function s.initial_effect(c)
--change name
--This card's name becomes "SPYRAL Super Agent" while it is on the field or in the GY.
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetRange(LOCATION_MZONE|LOCATION_GRAVE)
e1:SetValue(41091257)
c:RegisterEffect(e1)
--destroy
--Reveal the top card of your opponent's Deck, and if you do, destroy a targeted card if the revealed card is the declared type
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_DESTROY)
Expand All @@ -22,14 +22,16 @@ function s.initial_effect(c)
e2:SetOperation(s.desop)
c:RegisterEffect(e2)
end
s.listed_names={41091257} --"SPYRAL Super Agent"
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil)
and Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE)
e:SetLabel(Duel.SelectOption(tp,70,71,72))
e:SetLabel(Duel.SelectOption(tp,DECLTYPE_MONSTER,DECLTYPE_SPELL,DECLTYPE_TRAP))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
local tc=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,tc,1,tp,0)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)==0 then return end
Expand Down
Loading