Skip to content
Merged

Updates #1176

Show file tree
Hide file tree
Changes from 50 commits
Commits
Show all changes
140 commits
Select commit Hold shift + click to select a range
173ee28
test
NaimSantos Mar 24, 2025
60486ff
batch 1
NaimSantos Mar 24, 2025
0f6c0f7
batch 2
NaimSantos Mar 24, 2025
41c4cf8
batch 3
NaimSantos Mar 24, 2025
f78d340
batch 4
NaimSantos Mar 24, 2025
bfe0b38
fix
NaimSantos Mar 24, 2025
28de1f5
missing keyword in the previous commit
NaimSantos Mar 24, 2025
8b05232
batch 5 (up to c29999999.lua)
NaimSantos Mar 26, 2025
df4c1f2
fixes
NaimSantos Mar 26, 2025
f54c5c0
batch 6 (up to c39999999.lua)
NaimSantos Mar 26, 2025
41efd33
fix
NaimSantos Mar 26, 2025
25d54b7
batch 7 (up to c49999999)
NaimSantos Mar 27, 2025
34ab7dc
up to c59999999.lua
NaimSantos Mar 27, 2025
14249a0
up to c69999999.lua
NaimSantos Mar 27, 2025
97a3077
Merge branch 'master' into updates
NaimSantos Mar 27, 2025
a1badb3
up to c79999999.lua
NaimSantos Mar 27, 2025
4efb8dc
up to c89999999.lua
NaimSantos Mar 27, 2025
52c9eb8
up to c99999999.lua
NaimSantos Mar 27, 2025
b1cb385
Line endings
NaimSantos Mar 27, 2025
ba29416
some fixes
NaimSantos Mar 27, 2025
08750af
Replace types and phase related checks by modern version
NaimSantos Mar 27, 2025
177b4b7
replace some hexadecimal values in IsPlayerCanSpecialSummonMonster
NaimSantos Mar 27, 2025
abcf955
More hexadecimal values replacement
NaimSantos Mar 27, 2025
528aef5
other replacements
NaimSantos Mar 27, 2025
4cdafd8
Attempt to apply Cost.SelfTribute and remove extra line endings
NaimSantos Mar 27, 2025
d527a8c
Apply Cost.SelfToGrave
NaimSantos Mar 27, 2025
c9d0154
Attempt to apply SEQ_DECKSHUFFLE
NaimSantos Mar 28, 2025
c5bb093
SEQ_DECKBOTTOM
NaimSantos Mar 28, 2025
8edaf5c
SEQ_DECKTOP
NaimSantos Mar 28, 2025
ed90838
Attempt to apply Cost.Detach
NaimSantos Mar 28, 2025
70d916a
Attempt to apply Cost.PayLP
NaimSantos Mar 28, 2025
716e9aa
Fix "Vylon Sphere"
NaimSantos Mar 28, 2025
13e2303
Another series of hexadecimal replacements
NaimSantos Mar 28, 2025
6fcc400
"Steelswarm Origin" update
NaimSantos Mar 28, 2025
750b935
CARD_SPIRIT_ELIMINATION and last hexadecimal replacements
NaimSantos Mar 28, 2025
066164b
Apply Cost.SelfDiscard and Cost.SelfDiscardToGrave
NaimSantos Mar 28, 2025
62b6f57
Replace GetLocation
NaimSantos Mar 28, 2025
61b87cb
Replace the usage of IsActiveType with the corresponding function(s)
NaimSantos Mar 28, 2025
ad5c567
extra RESET_EVENT
pyrQ Mar 29, 2025
cfab524
extra space
pyrQ Mar 29, 2025
09ddbbf
extra space
pyrQ Mar 29, 2025
ea39c15
extra space
pyrQ Mar 29, 2025
f7f0676
extra space
pyrQ Mar 29, 2025
a76cb9a
no space
pyrQ Mar 29, 2025
362a383
extra new line
pyrQ Mar 29, 2025
c03cf21
TYPE_TRAP+TYPE_SPELL
pyrQ Mar 29, 2025
ff38210
extra ()
pyrQ Mar 29, 2025
0ae5730
Duel.GetCurrentPhase(PHASE_BATTLE_START)
pyrQ Mar 29, 2025
79f1d38
LVset
pyrQ Mar 29, 2025
318b0e3
Duel.IsMainPhase
pyrQ Mar 29, 2025
3a57453
Update "Time Thief Double Barrel"
NaimSantos Mar 30, 2025
1329236
Update "Ultimate Crystal Rainbow Dragon Overdrive"
NaimSantos Mar 30, 2025
3af09ed
Replace counter values when their constant already exist
NaimSantos Mar 30, 2025
281d644
Replace cards ID by their constants
NaimSantos Mar 30, 2025
f178eea
Update c47778083.lua
pyrQ Mar 30, 2025
5aa7a21
Update c3428069.lua
pyrQ Mar 30, 2025
e858e6b
aux.StatChangeDamageStepCondition
NaimSantos Mar 31, 2025
de87ad1
fix
NaimSantos Mar 31, 2025
1922c22
Replace some occurrences of the + operator with |
NaimSantos Mar 31, 2025
8be0638
Some other instances of Cost.SelfToGrave and Cost.SelfToHand
NaimSantos Apr 1, 2025
141d431
Update c90243945.lua
pyrQ Apr 1, 2025
685d1fd
Update c74458486.lua
pyrQ Apr 1, 2025
d9fff77
Update c67922702.lua
pyrQ Apr 1, 2025
7a3c56a
Update c11662742.lua
pyrQ Apr 1, 2025
4719930
Update c16008155.lua
pyrQ Apr 1, 2025
c18fd28
Update c37083210.lua
pyrQ Apr 1, 2025
ba80a6f
Update c86613346.lua
pyrQ Apr 1, 2025
2a16d6e
"Tanngnjostr of the Nordic Beasts"
NaimSantos Apr 2, 2025
e114696
Update c14677495.lua
pyrQ Apr 2, 2025
a45857b
Some hexadecimal values
NaimSantos Apr 2, 2025
d9584de
Added some japanese names
NaimSantos Apr 2, 2025
ce6f3c6
fixed EN name
pyrQ Apr 3, 2025
2c093b0
one more hex value
pyrQ Apr 3, 2025
b05b539
2 other Cost.Detach applications
NaimSantos Apr 3, 2025
51b3d52
more japanese names
NaimSantos Apr 3, 2025
b8b453e
Apply Cost.SelfBanish to more cards
NaimSantos Apr 3, 2025
68625a1
Remove duplicated scripts
NaimSantos Apr 3, 2025
0e691e0
Update c64280356.lua
pyrQ Apr 3, 2025
926717e
Replace occurences of functions in the "aux.Self" family with their
NaimSantos Apr 3, 2025
7014244
apply other instances of Card.IsSpellTrap, Card.IsContinuousTrap and
NaimSantos Apr 4, 2025
aae2355
remove/replace extra spaces
NaimSantos Apr 4, 2025
0a6f704
Use Card.IsMonsterCard
pyrQ Apr 4, 2025
95b97f3
Update c23220533.lua
pyrQ Apr 4, 2025
585fc8f
formatting and small fix
pyrQ Apr 4, 2025
6177e24
Update c19828680.lua
pyrQ Apr 4, 2025
eab0116
formatting and small fix
pyrQ Apr 4, 2025
162412e
use Card.IsNormalSpellTrap
pyrQ Apr 4, 2025
7035165
delete unused function
pyrQ Apr 4, 2025
c452654
Update c2619149.lua
pyrQ Apr 4, 2025
a04c666
Update c32828635.lua
pyrQ Apr 4, 2025
4e49315
Update c32828635.lua
pyrQ Apr 4, 2025
75473ad
delete unused function
pyrQ Apr 4, 2025
e0681e1
wrong archetype constant
pyrQ Apr 4, 2025
5a9ea5c
wrong card to exclude with Duel.GetMZoneCount
pyrQ Apr 4, 2025
8aa1942
delete unused function + update
pyrQ Apr 4, 2025
ebbac50
delete unused function
pyrQ Apr 4, 2025
bddf815
Apply Card.IsMonsterCard
NaimSantos Apr 5, 2025
9d56df9
function names + can draw 1 check
pyrQ Apr 5, 2025
18a2109
use Cost.AND and Cost.SelfBanish
pyrQ Apr 5, 2025
86b8288
space
pyrQ Apr 5, 2025
26099a3
Japanese names and extra tabs
NaimSantos Apr 5, 2025
e55bd5e
extra ()
pyrQ Apr 5, 2025
2392357
formatting and fixes
pyrQ Apr 5, 2025
64a3f52
Update c8165596.lua
pyrQ Apr 5, 2025
c4e268c
use Duel.GetMZoneCount
pyrQ Apr 5, 2025
0f3f73d
log which effect was activated
pyrQ Apr 5, 2025
6fb9d41
use Cost.Detach, Duel.SelectEffect, and Card.IsNormalSpellTrap
pyrQ Apr 5, 2025
833f9d7
Use tables in Card.IsSetCard when it is possible
NaimSantos Apr 6, 2025
ccd491d
extra keyword
NaimSantos Apr 6, 2025
39e7cf6
Table in Card.IsSetCar, Duel.IsMainPhase and Cost.SelfDiscard
NaimSantos Apr 7, 2025
91ae803
missing >0
pyrQ Apr 8, 2025
827e150
simplify the selection process
pyrQ Apr 8, 2025
1e8c712
string ids and small fixes
pyrQ Apr 10, 2025
99de657
op infos, (), and polishing
pyrQ Apr 10, 2025
0a9c243
use LOCATION_STZONE
pyrQ Apr 10, 2025
55a9c81
extra () + use Card.IsCanBeXyzMaterial
pyrQ Apr 10, 2025
50e2b6f
use table in Card.IsSetCard + typo in archetype constant
pyrQ Apr 10, 2025
2b2457a
use Cost.Discard
pyrQ Apr 10, 2025
314507f
Update c28406301.lua
pyrQ Apr 10, 2025
eb5be28
Update c99397762.lua
pyrQ Apr 13, 2025
17c8c93
Update cards calling SelectMatchingCard without a hint message
NaimSantos Apr 13, 2025
fc74dfc
string id
pyrQ Apr 13, 2025
1daba27
"Shining Draw" update
NaimSantos Apr 13, 2025
ca77b47
Update c84274024.lua
pyrQ Apr 13, 2025
ff98267
Update cards calling SelectTarget without a hint message
NaimSantos Apr 13, 2025
b47aa68
"Elemental HERO Sunrise" update
NaimSantos Apr 13, 2025
08cf483
Update c22908820.lua
pyrQ Apr 13, 2025
24cc1c9
Update c75660578.lua
pyrQ Apr 13, 2025
a11fd82
Update c88000953.lua
pyrQ Apr 13, 2025
4ad01e8
Update c91969909.lua
pyrQ Apr 13, 2025
874e285
Update c92767273.lua
pyrQ Apr 13, 2025
e072c60
Update c35906693.lua
pyrQ Apr 13, 2025
b371e18
Firewall Dragon Darkfluid - Neo Tempest Terahertz and Hieratic Dragon of
NaimSantos Apr 15, 2025
14362e4
Merge remote-tracking branch 'origin/updates' into updates
NaimSantos Apr 15, 2025
5de2205
fix
NaimSantos Apr 15, 2025
dac0579
Use GetBinClassCount with "Awakening of the Possessed"
NaimSantos Apr 15, 2025
227d88b
Replace Cost.SelfRevealCost with Cost.SelfReveal
NaimSantos Apr 15, 2025
3a76ed4
Update c4022819.lua
pyrQ Apr 15, 2025
400a153
Update c64211118.lua
pyrQ Apr 15, 2025
eb5173a
Remove overwrites integrated in the core from proc workaround
edo9300 Apr 17, 2025
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
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 1 addition & 0 deletions card_counter_constants.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ CARD_CLEAR_WORLD = 33900648
CARD_CLOCK_LIZARD = 51476410
CARD_CRIMSON_DRAGON = 63436931
CARD_CRYSTAL_GOD_TISTINA = 86999951
CARD_CRYSTAL_TREE = 47408488
CARD_CYBER_DRAGON = 70095154
CARD_DARK_FUSION = 94820406
CARD_DARK_MAGICIAN = 46986414
Expand Down
1 change: 1 addition & 0 deletions constant.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1018,5 +1018,6 @@ WIN_REASON_DEUCE = 0x54
WIN_REASON_DECK_MASTER = 0x56
WIN_REASON_DRAW_OF_FATE = 0x57
WIN_REASON_MUSICAL_SUMO = 0x58
WIN_REASON_SUMMER_SCHOOLWORK = 0x59
Duel.LoadScript("card_counter_constants.lua")
Duel.LoadScript("archetype_setcode_constants.lua")
7 changes: 4 additions & 3 deletions official/c10000000.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
--オベリスクの巨神兵
--Obelisk the Tormentor
local s,id=GetID()
function s.initial_effect(c)
--summon with 3 tribute
Expand Down Expand Up @@ -51,7 +52,7 @@ function s.sumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.SetChainLimitTillChainEnd(aux.FALSE)
end
function s.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL)
return e:GetHandler():IsSpecialSummoned()
end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Expand All @@ -70,7 +71,7 @@ function s.descost(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetReset(RESETS_STANDARD_PHASE_END)
e:GetHandler():RegisterEffect(e1)
local g=Duel.SelectReleaseGroupCost(tp,nil,2,2,false,aux.ReleaseCheckTarget,nil,dg)
Duel.Release(g,REASON_COST)
Expand All @@ -83,4 +84,4 @@ end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
Duel.Destroy(g,REASON_EFFECT)
end
end
6 changes: 1 addition & 5 deletions official/c10000010.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function s.initial_effect(c)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_MZONE)
e4:SetCost(s.descost)
e4:SetCost(Cost.PayLP(1000))
e4:SetTarget(s.destg)
e4:SetOperation(s.desop)
c:RegisterEffect(e4)
Expand Down Expand Up @@ -76,10 +76,6 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e2)
end
end
function s.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000)
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Expand Down
6 changes: 3 additions & 3 deletions official/c10000020.lua
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function s.sumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.SetChainLimitTillChainEnd(aux.FALSE)
end
function s.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL)
return e:GetHandler():IsSpecialSummoned()
end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Expand Down Expand Up @@ -95,11 +95,11 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-2000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetReset(RESET_EVENT|RESETS_STANDARD)
tc:RegisterEffect(e1)
if preatk~=0 and tc:GetAttack()==0 then dg:AddCard(tc) end
end
if #dg==0 then return end
Duel.BreakEffect()
Duel.Destroy(dg,REASON_EFFECT)
end
end
26 changes: 11 additions & 15 deletions official/c10000080.lua
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function s.initial_effect(c)
e9:SetCategory(CATEGORY_SPECIAL_SUMMON)
e9:SetType(EFFECT_TYPE_IGNITION)
e9:SetRange(LOCATION_MZONE)
e9:SetCost(s.spcost)
e9:SetCost(Cost.SelfTribute)
e9:SetTarget(s.sptg)
e9:SetOperation(s.spop)
c:RegisterEffect(e9)
Expand All @@ -66,7 +66,7 @@ function s.ttcon2(e,c,minc,zone,relzone,exeff)
if type(ret)=="function" then
ret={ret(exeff,c)}
if #ret>1 then
zone=(ret[2]>>16)&0x7f
zone=(ret[2]>>16)&(ZONES_EMZ|ZONES_MMZ)
end
end
end
Expand All @@ -80,7 +80,7 @@ function s.tttg2(e,tp,eg,ep,ev,re,r,rp,chk,c,minc,zone,relzone,exeff)
if type(ret)=="function" then
ret={ret(exeff,c)}
if #ret>1 then
zone=(ret[2]>>16)&0x7f
zone=(ret[2]>>16)&(ZONES_EMZ|ZONES_MMZ)
end
end
end
Expand All @@ -101,7 +101,7 @@ function s.ttop2(e,tp,eg,ep,ev,re,r,rp,c,minc,zone,relzone,exeff)
end
function s.retreg(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,2)
c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,2)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
Expand All @@ -110,7 +110,7 @@ function s.retreg(e,tp,eg,ep,ev,re,r,rp)
e1:SetCountLimit(1)
e1:SetCondition(s.retcon)
e1:SetOperation(s.retop)
e1:SetReset(RESET_PHASE+PHASE_END,2)
e1:SetReset(RESET_PHASE|PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
function s.retcon(e,tp,eg,ep,ev,re,r,rp)
Expand All @@ -123,37 +123,33 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_CONTROL)
e1:SetValue(c:GetOwner())
e1:SetReset(RESET_EVENT+RESETS_STANDARD-(RESET_TOFIELD+RESET_TEMP_REMOVE+RESET_TURN_SET))
e1:SetReset(RESET_EVENT|RESETS_STANDARD-(RESET_TOFIELD|RESET_TEMP_REMOVE|RESET_TURN_SET))
c:RegisterEffect(e1)
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function s.filter(c,e,tp)
return c:IsCode(CARD_RA) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if e:GetHandler():GetSequence()<5 then ft=ft+1 end
if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetValue(4000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetReset(RESET_EVENT|RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENSE)
tc:RegisterEffect(e2)
end
Duel.SpecialSummonComplete()
end
end
12 changes: 4 additions & 8 deletions official/c10000090.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function s.initial_effect(c)
e4:SetCategory(CATEGORY_TOGRAVE)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCost(s.tgcost)
e4:SetCost(Cost.PayLP(1000))
e4:SetTarget(s.tgtg)
e4:SetOperation(s.tgop)
c:RegisterEffect(e4)
Expand Down Expand Up @@ -71,10 +71,6 @@ end
function s.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function s.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000)
end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,PLAYER_ALL,LOCATION_MZONE)
Expand All @@ -93,16 +89,16 @@ end
function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE)
end
function s.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoGrave(c,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_GRAVE) then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
end
end
end
end
13 changes: 7 additions & 6 deletions official/c10004783.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
--宝玉の解放
--Crystal Release
local s,id=GetID()
function s.initial_effect(c)
aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,0x1034))
aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,SET_CRYSTAL_BEAST))
--Atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
Expand All @@ -19,12 +20,12 @@ function s.initial_effect(c)
e4:SetOperation(s.tfop)
c:RegisterEffect(e4)
end
s.listed_series={0x1034}
s.listed_series={SET_CRYSTAL_BEAST}
function s.tfcon(e,tp,eg,ep,ev,re,r,rp)
return (e:GetHandler():GetPreviousLocation()&LOCATION_ONFIELD)~=0
end
function s.tffilter(c)
return c:IsSetCard(0x1034) and not c:IsForbidden()
return c:IsSetCard(SET_CRYSTAL_BEAST) and not c:IsForbidden()
end
function s.tftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
Expand All @@ -41,9 +42,9 @@ function s.tfop(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetReset(RESET_EVENT|RESETS_STANDARD)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
Duel.RaiseEvent(tc,EVENT_CUSTOM+47408488,e,0,tp,0,0)
Duel.RaiseEvent(tc,EVENT_CUSTOM+CARD_CRYSTAL_TREE,e,0,tp,0,0)
end
end
end
7 changes: 3 additions & 4 deletions official/c10012614.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
--勇気の旗印
--Banner of Courage
local s,id=GetID()
function s.initial_effect(c)
--activate
Expand All @@ -17,7 +18,5 @@ function s.initial_effect(c)
c:RegisterEffect(e2)
end
function s.con(e)
local ph=Duel.GetCurrentPhase()
local tp=Duel.GetTurnPlayer()
return tp==e:GetHandlerPlayer() and ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end
return Duel.IsTurnPlayer(e:GetHandlerPlayer()) and Duel.IsBattlePhase()
end
14 changes: 7 additions & 7 deletions official/c10024317.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-- パラメタルフォーゼ・メルキャスター
-- Parametalfoes Melcaster
--パラメタルフォーゼ・メルキャスター
--Parametalfoes Melcaster
local s,id=GetID()
function s.initial_effect(c)
--pendulum summon
Expand Down Expand Up @@ -28,7 +28,7 @@ function s.initial_effect(c)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
end
s.listed_series={0xe1}
s.listed_series={SET_METALFOES}
function s.desfilter(c,tp)
if c:IsFacedown() then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
Expand All @@ -39,7 +39,7 @@ function s.desfilter(c,tp)
end
end
function s.filter(c,ignore)
return c:IsSetCard(0xe1) and c:IsSpellTrap() and c:IsSSetable(ignore)
return c:IsSetCard(SET_METALFOES) and c:IsSpellTrap() and c:IsSSetable(ignore)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and s.desfilter(chkc,tp) and chkc~=e:GetHandler() end
Expand All @@ -63,7 +63,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return (r&REASON_EFFECT+REASON_BATTLE)~=0 and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function s.thfilter(c)
return c:IsSetCard(0xe1) and c:IsMonster() and c:IsAbleToHand() and not c:IsCode(id)
return c:IsSetCard(SET_METALFOES) and c:IsMonster() and c:IsAbleToHand() and not c:IsCode(id)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_EXTRA,0,1,nil) end
Expand All @@ -83,10 +83,10 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
e1:SetTargetRange(1,0)
e1:SetValue(s.aclimit)
e1:SetLabel(code)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE|PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function s.aclimit(e,re,tp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsCode(e:GetLabel())
end
end
7 changes: 4 additions & 3 deletions official/c10026986.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
--ワーム・キング
--Worm King
local s,id=GetID()
function s.initial_effect(c)
--summon with 1 tribute
Expand All @@ -15,9 +16,9 @@ function s.initial_effect(c)
e2:SetOperation(s.desop)
c:RegisterEffect(e2)
end
s.listed_series={0x3e}
s.listed_series={SET_WORM}
function s.cfilter(c,tp)
return c:IsSetCard(0x3e) and c:IsRace(RACE_REPTILE) and (c:IsControler(tp) or c:IsFaceup())
return c:IsSetCard(SET_WORM) and c:IsRace(RACE_REPTILE) and (c:IsControler(tp) or c:IsFaceup())
end
function s.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,s.cfilter,1,nil,tp) end
Expand All @@ -36,4 +37,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp)
if tc and tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
end
9 changes: 5 additions & 4 deletions official/c10032958.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
--神竜-エクセリオン
--Divine Dragon - Excelion
local s,id=GetID()
function s.initial_effect(c)
--to defense
Expand Down Expand Up @@ -39,7 +40,7 @@ function s.reg(c,opt)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE)
e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE)
c:RegisterEffect(e1)
elseif opt==1 then
--chain attack
Expand All @@ -49,7 +50,7 @@ function s.reg(c,opt)
e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetCondition(s.atcon)
e1:SetOperation(s.atop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE)
e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE)
c:RegisterEffect(e1)
else
--damage
Expand All @@ -62,7 +63,7 @@ function s.reg(c,opt)
e1:SetCondition(aux.bdgcon)
e1:SetTarget(s.damtg)
e1:SetOperation(s.damop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE)
e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE)
c:RegisterEffect(e1)
end
end
Expand All @@ -85,4 +86,4 @@ end
function s.damop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
end
Loading