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
Soulgamer
ygopro-222DIY-cards
Commits
89bf8109
Commit
89bf8109
authored
Mar 29, 2021
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
40a228b4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
29 deletions
+42
-29
expansions/script/c14142103.lua
expansions/script/c14142103.lua
+42
-29
No files found.
expansions/script/c14142103.lua
View file @
89bf8109
...
...
@@ -58,10 +58,7 @@ function cm.eqlimit(e,c)
return
e
:
GetLabelObject
()
==
c
end
function
cm
.
controlcon
(
e
)
return
e
:
GetLabelObject
():
GetEquipGroup
():
FilterCount
(
cm
.
flagfilter
,
nil
)
>
1
end
function
cm
.
flagfilter
(
c
)
return
c
:
GetFlagEffect
(
m
)
>
0
return
e
:
GetLabelObject
():
IsHasEffect
(
m
)
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
...
...
@@ -72,20 +69,45 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if
tc
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
and
not
tc
:
IsImmuneToEffect
(
e
)
and
hc
:
IsFaceup
()
and
hc
:
IsRelateToEffect
(
e
)
and
hc
:
IsControler
(
1
-
tp
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
local
oc
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
filter
),
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
tc
:
GetCode
()):
GetFirst
()
if
Duel
.
Equip
(
tp
,
tc
,
hc
)
and
Duel
.
Equip
(
tp
,
oc
,
hc
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_COPY_INHERIT
+
EFFECT_FLAG_OWNER_RELATE
)
e1
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e1
:
SetValue
(
cm
.
eqlimit
)
e1
:
SetLabelObject
(
hc
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
oc
:
RegisterEffect
(
e2
)
--control
tc
:
RegisterFlagEffect
(
m
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
)
oc
:
RegisterFlagEffect
(
m
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
)
local
tcEquipped
=
false
local
ocEquipped
=
false
if
Duel
.
Equip
(
tp
,
tc
,
hc
,
true
)
then
tcEquipped
=
true
end
if
Duel
.
Equip
(
tp
,
oc
,
hc
,
true
)
then
ocEquipped
=
true
end
if
tcEquipped
or
ocEquipped
then
Duel
.
EquipComplete
()
if
tcEquipped
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_COPY_INHERIT
+
EFFECT_FLAG_OWNER_RELATE
)
e1
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e1
:
SetValue
(
cm
.
eqlimit
)
e1
:
SetLabelObject
(
hc
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e1
)
end
if
ocEquipped
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_COPY_INHERIT
+
EFFECT_FLAG_OWNER_RELATE
)
e1
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e1
:
SetValue
(
cm
.
eqlimit
)
e1
:
SetLabelObject
(
hc
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
oc
:
RegisterEffect
(
e1
)
end
end
if
tcEquipped
and
ocEquipped
then
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_EQUIP
)
e3
:
SetCode
(
m
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CANNOT_NEGATE
+
EFFECT_FLAG_UNCOPYABLE
)
e3
:
SetValue
(
tp
)
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e3
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_EQUIP
)
e3
:
SetCode
(
EFFECT_SET_CONTROL
)
...
...
@@ -94,16 +116,12 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
e3
:
SetLabelObject
(
hc
)
e3
:
SetValue
(
tp
)
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e3
)
local
e4
=
e3
:
Clone
()
oc
:
RegisterEffect
(
e4
)
oc
:
RegisterEffect
(
e3
)
--code
local
e5
=
e3
:
Clone
()
e5
:
SetCode
(
EFFECT_ADD_SETCODE
)
e5
:
SetValue
(
code
)
tc
:
RegisterEffect
(
e5
)
local
e6
=
e5
:
Clone
()
oc
:
RegisterEffect
(
e6
)
oc
:
RegisterEffect
(
e5
)
end
end
end
...
...
@@ -123,8 +141,3 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
end
end
--yl_testok
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