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
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
八宫一月
ygopro-scripts
Commits
3b19f106
Commit
3b19f106
authored
Mar 14, 2019
by
mercury233
Committed by
GitHub
Mar 14, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update triggering state handling (#1171)
parent
6d101da1
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
20 additions
and
121 deletions
+20
-121
c269510.lua
c269510.lua
+2
-41
c39185163.lua
c39185163.lua
+2
-35
c5908650.lua
c5908650.lua
+2
-1
c82044279.lua
c82044279.lua
+2
-2
c88305705.lua
c88305705.lua
+2
-41
c9272381.lua
c9272381.lua
+2
-1
constant.lua
constant.lua
+8
-0
No files found.
c269510.lua
View file @
3b19f106
...
@@ -68,46 +68,6 @@ function c269510.initial_effect(c)
...
@@ -68,46 +68,6 @@ function c269510.initial_effect(c)
e8
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsRace
,
RACE_CYBERSE
))
e8
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsRace
,
RACE_CYBERSE
))
e8
:
SetValue
(
1
)
e8
:
SetValue
(
1
)
c
:
RegisterEffect
(
e8
)
c
:
RegisterEffect
(
e8
)
--check activated cards
if
not
c269510
.
global_check
then
c269510
.
global_check
=
true
c269510
.
disable
=
{}
local
ge1
=
Effect
.
CreateEffect
(
c
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
)
ge1
:
SetCode
(
EFFECT_ACTIVATE_COST
)
ge1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
ge1
:
SetTargetRange
(
1
,
1
)
ge1
:
SetTarget
(
c269510
.
regtg
)
ge1
:
SetOperation
(
c269510
.
regop1
)
Duel
.
RegisterEffect
(
ge1
,
0
)
local
ge2
=
Effect
.
CreateEffect
(
c
)
ge2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge2
:
SetCode
(
EVENT_CHAINING
)
ge2
:
SetOperation
(
c269510
.
regop2
)
Duel
.
RegisterEffect
(
ge2
,
0
)
end
end
function
c269510
.
regtg
(
e
,
te
,
tp
)
if
te
:
IsActiveType
(
TYPE_MONSTER
)
and
te
:
GetHandler
():
IsRace
(
RACE_CYBERSE
)
then
e
:
SetLabel
(
1
)
else
e
:
SetLabel
(
0
)
end
return
true
end
function
c269510
.
regop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetLabel
()
==
1
then
Duel
.
RegisterFlagEffect
(
tp
,
269510
,
RESET_CHAIN
,
0
,
1
)
else
Duel
.
ResetFlagEffect
(
tp
,
269510
)
end
end
function
c269510
.
regop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetFlagEffect
(
tp
,
269510
)
~=
0
then
c269510
.
disable
[
ev
]
=
true
else
c269510
.
disable
[
ev
]
=
false
end
end
end
function
c269510
.
limfilter
(
c
)
function
c269510
.
limfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_LINK
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_LINK
)
...
@@ -125,8 +85,9 @@ function c269510.cfilter(c)
...
@@ -125,8 +85,9 @@ function c269510.cfilter(c)
return
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_CYBERSE
)
and
c
:
IsType
(
TYPE_LINK
)
return
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_CYBERSE
)
and
c
:
IsType
(
TYPE_LINK
)
end
end
function
c269510
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c269510
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
race
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_RACE
)
return
Duel
.
GetMatchingGroupCount
(
c269510
.
cfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
>
1
return
Duel
.
GetMatchingGroupCount
(
c269510
.
cfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
>
1
and
c269510
.
disable
[
ev
]
and
re
:
IsActiveType
(
TYPE_MONSTER
)
and
race
&
RACE_CYBERSE
>
0
end
end
function
c269510
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c269510
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
NegateEffect
(
ev
)
Duel
.
NegateEffect
(
ev
)
...
...
c39185163.lua
View file @
3b19f106
...
@@ -24,40 +24,6 @@ function c39185163.initial_effect(c)
...
@@ -24,40 +24,6 @@ function c39185163.initial_effect(c)
e2
:
SetTarget
(
c39185163
.
sptg
)
e2
:
SetTarget
(
c39185163
.
sptg
)
e2
:
SetOperation
(
c39185163
.
spop
)
e2
:
SetOperation
(
c39185163
.
spop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--check activated cards
if
not
c39185163
.
global_check
then
c39185163
.
global_check
=
true
c39185163
.
disable
=
{}
local
ge1
=
Effect
.
CreateEffect
(
c
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
)
ge1
:
SetCode
(
EFFECT_ACTIVATE_COST
)
ge1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
ge1
:
SetTargetRange
(
1
,
1
)
ge1
:
SetTarget
(
c39185163
.
regtg
)
ge1
:
SetOperation
(
c39185163
.
regop1
)
Duel
.
RegisterEffect
(
ge1
,
0
)
local
ge2
=
Effect
.
CreateEffect
(
c
)
ge2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge2
:
SetCode
(
EVENT_CHAINING
)
ge2
:
SetOperation
(
c39185163
.
regop2
)
Duel
.
RegisterEffect
(
ge2
,
0
)
end
end
function
c39185163
.
regtg
(
e
,
te
,
tp
)
local
tc
=
te
:
GetHandler
()
if
te
:
IsActiveType
(
TYPE_MONSTER
)
and
not
tc
:
IsCode
(
39185163
)
and
tc
:
IsRace
(
RACE_ZOMBIE
)
then
e
:
SetLabel
(
1
)
else
e
:
SetLabel
(
0
)
end
return
true
end
function
c39185163
.
regop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetLabel
()
==
1
then
Duel
.
RegisterFlagEffect
(
tp
,
39185165
,
RESET_CHAIN
,
0
,
1
)
else
Duel
.
ResetFlagEffect
(
tp
,
39185165
)
end
end
end
function
c39185163
.
disrmcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c39185163
.
disrmcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
...
@@ -65,7 +31,8 @@ function c39185163.disrmcost(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -65,7 +31,8 @@ function c39185163.disrmcost(e,tp,eg,ep,ev,re,r,rp,chk)
c
:
RegisterFlagEffect
(
39185163
,
RESET_CHAIN
,
0
,
1
)
c
:
RegisterFlagEffect
(
39185163
,
RESET_CHAIN
,
0
,
1
)
end
end
function
c39185163
.
disrmcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c39185163
.
disrmcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetFlagEffect
(
rp
,
39185165
)
~=
0
local
race
,
code1
,
code2
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_RACE
,
CHAININFO_TRIGGERING_CODE
,
CHAININFO_TRIGGERING_CODE2
)
return
race
&
RACE_ZOMBIE
>
0
and
code1
~=
39185163
and
code2
~=
39185163
end
end
function
c39185163
.
disrmtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c39185163
.
disrmtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
b1
=
Duel
.
IsChainDisablable
(
ev
)
and
Duel
.
GetFlagEffect
(
tp
,
39185163
)
==
0
local
b1
=
Duel
.
IsChainDisablable
(
ev
)
and
Duel
.
GetFlagEffect
(
tp
,
39185163
)
==
0
...
...
c5908650.lua
View file @
3b19f106
...
@@ -15,7 +15,8 @@ function c5908650.initial_effect(c)
...
@@ -15,7 +15,8 @@ function c5908650.initial_effect(c)
Duel
.
AddCustomActivityCounter
(
5908650
,
ACTIVITY_CHAIN
,
c5908650
.
chainfilter
)
Duel
.
AddCustomActivityCounter
(
5908650
,
ACTIVITY_CHAIN
,
c5908650
.
chainfilter
)
end
end
function
c5908650
.
chainfilter
(
re
,
tp
,
cid
)
function
c5908650
.
chainfilter
(
re
,
tp
,
cid
)
return
not
(
re
:
IsActiveType
(
TYPE_MONSTER
)
and
not
re
:
GetHandler
():
IsAttribute
(
ATTRIBUTE_LIGHT
))
local
attr
=
Duel
.
GetChainInfo
(
cid
,
CHAININFO_TRIGGERING_ATTRIBUTE
)
return
not
(
re
:
IsActiveType
(
TYPE_MONSTER
)
and
attr
&
ATTRIBUTE_LIGHT
==
0
)
end
end
function
c5908650
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c5908650
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetCustomActivityCount
(
5908650
,
tp
,
ACTIVITY_CHAIN
)
==
0
end
if
chk
==
0
then
return
Duel
.
GetCustomActivityCount
(
5908650
,
tp
,
ACTIVITY_CHAIN
)
==
0
end
...
...
c82044279.lua
View file @
3b19f106
...
@@ -32,8 +32,8 @@ end
...
@@ -32,8 +32,8 @@ end
function
c82044279
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c82044279
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
rc
=
re
:
GetHandler
()
local
rc
=
re
:
GetHandler
()
local
loc
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
)
local
loc
,
level
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
,
CHAININFO_TRIGGERING_LEVEL
)
return
re
:
IsActiveType
(
TYPE_MONSTER
)
and
rc
~=
c
and
rc
:
IsLevelAbove
(
5
)
and
loc
==
LOCATION_MZONE
return
re
:
IsActiveType
(
TYPE_MONSTER
)
and
rc
~=
c
and
level
>=
5
and
loc
==
LOCATION_MZONE
and
not
c
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
Duel
.
IsChainNegatable
(
ev
)
and
not
c
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
Duel
.
IsChainNegatable
(
ev
)
end
end
function
c82044279
.
condition2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c82044279
.
condition2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
c88305705.lua
View file @
3b19f106
...
@@ -31,46 +31,6 @@ function c88305705.initial_effect(c)
...
@@ -31,46 +31,6 @@ function c88305705.initial_effect(c)
e3
:
SetTarget
(
c88305705
.
rmtg
)
e3
:
SetTarget
(
c88305705
.
rmtg
)
e3
:
SetOperation
(
c88305705
.
rmop
)
e3
:
SetOperation
(
c88305705
.
rmop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
--check activated cards
if
not
c88305705
.
global_check
then
c88305705
.
global_check
=
true
c88305705
.
disable
=
{}
local
ge1
=
Effect
.
CreateEffect
(
c
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
)
ge1
:
SetCode
(
EFFECT_ACTIVATE_COST
)
ge1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
ge1
:
SetTargetRange
(
1
,
1
)
ge1
:
SetTarget
(
c88305705
.
regtg
)
ge1
:
SetOperation
(
c88305705
.
regop1
)
Duel
.
RegisterEffect
(
ge1
,
0
)
local
ge2
=
Effect
.
CreateEffect
(
c
)
ge2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge2
:
SetCode
(
EVENT_CHAINING
)
ge2
:
SetOperation
(
c88305705
.
regop2
)
Duel
.
RegisterEffect
(
ge2
,
0
)
end
end
function
c88305705
.
regtg
(
e
,
te
,
tp
)
if
te
:
IsActiveType
(
TYPE_MONSTER
)
and
te
:
GetHandler
():
IsRace
(
RACE_CYBERSE
)
then
e
:
SetLabel
(
1
)
else
e
:
SetLabel
(
0
)
end
return
true
end
function
c88305705
.
regop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetLabel
()
==
1
then
Duel
.
RegisterFlagEffect
(
tp
,
88305705
,
RESET_CHAIN
,
0
,
1
)
else
Duel
.
ResetFlagEffect
(
tp
,
88305705
)
end
end
function
c88305705
.
regop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetFlagEffect
(
tp
,
88305705
)
~=
0
then
c88305705
.
disable
[
ev
]
=
true
else
c88305705
.
disable
[
ev
]
=
false
end
end
end
function
c88305705
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c88305705
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_FUSION
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_FUSION
)
...
@@ -108,7 +68,8 @@ function c88305705.ftarget(e,c)
...
@@ -108,7 +68,8 @@ function c88305705.ftarget(e,c)
end
end
function
c88305705
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c88305705
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
IsStatus
(
STATUS_BATTLE_DESTROYED
)
then
return
false
end
if
e
:
GetHandler
():
IsStatus
(
STATUS_BATTLE_DESTROYED
)
then
return
false
end
return
c88305705
.
disable
[
ev
]
local
atk
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_ATTACK
)
return
re
:
IsActiveType
(
TYPE_MONSTER
)
and
atk
==
0
end
end
function
c88305705
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c88305705
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
NegateEffect
(
ev
)
Duel
.
NegateEffect
(
ev
)
...
...
c9272381.lua
View file @
3b19f106
...
@@ -50,7 +50,8 @@ function c9272381.effcon(e)
...
@@ -50,7 +50,8 @@ function c9272381.effcon(e)
return
e
:
GetHandler
():
GetOverlayCount
()
>
0
return
e
:
GetHandler
():
GetOverlayCount
()
>
0
end
end
function
c9272381
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c9272381
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
ep
~=
tp
and
re
:
IsActiveType
(
TYPE_MONSTER
)
and
re
:
GetHandler
():
IsAttribute
(
ATTRIBUTE_DARK
)
and
Duel
.
IsChainNegatable
(
ev
)
local
attr
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_ATTRIBUTE
)
return
ep
~=
tp
and
re
:
IsActiveType
(
TYPE_MONSTER
)
and
attr
&
ATTRIBUTE_DARK
>
0
and
Duel
.
IsChainNegatable
(
ev
)
end
end
function
c9272381
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c9272381
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
...
...
constant.lua
View file @
3b19f106
...
@@ -215,6 +215,14 @@ CHAININFO_CHAIN_ID =0x800 --连锁ID
...
@@ -215,6 +215,14 @@ CHAININFO_CHAIN_ID =0x800 --连锁ID
CHAININFO_TYPE
=
0x1000
--连锁类型
CHAININFO_TYPE
=
0x1000
--连锁类型
CHAININFO_EXTTYPE
=
0x2000
--连锁额外类型
CHAININFO_EXTTYPE
=
0x2000
--连锁额外类型
CHAININFO_TRIGGERING_POSITION
=
0x4000
--连锁发生时的表示形式
CHAININFO_TRIGGERING_POSITION
=
0x4000
--连锁发生时的表示形式
CHAININFO_TRIGGERING_CODE
=
0x8000
--连锁发生时的密码
CHAININFO_TRIGGERING_CODE2
=
0x10000
--连锁发生时的其他密码
CHAININFO_TRIGGERING_LEVEL
=
0x40000
--连锁发生时的等级
CHAININFO_TRIGGERING_RANK
=
0x80000
--连锁发生时的阶级
CHAININFO_TRIGGERING_ATTRIBUTE
=
0x100000
--连锁发生时的属性
CHAININFO_TRIGGERING_RACE
=
0x200000
--连锁发生时的种族
CHAININFO_TRIGGERING_ATTACK
=
0x400000
--连锁发生时的攻击力
CHAININFO_TRIGGERING_DEFENSE
=
0x800000
--连锁发生时的守备力
--========== Reset ========== --重置条件(注意:重置条件可以多个相加)
--========== Reset ========== --重置条件(注意:重置条件可以多个相加)
RESET_SELF_TURN
=
0x10000000
--自己回合的階段重置
RESET_SELF_TURN
=
0x10000000
--自己回合的階段重置
RESET_OPPO_TURN
=
0x20000000
--对方回合的階段重置
RESET_OPPO_TURN
=
0x20000000
--对方回合的階段重置
...
...
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