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
5d53d04c
Commit
5d53d04c
authored
Nov 24, 2017
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
62403936
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
84 additions
and
66 deletions
+84
-66
c63519819.lua
c63519819.lua
+41
-32
c64631466.lua
c64631466.lua
+43
-34
No files found.
c63519819.lua
View file @
5d53d04c
...
@@ -35,7 +35,6 @@ function c63519819.initial_effect(c)
...
@@ -35,7 +35,6 @@ function c63519819.initial_effect(c)
e4
:
SetCode
(
EFFECT_SET_ATTACK
)
e4
:
SetCode
(
EFFECT_SET_ATTACK
)
e4
:
SetCondition
(
c63519819
.
adcon
)
e4
:
SetCondition
(
c63519819
.
adcon
)
e4
:
SetValue
(
c63519819
.
atkval
)
e4
:
SetValue
(
c63519819
.
atkval
)
e4
:
SetLabelObject
(
e1
)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
local
e5
=
Effect
.
CreateEffect
(
c
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
)
...
@@ -43,14 +42,19 @@ function c63519819.initial_effect(c)
...
@@ -43,14 +42,19 @@ function c63519819.initial_effect(c)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetCode
(
EFFECT_SET_DEFENSE
)
e5
:
SetCode
(
EFFECT_SET_DEFENSE
)
e5
:
SetCondition
(
c63519819
.
adcon
)
e5
:
SetCondition
(
c63519819
.
adcon
)
e5
:
SetValue
(
c63519819
.
defval
)
e5
:
SetValue
(
c63519819
.
defval
)
e5
:
SetLabelObject
(
e1
)
c
:
RegisterEffect
(
e5
)
c
:
RegisterEffect
(
e5
)
end
end
function
c63519819
.
eqcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c63519819
.
eqcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
ec
=
e
:
GetLabelObject
()
return
c63519819
.
can_equip_monster
(
c
)
return
ec
==
nil
or
ec
:
GetFlagEffect
(
63519819
)
==
0
end
function
c63519819
.
eqfilter
(
c
)
return
c
:
GetFlagEffect
(
63519819
)
~=
0
end
function
c63519819
.
can_equip_monster
(
c
)
local
g
=
c
:
GetEquipGroup
():
Filter
(
c63519819
.
eqfilter
,
nil
)
return
g
:
GetCount
()
==
0
end
end
function
c63519819
.
eqtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c63519819
.
eqtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
1
-
tp
)
and
chkc
:
IsAbleToChangeControler
()
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
1
-
tp
)
and
chkc
:
IsAbleToChangeControler
()
end
...
@@ -63,30 +67,32 @@ end
...
@@ -63,30 +67,32 @@ end
function
c63519819
.
eqlimit
(
e
,
c
)
function
c63519819
.
eqlimit
(
e
,
c
)
return
e
:
GetOwner
()
==
c
return
e
:
GetOwner
()
==
c
end
end
function
c63519819
.
equip_monster
(
c
,
tp
,
tc
)
if
not
Duel
.
Equip
(
tp
,
tc
,
c
,
false
)
then
return
end
--Add Equip limit
tc
:
RegisterFlagEffect
(
63519819
,
RESET_EVENT
+
0x1fe0000
,
0
,
0
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_OWNER_RELATE
)
e1
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetValue
(
c63519819
.
eqlimit
)
tc
:
RegisterEffect
(
e1
)
--substitute
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2
:
SetCode
(
EFFECT_DESTROY_SUBSTITUTE
)
e2
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e2
:
SetValue
(
c63519819
.
repval
)
tc
:
RegisterEffect
(
e2
)
end
function
c63519819
.
eqop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c63519819
.
eqop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsType
(
TYPE_MONSTER
)
and
tc
:
IsControler
(
1
-
tp
)
then
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsType
(
TYPE_MONSTER
)
and
tc
:
IsControler
(
1
-
tp
)
then
if
c
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
)
then
if
c
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
)
then
if
not
Duel
.
Equip
(
tp
,
tc
,
c
,
false
)
then
return
end
c63519819
.
equip_monster
(
c
,
tp
,
tc
)
--Add Equip limit
tc
:
RegisterFlagEffect
(
63519819
,
RESET_EVENT
+
0x1fe0000
,
0
,
0
)
e
:
SetLabelObject
(
tc
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_OWNER_RELATE
)
e1
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetValue
(
c63519819
.
eqlimit
)
tc
:
RegisterEffect
(
e1
)
--substitute
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2
:
SetCode
(
EFFECT_DESTROY_SUBSTITUTE
)
e2
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e2
:
SetValue
(
c63519819
.
repval
)
tc
:
RegisterEffect
(
e2
)
else
Duel
.
SendtoGrave
(
tc
,
REASON_EFFECT
)
end
else
Duel
.
SendtoGrave
(
tc
,
REASON_EFFECT
)
end
end
end
end
end
...
@@ -97,22 +103,25 @@ function c63519819.antarget(e,c)
...
@@ -97,22 +103,25 @@ function c63519819.antarget(e,c)
return
c
~=
e
:
GetHandler
()
return
c
~=
e
:
GetHandler
()
end
end
function
c63519819
.
adcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c63519819
.
adcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ec
=
e
:
GetLabelObject
():
GetLabelObject
()
local
c
=
e
:
GetHandler
()
return
ec
and
ec
:
GetFlagEffect
(
63519819
)
~=
0
local
g
=
c
:
GetEquipGroup
():
Filter
(
c63519819
.
eqfilter
,
nil
)
return
g
:
GetCount
()
>
0
end
end
function
c63519819
.
atkval
(
e
,
c
)
function
c63519819
.
atkval
(
e
,
c
)
local
ec
=
e
:
GetLabelObject
():
GetLabelObject
()
local
c
=
e
:
GetHandler
()
local
atk
=
ec
:
GetTextAttack
()
local
g
=
c
:
GetEquipGroup
():
Filter
(
c63519819
.
eqfilter
,
nil
)
if
ec
:
IsFacedown
()
or
bit
.
band
(
ec
:
GetOriginalType
(),
TYPE_MONSTER
)
==
0
or
atk
<
0
then
local
atk
=
g
:
GetFirst
():
GetTextAttack
()
if
g
:
GetFirst
():
IsFacedown
()
or
bit
.
band
(
g
:
GetFirst
():
GetOriginalType
(),
TYPE_MONSTER
)
==
0
or
atk
<
0
then
return
0
return
0
else
else
return
atk
return
atk
end
end
end
end
function
c63519819
.
defval
(
e
,
c
)
function
c63519819
.
defval
(
e
,
c
)
local
ec
=
e
:
GetLabelObject
():
GetLabelObject
()
local
c
=
e
:
GetHandler
()
local
def
=
ec
:
GetTextDefense
()
local
g
=
c
:
GetEquipGroup
():
Filter
(
c63519819
.
eqfilter
,
nil
)
if
ec
:
IsFacedown
()
or
bit
.
band
(
ec
:
GetOriginalType
(),
TYPE_MONSTER
)
==
0
or
def
<
0
then
local
def
=
g
:
GetFirst
():
GetTextDefense
()
if
g
:
GetFirst
():
IsFacedown
()
or
bit
.
band
(
g
:
GetFirst
():
GetOriginalType
(),
TYPE_MONSTER
)
==
0
or
def
<
0
then
return
0
return
0
else
else
return
def
return
def
...
...
c64631466.lua
View file @
5d53d04c
...
@@ -21,7 +21,6 @@ function c64631466.initial_effect(c)
...
@@ -21,7 +21,6 @@ function c64631466.initial_effect(c)
e2
:
SetCode
(
EFFECT_SET_ATTACK
)
e2
:
SetCode
(
EFFECT_SET_ATTACK
)
e2
:
SetCondition
(
c64631466
.
adcon
)
e2
:
SetCondition
(
c64631466
.
adcon
)
e2
:
SetValue
(
c64631466
.
atkval
)
e2
:
SetValue
(
c64631466
.
atkval
)
e2
:
SetLabelObject
(
e1
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
...
@@ -30,7 +29,6 @@ function c64631466.initial_effect(c)
...
@@ -30,7 +29,6 @@ function c64631466.initial_effect(c)
e3
:
SetCode
(
EFFECT_SET_DEFENSE
)
e3
:
SetCode
(
EFFECT_SET_DEFENSE
)
e3
:
SetCondition
(
c64631466
.
adcon
)
e3
:
SetCondition
(
c64631466
.
adcon
)
e3
:
SetValue
(
c64631466
.
defval
)
e3
:
SetValue
(
c64631466
.
defval
)
e3
:
SetLabelObject
(
e1
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
--damage
--damage
local
e4
=
Effect
.
CreateEffect
(
c
)
local
e4
=
Effect
.
CreateEffect
(
c
)
...
@@ -40,12 +38,17 @@ function c64631466.initial_effect(c)
...
@@ -40,12 +38,17 @@ function c64631466.initial_effect(c)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCondition
(
c64631466
.
damcon
)
e4
:
SetCondition
(
c64631466
.
damcon
)
e4
:
SetOperation
(
c64631466
.
damop
)
e4
:
SetOperation
(
c64631466
.
damop
)
e4
:
SetLabelObject
(
e1
)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
end
end
function
c64631466
.
eqcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c64631466
.
eqcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ec
=
e
:
GetLabelObject
()
return
c64631466
.
can_equip_monster
(
e
:
GetHandler
())
return
ec
==
nil
or
ec
:
GetFlagEffect
(
64631466
)
==
0
end
function
c64631466
.
eqfilter
(
c
)
return
c
:
GetFlagEffect
(
64631466
)
~=
0
end
function
c64631466
.
can_equip_monster
(
c
)
local
g
=
c
:
GetEquipGroup
():
Filter
(
c64631466
.
eqfilter
,
nil
)
return
g
:
GetCount
()
==
0
end
end
function
c64631466
.
eqtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c64631466
.
eqtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
1
-
tp
)
and
chkc
:
IsAbleToChangeControler
()
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
1
-
tp
)
and
chkc
:
IsAbleToChangeControler
()
end
...
@@ -58,30 +61,32 @@ end
...
@@ -58,30 +61,32 @@ end
function
c64631466
.
eqlimit
(
e
,
c
)
function
c64631466
.
eqlimit
(
e
,
c
)
return
e
:
GetOwner
()
==
c
return
e
:
GetOwner
()
==
c
end
end
function
c64631466
.
equip_monster
(
c
,
tp
,
tc
)
if
not
Duel
.
Equip
(
tp
,
tc
,
c
,
false
)
then
return
end
--Add Equip limit
tc
:
RegisterFlagEffect
(
64631466
,
RESET_EVENT
+
0x1fe0000
,
0
,
0
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_OWNER_RELATE
)
e1
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetValue
(
c64631466
.
eqlimit
)
tc
:
RegisterEffect
(
e1
)
--substitute
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2
:
SetCode
(
EFFECT_DESTROY_SUBSTITUTE
)
e2
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e2
:
SetValue
(
c64631466
.
repval
)
tc
:
RegisterEffect
(
e2
)
end
function
c64631466
.
eqop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c64631466
.
eqop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsType
(
TYPE_MONSTER
)
and
tc
:
IsControler
(
1
-
tp
)
then
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsType
(
TYPE_MONSTER
)
and
tc
:
IsControler
(
1
-
tp
)
then
if
c
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
)
then
if
c
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
)
then
if
not
Duel
.
Equip
(
tp
,
tc
,
c
,
false
)
then
return
end
c64631466
.
equip_monster
(
c
,
tp
,
tc
)
--Add Equip limit
tc
:
RegisterFlagEffect
(
64631466
,
RESET_EVENT
+
0x1fe0000
,
0
,
0
)
e
:
SetLabelObject
(
tc
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_OWNER_RELATE
)
e1
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetValue
(
c64631466
.
eqlimit
)
tc
:
RegisterEffect
(
e1
)
--substitute
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2
:
SetCode
(
EFFECT_DESTROY_SUBSTITUTE
)
e2
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e2
:
SetValue
(
c64631466
.
repval
)
tc
:
RegisterEffect
(
e2
)
else
Duel
.
SendtoGrave
(
tc
,
REASON_EFFECT
)
end
else
Duel
.
SendtoGrave
(
tc
,
REASON_EFFECT
)
end
end
end
end
end
...
@@ -89,30 +94,34 @@ function c64631466.repval(e,re,r,rp)
...
@@ -89,30 +94,34 @@ function c64631466.repval(e,re,r,rp)
return
bit
.
band
(
r
,
REASON_BATTLE
)
~=
0
return
bit
.
band
(
r
,
REASON_BATTLE
)
~=
0
end
end
function
c64631466
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c64631466
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ec
=
e
:
GetLabelObject
():
GetLabelObject
()
local
c
=
e
:
GetHandler
()
return
ec
and
ec
:
GetFlagEffect
(
64631466
)
~=
0
and
ep
==
tp
local
g
=
c
:
GetEquipGroup
():
Filter
(
c64631466
.
eqfilter
,
nil
)
return
g
:
GetCount
()
>
0
and
ep
==
tp
and
(
Duel
.
GetAttacker
()
==
e
:
GetHandler
()
or
Duel
.
GetAttackTarget
()
==
e
:
GetHandler
())
and
(
Duel
.
GetAttacker
()
==
e
:
GetHandler
()
or
Duel
.
GetAttackTarget
()
==
e
:
GetHandler
())
end
end
function
c64631466
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c64631466
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Damage
(
1
-
tp
,
ev
,
REASON_EFFECT
)
Duel
.
Damage
(
1
-
tp
,
ev
,
REASON_EFFECT
)
end
end
function
c64631466
.
adcon
(
e
)
function
c64631466
.
adcon
(
e
)
local
ec
=
e
:
GetLabelObject
():
GetLabelObject
()
local
c
=
e
:
GetHandler
()
return
ec
and
ec
:
GetFlagEffect
(
64631466
)
~=
0
local
g
=
c
:
GetEquipGroup
():
Filter
(
c64631466
.
eqfilter
,
nil
)
return
g
:
GetCount
()
>
0
end
end
function
c64631466
.
atkval
(
e
,
c
)
function
c64631466
.
atkval
(
e
,
c
)
local
ec
=
e
:
GetLabelObject
():
GetLabelObject
()
local
c
=
e
:
GetHandler
()
local
atk
=
ec
:
GetTextAttack
()
local
g
=
c
:
GetEquipGroup
():
Filter
(
c64631466
.
eqfilter
,
nil
)
if
ec
:
IsFacedown
()
or
bit
.
band
(
ec
:
GetOriginalType
(),
TYPE_MONSTER
)
==
0
or
atk
<
0
then
local
atk
=
g
:
GetFirst
():
GetTextAttack
()
if
g
:
GetFirst
():
IsFacedown
()
or
bit
.
band
(
g
:
GetFirst
():
GetOriginalType
(),
TYPE_MONSTER
)
==
0
or
atk
<
0
then
return
0
return
0
else
else
return
atk
return
atk
end
end
end
end
function
c64631466
.
defval
(
e
,
c
)
function
c64631466
.
defval
(
e
,
c
)
local
ec
=
e
:
GetLabelObject
():
GetLabelObject
()
local
c
=
e
:
GetHandler
()
local
def
=
ec
:
GetTextDefense
()
local
g
=
c
:
GetEquipGroup
():
Filter
(
c64631466
.
eqfilter
,
nil
)
if
ec
:
IsFacedown
()
or
bit
.
band
(
ec
:
GetOriginalType
(),
TYPE_MONSTER
)
==
0
or
def
<
0
then
local
def
=
g
:
GetFirst
():
GetTextDefense
()
if
g
:
GetFirst
():
IsFacedown
()
or
bit
.
band
(
g
:
GetFirst
():
GetOriginalType
(),
TYPE_MONSTER
)
==
0
or
def
<
0
then
return
0
return
0
else
else
return
def
return
def
...
...
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