Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
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
REIKAI
ygopro
Commits
7ba237a7
Commit
7ba237a7
authored
Oct 15, 2018
by
MobiusMei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ver. 1.3.5 Contract with Exodia
parent
4584cef6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
116 additions
and
55 deletions
+116
-55
2pick/pick.lua
2pick/pick.lua
+116
-55
No files found.
2pick/pick.lua
View file @
7ba237a7
...
@@ -229,30 +229,30 @@ function Auxiliary.StartPick(e)
...
@@ -229,30 +229,30 @@ function Auxiliary.StartPick(e)
end
end
end
end
-- Shadoll Additional Picks
--
--
Shadoll Additional Picks
for
p
=
0
,
1
do
--
for p=0,1 do
if
Duel
.
IsPlayerNeedToPickDeck
(
p
)
then
--
if Duel.IsPlayerNeedToPickDeck(p) then
Duel
.
Hint
(
HINT_CARD
,
p
,
86938484
)
--
Duel.Hint(HINT_CARD,p,86938484)
local
ng
=
Group
.
CreateGroup
()
--
local ng=Group.CreateGroup()
local
card1
=
Duel
.
CreateToken
(
p
,
86938484
)
--
local card1=Duel.CreateToken(p,86938484)
local
card2
=
Duel
.
CreateToken
(
p
,
86938484
)
--
local card2=Duel.CreateToken(p,86938484)
local
card3
=
Duel
.
CreateToken
(
p
,
74822425
)
--
local card3=Duel.CreateToken(p,74822425)
local
card4
=
Duel
.
CreateToken
(
p
,
19261966
)
--
local card4=Duel.CreateToken(p,19261966)
local
card5
=
Duel
.
CreateToken
(
p
,
20366274
)
--
local card5=Duel.CreateToken(p,20366274)
local
card6
=
Duel
.
CreateToken
(
p
,
48424886
)
--
local card6=Duel.CreateToken(p,48424886)
local
card7
=
Duel
.
CreateToken
(
p
,
74009824
)
--
local card7=Duel.CreateToken(p,74009824)
local
card8
=
Duel
.
CreateToken
(
p
,
94977269
)
--
local card8=Duel.CreateToken(p,94977269)
ng
:
AddCard
(
card1
)
--
ng:AddCard(card1)
ng
:
AddCard
(
card2
)
--
ng:AddCard(card2)
ng
:
AddCard
(
card3
)
--
ng:AddCard(card3)
ng
:
AddCard
(
card4
)
--
ng:AddCard(card4)
ng
:
AddCard
(
card5
)
--
ng:AddCard(card5)
ng
:
AddCard
(
card6
)
--
ng:AddCard(card6)
ng
:
AddCard
(
card7
)
--
ng:AddCard(card7)
ng
:
AddCard
(
card8
)
--
ng:AddCard(card8)
Duel
.
SendtoDeck
(
ng
,
nil
,
0
,
REASON_RULE
)
--
Duel.SendtoDeck(ng,nil,0,REASON_RULE)
end
--
end
end
--
end
Auxiliary
.
SaveDeck
()
Auxiliary
.
SaveDeck
()
for
p
=
0
,
1
do
for
p
=
0
,
1
do
...
@@ -279,10 +279,13 @@ function Auxiliary.Load2PickRule()
...
@@ -279,10 +279,13 @@ function Auxiliary.Load2PickRule()
--Skill DrawSense Specials
--Skill DrawSense Specials
Auxiliary
.
Load_Skill_DrawSense_Rule
()
Auxiliary
.
Load_Skill_DrawSense_Rule
()
--Shadoll Event
Auxiliary
.
Load_Shadow_Rule
()
--EVENT Grandpa's Cards
Auxiliary
.
Load_EVENT_Grandpas_Cards
()
end
end
--Skill_DrawSense_Rule
function
Auxiliary
.
Load_Skill_DrawSense_Rule
()
function
Auxiliary
.
Load_Skill_DrawSense_Rule
()
local
e1
=
Effect
.
GlobalEffect
()
local
e1
=
Effect
.
GlobalEffect
()
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
...
@@ -309,14 +312,14 @@ function Auxiliary.Skill_DrawSense_Operation(e,tp,eg,ep,ev,re,r,rp)
...
@@ -309,14 +312,14 @@ function Auxiliary.Skill_DrawSense_Operation(e,tp,eg,ep,ev,re,r,rp)
if
dt
~=
0
then
if
dt
~=
0
then
_replace_count
=
0
_replace_count
=
0
_replace_max
=
dt
_replace_max
=
dt
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
--
local e1=Effect.CreateEffect(e:GetHandler())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
--
e1:SetType(EFFECT_TYPE_FIELD)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
--
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1
:
SetCode
(
EFFECT_DRAW_COUNT
)
--
e1:SetCode(EFFECT_DRAW_COUNT)
e1
:
SetTargetRange
(
1
,
0
)
--
e1:SetTargetRange(1,0)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_DRAW
)
--
e1:SetReset(RESET_PHASE+PHASE_DRAW)
e1
:
SetValue
(
0
)
--
e1:SetValue(0)
Duel
.
RegisterEffect
(
e1
,
tp
)
--
Duel.RegisterEffect(e1,tp)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CARDTYPE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CARDTYPE
)
local
SenseType
=
(
Duel
.
AnnounceType
(
tp
))
local
SenseType
=
(
Duel
.
AnnounceType
(
tp
))
...
@@ -329,7 +332,7 @@ function Auxiliary.Skill_DrawSense_Operation(e,tp,eg,ep,ev,re,r,rp)
...
@@ -329,7 +332,7 @@ function Auxiliary.Skill_DrawSense_Operation(e,tp,eg,ep,ev,re,r,rp)
Duel
.
ShuffleDeck
(
tp
)
Duel
.
ShuffleDeck
(
tp
)
Duel
.
MoveSequence
(
tc
,
0
)
Duel
.
MoveSequence
(
tc
,
0
)
end
end
Duel
.
Draw
(
tp
,
1
,
REASON_RULE
)
--
Duel.Draw(tp,1,REASON_RULE)
elseif
(
SenseType
==
1
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsType
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
TYPE_SPELL
))
then
elseif
(
SenseType
==
1
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsType
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
TYPE_SPELL
))
then
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsType
,
tp
,
LOCATION_DECK
,
0
,
nil
,
TYPE_SPELL
)
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsType
,
tp
,
LOCATION_DECK
,
0
,
nil
,
TYPE_SPELL
)
local
SenseCard
=
g
:
RandomSelect
(
tp
,
1
)
local
SenseCard
=
g
:
RandomSelect
(
tp
,
1
)
...
@@ -338,7 +341,7 @@ function Auxiliary.Skill_DrawSense_Operation(e,tp,eg,ep,ev,re,r,rp)
...
@@ -338,7 +341,7 @@ function Auxiliary.Skill_DrawSense_Operation(e,tp,eg,ep,ev,re,r,rp)
Duel
.
ShuffleDeck
(
tp
)
Duel
.
ShuffleDeck
(
tp
)
Duel
.
MoveSequence
(
tc
,
0
)
Duel
.
MoveSequence
(
tc
,
0
)
end
end
Duel
.
Draw
(
tp
,
1
,
REASON_RULE
)
--
Duel.Draw(tp,1,REASON_RULE)
elseif
(
SenseType
==
2
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsType
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
TYPE_TRAP
))
then
elseif
(
SenseType
==
2
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsType
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
TYPE_TRAP
))
then
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsType
,
tp
,
LOCATION_DECK
,
0
,
nil
,
TYPE_TRAP
)
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsType
,
tp
,
LOCATION_DECK
,
0
,
nil
,
TYPE_TRAP
)
local
SenseCard
=
g
:
RandomSelect
(
tp
,
1
)
local
SenseCard
=
g
:
RandomSelect
(
tp
,
1
)
...
@@ -347,40 +350,98 @@ function Auxiliary.Skill_DrawSense_Operation(e,tp,eg,ep,ev,re,r,rp)
...
@@ -347,40 +350,98 @@ function Auxiliary.Skill_DrawSense_Operation(e,tp,eg,ep,ev,re,r,rp)
Duel
.
ShuffleDeck
(
tp
)
Duel
.
ShuffleDeck
(
tp
)
Duel
.
MoveSequence
(
tc
,
0
)
Duel
.
MoveSequence
(
tc
,
0
)
end
end
Duel
.
Draw
(
tp
,
1
,
REASON_RULE
)
--
Duel.Draw(tp,1,REASON_RULE)
else
else
Duel
.
ShuffleDeck
(
tp
)
Duel
.
ShuffleDeck
(
tp
)
Duel
.
Draw
(
tp
,
1
,
REASON_RULE
)
--
Duel.Draw(tp,1,REASON_RULE)
end
end
end
end
end
end
--EVENT Grandpa's Cards
function
Auxiliary
.
Load_Shadow_Rule
()
function
Auxiliary
.
Load_EVENT_Grandpas_Cards
()
local
e1
=
Effect
.
GlobalEffect
()
local
e1
=
Effect
.
GlobalEffect
()
e1
:
SetDescription
(
1166
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
+
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetCode
(
EVENT_BATTLED
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetTarget
(
Auxiliary
.
EVENT_Grandpas_Cards_Target
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetOperation
(
Auxiliary
.
EVENT_Grandpas_Cards_Operation
)
e1
:
SetCondition
(
Auxiliary
.
LinkCondition
(
nil
,
2
,
2
,
nil
))
e1
:
SetTarget
(
Auxiliary
.
LinkTarget
(
nil
,
2
,
2
,
nil
))
e1
:
SetOperation
(
Auxiliary
.
LinkOperation
(
nil
,
2
,
2
,
nil
))
e1
:
SetValue
(
SUMMON_TYPE_LINK
)
local
e2
=
Effect
.
GlobalEffect
()
local
e2
=
Effect
.
GlobalEffect
()
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_GRANT
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_GRANT
)
e2
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e2
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
+
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetTargetRange
(
LOCATION_EXTRA
,
LOCATION_EXTRA
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e2
:
SetTarget
(
Auxiliary
.
IsConstruct
)
e2
:
SetLabelObject
(
e1
)
e2
:
SetLabelObject
(
e1
)
Duel
.
RegisterEffect
(
e2
,
0
)
Duel
.
RegisterEffect
(
e2
,
0
)
return
end
end
function
Auxiliary
.
IsConstruct
(
e
,
c
)
function
Auxiliary
.
EVENT_Grandpas_Cards_Target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
c
:
IsCode
(
86938484
)
local
c
=
e
:
GetHandler
()
if
c
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
then
return
false
end
local
bc
=
c
:
GetBattleTarget
()
return
bc
and
bc
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
not
bc
:
IsType
(
TYPE_TOKEN
)
and
bc
:
GetLeaveFieldDest
()
==
0
end
function
Auxiliary
.
EVENT_Grandpas_Cards_Operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
if
Duel
.
SelectYesNo
(
c
.
GetOwner
(
c
),
94
)
then
if
bc
:
IsRelateToBattle
()
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCode
(
EFFECT_SEND_REPLACE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetTarget
(
Auxiliary
.
EVENT_Grandpas_Cards_Return_Hand_Target
)
e1
:
SetOperation
(
Auxiliary
.
EVENT_Grandpas_Cards_Return_Hand_Operation
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_DAMAGE
)
bc
:
RegisterEffect
(
e1
)
end
-- local code=e:GetHandler():GetCode()
Exodia_announce_filter
=
{
0x40
,
OPCODE_ISSETCARD
,
OPCODE_ISCODE
,
OPCODE_NOT
,
OPCODE_AND
}
local
ac
=
Duel
.
AnnounceCardFilter
(
c
.
GetOwner
(
c
),
table.unpack
(
Exodia_announce_filter
))
local
Yugi_Card
=
Duel
.
CreateToken
(
c
.
GetOwner
(
c
),
ac
)
Duel
.
SendtoHand
(
Yugi_Card
,
c
.
GetOwner
(
c
),
0
,
REASON_RULE
)
end
end
end
function
Auxiliary
.
EVENT_Grandpas_Cards_Return_Hand_Target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
GetDestination
()
==
LOCATION_GRAVE
and
c
:
IsReason
(
REASON_BATTLE
)
end
return
true
end
function
Auxiliary
.
EVENT_Grandpas_Cards_Return_Hand_Operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
SendtoHand
(
e
:
GetHandler
(),
nil
,
2
,
REASON_RULE
)
end
--Shadoll Event
-- function Auxiliary.Load_Shadow_Rule()
-- local e1=Effect.GlobalEffect()
-- e1:SetDescription(1166)
-- e1:SetType(EFFECT_TYPE_FIELD)
-- e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
-- e1:SetCode(EFFECT_SPSUMMON_PROC)
-- e1:SetRange(LOCATION_EXTRA)
-- e1:SetCondition(Auxiliary.LinkCondition(nil,2,2,nil))
-- e1:SetTarget(Auxiliary.LinkTarget(nil,2,2,nil))
-- e1:SetOperation(Auxiliary.LinkOperation(nil,2,2,nil))
-- e1:SetValue(SUMMON_TYPE_LINK)
-- local e2=Effect.GlobalEffect()
-- e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
-- e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
-- e2:SetTargetRange(LOCATION_EXTRA,LOCATION_EXTRA)
-- e2:SetTarget(Auxiliary.IsConstruct)
-- e2:SetLabelObject(e1)
-- Duel.RegisterEffect(e2,0)
-- return
-- end
-- function Auxiliary.IsConstruct(e,c)
-- return c:IsCode(86938484)
-- end
--DestinyDraw Rule
-- function Auxiliary.Load_Skill_DestinyDraw_Rule()
-- function Auxiliary.Load_Skill_DestinyDraw_Rule()
-- local e1=Effect.GlobalEffect()
-- local e1=Effect.GlobalEffect()
...
...
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