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
fdafde2c
Commit
fdafde2c
authored
Apr 23, 2013
by
argon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
f37aa3ee
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
26 additions
and
10 deletions
+26
-10
gframe/single_duel.cpp
gframe/single_duel.cpp
+4
-4
ocgcore/card.cpp
ocgcore/card.cpp
+1
-1
ocgcore/field.cpp
ocgcore/field.cpp
+1
-1
ocgcore/operations.cpp
ocgcore/operations.cpp
+12
-0
script/c32339440.lua
script/c32339440.lua
+1
-1
script/c48333324.lua
script/c48333324.lua
+3
-0
script/c49678559.lua
script/c49678559.lua
+1
-1
script/c7152333.lua
script/c7152333.lua
+1
-1
script/c73906480.lua
script/c73906480.lua
+2
-1
No files found.
gframe/single_duel.cpp
View file @
fdafde2c
...
...
@@ -420,22 +420,22 @@ void SingleDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
last_replay
.
WriteInt32
(
opt
,
false
);
last_replay
.
Flush
();
last_replay
.
WriteInt32
(
pdeck
[
0
].
main
.
size
(),
false
);
for
(
size_t
i
=
pdeck
[
0
].
main
.
size
()
-
1
;
i
>=
0
;
--
i
)
{
for
(
int32
i
=
(
int32
)
pdeck
[
0
].
main
.
size
()
-
1
;
i
>=
0
;
--
i
)
{
new_card
(
pduel
,
pdeck
[
0
].
main
[
i
]
->
first
,
0
,
0
,
LOCATION_DECK
,
0
,
0
);
last_replay
.
WriteInt32
(
pdeck
[
0
].
main
[
i
]
->
first
,
false
);
}
last_replay
.
WriteInt32
(
pdeck
[
0
].
extra
.
size
(),
false
);
for
(
size_t
i
=
pdeck
[
0
].
extra
.
size
()
-
1
;
i
>=
0
;
--
i
)
{
for
(
int32
i
=
(
int32
)
pdeck
[
0
].
extra
.
size
()
-
1
;
i
>=
0
;
--
i
)
{
new_card
(
pduel
,
pdeck
[
0
].
extra
[
i
]
->
first
,
0
,
0
,
LOCATION_EXTRA
,
0
,
0
);
last_replay
.
WriteInt32
(
pdeck
[
0
].
extra
[
i
]
->
first
,
false
);
}
last_replay
.
WriteInt32
(
pdeck
[
1
].
main
.
size
(),
false
);
for
(
size_t
i
=
pdeck
[
1
].
main
.
size
()
-
1
;
i
>=
0
;
--
i
)
{
for
(
int32
i
=
(
int32
)
pdeck
[
1
].
main
.
size
()
-
1
;
i
>=
0
;
--
i
)
{
new_card
(
pduel
,
pdeck
[
1
].
main
[
i
]
->
first
,
1
,
1
,
LOCATION_DECK
,
0
,
0
);
last_replay
.
WriteInt32
(
pdeck
[
1
].
main
[
i
]
->
first
,
false
);
}
last_replay
.
WriteInt32
(
pdeck
[
1
].
extra
.
size
(),
false
);
for
(
size_t
i
=
pdeck
[
1
].
extra
.
size
()
-
1
;
i
>=
0
;
--
i
)
{
for
(
int32
i
=
(
int32
)
pdeck
[
1
].
extra
.
size
()
-
1
;
i
>=
0
;
--
i
)
{
new_card
(
pduel
,
pdeck
[
1
].
extra
[
i
]
->
first
,
1
,
1
,
LOCATION_EXTRA
,
0
,
0
);
last_replay
.
WriteInt32
(
pdeck
[
1
].
extra
[
i
]
->
first
,
false
);
}
...
...
ocgcore/card.cpp
View file @
fdafde2c
...
...
@@ -697,7 +697,7 @@ void card::cancel_field_effect() {
&&
(
it
->
second
->
type
&
EFFECT_TYPE_TRIGGER_O
)
&&
!
(
it
->
second
->
code
&
EVENT_PHASE
)))
pduel
->
game_field
->
remove_effect
(
it
->
second
);
}
if
(
unique_code
&&
current
.
location
&
LOCATION_ONFIELD
)
if
(
unique_code
&&
(
current
.
location
&
LOCATION_ONFIELD
)
)
pduel
->
game_field
->
remove_unique_card
(
this
);
}
void
card
::
enable_field_effect
(
int32
enabled
)
{
...
...
ocgcore/field.cpp
View file @
fdafde2c
...
...
@@ -1327,7 +1327,7 @@ effect* field::check_unique_onfield(card* pcard, uint8 controler) {
return
0
;
for
(
auto
iter
=
core
.
unique_cards
[
controler
].
begin
();
iter
!=
core
.
unique_cards
[
controler
].
end
();
++
iter
)
{
card
*
ucard
=
*
iter
;
if
((
ucard
!=
pcard
)
&&
ucard
->
is_position
(
POS_FACEUP
)
&&
ucard
->
unique_code
==
pcard
->
unique_code
if
((
ucard
!=
pcard
)
&&
ucard
->
get_status
(
STATUS_EFFECT_ENABLED
)
&&
(
ucard
->
unique_code
==
pcard
->
unique_code
)
&&
(
!
(
pcard
->
current
.
location
&
LOCATION_ONFIELD
)
||
pcard
->
is_position
(
POS_FACEDOWN
)
||
(
ucard
->
unique_uid
<
pcard
->
unique_uid
)))
return
pcard
->
unique_effect
;
}
...
...
ocgcore/operations.cpp
View file @
fdafde2c
...
...
@@ -799,11 +799,15 @@ int32 field::get_control(uint16 step, effect * reason_effect, uint8 reason_playe
if
(
!
pcard
->
is_affect_by_effect
(
reason_effect
))
return
TRUE
;
pcard
->
filter_disable_related_cards
();
if
(
pcard
->
unique_code
)
pduel
->
game_field
->
remove_unique_card
(
pcard
);
move_to_field
(
pcard
,
playerid
,
playerid
,
LOCATION_MZONE
,
pcard
->
current
.
position
);
pcard
->
set_status
(
STATUS_ATTACK_CANCELED
,
TRUE
);
return
FALSE
;
}
case
1
:
{
if
(
pcard
->
unique_code
)
pduel
->
game_field
->
add_unique_card
(
pcard
);
set_control
(
pcard
,
playerid
,
reset_phase
,
reset_count
);
pcard
->
reset
(
RESET_CONTROL
,
RESET_EVENT
);
pcard
->
filter_disable_related_cards
();
...
...
@@ -843,10 +847,18 @@ int32 field::swap_control(uint16 step, effect * reason_effect, uint8 reason_play
return
TRUE
;
pcard1
->
filter_disable_related_cards
();
pcard2
->
filter_disable_related_cards
();
if
(
pcard1
->
unique_code
)
pduel
->
game_field
->
remove_unique_card
(
pcard1
);
if
(
pcard2
->
unique_code
)
pduel
->
game_field
->
remove_unique_card
(
pcard2
);
remove_card
(
pcard1
);
remove_card
(
pcard2
);
add_card
(
p2
,
pcard1
,
l2
,
s2
);
add_card
(
p1
,
pcard2
,
l1
,
s1
);
if
(
pcard1
->
unique_code
)
pduel
->
game_field
->
add_unique_card
(
pcard1
);
if
(
pcard2
->
unique_code
)
pduel
->
game_field
->
add_unique_card
(
pcard2
);
set_control
(
pcard1
,
p2
,
reset_phase
,
reset_count
);
set_control
(
pcard2
,
p1
,
reset_phase
,
reset_count
);
pcard1
->
reset
(
RESET_CONTROL
,
RESET_EVENT
);
...
...
script/c32339440.lua
View file @
fdafde2c
...
...
@@ -18,7 +18,7 @@ function c32339440.thcon(e,tp,eg,ep,ev,re,r,rp)
return
Duel
.
GetTurnPlayer
()
==
tp
end
function
c32339440
.
filter
(
c
)
return
c
:
IsSetCard
(
0x88
)
and
c
:
IsAbleToHand
()
return
c
:
IsSetCard
(
0x88
)
and
c
:
Is
Type
(
TYPE_MONSTER
)
and
sc
:
Is
AbleToHand
()
end
function
c32339440
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c32339440
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
...
...
script/c48333324.lua
View file @
fdafde2c
...
...
@@ -48,6 +48,9 @@ function c48333324.activate(e,tp,eg,ep,ev,re,r,rp)
end
g
=
Duel
.
GetMatchingGroup
(
c48333324
.
negfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
sc
)
tc
=
g
:
GetFirst
()
if
tc
then
Duel
.
BreakEffect
()
end
while
tc
do
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
...
...
script/c49678559.lua
View file @
fdafde2c
...
...
@@ -41,7 +41,7 @@ end
function
c49678559
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
and
tc
:
GetAttack
()
>
0
then
if
tc
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
...
...
script/c7152333.lua
View file @
fdafde2c
...
...
@@ -21,7 +21,7 @@ function c7152333.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function
c7152333
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
GetAttack
()
==
0
then
return
end
if
c
:
IsFacedown
()
or
not
c
:
IsRelateToEffect
(
e
)
or
c
:
GetAttack
()
==
0
then
return
end
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
...
...
script/c73906480.lua
View file @
fdafde2c
...
...
@@ -34,8 +34,9 @@ function c73906480.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g1
,
g1
:
GetCount
(),
0
,
0
)
end
function
c73906480
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<
2
then
return
end
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
):
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<
g
:
GetCount
()
then
return
end
if
g
:
GetCount
()
~=
2
then
return
end
local
tc
=
g
:
GetFirst
()
local
c
=
e
:
GetHandler
()
while
tc
do
...
...
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