Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-rush-duel
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
Clara Grace Paulsen
ygopro-rush-duel
Commits
ffc35190
Commit
ffc35190
authored
Jan 01, 2023
by
未闻皂名
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2023/1/1 优化极大召唤
parent
ce11bd18
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
70 additions
and
73 deletions
+70
-73
script/RDMaximum.lua
script/RDMaximum.lua
+70
-73
No files found.
script/RDMaximum.lua
View file @
ffc35190
...
...
@@ -25,14 +25,6 @@ function RushDuel.InitMaximum()
local
e4
=
e2
:
Clone
()
e4
:
SetCode
(
EFFECT_CANNOT_TURN_SET
)
Duel
.
RegisterEffect
(
e4
,
0
)
-- 极大召唤时的表示形式
local
e5
=
Effect
.
GlobalEffect
()
e5
:
SetType
(
EFFECT_TYPE_FIELD
)
e5
:
SetCode
(
EFFECT_LIMIT_SPECIAL_SUMMON_POSITION
)
e5
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e5
:
SetTargetRange
(
1
,
1
)
e5
:
SetTarget
(
RushDuel
.
MaximumSummonPosition
)
Duel
.
RegisterEffect
(
e5
,
0
)
end
function
RushDuel
.
MaximumMonster
(
e
,
c
)
return
c
:
IsSummonType
(
SUMMON_TYPE_MAXIMUM
)
and
c
:
GetOverlayCount
()
>
0
...
...
@@ -40,9 +32,6 @@ end
function
RushDuel
.
MaximumMonsterAtk
(
e
,
c
)
return
c
:
IsPosition
(
POS_FACEUP_ATTACK
)
and
RushDuel
.
MaximumMonster
(
e
,
c
)
end
function
RushDuel
.
MaximumSummonPosition
(
e
,
c
,
tp
,
sumtp
,
sumpos
)
return
c
:
IsType
(
TYPE_MAXIMUM
)
and
(
sumtp
&
SUMMON_TYPE_MAXIMUM
)
==
SUMMON_TYPE_MAXIMUM
and
(
sumpos
&
POS_DEFENSE
)
>
0
end
-- 添加极大召唤手续
function
RushDuel
.
AddMaximumProcedure
(
c
,
max_atk
,
left_code
,
right_code
)
...
...
@@ -50,42 +39,15 @@ function RushDuel.AddMaximumProcedure(c, max_atk, left_code, right_code)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
120000000
,
0
))
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
_G
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_SPSUM_PARAM
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCondition
(
function
(
e
,
c
,
og
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
mg
=
Duel
.
GetMatchingGroup
(
RushDuel
.
MaximumSummonFilter
,
tp
,
LOCATION_HAND
,
0
,
nil
,
e
,
tp
,
left_code
,
right_code
)
local
fg
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_MZONE
,
0
)
return
Duel
.
GetMZoneCount
(
tp
,
fg
)
>
0
and
not
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
and
mg
:
CheckSubGroup
(
RushDuel
.
MaximumSummonCheck
,
2
,
2
)
end
)
e1
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
sg
,
og
)
local
mg
=
Duel
.
GetMatchingGroup
(
RushDuel
.
MaximumSummonFilter
,
tp
,
LOCATION_HAND
,
0
,
nil
,
e
,
tp
,
left_code
,
right_code
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
120000000
,
1
))
local
cancel
=
Duel
.
GetCurrentChain
()
==
0
local
g
=
mg
:
SelectSubGroup
(
tp
,
RushDuel
.
MaximumSummonCheck
,
cancel
,
2
,
2
)
if
not
g
then
return
end
local
fg
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_MZONE
,
0
)
Duel
.
SendtoGrave
(
fg
,
REASON_RULE
)
c
:
SetMaterial
(
g
)
sg
:
AddCard
(
c
)
sg
:
Merge
(
g
)
end
)
e1
:
SetValue
(
SUMMON_TYPE_MAXIMUM
)
e1
:
SetTargetRange
(
POS_FACEUP_ATTACK
,
0
)
e1
:
SetCondition
(
RushDuel
.
MaximumSummonCondition
(
left_code
,
right_code
))
e1
:
SetTarget
(
RushDuel
.
MaximumSummonTarget
(
left_code
,
right_code
))
e1
:
SetOperation
(
RushDuel
.
MaximumSummonOperation
(
left_code
,
right_code
))
e1
:
SetValue
(
RushDuel
.
MaximumSummonValue
)
c
:
RegisterEffect
(
e1
)
-- 极大召唤 素材
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e2
:
SetCondition
(
RushDuel
.
MaximumMaterialCondition
)
e2
:
SetOperation
(
RushDuel
.
MaximumMaterialOperation
)
c
:
RegisterEffect
(
e2
)
-- 极大攻击力
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
...
...
@@ -96,23 +58,23 @@ function RushDuel.AddMaximumProcedure(c, max_atk, left_code, right_code)
e3
:
SetValue
(
max_atk
)
c
:
RegisterEffect
(
e3
)
-- 占用3个主要怪兽区域
local
e
4
=
Effect
.
CreateEffect
(
c
)
e
4
:
SetType
(
EFFECT_TYPE_FIELD
)
e
4
:
SetCode
(
EFFECT_MAX_MZONE
)
e
4
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e
4
:
SetRange
(
LOCATION_MZONE
)
e
4
:
SetTargetRange
(
1
,
0
)
e
4
:
SetCondition
(
RushDuel
.
MaximumMode
)
e
4
:
SetValue
(
1
)
c
:
RegisterEffect
(
e
4
)
local
e
8
=
Effect
.
CreateEffect
(
c
)
e
8
:
SetType
(
EFFECT_TYPE_FIELD
)
e
8
:
SetCode
(
EFFECT_MAX_MZONE
)
e
8
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e
8
:
SetRange
(
LOCATION_MZONE
)
e
8
:
SetTargetRange
(
1
,
0
)
e
8
:
SetCondition
(
RushDuel
.
MaximumMode
)
e
8
:
SetValue
(
1
)
c
:
RegisterEffect
(
e
8
)
-- 离开场上时, 所有部件一同离开
local
e
5
=
Effect
.
CreateEffect
(
c
)
e
5
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e
5
:
SetCode
(
EVENT_LEAVE_FIELD_P
)
e
5
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e
5
:
SetCondition
(
RushDuel
.
MaximumMode
)
e
5
:
SetOperation
(
RushDuel
.
MaximumLeaveOperation
)
c
:
RegisterEffect
(
e
5
)
local
e
9
=
Effect
.
CreateEffect
(
c
)
e
9
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e
9
:
SetCode
(
EVENT_LEAVE_FIELD_P
)
e
9
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e
9
:
SetCondition
(
RushDuel
.
MaximumMode
)
e
9
:
SetOperation
(
RushDuel
.
MaximumLeaveOperation
)
c
:
RegisterEffect
(
e
9
)
end
function
RushDuel
.
MaximumSummonFilter
(
c
,
e
,
tp
,
left_code
,
right_code
)
return
c
:
IsCode
(
left_code
,
right_code
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP
)
...
...
@@ -120,21 +82,56 @@ end
function
RushDuel
.
MaximumSummonCheck
(
g
)
return
g
:
GetClassCount
(
Card
.
GetCode
)
==
g
:
GetCount
()
end
function
RushDuel
.
MaximumMode
(
e
)
local
c
=
e
:
GetHandler
()
return
c
:
IsSummonType
(
SUMMON_TYPE_MAXIMUM
)
and
c
:
GetOverlayCount
()
>
0
function
RushDuel
.
MaximumSummonCondition
(
left_code
,
right_code
)
return
function
(
e
,
c
,
og
,
min
,
max
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
mg
=
Duel
.
GetMatchingGroup
(
RushDuel
.
MaximumSummonFilter
,
tp
,
LOCATION_HAND
,
0
,
nil
,
e
,
tp
,
left_code
,
right_code
)
local
fg
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_MZONE
,
0
)
return
Duel
.
GetMZoneCount
(
tp
,
fg
)
>
0
and
mg
:
CheckSubGroup
(
RushDuel
.
MaximumSummonCheck
,
2
,
2
)
end
end
function
RushDuel
.
MaximumSummonTarget
(
left_code
,
right_code
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
c
,
og
,
min
,
max
)
local
mg
=
Duel
.
GetMatchingGroup
(
RushDuel
.
MaximumSummonFilter
,
tp
,
LOCATION_HAND
,
0
,
nil
,
e
,
tp
,
left_code
,
right_code
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
120000000
,
1
))
local
cancel
=
Duel
.
GetCurrentChain
()
==
0
local
g
=
mg
:
SelectSubGroup
(
tp
,
RushDuel
.
MaximumSummonCheck
,
cancel
,
2
,
2
)
if
g
then
g
:
KeepAlive
()
e
:
SetLabelObject
(
g
)
return
true
else
return
false
end
end
end
function
RushDuel
.
MaximumSummonOperation
(
left_code
,
right_code
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
og
,
min
,
max
)
local
fg
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_MZONE
,
0
)
Duel
.
SendtoGrave
(
fg
,
REASON_RULE
)
local
mg
=
e
:
GetLabelObject
()
local
left
=
mg
:
GetFirst
()
local
right
=
mg
:
GetNext
()
if
left
:
IsCode
(
right_code
)
then
left
,
right
=
right
,
left
end
Duel
.
MoveToField
(
left
,
tp
,
tp
,
LOCATION_MZONE
,
POS_FACEUP_ATTACK
,
false
,
0x2
)
Duel
.
MoveToField
(
right
,
tp
,
tp
,
LOCATION_MZONE
,
POS_FACEUP_ATTACK
,
false
,
0x8
)
c
:
SetMaterial
(
mg
)
Duel
.
Overlay
(
c
,
mg
)
mg
:
DeleteGroup
()
end
end
function
RushDuel
.
Maximum
MaterialCondition
(
e
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_MAXIMUM
)
function
RushDuel
.
Maximum
SummonValue
(
e
,
c
)
return
SUMMON_TYPE_MAXIMUM
,
0x4
end
function
RushDuel
.
MaximumMaterialOperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
RushDuel
.
MaximumMode
(
e
)
local
c
=
e
:
GetHandler
()
local
mg
=
c
:
GetMaterial
()
Duel
.
Overlay
(
c
,
mg
)
Duel
.
MoveSequence
(
c
,
2
)
end
function
RushDuel
.
MaximumPositionCondition
(
e
)
return
RushDuel
.
MaximumMode
(
e
)
and
e
:
GetHandler
():
IsAttackPos
()
return
c
:
IsSummonType
(
SUMMON_TYPE_MAXIMUM
)
and
c
:
GetOverlayCount
()
>
0
end
function
RushDuel
.
MaximumLeaveOperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
...
...
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