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
62eea42c
Commit
62eea42c
authored
Dec 17, 2012
by
Fluorohydride
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #370 from VanillaSalt/patch45
fix
parents
a8d9b6c3
9475777c
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
31 additions
and
19 deletions
+31
-19
ocgcore/processor.cpp
ocgcore/processor.cpp
+13
-5
script/c13166204.lua
script/c13166204.lua
+1
-1
script/c31557782.lua
script/c31557782.lua
+2
-1
script/c38525760.lua
script/c38525760.lua
+1
-1
script/c41181774.lua
script/c41181774.lua
+6
-4
script/c51402908.lua
script/c51402908.lua
+1
-1
script/c58165765.lua
script/c58165765.lua
+4
-3
script/c58471134.lua
script/c58471134.lua
+1
-1
script/c62953041.lua
script/c62953041.lua
+2
-2
No files found.
ocgcore/processor.cpp
View file @
62eea42c
...
...
@@ -2677,7 +2677,7 @@ int32 field::process_battle_command(uint16 step) {
if
(
core
.
select_cards
.
size
()
==
1
)
returns
.
bvalue
[
1
]
=
0
;
else
add_process
(
MSG
_SELECT_CARD
,
0
,
0
,
0
,
1
-
infos
.
turn_player
+
(
core
.
attack_cancelable
?
0x20000
:
0
),
0x10001
);
add_process
(
PROCESSOR
_SELECT_CARD
,
0
,
0
,
0
,
1
-
infos
.
turn_player
+
(
core
.
attack_cancelable
?
0x20000
:
0
),
0x10001
);
core
.
units
.
begin
()
->
step
=
5
;
return
FALSE
;
}
...
...
@@ -2689,7 +2689,7 @@ int32 field::process_battle_command(uint16 step) {
}
for
(
int32
i
=
0
;
i
<
5
;
++
i
)
{
if
(
player
[
1
-
infos
.
turn_player
].
list_mzone
[
i
])
{
add_process
(
MSG
_SELECT_YESNO
,
0
,
0
,
0
,
infos
.
turn_player
,
31
);
add_process
(
PROCESSOR
_SELECT_YESNO
,
0
,
0
,
0
,
infos
.
turn_player
,
31
);
return
FALSE
;
}
}
...
...
@@ -2701,11 +2701,19 @@ int32 field::process_battle_command(uint16 step) {
if
(
core
.
select_cards
.
size
()
==
1
)
returns
.
bvalue
[
1
]
=
0
;
else
add_process
(
MSG
_SELECT_CARD
,
0
,
0
,
0
,
1
-
infos
.
turn_player
+
(
core
.
attack_cancelable
?
0x20000
:
0
),
0x10001
);
add_process
(
PROCESSOR
_SELECT_CARD
,
0
,
0
,
0
,
1
-
infos
.
turn_player
+
(
core
.
attack_cancelable
?
0x20000
:
0
),
0x10001
);
core
.
units
.
begin
()
->
step
=
5
;
return
FALSE
;
}
add_process
(
MSG_SELECT_CARD
,
0
,
0
,
0
,
infos
.
turn_player
+
(
core
.
attack_cancelable
?
0x20000
:
0
),
0x10001
);
if
(
core
.
select_cards
.
size
()
==
0
)
{
if
(
!
core
.
attack_cancelable
)
{
core
.
attacker
->
announce_count
++
;
core
.
attacker
->
announced_cards
[
0
]
=
0
;
}
core
.
units
.
begin
()
->
step
=
-
1
;
return
FALSE
;
}
add_process
(
PROCESSOR_SELECT_CARD
,
0
,
0
,
0
,
infos
.
turn_player
+
(
core
.
attack_cancelable
?
0x20000
:
0
),
0x10001
);
core
.
units
.
begin
()
->
step
=
5
;
return
FALSE
;
}
...
...
@@ -2715,7 +2723,7 @@ int32 field::process_battle_command(uint16 step) {
return
FALSE
;
}
else
{
if
(
core
.
select_cards
.
size
())
add_process
(
MSG
_SELECT_CARD
,
0
,
0
,
0
,
infos
.
turn_player
+
(
core
.
attack_cancelable
?
0x20000
:
0
),
0x10001
);
add_process
(
PROCESSOR
_SELECT_CARD
,
0
,
0
,
0
,
infos
.
turn_player
+
(
core
.
attack_cancelable
?
0x20000
:
0
),
0x10001
);
else
core
.
units
.
begin
()
->
step
=
-
1
;
}
...
...
script/c13166204.lua
View file @
62eea42c
...
...
@@ -11,7 +11,7 @@ function c13166204.initial_effect(c)
c
:
RegisterEffect
(
e1
)
end
function
c13166204
.
filter
(
c
,
tp
)
return
c
:
IsControler
(
tp
)
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsSetCard
(
0x54
)
return
c
:
Is
Faceup
()
and
c
:
Is
Controler
(
tp
)
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsSetCard
(
0x54
)
end
function
c13166204
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
rp
~=
tp
and
re
:
IsActiveType
(
TYPE_MONSTER
)
and
eg
:
IsExists
(
c13166204
.
filter
,
1
,
nil
,
tp
)
...
...
script/c31557782.lua
View file @
62eea42c
...
...
@@ -4,7 +4,8 @@ function c31557782.initial_effect(c)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_SPSUM_PARAM
)
e1
:
SetTargetRange
(
POS_FACEUP_ATTACK
,
0
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCondition
(
c31557782
.
spcon
)
c
:
RegisterEffect
(
e1
)
...
...
script/c38525760.lua
View file @
62eea42c
...
...
@@ -24,7 +24,7 @@ function c38525760.initial_effect(c)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetCo
st
(
c38525760
.
thcon
)
e3
:
SetCo
ndition
(
c38525760
.
thcon
)
e3
:
SetTarget
(
c38525760
.
thtg
)
e3
:
SetOperation
(
c38525760
.
thop
)
c
:
RegisterEffect
(
e3
)
...
...
script/c41181774.lua
View file @
62eea42c
...
...
@@ -65,10 +65,11 @@ function c41181774.sdcon(e)
or
Duel
.
IsExistingMatchingCard
(
c41181774
.
exfilter
,
0
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
,
c
:
GetFieldID
())
end
function
c41181774
.
hdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
Is
Location
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
chkc
:
IsAbleToDeck
()
end
if
chkc
then
return
chkc
:
Is
OnField
(
)
and
chkc
:
IsControler
(
tp
)
and
chkc
:
IsAbleToDeck
()
end
if
chk
==
0
then
return
true
end
local
ct
=
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_HAND
)
if
ct
==
0
then
return
end
if
ct
>
3
then
ct
=
3
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsAbleToDeck
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
ct
,
e
:
GetHandler
())
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
g
:
GetCount
(),
0
,
0
)
...
...
@@ -76,8 +77,9 @@ end
function
c41181774
.
hdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
if
not
g
then
return
end
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_EFFECT
)
local
ct
=
g
:
FilterCount
(
Card
.
IsLocation
,
nil
,
LOCATION_DECK
+
LOCATION_EXTRA
)
local
sg
=
g
:
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
Duel
.
SendtoDeck
(
sg
,
nil
,
2
,
REASON_EFFECT
)
local
ct
=
sg
:
FilterCount
(
Card
.
IsLocation
,
nil
,
LOCATION_DECK
+
LOCATION_EXTRA
)
if
ct
==
0
then
return
end
local
dg
=
Duel
.
GetFieldGroup
(
tp
,
0
,
LOCATION_HAND
):
RandomSelect
(
tp
,
ct
)
local
dt
=
Duel
.
SendtoGrave
(
dg
,
REASON_EFFECT
+
REASON_DISCARD
)
...
...
@@ -89,7 +91,7 @@ function c41181774.hdop(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
dt
*
1000
)
e1
:
SetReset
(
RESET_EVENT
+
0x1f
e
0000
)
e1
:
SetReset
(
RESET_EVENT
+
0x1f
f
0000
)
c
:
RegisterEffect
(
e1
)
end
end
script/c51402908.lua
View file @
62eea42c
...
...
@@ -33,7 +33,7 @@ function c51402908.spr(e,tp,eg,ep,ev,re,r,rp)
if
Duel
.
GetCurrentPhase
()
==
PHASE_DAMAGE
then
pos
=
c
:
GetBattlePosition
()
end
if
c
:
IsReason
(
REASON_DESTROY
)
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
bit
.
band
(
pos
,
POS_FACEUP
)
~=
0
then
c
:
RegisterFlagEffect
(
51402908
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_
STANDBY
,
0
,
1
)
c
:
RegisterFlagEffect
(
51402908
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_
END
,
0
,
2
)
end
end
function
c51402908
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c58165765.lua
View file @
62eea42c
--Red Dragon Ninja
function
c58165765
.
initial_effect
(
c
)
--
destroy
--
todeck
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
58165765
,
0
))
e1
:
SetCategory
(
CATEGORY_
DESTROY
)
e1
:
SetCategory
(
CATEGORY_
TODECK
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
...
...
@@ -28,13 +28,14 @@ function c58165765.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
c58165765
.
filter
(
c
)
return
c
:
IsFacedown
()
and
c
:
Is
Destructable
()
return
c
:
IsFacedown
()
and
c
:
Is
AbleToDeck
()
end
function
c58165765
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
1
-
tp
)
and
chkc
:
IsOnField
()
and
c58165765
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c58165765
.
filter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c58165765
.
filter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
1
,
0
,
0
)
Duel
.
SetChainLimit
(
c58165765
.
limit
(
g
:
GetFirst
()))
end
function
c58165765
.
limit
(
c
)
...
...
script/c58471134.lua
View file @
62eea42c
...
...
@@ -16,7 +16,7 @@ function c58471134.initial_effect(c)
c
:
RegisterEffect
(
e2
)
end
function
c58471134
.
cfilter
(
c
)
return
c
:
IsAttribute
(
ATTRIBUTE_WATER
)
and
c
:
IsDiscardable
()
return
c
:
IsAttribute
(
ATTRIBUTE_WATER
)
and
c
:
IsDiscardable
()
and
c
:
IsAbleToGraveAsCost
()
end
function
c58471134
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetFlagEffect
(
tp
,
58471134
)
==
0
...
...
script/c62953041.lua
View file @
62eea42c
...
...
@@ -60,10 +60,10 @@ function c62953041.spreg(e,tp,eg,ep,ev,re,r,rp)
if
bit
.
band
(
r
,
0x41
)
~=
0x41
or
not
c
:
IsPreviousPosition
(
POS_FACEUP
)
then
return
end
if
Duel
.
GetTurnPlayer
()
==
tp
and
Duel
.
GetCurrentPhase
()
==
PHASE_STANDBY
then
e
:
SetLabel
(
Duel
.
GetTurnCount
())
c
:
RegisterFlagEffect
(
6
1441708
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_STANDBY
+
RESET_SELF_TURN
,
0
,
2
)
c
:
RegisterFlagEffect
(
6
2953041
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_STANDBY
+
RESET_SELF_TURN
,
0
,
2
)
else
e
:
SetLabel
(
0
)
c
:
RegisterFlagEffect
(
6
1441708
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_STANDBY
+
RESET_SELF_TURN
,
0
,
1
)
c
:
RegisterFlagEffect
(
6
2953041
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_STANDBY
+
RESET_SELF_TURN
,
0
,
1
)
end
end
function
c62953041
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
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