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
334b53fe
Commit
334b53fe
authored
Jul 21, 2017
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
for 7210
parent
4970601e
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
5 additions
and
213 deletions
+5
-213
appveyor.yml
appveyor.yml
+1
-1
gframe/single_duel.cpp
gframe/single_duel.cpp
+1
-4
gframe/tag_duel.cpp
gframe/tag_duel.cpp
+1
-4
ocgcore/card.cpp
ocgcore/card.cpp
+0
-9
ocgcore/card.h
ocgcore/card.h
+0
-3
ocgcore/interpreter.cpp
ocgcore/interpreter.cpp
+0
-14
ocgcore/libcard.cpp
ocgcore/libcard.cpp
+0
-39
ocgcore/libdebug.cpp
ocgcore/libdebug.cpp
+2
-8
ocgcore/libduel.cpp
ocgcore/libduel.cpp
+0
-112
ocgcore/libeffect.cpp
ocgcore/libeffect.cpp
+0
-10
ocgcore/scriptlib.h
ocgcore/scriptlib.h
+0
-9
No files found.
appveyor.yml
View file @
334b53fe
...
@@ -42,7 +42,7 @@ test: off
...
@@ -42,7 +42,7 @@ test: off
artifacts
:
artifacts
:
-
path
:
ygopro.exe
-
path
:
ygopro.exe
name
:
ygopro
(server)
name
:
ygopro
server build
cache
:
cache
:
-
premake-5.0.0-alpha10-windows.zip
-
premake-5.0.0-alpha10-windows.zip
...
...
gframe/single_duel.cpp
View file @
334b53fe
...
@@ -679,10 +679,7 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) {
...
@@ -679,10 +679,7 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) {
NetServer
::
ReSendToPlayer
(
*
oit
);
NetServer
::
ReSendToPlayer
(
*
oit
);
break
;
break
;
}
}
case
10
:
case
10
:
{
//modded
case
11
:
case
12
:
{
NetServer
::
SendBufferToPlayer
(
players
[
0
],
STOC_GAME_MSG
,
offset
,
pbuf
-
offset
);
NetServer
::
SendBufferToPlayer
(
players
[
0
],
STOC_GAME_MSG
,
offset
,
pbuf
-
offset
);
NetServer
::
SendBufferToPlayer
(
players
[
1
],
STOC_GAME_MSG
,
offset
,
pbuf
-
offset
);
NetServer
::
SendBufferToPlayer
(
players
[
1
],
STOC_GAME_MSG
,
offset
,
pbuf
-
offset
);
for
(
auto
oit
=
observers
.
begin
();
oit
!=
observers
.
end
();
++
oit
)
for
(
auto
oit
=
observers
.
begin
();
oit
!=
observers
.
end
();
++
oit
)
...
...
gframe/tag_duel.cpp
View file @
334b53fe
...
@@ -600,10 +600,7 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) {
...
@@ -600,10 +600,7 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) {
case
2
:
case
2
:
case
3
:
case
3
:
case
5
:
case
5
:
case
10
:
case
10
:
{
//modded
case
11
:
case
12
:
{
NetServer
::
SendBufferToPlayer
(
cur_player
[
player
],
STOC_GAME_MSG
,
offset
,
pbuf
-
offset
);
NetServer
::
SendBufferToPlayer
(
cur_player
[
player
],
STOC_GAME_MSG
,
offset
,
pbuf
-
offset
);
break
;
break
;
}
}
...
...
ocgcore/card.cpp
View file @
334b53fe
...
@@ -16,15 +16,6 @@
...
@@ -16,15 +16,6 @@
#include <iostream>
#include <iostream>
#include <algorithm>
#include <algorithm>
//222DIY
uint32
card
::
set_entity_code
(
uint32
entity_code
)
{
card_data
dat
;
::
read_card
(
entity_code
,
&
dat
);
uint32
code
=
data
.
code
;
data
=
dat
;
return
code
;
}
bool
card_sort
::
operator
()(
void
*
const
&
p1
,
void
*
const
&
p2
)
const
{
bool
card_sort
::
operator
()(
void
*
const
&
p1
,
void
*
const
&
p2
)
const
{
card
*
c1
=
(
card
*
)
p1
;
card
*
c1
=
(
card
*
)
p1
;
card
*
c2
=
(
card
*
)
p2
;
card
*
c2
=
(
card
*
)
p2
;
...
...
ocgcore/card.h
View file @
334b53fe
...
@@ -104,9 +104,6 @@ public:
...
@@ -104,9 +104,6 @@ public:
public:
public:
void
addcard
(
card
*
pcard
);
void
addcard
(
card
*
pcard
);
};
};
//222DIY
uint32
set_entity_code
(
uint32
entity_code
);
int32
scrtype
;
int32
scrtype
;
int32
ref_handle
;
int32
ref_handle
;
duel
*
pduel
;
duel
*
pduel
;
...
...
ocgcore/interpreter.cpp
View file @
334b53fe
...
@@ -16,11 +16,6 @@
...
@@ -16,11 +16,6 @@
#include "interpreter.h"
#include "interpreter.h"
static
const
struct
luaL_Reg
cardlib
[]
=
{
static
const
struct
luaL_Reg
cardlib
[]
=
{
//222DIY
{
"GetAffectingEffect"
,
scriptlib
::
card_get_affecting_effect
},
{
"FilterEffect"
,
scriptlib
::
card_filter_effect
},
{
"SetEntityCode"
,
scriptlib
::
card_set_entity_code
},
{
"GetCode"
,
scriptlib
::
card_get_code
},
{
"GetCode"
,
scriptlib
::
card_get_code
},
{
"GetOriginalCode"
,
scriptlib
::
card_get_origin_code
},
{
"GetOriginalCode"
,
scriptlib
::
card_get_origin_code
},
{
"GetOriginalCodeRule"
,
scriptlib
::
card_get_origin_code_rule
},
{
"GetOriginalCodeRule"
,
scriptlib
::
card_get_origin_code_rule
},
...
@@ -251,9 +246,6 @@ static const struct luaL_Reg cardlib[] = {
...
@@ -251,9 +246,6 @@ static const struct luaL_Reg cardlib[] = {
};
};
static
const
struct
luaL_Reg
effectlib
[]
=
{
static
const
struct
luaL_Reg
effectlib
[]
=
{
//222DIY
{
"SetOwner"
,
scriptlib
::
effect_set_owner
},
{
"CreateEffect"
,
scriptlib
::
effect_new
},
{
"CreateEffect"
,
scriptlib
::
effect_new
},
{
"GlobalEffect"
,
scriptlib
::
effect_newex
},
{
"GlobalEffect"
,
scriptlib
::
effect_newex
},
{
"Clone"
,
scriptlib
::
effect_clone
},
{
"Clone"
,
scriptlib
::
effect_clone
},
...
@@ -342,12 +334,6 @@ static const struct luaL_Reg grouplib[] = {
...
@@ -342,12 +334,6 @@ static const struct luaL_Reg grouplib[] = {
};
};
static
const
struct
luaL_Reg
duellib
[]
=
{
static
const
struct
luaL_Reg
duellib
[]
=
{
//222DIY
{
"SelectField"
,
scriptlib
::
duel_select_field
},
{
"GetMasterRule"
,
scriptlib
::
duel_get_master_rule
},
{
"FilterPlayerEffect"
,
scriptlib
::
duel_filter_player_effect
},
{
"ReadCard"
,
scriptlib
::
duel_read_card
},
{
"EnableGlobalFlag"
,
scriptlib
::
duel_enable_global_flag
},
{
"EnableGlobalFlag"
,
scriptlib
::
duel_enable_global_flag
},
{
"GetLP"
,
scriptlib
::
duel_get_lp
},
{
"GetLP"
,
scriptlib
::
duel_get_lp
},
{
"SetLP"
,
scriptlib
::
duel_set_lp
},
{
"SetLP"
,
scriptlib
::
duel_set_lp
},
...
...
ocgcore/libcard.cpp
View file @
334b53fe
...
@@ -13,45 +13,6 @@
...
@@ -13,45 +13,6 @@
#include "group.h"
#include "group.h"
#include <iostream>
#include <iostream>
//222DIY functions
int32
scriptlib
::
card_get_affecting_effect
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
uint32
code
=
lua_tointeger
(
L
,
2
);
effect
*
peffect
=
pcard
->
is_affected_by_effect
(
code
,
pcard
);
interpreter
::
effect2value
(
L
,
peffect
);
return
1
;
}
int32
scriptlib
::
card_filter_effect
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
uint32
code
=
lua_tointeger
(
L
,
2
);
int32
sort
=
lua_toboolean
(
L
,
3
);
effect_set
eset
;
if
(
sort
||
(
lua_gettop
(
L
)
<
3
))
pcard
->
filter_effect
(
code
,
&
eset
,
TRUE
);
else
pcard
->
filter_effect
(
code
,
&
eset
,
FALSE
);
if
(
eset
.
size
()
<=
0
)
return
0
;
int32
count
=
0
;
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
interpreter
::
effect2value
(
L
,
eset
[
i
]);
count
=
count
+
1
;
}
return
count
;
}
int32
scriptlib
::
card_set_entity_code
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
uint32
trace
=
lua_tointeger
(
L
,
2
);
lua_pushinteger
(
L
,
pcard
->
set_entity_code
(
trace
));
return
1
;
}
int32
scriptlib
::
card_get_code
(
lua_State
*
L
)
{
int32
scriptlib
::
card_get_code
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
...
...
ocgcore/libdebug.cpp
View file @
334b53fe
...
@@ -22,7 +22,6 @@ int32 scriptlib::debug_message(lua_State *L) {
...
@@ -22,7 +22,6 @@ int32 scriptlib::debug_message(lua_State *L) {
handle_message
(
pduel
,
2
);
handle_message
(
pduel
,
2
);
return
0
;
return
0
;
}
}
//222DIY modded
int32
scriptlib
::
debug_add_card
(
lua_State
*
L
)
{
int32
scriptlib
::
debug_add_card
(
lua_State
*
L
)
{
check_param_count
(
L
,
6
);
check_param_count
(
L
,
6
);
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
...
@@ -41,14 +40,9 @@ int32 scriptlib::debug_add_card(lua_State *L) {
...
@@ -41,14 +40,9 @@ int32 scriptlib::debug_add_card(lua_State *L) {
card
*
pcard
=
pduel
->
new_card
(
code
);
card
*
pcard
=
pduel
->
new_card
(
code
);
pcard
->
owner
=
owner
;
pcard
->
owner
=
owner
;
pcard
->
operation_param
=
position
<<
24
;
pcard
->
operation_param
=
position
<<
24
;
if
(
location
==
LOCATION_PZONE
)
{
int32
seq
=
(
pduel
->
game_field
->
core
.
duel_rule
>=
4
)
?
(
sequence
*
4
)
:
(
6
+
sequence
);
pduel
->
game_field
->
add_card
(
playerid
,
pcard
,
LOCATION_SZONE
,
seq
,
true
);
}
else
pduel
->
game_field
->
add_card
(
playerid
,
pcard
,
location
,
sequence
);
pduel
->
game_field
->
add_card
(
playerid
,
pcard
,
location
,
sequence
);
pcard
->
current
.
position
=
position
;
pcard
->
current
.
position
=
position
;
if
(
!
(
location
&
(
LOCATION_ONFIELD
+
LOCATION_PZONE
)
)
||
(
position
&
POS_FACEUP
))
{
if
(
!
(
location
&
LOCATION_ONFIELD
)
||
(
position
&
POS_FACEUP
))
{
pcard
->
enable_field_effect
(
true
);
pcard
->
enable_field_effect
(
true
);
pduel
->
game_field
->
adjust_instant
();
pduel
->
game_field
->
adjust_instant
();
}
}
...
...
ocgcore/libduel.cpp
View file @
334b53fe
...
@@ -12,118 +12,6 @@
...
@@ -12,118 +12,6 @@
#include "effect.h"
#include "effect.h"
#include "group.h"
#include "group.h"
#include "ocgapi.h"
#include "ocgapi.h"
//222DIY
int32
scriptlib
::
duel_select_field
(
lua_State
*
L
)
{
check_action_permission
(
L
);
check_param_count
(
L
,
4
);
int32
playerid
=
lua_tointeger
(
L
,
1
);
if
(
playerid
!=
0
&&
playerid
!=
1
)
return
0
;
uint32
flag1
=
lua_tointeger
(
L
,
2
);
uint32
flag2
=
lua_tointeger
(
L
,
3
);
uint32
count
=
lua_tointeger
(
L
,
4
);
if
(
count
==
0
)
return
0
;
uint32
flag
=
(
flag1
&
0xffff
)
|
(
flag2
<<
16
);
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
if
(
pduel
->
game_field
->
core
.
duel_rule
>=
4
)
{
flag
=
(
flag
|
(
0xffffffff
-
0x3f7f3f7f
));
card
*
pcard_1
=
pduel
->
game_field
->
get_field_card
(
1
-
playerid
,
LOCATION_MZONE
,
6
);
card
*
pcard_2
=
pduel
->
game_field
->
get_field_card
(
1
-
playerid
,
LOCATION_MZONE
,
5
);
if
(
pcard_1
&&
pcard_2
)
{
flag
=
(
flag
|
(
0xffffffff
-
0xff7fff1f
));
}
else
if
(
!
pcard_1
&&
pcard_2
)
{
flag
=
(
flag
|
(
0xffffffff
-
0xff5fff3f
));
}
else
if
(
pcard_1
&&
!
pcard_2
)
{
flag
=
(
flag
|
(
0xffffffff
-
0xff3fff5f
));
}
else
{
flag
=
(
flag
|
(
0xffffffff
-
0xff1fff7f
));
}
}
else
{
flag
=
(
flag
|
(
0xffffffff
-
0xff1fff1f
));
}
pduel
->
game_field
->
add_process
(
PROCESSOR_SELECT_DISFIELD_S
,
0
,
0
,
0
,
playerid
,
flag
,
count
);
return
lua_yield
(
L
,
0
);
}
int32
scriptlib
::
duel_get_master_rule
(
lua_State
*
L
)
{
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
lua_pushinteger
(
L
,
pduel
->
game_field
->
core
.
duel_rule
);
return
1
;
}
int32
scriptlib
::
duel_filter_player_effect
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
int32
playerid
=
lua_tointeger
(
L
,
1
);
if
(
playerid
!=
0
&&
playerid
!=
1
)
{
lua_pushnil
(
L
);
return
1
;
}
int32
code
=
lua_tointeger
(
L
,
2
);
effect_set
eset
;
pduel
->
game_field
->
filter_player_effect
(
playerid
,
code
,
&
eset
);
if
(
eset
.
size
()
<=
0
)
return
0
;
int32
count
=
0
;
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
interpreter
::
effect2value
(
L
,
eset
[
i
]);
count
=
count
+
1
;
}
return
count
;
}
int32
scriptlib
::
duel_read_card
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
int32
code
=
lua_tointeger
(
L
,
1
);
card_data
dat
;
::
read_card
(
code
,
&
dat
);
if
(
!
dat
.
code
)
return
0
;
uint32
args
=
lua_gettop
(
L
)
-
1
;
for
(
uint32
i
=
0
;
i
<
args
;
++
i
)
{
int32
flag
=
lua_tointeger
(
L
,
2
+
i
);
switch
(
flag
)
{
case
1
:
lua_pushinteger
(
L
,
dat
.
code
);
break
;
case
2
:
lua_pushinteger
(
L
,
dat
.
alias
);
break
;
case
3
:
lua_pushinteger
(
L
,
dat
.
setcode
);
break
;
case
4
:
lua_pushinteger
(
L
,
dat
.
type
);
break
;
case
5
:
lua_pushinteger
(
L
,
dat
.
level
);
break
;
case
6
:
lua_pushinteger
(
L
,
dat
.
attribute
);
break
;
case
7
:
lua_pushinteger
(
L
,
dat
.
race
);
break
;
case
8
:
lua_pushinteger
(
L
,
dat
.
attack
);
break
;
case
9
:
lua_pushinteger
(
L
,
dat
.
defense
);
break
;
case
10
:
lua_pushinteger
(
L
,
dat
.
lscale
);
break
;
case
11
:
lua_pushinteger
(
L
,
dat
.
rscale
);
break
;
case
12
:
lua_pushinteger
(
L
,
dat
.
link_marker
);
break
;
default:
lua_pushinteger
(
L
,
0
);
break
;
}
}
return
args
;
}
int32
scriptlib
::
duel_enable_global_flag
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_enable_global_flag
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param_count
(
L
,
1
);
...
...
ocgcore/libeffect.cpp
View file @
334b53fe
...
@@ -10,16 +10,6 @@
...
@@ -10,16 +10,6 @@
#include "field.h"
#include "field.h"
#include "card.h"
#include "card.h"
#include "effect.h"
#include "effect.h"
//222DIY
int32
scriptlib
::
effect_set_owner
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_EFFECT
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
2
);
effect
*
peffect
=
*
(
effect
**
)
lua_touserdata
(
L
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
2
);
peffect
->
owner
=
pcard
;
return
0
;
}
int32
scriptlib
::
effect_new
(
lua_State
*
L
)
{
int32
scriptlib
::
effect_new
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param_count
(
L
,
1
);
...
...
ocgcore/scriptlib.h
View file @
334b53fe
...
@@ -16,15 +16,6 @@ public:
...
@@ -16,15 +16,6 @@ public:
static
int32
check_param
(
lua_State
*
L
,
int32
param_type
,
int32
index
,
BOOL
retfalse
=
FALSE
);
static
int32
check_param
(
lua_State
*
L
,
int32
param_type
,
int32
index
,
BOOL
retfalse
=
FALSE
);
static
int32
check_param_count
(
lua_State
*
L
,
int32
count
);
static
int32
check_param_count
(
lua_State
*
L
,
int32
count
);
static
int32
check_action_permission
(
lua_State
*
L
);
static
int32
check_action_permission
(
lua_State
*
L
);
//222DIY
static
int32
card_get_affecting_effect
(
lua_State
*
L
);
static
int32
card_set_entity_code
(
lua_State
*
L
);
static
int32
card_filter_effect
(
lua_State
*
L
);
static
int32
effect_set_owner
(
lua_State
*
L
);
static
int32
duel_select_field
(
lua_State
*
L
);
static
int32
duel_get_master_rule
(
lua_State
*
L
);
static
int32
duel_filter_player_effect
(
lua_State
*
L
);
static
int32
duel_read_card
(
lua_State
*
L
);
//card lib
//card lib
static
int32
card_get_code
(
lua_State
*
L
);
static
int32
card_get_code
(
lua_State
*
L
);
...
...
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