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
YGOPRO-520DIY
ygopro
Commits
940734a9
Commit
940734a9
authored
Jul 23, 2012
by
argon.sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
2c08fc78
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
14 deletions
+21
-14
gframe/game.cpp
gframe/game.cpp
+1
-1
ocgcore/libduel.cpp
ocgcore/libduel.cpp
+8
-5
ocgcore/processor.cpp
ocgcore/processor.cpp
+2
-2
script/c24096228.lua
script/c24096228.lua
+1
-1
script/c5990062.lua
script/c5990062.lua
+8
-4
script/c76891401.lua
script/c76891401.lua
+1
-1
No files found.
gframe/game.cpp
View file @
940734a9
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
#include <dirent.h>
#include <dirent.h>
#endif
#endif
const
unsigned
short
PRO_VERSION
=
0x12b
0
;
const
unsigned
short
PRO_VERSION
=
0x12b
1
;
namespace
ygo
{
namespace
ygo
{
...
...
ocgcore/libduel.cpp
View file @
940734a9
...
@@ -1912,7 +1912,7 @@ int32 scriptlib::duel_select_target(lua_State *L) {
...
@@ -1912,7 +1912,7 @@ int32 scriptlib::duel_select_target(lua_State *L) {
group* pgroup = pduel->new_group();
group* pgroup = pduel->new_group();
pduel->game_field->core.select_cards.clear();
pduel->game_field->core.select_cards.clear();
pduel->game_field->filter_matching_card(2, (uint8)self, location1, location2, pgroup, pexception, extraargs, 0, 0, TRUE);
pduel->game_field->filter_matching_card(2, (uint8)self, location1, location2, pgroup, pexception, extraargs, 0, 0, TRUE);
for
(
field
::
card_set
::
iterator
cit
=
pgroup
->
container
.
begin
();
cit
!=
pgroup
->
container
.
end
();
++
cit
)
for(
auto
cit = pgroup->container.begin(); cit != pgroup->container.end(); ++cit)
pduel->game_field->core.select_cards.push_back(*cit);
pduel->game_field->core.select_cards.push_back(*cit);
pduel->game_field->add_process(PROCESSOR_SELECT_TARGET, 0, 0, 0, playerid, min + (max << 16));
pduel->game_field->add_process(PROCESSOR_SELECT_TARGET, 0, 0, 0, playerid, min + (max << 16));
return lua_yield(L, 0);
return lua_yield(L, 0);
...
@@ -2078,12 +2078,15 @@ int32 scriptlib::duel_set_target_card(lua_State *L) {
...
@@ -2078,12 +2078,15 @@ int32 scriptlib::duel_set_target_card(lua_State *L) {
pduel->game_field->core.current_chain.rbegin()->target_cards->is_readonly = TRUE;
pduel->game_field->core.current_chain.rbegin()->target_cards->is_readonly = TRUE;
}
}
group* targets = pduel->game_field->core.current_chain.rbegin()->target_cards;
group* targets = pduel->game_field->core.current_chain.rbegin()->target_cards;
if
(
pcard
)
if(pcard)
{
targets->container.insert(pcard);
targets->container.insert(pcard);
else
pcard->create_relation(peffect);
} else {
targets->container.insert(pgroup->container.begin(), pgroup->container.end());
targets->container.insert(pgroup->container.begin(), pgroup->container.end());
for(auto cit = pgroup->container.begin(); cit != pgroup->container.end(); ++cit)
(*cit)->create_relation(peffect);
}
if(peffect->flag & EFFECT_FLAG_CARD_TARGET) {
if(peffect->flag & EFFECT_FLAG_CARD_TARGET) {
group
::
card_set
::
iterator
cit
;
if(pcard) {
if(pcard) {
if(pcard->current.location & 0x30)
if(pcard->current.location & 0x30)
pduel->game_field->move_card(pcard->current.controler, pcard, pcard->current.location, 0);
pduel->game_field->move_card(pcard->current.controler, pcard, pcard->current.location, 0);
...
@@ -2091,7 +2094,7 @@ int32 scriptlib::duel_set_target_card(lua_State *L) {
...
@@ -2091,7 +2094,7 @@ int32 scriptlib::duel_set_target_card(lua_State *L) {
pduel->write_buffer8(1);
pduel->write_buffer8(1);
pduel->write_buffer32(pcard->get_info_location());
pduel->write_buffer32(pcard->get_info_location());
} else {
} else {
for
(
cit
=
pgroup
->
container
.
begin
();
cit
!=
pgroup
->
container
.
end
();
++
cit
)
{
for(
auto
cit = pgroup->container.begin(); cit != pgroup->container.end(); ++cit) {
if((*cit)->current.location & 0x30)
if((*cit)->current.location & 0x30)
pduel->game_field->move_card((*cit)->current.controler, (*cit), (*cit)->current.location, 0);
pduel->game_field->move_card((*cit)->current.controler, (*cit), (*cit)->current.location, 0);
pduel->write_buffer8(MSG_BECOME_TARGET);
pduel->write_buffer8(MSG_BECOME_TARGET);
...
...
ocgcore/processor.cpp
View file @
940734a9
...
@@ -692,6 +692,8 @@ int32 field::process() {
...
@@ -692,6 +692,8 @@ int32 field::process() {
pduel
->
write_buffer32
(
core
.
select_cards
[
returns
.
bvalue
[
i
+
1
]]
->
get_info_location
());
pduel
->
write_buffer32
(
core
.
select_cards
[
returns
.
bvalue
[
i
+
1
]]
->
get_info_location
());
}
}
}
}
for
(
auto
cit
=
pret
->
container
.
begin
();
cit
!=
pret
->
container
.
end
();
++
cit
)
(
*
cit
)
->
create_relation
(
peffect
);
pduel
->
lua
->
add_param
(
pret
,
PARAM_TYPE_GROUP
);
pduel
->
lua
->
add_param
(
pret
,
PARAM_TYPE_GROUP
);
}
}
core
.
units
.
pop_front
();
core
.
units
.
pop_front
();
...
@@ -3933,8 +3935,6 @@ int32 field::add_chain(uint16 step) {
...
@@ -3933,8 +3935,6 @@ int32 field::add_chain(uint16 step) {
effect
*
peffect
=
clit
->
triggering_effect
;
effect
*
peffect
=
clit
->
triggering_effect
;
card_set
::
iterator
cit
;
card_set
::
iterator
cit
;
if
(
clit
->
target_cards
&&
clit
->
target_cards
->
container
.
size
())
{
if
(
clit
->
target_cards
&&
clit
->
target_cards
->
container
.
size
())
{
for
(
cit
=
clit
->
target_cards
->
container
.
begin
();
cit
!=
clit
->
target_cards
->
container
.
end
();
++
cit
)
(
*
cit
)
->
create_relation
(
clit
->
triggering_effect
);
if
(
clit
->
triggering_effect
->
flag
&
EFFECT_FLAG_CARD_TARGET
)
{
if
(
clit
->
triggering_effect
->
flag
&
EFFECT_FLAG_CARD_TARGET
)
{
for
(
cit
=
clit
->
target_cards
->
container
.
begin
();
cit
!=
clit
->
target_cards
->
container
.
end
();
++
cit
)
for
(
cit
=
clit
->
target_cards
->
container
.
begin
();
cit
!=
clit
->
target_cards
->
container
.
end
();
++
cit
)
raise_single_event
(
*
cit
,
0
,
EVENT_BECOME_TARGET
,
clit
->
triggering_effect
,
0
,
clit
->
triggering_player
,
0
,
clit
->
chain_count
);
raise_single_event
(
*
cit
,
0
,
EVENT_BECOME_TARGET
,
clit
->
triggering_effect
,
0
,
clit
->
triggering_player
,
0
,
clit
->
chain_count
);
...
...
script/c24096228.lua
View file @
940734a9
...
@@ -13,7 +13,7 @@ function c24096228.cfilter(c)
...
@@ -13,7 +13,7 @@ function c24096228.cfilter(c)
return
c
:
IsDiscardable
()
and
c
:
IsType
(
TYPE_SPELL
)
return
c
:
IsDiscardable
()
and
c
:
IsType
(
TYPE_SPELL
)
end
end
function
c24096228
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c24096228
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c24096228
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c24096228
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
e
:
GetHandler
()
)
end
Duel
.
DiscardHand
(
tp
,
c24096228
.
cfilter
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
)
Duel
.
DiscardHand
(
tp
,
c24096228
.
cfilter
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
)
end
end
function
c24096228
.
filter1
(
c
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c24096228
.
filter1
(
c
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c5990062.lua
View file @
940734a9
...
@@ -12,10 +12,14 @@ function c5990062.cfilter(c)
...
@@ -12,10 +12,14 @@ function c5990062.cfilter(c)
return
not
c
:
IsAbleToGraveAsCost
()
return
not
c
:
IsAbleToGraveAsCost
()
end
end
function
c5990062
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c5990062
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_ONFIELD
+
LOCATION_HAND
,
0
)
local
g1
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_ONFIELD
,
0
)
g
:
RemoveCard
(
e
:
GetHandler
())
local
g2
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_HAND
,
0
)
if
chk
==
0
then
return
g
:
GetCount
()
>
0
and
not
g
:
IsExists
(
c5990062
.
cfilter
,
1
,
nil
)
end
g1
:
RemoveCard
(
e
:
GetHandler
())
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
g2
:
RemoveCard
(
e
:
GetHandler
())
if
chk
==
0
then
return
g1
:
GetCount
()
>
0
and
not
g1
:
IsExists
(
c5990062
.
cfilter
,
1
,
nil
)
and
g2
:
GetCount
()
>
0
and
not
g2
:
IsExists
(
c5990062
.
cfilter
,
1
,
nil
)
end
g1
:
Merge
(
g2
)
Duel
.
SendtoGrave
(
g1
,
REASON_COST
)
end
end
function
c5990062
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c5990062
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
1
)
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
1
)
...
...
script/c76891401.lua
View file @
940734a9
...
@@ -18,7 +18,7 @@ function c76891401.synfilter(c)
...
@@ -18,7 +18,7 @@ function c76891401.synfilter(c)
return
c
:
GetLevel
()
==
3
return
c
:
GetLevel
()
==
3
end
end
function
c76891401
.
filter
(
c
)
function
c76891401
.
filter
(
c
)
if
c
:
GetLevel
()
~=
3
then
return
false
end
if
not
c
:
IsLevelBelow
(
3
)
then
return
false
end
local
loc
=
c
:
GetPreviousLocation
()
local
loc
=
c
:
GetPreviousLocation
()
if
not
(
bit
.
band
(
loc
,
LOCATION_ONFIELD
)
>
0
)
then
return
false
end
if
not
(
bit
.
band
(
loc
,
LOCATION_ONFIELD
)
>
0
)
then
return
false
end
local
pos
=
c
:
GetPreviousPosition
()
local
pos
=
c
:
GetPreviousPosition
()
...
...
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