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
badb28d4
Commit
badb28d4
authored
Dec 02, 2017
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update_core
parent
fa5cacb4
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
48 additions
and
17 deletions
+48
-17
ocgcore/card.cpp
ocgcore/card.cpp
+3
-3
ocgcore/card.h
ocgcore/card.h
+2
-2
ocgcore/interpreter.cpp
ocgcore/interpreter.cpp
+4
-4
ocgcore/interpreter.h
ocgcore/interpreter.h
+1
-1
ocgcore/libcard.cpp
ocgcore/libcard.cpp
+2
-2
ocgcore/libduel.cpp
ocgcore/libduel.cpp
+14
-2
ocgcore/libeffect.cpp
ocgcore/libeffect.cpp
+1
-1
ocgcore/libgroup.cpp
ocgcore/libgroup.cpp
+19
-0
ocgcore/scriptlib.cpp
ocgcore/scriptlib.cpp
+1
-1
ocgcore/scriptlib.h
ocgcore/scriptlib.h
+1
-1
No files found.
ocgcore/card.cpp
View file @
badb28d4
...
...
@@ -22,7 +22,7 @@ uint32 card::get_ritual_type() {
return
data
.
type
;
return
get_type
();
}
//
222DIY
//
modded
uint32
card
::
set_entity_code
(
uint32
entity_code
,
bool
remove_alias
)
{
card_data
dat
;
::
read_card
(
entity_code
,
&
dat
);
...
...
@@ -917,7 +917,7 @@ uint32 card::get_rank() {
return
0
;
if
(
assume_type
==
ASSUME_RANK
)
return
assume_value
;
//
222DIY
modded from ygocc
//modded from ygocc
//if(!(current.location & LOCATION_MZONE))
// return data.level;
if
(
temp
.
level
!=
0xffffffff
)
...
...
@@ -1129,7 +1129,7 @@ uint32 card::get_rscale() {
temp
.
rscale
=
0xffffffff
;
return
rscale
;
}
//
222DIY
modded by Flandre
//modded by Flandre
uint32
card
::
get_link_marker
()
{
if
(
!
(
data
.
type
&
TYPE_LINK
))
return
0
;
...
...
ocgcore/card.h
View file @
badb28d4
...
...
@@ -107,7 +107,7 @@ public:
//millux
uint32
get_ritual_type
();
//
222DIY
//
modded
uint32
set_entity_code
(
uint32
entity_code
,
bool
remove_alias
=
false
);
struct
sendto_param_t
{
...
...
@@ -502,7 +502,7 @@ public:
#define STATUS_OPPO_BATTLE 0x10000000
#define STATUS_FLIP_SUMMON_TURN 0x20000000
#define STATUS_SPSUMMON_TURN 0x40000000
//
222DIY
//
modded
#define STATUS_TO_LEAVE_FROMEX 0x80000000
//Counter
#define COUNTER_WITHOUT_PERMIT 0x1000
...
...
ocgcore/interpreter.cpp
View file @
badb28d4
...
...
@@ -18,7 +18,7 @@
static
const
struct
luaL_Reg
cardlib
[]
=
{
//millux
{
"IsRitualType"
,
scriptlib
::
card_is_ritual_type
},
//
222DIY
//
modded
{
"SetEntityCode"
,
scriptlib
::
card_set_entity_code
},
{
"SetCardData"
,
scriptlib
::
card_set_card_data
},
...
...
@@ -266,7 +266,7 @@ static const struct luaL_Reg cardlib[] = {
};
static
const
struct
luaL_Reg
effectlib
[]
=
{
//
222DIY
//
modded
{
"SetOwner"
,
scriptlib
::
effect_set_owner
},
{
"GetRange"
,
scriptlib
::
effect_get_range
},
{
"GetCountLimit"
,
scriptlib
::
effect_get_count_limit
},
...
...
@@ -360,7 +360,7 @@ static const struct luaL_Reg grouplib[] = {
};
static
const
struct
luaL_Reg
duellib
[]
=
{
//
222DIY
//
modded
{
"SelectField"
,
scriptlib
::
duel_select_field
},
{
"GetMasterRule"
,
scriptlib
::
duel_get_master_rule
},
{
"ReadCard"
,
scriptlib
::
duel_read_card
},
...
...
@@ -595,7 +595,7 @@ interpreter::interpreter(duel* pd): coroutines(256) {
pduel
=
pd
;
no_action
=
0
;
call_depth
=
0
;
//
222DIY
//
modded
disable_action_check
=
0
;
set_duel_info
(
lua_state
,
pd
);
...
...
ocgcore/interpreter.h
View file @
badb28d4
...
...
@@ -44,7 +44,7 @@ public:
coroutine_map
coroutines
;
int32
no_action
;
int32
call_depth
;
//
222DIY
//
modded
int32
disable_action_check
;
explicit
interpreter
(
duel
*
pd
);
...
...
ocgcore/libcard.cpp
View file @
badb28d4
...
...
@@ -13,7 +13,7 @@
#include "group.h"
#include <iostream>
//millux
//m
odded by m
illux
int32
scriptlib
::
card_is_ritual_type
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
...
...
@@ -25,7 +25,7 @@ int32 scriptlib::card_is_ritual_type(lua_State *L) {
lua_pushboolean
(
L
,
0
);
return
1
;
}
//
222DIY
functions
//
modded
functions
int32
scriptlib
::
card_set_entity_code
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
...
...
ocgcore/libduel.cpp
View file @
badb28d4
...
...
@@ -13,7 +13,7 @@
#include "group.h"
#include "ocgapi.h"
//
222DIY
//
modded
int32
scriptlib
::
duel_select_field
(
lua_State
*
L
)
{
check_action_permission
(
L
);
check_param_count
(
L
,
4
);
...
...
@@ -1739,7 +1739,7 @@ int32 scriptlib::duel_get_location_count(lua_State *L) {
lua_pushinteger
(
L
,
pduel
->
game_field
->
get_useable_count
(
playerid
,
location
,
uplayer
,
reason
,
zone
));
return
1
;
}
//
222DIY
modded by Flandre
//modded by Flandre
int32
scriptlib
::
duel_get_mzone_count
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
uint32
playerid
=
lua_tonumberint
(
L
,
1
);
...
...
@@ -3200,6 +3200,7 @@ int32 scriptlib::duel_select_position(lua_State * L) {
pduel
->
game_field
->
add_process
(
PROCESSOR_SELECT_POSITION_S
,
0
,
0
,
0
,
playerid
+
(
positions
<<
16
),
pcard
->
data
.
code
);
return
lua_yield
(
L
,
0
);
}
//modded
int32
scriptlib
::
duel_select_disable_field
(
lua_State
*
L
)
{
check_action_permission
(
L
);
check_param_count
(
L
,
5
);
...
...
@@ -3229,6 +3230,17 @@ int32 scriptlib::duel_select_disable_field(lua_State * L) {
flag
=
(
flag
&
0xffffff
)
|
(
plist
<<
24
);
}
flag
|=
filter
|
0xe0e0e0e0
;
int32
allow_exzone
=
lua_toboolean
(
L
,
6
);
if
(
allow_exzone
&&
pduel
->
game_field
->
core
.
duel_rule
>=
4
)
{
if
(
pduel
->
game_field
->
is_location_useable
(
playerid
,
LOCATION_MZONE
,
5
))
{
ct1
=
ct1
+
1
;
flag
=
flag
-
(
flag
&
0x20
);
}
if
(
pduel
->
game_field
->
is_location_useable
(
playerid
,
LOCATION_MZONE
,
6
))
{
ct1
=
ct1
+
1
;
flag
=
flag
-
(
flag
&
0x40
);
}
}
if
(
count
>
ct1
+
ct2
+
ct3
+
ct4
)
count
=
ct1
+
ct2
+
ct3
+
ct4
;
if
(
count
==
0
)
...
...
ocgcore/libeffect.cpp
View file @
badb28d4
...
...
@@ -10,7 +10,7 @@
#include "field.h"
#include "card.h"
#include "effect.h"
//
222DIY
//
modded
int32
scriptlib
::
effect_set_owner
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_EFFECT
,
1
);
...
...
ocgcore/libgroup.cpp
View file @
badb28d4
...
...
@@ -295,12 +295,31 @@ int32 scriptlib::group_select_unselect(lua_State *L) {
pduel
->
game_field
->
add_process
(
PROCESSOR_SELECT_UNSELECT_CARD_S
,
0
,
0
,
0
,
playerid
+
(
cancelable
<<
16
),
min
+
(
max
<<
16
),
buttonok
);
return
lua_yield
(
L
,
0
);
}
//modded
int32
scriptlib
::
group_random_select
(
lua_State
*
L
)
{
check_param_count
(
L
,
3
);
check_param
(
L
,
PARAM_TYPE_GROUP
,
1
);
group
*
pgroup
=
*
(
group
**
)
lua_touserdata
(
L
,
1
);
int32
playerid
=
lua_tonumberint
(
L
,
2
);
int32
count
=
lua_tonumberint
(
L
,
3
);
int32
no_hint
=
lua_toboolean
(
L
,
4
);
if
(
no_hint
)
{
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
group
*
newgroup
=
pduel
->
new_group
();
if
(
count
==
pgroup
->
container
.
size
())
newgroup
->
container
=
pgroup
->
container
;
else
{
while
(
newgroup
->
container
.
size
()
<
count
)
{
int32
i
=
pduel
->
get_next_integer
(
0
,
pgroup
->
container
.
size
()
-
1
);
auto
cit
=
pgroup
->
container
.
begin
();
std
::
advance
(
cit
,
i
);
newgroup
->
container
.
insert
(
*
cit
);
}
}
interpreter
::
group2value
(
L
,
newgroup
);
return
1
;
}
pgroup
->
pduel
->
game_field
->
add_process
(
PROCESSOR_RANDOM_SELECT_S
,
0
,
0
,
pgroup
,
playerid
,
count
);
return
lua_yield
(
L
,
0
);
}
...
...
ocgcore/scriptlib.cpp
View file @
badb28d4
...
...
@@ -63,7 +63,7 @@ int32 scriptlib::check_param_count(lua_State* L, int32 count) {
luaL_error
(
L
,
"%d Parameters are needed."
,
count
);
return
TRUE
;
}
//
222DIY
//
modded
int32
scriptlib
::
check_action_permission
(
lua_State
*
L
)
{
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
if
(
pduel
->
lua
->
no_action
&&
!
pduel
->
lua
->
disable_action_check
)
...
...
ocgcore/scriptlib.h
View file @
badb28d4
...
...
@@ -18,7 +18,7 @@ public:
static
int32
check_action_permission
(
lua_State
*
L
);
//millux
static
int32
card_is_ritual_type
(
lua_State
*
L
);
//
222DIY
//
modded
static
int32
card_set_entity_code
(
lua_State
*
L
);
static
int32
card_set_card_data
(
lua_State
*
L
);
static
int32
effect_set_owner
(
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