Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-THC-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
GuGu
ygopro-THC-cards
Commits
638402c6
Commit
638402c6
authored
Feb 25, 2022
by
wyykak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix season mechanism
Provided by: kritosoft Signed-off-by:
wyykak
<
wyy_1414@126.com
>
parent
773b50ff
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
100 additions
and
103 deletions
+100
-103
expansions/script/nef/nef.lua
expansions/script/nef/nef.lua
+80
-67
script/c1192020.lua
script/c1192020.lua
+6
-1
script/c999104.lua
script/c999104.lua
+9
-28
script/c999107.lua
script/c999107.lua
+5
-7
No files found.
expansions/script/nef/nef.lua
View file @
638402c6
...
@@ -1366,29 +1366,22 @@ if not Nef.PLCounter then
...
@@ -1366,29 +1366,22 @@ if not Nef.PLCounter then
function
class
.
Add
(
tp
,
code
,
num
)
function
class
.
Add
(
tp
,
code
,
num
)
local
eg
=
class
.
_e
[
tp
][
code
]
local
eg
=
class
.
_e
[
tp
][
code
]
if
eg
then
if
eg
then
local
e
=
eg
:
GetLabelObject
()
e
:
Reset
()
eg
:
Reset
()
eg
:
Reset
()
end
end
local
e1
=
Effect
.
GlobalEffect
()
local
e1
=
Effect
.
GlobalEffect
()
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_CLIENT_HINT
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_CLIENT_HINT
+
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetTargetRange
(
1
,
0
)
local
eg1
=
Effect
.
GlobalEffect
()
eg1
:
SetType
(
EFFECT_TYPE_FIELD
|
EFFECT_TYPE_GRANT
)
eg1
:
SetTargetRange
(
0xff
,
0
)
eg1
:
SetTarget
(
aux
.
TRUE
)
local
count
=
(
class
.
_n
[
tp
][
code
]
or
0
)
+
num
local
count
=
(
class
.
_n
[
tp
][
code
]
or
0
)
+
num
class
.
_e
[
tp
][
code
]
=
e
g
1
class
.
_e
[
tp
][
code
]
=
e1
class
.
_n
[
tp
][
code
]
=
count
class
.
_n
[
tp
][
code
]
=
count
e1
:
SetDescription
(
aux
.
Stringid
(
code
,
count
))
e1
:
SetDescription
(
aux
.
Stringid
(
code
,
count
))
eg1
:
SetLabelObject
(
e1
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterEffect
(
eg1
,
tp
)
end
end
function
class
.
Get
(
tp
,
code
)
function
class
.
Get
(
tp
,
code
)
...
@@ -1397,3 +1390,23 @@ if not Nef.PLCounter then
...
@@ -1397,3 +1390,23 @@ if not Nef.PLCounter then
Nef
.
PLCounter
=
class
Nef
.
PLCounter
=
class
end
end
--seasonchange
function
Nef
.
SeasonChange
(
c
)
if
Nef
.
Seasoncounter
==
nil
then
Nef
.
Seasoncounter
=
true
local
sea
=
Effect
.
CreateEffect
(
c
)
sea
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
sea
:
SetCode
(
EVENT_PHASE_START
+
PHASE_STANDBY
)
sea
:
SetOperation
(
Nef
.
addcount
)
Duel
.
RegisterEffect
(
sea
,
0
)
end
end
function
Nef
.
addcount
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Nef
.
PLCounter
.
Get
(
tp
,
999104
)
<
4
then
Nef
.
PLCounter
.
Add
(
tp
,
999104
,
1
)
Nef
.
PLCounter
.
Add
(
1
-
tp
,
999104
,
1
)
else
Nef
.
PLCounter
.
Add
(
tp
,
999104
,
-
3
)
Nef
.
PLCounter
.
Add
(
1
-
tp
,
999104
,
-
3
)
end
end
\ No newline at end of file
script/c1192020.lua
View file @
638402c6
...
@@ -71,7 +71,12 @@ function c1192020.ofilter2(c)
...
@@ -71,7 +71,12 @@ function c1192020.ofilter2(c)
end
end
function
c1192020
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c1192020
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
--
--
if
Duel
.
IsExistingMatchingCard
(
c1192020
.
ofilter2
,
tp
,
0xff
,
0xff
,
1
,
nil
)
then
Nef
.
SetCommonCounter
(
1
,
999104
,
tp
)
end
Debug
.
Message
(
Nef
.
PLCounter
.
Get
(
tp
,
999104
))
if
Nef
.
PLCounter
.
Get
(
tp
,
999104
)
~=
0
then
local
a
=
Nef
.
PLCounter
.
Get
(
tp
,
999104
)
Nef
.
PLCounter
.
Add
(
tp
,
999104
,
1
-
a
)
Nef
.
PLCounter
.
Add
(
1
-
tp
,
999104
,
1
-
a
)
end
--
--
if
Duel
.
Recover
(
tp
,
1500
,
REASON_EFFECT
)
<
1
then
return
end
if
Duel
.
Recover
(
tp
,
1500
,
REASON_EFFECT
)
<
1
then
return
end
--
--
...
...
script/c999104.lua
View file @
638402c6
--幻想时令『四时之兆』
--幻想时令『四时之兆』
local
M
=
c999104
local
M
=
c999104
local
Mid
=
999104
local
Mid
=
999104
require
(
"expansions/script/nef/nef"
)
function
M
.
initial_effect
(
c
)
function
M
.
initial_effect
(
c
)
--
--
aux
.
AddCodeList
(
c
,
1192020
)
aux
.
AddCodeList
(
c
,
1192020
)
--
Nef
.
SeasonChange
(
c
)
Nef
.
CommonCounterGroup
(
c
,
Mid
)
if
M
.
counter
==
nil
then
M
.
counter
=
true
local
ge0
=
Effect
.
CreateEffect
(
c
)
ge0
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
ge0
:
SetCode
(
EVENT_PHASE_START
+
PHASE_STANDBY
)
ge0
:
SetOperation
(
M
.
addcount
)
Duel
.
RegisterEffect
(
ge0
,
0
)
end
--Activate
--Activate
local
e0
=
Effect
.
CreateEffect
(
c
)
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e0
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e0
:
SetCode
(
EVENT_FREE_CHAIN
)
e0
:
SetCode
(
EVENT_FREE_CHAIN
)
e0
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Nef
.
RefreshCommonCounter
(
c
,
Mid
)
end
)
c
:
RegisterEffect
(
e0
)
c
:
RegisterEffect
(
e0
)
--
--
...
@@ -54,16 +42,6 @@ function M.initial_effect(c)
...
@@ -54,16 +42,6 @@ function M.initial_effect(c)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
function
M
.
addcount
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
for
p
=
0
,
1
do
if
Nef
.
GetCommonCounter
(
Mid
,
p
)
<
4
then
Nef
.
AddCommonCounter
(
1
,
Mid
,
p
)
else
Nef
.
AddCommonCounter
(
-
3
,
Mid
,
p
)
end
end
end
function
M
.
filter1
(
c
)
function
M
.
filter1
(
c
)
return
c
:
IsSetCard
(
0x123
)
and
c
:
IsAbleToHand
()
return
c
:
IsSetCard
(
0x123
)
and
c
:
IsAbleToHand
()
end
end
...
@@ -92,7 +70,7 @@ end
...
@@ -92,7 +70,7 @@ end
function
M
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
M
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
if
chk
==
0
then
local
flag
=
Nef
.
GetCommonCounter
(
Mid
,
tp
)
local
flag
=
Nef
.
PLCounter
.
Get
(
tp
,
Mid
)
local
list
=
{
20200
,
22400
,
23300
,
10100
}
local
list
=
{
20200
,
22400
,
23300
,
10100
}
return
flag
>
0
and
Duel
.
IsExistingMatchingCard
(
M
[
"filter"
..
flag
],
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
return
flag
>
0
and
Duel
.
IsExistingMatchingCard
(
M
[
"filter"
..
flag
],
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
M
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
list
[
flag
])
and
Duel
.
IsExistingMatchingCard
(
M
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
list
[
flag
])
...
@@ -101,7 +79,7 @@ function M.target(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -101,7 +79,7 @@ function M.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
function
M
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
M
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
flag
=
Nef
.
GetCommonCounter
(
Mid
,
tp
)
local
flag
=
Nef
.
PLCounter
.
Get
(
tp
,
Mid
)
local
list
=
{
20200
,
22400
,
23300
,
10100
}
local
list
=
{
20200
,
22400
,
23300
,
10100
}
if
flag
>
0
and
Duel
.
IsExistingMatchingCard
(
M
[
"filter"
..
flag
],
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
if
flag
>
0
and
Duel
.
IsExistingMatchingCard
(
M
[
"filter"
..
flag
],
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
M
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
list
[
flag
])
then
and
Duel
.
IsExistingMatchingCard
(
M
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
list
[
flag
])
then
...
@@ -129,6 +107,9 @@ function M.seasonop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -129,6 +107,9 @@ function M.seasonop(e,tp,eg,ep,ev,re,r,rp)
[
10100
]
=
4
,
[
10100
]
=
4
,
}
}
if
list
[
code
]
then
if
list
[
code
]
then
Nef
.
SetCommonCounter
(
list
[
code
],
Mid
,
tp
)
local
a
=
Nef
.
PLCounter
.
Get
(
tp
,
Mid
)
local
b
=
list
[
code
]
Nef
.
PLCounter
.
Add
(
tp
,
Mid
,
b
-
a
)
Nef
.
PLCounter
.
Add
(
1
-
tp
,
Mid
,
b
-
a
)
end
end
end
end
script/c999107.lua
View file @
638402c6
...
@@ -102,8 +102,6 @@ function M.activate(e,tp,eg,ep,ev,re,r,rp)
...
@@ -102,8 +102,6 @@ function M.activate(e,tp,eg,ep,ev,re,r,rp)
local
cost
=
te
:
GetCost
()
local
cost
=
te
:
GetCost
()
if
cost
then
cost
(
te
,
tep
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
end
if
cost
then
cost
(
te
,
tep
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
end
Duel
.
RaiseEvent
(
tc
,
EVENT_CHAIN_SOLVED
,
tc
:
GetActivateEffect
(),
0
,
tp
,
tp
,
Duel
.
GetCurrentChain
())
Duel
.
RaiseEvent
(
tc
,
EVENT_CHAIN_SOLVED
,
tc
:
GetActivateEffect
(),
0
,
tp
,
tp
,
Duel
.
GetCurrentChain
())
Nef
.
RefreshCommonCounter
(
tc
,
999104
)
end
end
-- immune
-- immune
...
@@ -136,7 +134,7 @@ end
...
@@ -136,7 +134,7 @@ end
function
M
.
tokentg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
M
.
tokentg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
if
chk
==
0
then
local
flag
=
Nef
.
GetCommonCounter
(
999104
,
tp
)
local
flag
=
Nef
.
PLCounter
.
Get
(
tp
,
999104
)
local
list
=
{
local
list
=
{
[
1
]
=
{
25161
,
0x208
,
0x4011
,
2000
,
2000
,
5
,
RACE_PLANT
,
ATTRIBUTE_LIGHT
},
[
1
]
=
{
25161
,
0x208
,
0x4011
,
2000
,
2000
,
5
,
RACE_PLANT
,
ATTRIBUTE_LIGHT
},
[
2
]
=
{
25160
,
0x208
,
0x4011
,
1000
,
1000
,
1
,
RACE_PLANT
,
ATTRIBUTE_LIGHT
},
[
2
]
=
{
25160
,
0x208
,
0x4011
,
1000
,
1000
,
1
,
RACE_PLANT
,
ATTRIBUTE_LIGHT
},
...
@@ -151,7 +149,7 @@ function M.tokentg(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -151,7 +149,7 @@ function M.tokentg(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
function
M
.
tokenop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
M
.
tokenop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
flag
=
Nef
.
GetCommonCounter
(
999104
,
tp
)
local
flag
=
Nef
.
PLCounter
.
Get
(
tp
,
999104
)
local
list
=
{
local
list
=
{
[
1
]
=
{
25161
,
0x208
,
0x4011
,
2000
,
2000
,
5
,
RACE_PLANT
,
ATTRIBUTE_LIGHT
},
[
1
]
=
{
25161
,
0x208
,
0x4011
,
2000
,
2000
,
5
,
RACE_PLANT
,
ATTRIBUTE_LIGHT
},
[
2
]
=
{
25160
,
0x208
,
0x4011
,
1000
,
1000
,
1
,
RACE_PLANT
,
ATTRIBUTE_LIGHT
},
[
2
]
=
{
25160
,
0x208
,
0x4011
,
1000
,
1000
,
1
,
RACE_PLANT
,
ATTRIBUTE_LIGHT
},
...
...
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