Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-222DIY-cards
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
List
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
alstroemeria-silentlove
ygopro-222DIY-cards
Commits
cdcb0e2c
Commit
cdcb0e2c
authored
Jan 13, 2022
by
Tachibana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eme
parent
1c6817dc
Pipeline
#8680
passed with stages
in 23 minutes and 18 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
+31
-0
expansions/script/tama.lua
expansions/script/tama.lua
+31
-0
No files found.
expansions/script/tama.lua
View file @
cdcb0e2c
...
...
@@ -79,6 +79,37 @@ function tama.getTargetTable(c,str)
end
return
nil
end
--[[Using for save or load something. After load, please use some effect to remove. Thanks to Komeiji Koishi(777).
Example:
local index=tama.save(tama.tamas_sumElements(sg))
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_END)
e1:SetReset(RESET_EVENT+RESET_CHAIN)
e1:SetOperation(function (e,tp,eg,ep,ev,re,r,rp)
return tama.removeObj(index)
end)
Duel.RegisterEffect(e1,tp)
e:SetLabel(index)
]]
local
current
=
1
local
t
=
{}
function
tama
.
save
(
obj
)
local
i
=
current
while
t
[
i
]
do
i
=
i
+
1
end
current
=
current
+
1
t
[
i
]
=
obj
return
i
end
function
tama
.
get
(
index
)
return
t
[
index
]
end
function
tama
.
removeObj
(
index
)
if
current
<
index
then
current
=
index
end
t
[
index
]
=
nil
end
--[[
Custom field effect example:
local e1=Effect.CreateEffect(c)
...
...
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