Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-scripts-888
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
3
Merge Requests
3
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
MyCard
ygopro-scripts-888
Commits
7fbf0605
Commit
7fbf0605
authored
Oct 15, 2024
by
Chen Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add aux.BecomeOriginalCode
parent
2db3cea8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
15 deletions
+23
-15
c30312361.lua
c30312361.lua
+2
-8
c50584941.lua
c50584941.lua
+4
-7
utility.lua
utility.lua
+17
-0
No files found.
c30312361.lua
View file @
7fbf0605
...
...
@@ -38,15 +38,9 @@ function c30312361.operation(e,tp,eg,ep,ev,re,r,rp)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
Remove
(
tc
,
POS_FACEUP
,
REASON_EFFECT
)
==
1
and
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
--copy name, base atk
local
code
=
tc
:
GetOriginalCode
Rule
()
local
code
=
tc
:
GetOriginalCode
()
local
ba
=
tc
:
GetBaseAttack
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
e1
:
SetCode
(
EFFECT_CHANGE_CODE
)
e1
:
SetValue
(
code
)
c
:
RegisterEffect
(
e1
)
local
e1
=
aux
.
BecomeOriginalCode
(
c
,
tc
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
...
...
c50584941.lua
View file @
7fbf0605
...
...
@@ -28,6 +28,7 @@ function c50584941.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c50584941
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
tp
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
e
:
SetLabel
(
g
:
GetFirst
():
GetOriginalCode
())
e
:
SetLabelObject
(
g
:
GetFirst
())
end
function
c50584941
.
filter
(
c
,
code
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x1045
)
and
c
:
IsType
(
TYPE_SYNCHRO
)
and
not
c
:
IsCode
(
code
)
...
...
@@ -37,6 +38,7 @@ function c50584941.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if
chk
==
0
then
if
e
:
GetLabel
()
~=
1
then
return
false
end
e
:
SetLabel
(
0
)
e
:
SetLabelObject
(
nil
)
return
true
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
...
...
@@ -46,14 +48,9 @@ function c50584941.activate(e,tp,eg,ep,ev,re,r,rp)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
local
code
=
e
:
GetLabel
()
local
source
=
e
:
GetLabelObject
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CHANGE_CODE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetValue
(
code
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e1
)
aux
.
BecomeOriginalCode
(
c
,
source
,
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
ReplaceEffect
(
code
,
RESET_EVENT
+
RESETS_STANDARD
)
end
end
utility.lua
View file @
7fbf0605
...
...
@@ -1776,3 +1776,20 @@ end
function
Auxiliary
.
MimighoulFlipCondition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsMainPhase
()
end
---The name of `c` becomes the original name of `tc`
---@param c Card
---@param tc Card
---@param reset? integer defult: RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END
---@return Effect
function
Auxiliary
.
BecomeOriginalCode
(
c
,
tc
,
reset
)
reset
=
reset
or
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
local
code
=
tc
:
GetOriginalCodeRule
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CHANGE_CODE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetValue
(
code
)
e1
:
SetReset
(
reset
)
c
:
RegisterEffect
(
e1
)
return
e1
end
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