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
949b93a2
Commit
949b93a2
authored
Dec 01, 2017
by
Momobako
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/purerosefallen/ygopro-222DIY
into beta
parents
cd13c762
7a62d397
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
7 deletions
+18
-7
.travis.yml
.travis.yml
+8
-2
expansions/script/c37564056.lua
expansions/script/c37564056.lua
+2
-2
ocgcore/common.h
ocgcore/common.h
+4
-1
ocgcore/playerop.cpp
ocgcore/playerop.cpp
+4
-2
No files found.
.travis.yml
View file @
949b93a2
...
@@ -9,12 +9,18 @@ addons:
...
@@ -9,12 +9,18 @@ addons:
packages
:
packages
:
-
libevent-dev
-
libevent-dev
-
libsqlite3-dev
-
libsqlite3-dev
-
liblua5.3-dev
before_install
:
before_install
:
-
git submodule update --init --recursive
-
git submodule update --init --recursive
-
wget 'http://www.lua.org/ftp/lua-5.3.4.tar.gz'
-
tar zxf lua-5.3.4.tar.gz
-
cd lua-5.3.4
-
make linux test
-
sudo make install
-
cd ..
-
wget -O - https://github.com/premake/premake-core/releases/download/v5.0.0-alpha10/premake-5.0.0-alpha10-linux.tar.gz | tar zfx -
-
wget -O - https://github.com/premake/premake-core/releases/download/v5.0.0-alpha10/premake-5.0.0-alpha10-linux.tar.gz | tar zfx -
script
:
script
:
-
./premake5 gmake
-
./premake5 gmake
-
cd build
-
cd build
-
sed -i 's/-llua/-llua5.3/g' ygopro.make
-
make config=release
-
make config=release
expansions/script/c37564056.lua
View file @
949b93a2
...
@@ -96,10 +96,10 @@ function cm.replace_register_effect(f,p)
...
@@ -96,10 +96,10 @@ function cm.replace_register_effect(f,p)
end
end
end
end
function
cm
.
replace_function
(
of
)
function
cm
.
replace_function
(
of
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
f
=
Duel
.
IsPlayerAffectedByEffect
local
f
=
Duel
.
IsPlayerAffectedByEffect
Duel
.
IsPlayerAffectedByEffect
=
cm
.
replace_affected_by_effect
(
f
)
Duel
.
IsPlayerAffectedByEffect
=
cm
.
replace_affected_by_effect
(
f
)
local
res
=
(
not
of
or
of
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
))
local
res
=
(
not
of
or
of
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
))
Duel
.
IsPlayerAffectedByEffect
=
f
Duel
.
IsPlayerAffectedByEffect
=
f
return
res
return
res
end
end
...
...
ocgcore/common.h
View file @
949b93a2
...
@@ -38,9 +38,12 @@ typedef int BOOL;
...
@@ -38,9 +38,12 @@ typedef int BOOL;
#ifndef NULL
#ifndef NULL
#define NULL 0
#define NULL 0
#endif
#endif
#define lua_tonumberint(L,i) (lua_Integer)(((lua_tonumberx(L, (i), NULL) > 0) ? 0.5 : -0.5) + lua_tonumberx(L, (i), NULL))
struct
card_sort
{
struct
card_sort
{
bool
operator
()(
void
*
const
&
c1
,
void
*
const
&
c2
)
const
;
bool
operator
()(
void
*
const
&
c1
,
void
*
const
&
c2
)
const
;
};
};
#endif
/* COMMON_H_ */
#endif
/* COMMON_H_ */
#ifndef MODDED_TONUMBER
#define MODDED_TONUMBER
#define lua_tonumberint(L,i) (lua_Integer)(((lua_tonumberx(L, (i), NULL) > 0) ? 0.5 : -0.5) + lua_tonumberx(L, (i), NULL))
#endif
ocgcore/playerop.cpp
View file @
949b93a2
...
@@ -378,7 +378,9 @@ int32 field::select_chain(uint16 step, uint8 playerid, uint8 spe_count, uint8 fo
...
@@ -378,7 +378,9 @@ int32 field::select_chain(uint16 step, uint8 playerid, uint8 spe_count, uint8 fo
}
}
return
FALSE
;
return
FALSE
;
}
else
{
}
else
{
if
((
returns
.
ivalue
[
0
]
<
0
&&
forced
)
||
returns
.
ivalue
[
0
]
>=
(
int32
)
core
.
select_chains
.
size
())
{
if
(
!
forced
&&
returns
.
ivalue
[
0
]
==
-
1
)
return
TRUE
;
if
(
returns
.
ivalue
[
0
]
<
0
||
returns
.
ivalue
[
0
]
>=
(
int32
)
core
.
select_chains
.
size
())
{
pduel
->
write_buffer8
(
MSG_RETRY
);
pduel
->
write_buffer8
(
MSG_RETRY
);
return
FALSE
;
return
FALSE
;
}
}
...
@@ -734,7 +736,7 @@ int32 field::sort_card(int16 step, uint8 playerid, uint8 is_chain) {
...
@@ -734,7 +736,7 @@ int32 field::sort_card(int16 step, uint8 playerid, uint8 is_chain) {
if
(
step
==
0
)
{
if
(
step
==
0
)
{
returns
.
bvalue
[
0
]
=
0
;
returns
.
bvalue
[
0
]
=
0
;
if
((
playerid
==
1
)
&&
(
core
.
duel_options
&
DUEL_SIMPLE_AI
))
{
if
((
playerid
==
1
)
&&
(
core
.
duel_options
&
DUEL_SIMPLE_AI
))
{
returns
.
i
value
[
0
]
=
-
1
;
returns
.
b
value
[
0
]
=
-
1
;
return
TRUE
;
return
TRUE
;
}
}
if
(
core
.
select_cards
.
empty
())
if
(
core
.
select_cards
.
empty
())
...
...
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