Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-core
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
xiaoye
ygopro-core
Commits
1852d138
Commit
1852d138
authored
Dec 29, 2019
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:Fluorohydride/ygopro-core
parents
08861e17
132db217
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
166 additions
and
101 deletions
+166
-101
effect.h
effect.h
+2
-0
interpreter.cpp
interpreter.cpp
+7
-3
libduel.cpp
libduel.cpp
+1
-1
libeffect.cpp
libeffect.cpp
+2
-0
processor.cpp
processor.cpp
+154
-97
No files found.
effect.h
View file @
1852d138
...
...
@@ -382,6 +382,8 @@ inline effect_flag operator|(effect_flag flag1, effect_flag flag2)
#define EFFECT_PIERCE 203
#define EFFECT_BATTLE_DESTROY_REDIRECT 204
#define EFFECT_BATTLE_DAMAGE_TO_EFFECT 205
#define EFFECT_BOTH_BATTLE_DAMAGE 206
#define EFFECT_ALSO_BATTLE_DAMAGE 207
#define EFFECT_TOSS_COIN_REPLACE 220
#define EFFECT_TOSS_DICE_REPLACE 221
#define EFFECT_FUSION_MATERIAL 230
...
...
interpreter.cpp
View file @
1852d138
...
...
@@ -1150,7 +1150,7 @@ int32 interpreter::get_operation_value(card* pcard, int32 findex, int32 extraarg
}
return
OPERATION_FAIL
;
}
int32
result
=
std
::
round
(
lua_tonumber
(
current_state
,
-
1
));
int32
result
=
lua_isinteger
(
current_state
,
-
1
)
?
lua_tointeger
(
current_state
,
-
1
)
:
std
::
round
(
lua_tonumber
(
current_state
,
-
1
));
lua_pop
(
current_state
,
1
);
no_action
--
;
call_depth
--
;
...
...
@@ -1169,8 +1169,10 @@ int32 interpreter::get_function_value(int32 f, uint32 param_count) {
call_depth
++
;
if
(
call_function
(
f
,
param_count
,
1
))
{
int32
result
=
0
;
if
(
lua_isboolean
(
current_state
,
-
1
))
if
(
lua_isboolean
(
current_state
,
-
1
))
result
=
lua_toboolean
(
current_state
,
-
1
);
else
if
(
lua_isinteger
(
current_state
,
-
1
))
result
=
lua_tointeger
(
current_state
,
-
1
);
else
result
=
std
::
round
(
lua_tonumber
(
current_state
,
-
1
));
lua_pop
(
current_state
,
1
);
...
...
@@ -1203,8 +1205,10 @@ int32 interpreter::get_function_value(int32 f, uint32 param_count, std::vector<i
int32
stack_newtop
=
lua_gettop
(
current_state
);
for
(
int32
index
=
stack_top
+
1
;
index
<=
stack_newtop
;
++
index
)
{
int32
return_value
=
0
;
if
(
lua_isboolean
(
current_state
,
index
))
if
(
lua_isboolean
(
current_state
,
index
))
return_value
=
lua_toboolean
(
current_state
,
index
);
else
if
(
lua_isinteger
(
current_state
,
index
))
return_value
=
lua_tointeger
(
current_state
,
index
);
else
return_value
=
std
::
round
(
lua_tonumber
(
current_state
,
index
));
result
->
push_back
(
return_value
);
...
...
libduel.cpp
View file @
1852d138
...
...
@@ -2077,7 +2077,7 @@ int32 scriptlib::duel_get_location_count_fromex(lua_State *L) {
return
0
;
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
uint32
uplayer
=
pduel
->
game_field
->
core
.
reason_player
;
if
(
lua_gettop
(
L
)
>=
2
)
if
(
lua_gettop
(
L
)
>=
2
&&
!
lua_isnil
(
L
,
2
)
)
uplayer
=
lua_tointeger
(
L
,
2
);
bool
swapped
=
false
;
card
*
mcard
=
0
;
...
...
libeffect.cpp
View file @
1852d138
...
...
@@ -300,6 +300,8 @@ int32 scriptlib::effect_set_value(lua_State *L) {
peffect
->
flag
[
0
]
&=
~
EFFECT_FLAG_FUNC_VALUE
;
if
(
lua_isboolean
(
L
,
2
))
peffect
->
value
=
lua_toboolean
(
L
,
2
);
else
if
(
lua_isinteger
(
L
,
2
))
peffect
->
value
=
lua_tointeger
(
L
,
2
);
else
peffect
->
value
=
std
::
round
(
lua_tonumber
(
L
,
2
));
}
...
...
processor.cpp
View file @
1852d138
This diff is collapsed.
Click to expand it.
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