Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-scripts
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
ygopro-scripts
Commits
323d73f7
Commit
323d73f7
authored
Jun 02, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use getmetatable instead of _G
parent
714f3700
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
16 deletions
+8
-16
utility.lua
utility.lua
+8
-16
No files found.
utility.lua
View file @
323d73f7
...
...
@@ -1015,8 +1015,7 @@ function Auxiliary.AddFusionProcMix(c,sub,insf,...)
end
end
if
#
mat
>
0
and
c
.
material_count
==
nil
then
local
code
=
c
:
GetOriginalCode
()
local
mt
=
_G
[
"c"
..
code
]
local
mt
=
getmetatable
(
c
)
mt
.
material_count
=#
mat
mt
.
material
=
mat
end
...
...
@@ -1126,8 +1125,7 @@ function Auxiliary.AddFusionProcMixRep(c,sub,insf,fun1,minc,maxc,...)
end
end
if
#
mat
>
0
and
c
.
material_count
==
nil
then
local
code
=
c
:
GetOriginalCode
()
local
mt
=
_G
[
"c"
..
code
]
local
mt
=
getmetatable
(
c
)
mt
.
material_count
=#
mat
mt
.
material
=
mat
end
...
...
@@ -1309,8 +1307,7 @@ function Auxiliary.AddFusionProcCodeRep(c,code1,cc,sub,insf)
code
[
i
]
=
code1
end
if
c
.
material_count
==
nil
then
local
code
=
c
:
GetOriginalCode
()
local
mt
=
_G
[
"c"
..
code
]
local
mt
=
getmetatable
(
c
)
mt
.
material_count
=
1
mt
.
material
=
{
code1
}
end
...
...
@@ -1513,8 +1510,7 @@ function Auxiliary.RPGOperation(filter)
end
function
Auxiliary
.
AddRitualProcGreaterCode
(
c
,
code1
)
if
not
c
:
IsStatus
(
STATUS_COPYING_EFFECT
)
and
c
.
fit_monster
==
nil
then
local
code
=
c
:
GetOriginalCode
()
local
mt
=
_G
[
"c"
..
code
]
local
mt
=
getmetatable
(
c
)
mt
.
fit_monster
=
{
code1
}
end
Auxiliary
.
AddRitualProcGreater
(
c
,
Auxiliary
.
FilterBoolFunction
(
Card
.
IsCode
,
code1
))
...
...
@@ -1585,8 +1581,7 @@ function Auxiliary.RPEOperation(filter)
end
function
Auxiliary
.
AddRitualProcEqualCode
(
c
,
code1
)
if
not
c
:
IsStatus
(
STATUS_COPYING_EFFECT
)
and
c
.
fit_monster
==
nil
then
local
code
=
c
:
GetOriginalCode
()
local
mt
=
_G
[
"c"
..
code
]
local
mt
=
getmetatable
(
c
)
mt
.
fit_monster
=
{
code1
}
end
Auxiliary
.
AddRitualProcEqual
(
c
,
Auxiliary
.
FilterBoolFunction
(
Card
.
IsCode
,
code1
))
...
...
@@ -1657,16 +1652,14 @@ function Auxiliary.RPEOperation2(filter)
end
function
Auxiliary
.
AddRitualProcEqual2Code
(
c
,
code1
)
if
not
c
:
IsStatus
(
STATUS_COPYING_EFFECT
)
and
c
.
fit_monster
==
nil
then
local
code
=
c
:
GetOriginalCode
()
local
mt
=
_G
[
"c"
..
code
]
local
mt
=
getmetatable
(
c
)
mt
.
fit_monster
=
{
code1
}
end
Auxiliary
.
AddRitualProcEqual2
(
c
,
Auxiliary
.
FilterBoolFunction
(
Card
.
IsCode
,
code1
))
end
function
Auxiliary
.
AddRitualProcEqual2Code2
(
c
,
code1
,
code2
)
if
not
c
:
IsStatus
(
STATUS_COPYING_EFFECT
)
and
c
.
fit_monster
==
nil
then
local
code
=
c
:
GetOriginalCode
()
local
mt
=
_G
[
"c"
..
code
]
local
mt
=
getmetatable
(
c
)
mt
.
fit_monster
=
{
code1
,
code2
}
end
Auxiliary
.
AddRitualProcEqual2
(
c
,
Auxiliary
.
FilterBoolFunction
(
Card
.
IsCode
,
code1
,
code2
))
...
...
@@ -1796,8 +1789,7 @@ end
function
Auxiliary
.
EnableReviveLimitPendulumSummonable
(
c
,
loc
)
if
c
:
IsStatus
(
STATUS_COPYING_EFFECT
)
then
return
end
c
:
EnableReviveLimit
()
local
code
=
c
:
GetOriginalCode
()
local
mt
=
_G
[
"c"
..
code
]
local
mt
=
getmetatable
(
c
)
if
loc
==
nil
then
loc
=
0xff
end
mt
.
psummonable_location
=
loc
--complete procedure on pendulum summon success
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment