Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-2pick
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-2pick
Commits
38fa6b64
Commit
38fa6b64
authored
Dec 20, 2017
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update_rule
parent
2fc587ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
1 deletion
+44
-1
expansions/pick.lua
expansions/pick.lua
+44
-1
No files found.
expansions/pick.lua
View file @
38fa6b64
...
...
@@ -46,7 +46,7 @@ function Auxiliary.LoadDB()
local
cat
=
tonumber
(
line
:
sub
(
col
+
1
,
#
line
))
if
(
cat
&
TYPE_FUSION
+
TYPE_SYNCHRO
+
TYPE_XYZ
+
TYPE_LINK
)
>
0
then
table.insert
(
extra
,
code
)
elseif
(
cat
&
TYPE_TOKEN
)
==
0
and
cat
~=
TYPE_MONSTER
+
TYPE_NORMAL
then
elseif
(
cat
&
TYPE_TOKEN
+
TYPE_RITUAL
)
==
0
and
cat
~=
TYPE_MONSTER
+
TYPE_NORMAL
then
table.insert
(
main
,
code
)
if
forbidden_check
[
code
]
then
table.insert
(
forbidden
,
code
)
...
...
@@ -119,6 +119,37 @@ function Auxiliary.Load2PickRule()
Auxiliary
.
LoadLFList
()
Auxiliary
.
LoadDB
()
local
e2
=
Effect
.
GlobalEffect
()
e2
:
SetDescription
(
1264319
*
16
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e2
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e2
:
SetRange
(
LOCATION_EXTRA
)
e2
:
SetValue
(
SUMMON_TYPE_FUSION
)
e2
:
SetCondition
(
Auxiliary
.
FusionSummonCondition
)
e2
:
SetOperation
(
Auxiliary
.
FusionSummonOperation
)
local
e1
=
Effect
.
GlobalEffect
()
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_GRANT
)
e1
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
|
EFFECT_FLAG_SET_AVAILABLE
)
e1
:
SetTargetRange
(
LOCATION_EXTRA
,
LOCATION_EXTRA
)
e1
:
SetLabelObject
(
e2
)
e1
:
SetTarget
(
function
(
e
,
c
)
return
c
:
IsType
(
TYPE_FUSION
)
end
)
Duel
.
RegisterEffect
(
e1
,
0
)
local
e1
=
Effect
.
GlobalEffect
()
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_ADD_TYPE
)
e1
:
SetProperty
(
EFFECT_FLAG_IGNORE_RANGE
|
EFFECT_FLAG_IGNORE_IMMUNE
|
EFFECT_FLAG_SET_AVAILABLE
)
e1
:
SetTargetRange
(
0xff
,
0xff
)
e1
:
SetValue
(
TYPE_TUNER
)
e1
:
SetTarget
(
function
(
e
,
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
end
)
Duel
.
RegisterEffect
(
e1
,
0
)
local
e1
=
Effect
.
GlobalEffect
()
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_NONTUNER
)
e1
:
SetProperty
(
EFFECT_FLAG_IGNORE_RANGE
|
EFFECT_FLAG_IGNORE_IMMUNE
|
EFFECT_FLAG_SET_AVAILABLE
)
e1
:
SetTargetRange
(
0xff
,
0xff
)
e1
:
SetValue
(
1
)
Duel
.
RegisterEffect
(
e1
,
0
)
local
e1
=
Effect
.
GlobalEffect
()
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_ADD_RACE
)
...
...
@@ -140,3 +171,15 @@ function Auxiliary.Load2PickRule()
e1
:
SetOperation
(
Auxiliary
.
StartPick
)
Duel
.
RegisterEffect
(
e1
,
0
)
end
function
Auxiliary
.
FusionSummonCondition
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
mg
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
Card
.
IsOnField
,
nil
)
return
c
:
CheckFusionMaterial
(
mg
,
nil
,
tp
)
end
function
Auxiliary
.
FusionSummonOperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
mg
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
Card
.
IsOnField
,
nil
)
local
g
=
Duel
.
SelectFusionMaterial
(
tp
,
c
,
mg
,
nil
,
tp
)
c
:
SetMaterial
(
g
)
Duel
.
SendtoGrave
(
g
,
REASON_MATERIAL
+
REASON_FUSION
)
end
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