Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile-Cn-Ko-En
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
fallenstardust
YGOMobile-Cn-Ko-En
Commits
1956626c
Commit
1956626c
authored
Apr 25, 2018
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化可发动效果判定
parent
4b74e797
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
49 additions
and
4 deletions
+49
-4
Classes/ocgcore/interpreter.cpp
Classes/ocgcore/interpreter.cpp
+2
-0
Classes/ocgcore/libeffect.cpp
Classes/ocgcore/libeffect.cpp
+34
-2
Classes/ocgcore/scriptlib.h
Classes/ocgcore/scriptlib.h
+2
-0
mobile/assets/changelog.html
mobile/assets/changelog.html
+10
-1
mobile/build.gradle
mobile/build.gradle
+1
-1
No files found.
Classes/ocgcore/interpreter.cpp
View file @
1956626c
...
...
@@ -316,6 +316,8 @@ static const struct luaL_Reg effectlib[] = {
{
"IsActivated"
,
scriptlib
::
effect_is_activated
},
{
"GetActivateLocation"
,
scriptlib
::
effect_get_activate_location
},
{
"GetActivateSequence"
,
scriptlib
::
effect_get_activate_sequence
},
{
"CheckCountLimit"
,
scriptlib
::
effect_check_count_limit
},
{
"UseCountLimit"
,
scriptlib
::
effect_use_count_limit
},
{
NULL
,
NULL
}
};
...
...
Classes/ocgcore/libeffect.cpp
View file @
1956626c
...
...
@@ -504,9 +504,13 @@ int32 scriptlib::effect_is_activatable(lua_State *L) {
uint32
playerid
=
lua_tointeger
(
L
,
2
);
effect
*
peffect
=
*
(
effect
**
)
lua_touserdata
(
L
,
1
);
uint32
neglect_loc
=
0
;
if
(
lua_gettop
(
L
)
>
2
)
uint32
neglect_target
=
0
;
if
(
lua_gettop
(
L
)
>
2
)
{
neglect_loc
=
lua_toboolean
(
L
,
3
);
lua_pushboolean
(
L
,
peffect
->
is_activateable
(
playerid
,
peffect
->
pduel
->
game_field
->
nil_event
,
0
,
0
,
0
,
neglect_loc
));
if
(
lua_gettop
(
L
)
>
3
)
neglect_target
=
lua_toboolean
(
L
,
4
);
}
lua_pushboolean
(
L
,
peffect
->
is_activateable
(
playerid
,
peffect
->
pduel
->
game_field
->
nil_event
,
0
,
0
,
neglect_target
,
neglect_loc
));
return
1
;
}
int32
scriptlib
::
effect_is_activated
(
lua_State
*
L
)
{
...
...
@@ -530,3 +534,31 @@ int32 scriptlib::effect_get_activate_sequence(lua_State *L) {
lua_pushinteger
(
L
,
peffect
->
active_sequence
);
return
1
;
}
int32
scriptlib
::
effect_check_count_limit
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_EFFECT
,
1
);
effect
*
peffect
=
*
(
effect
**
)
lua_touserdata
(
L
,
1
);
uint32
p
=
lua_tointeger
(
L
,
2
);
lua_pushboolean
(
L
,
peffect
->
check_count_limit
(
p
));
return
1
;
}
int32
scriptlib
::
effect_use_count_limit
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_EFFECT
,
1
);
effect
*
peffect
=
*
(
effect
**
)
lua_touserdata
(
L
,
1
);
uint32
p
=
lua_tointeger
(
L
,
2
);
uint32
count
=
1
;
uint32
oath_only
=
0
;
uint32
code
=
peffect
->
count_code
;
if
(
lua_gettop
(
L
)
>
2
)
{
count
=
lua_tointeger
(
L
,
3
);
if
(
lua_gettop
(
L
)
>
3
)
oath_only
=
lua_toboolean
(
L
,
4
);
}
if
(
!
oath_only
||
code
&
EFFECT_COUNT_CODE_OATH
)
while
(
count
)
{
peffect
->
dec_count
(
p
);
count
--
;
}
return
0
;
}
Classes/ocgcore/scriptlib.h
View file @
1956626c
...
...
@@ -316,6 +316,8 @@ public:
static
int32
effect_is_activated
(
lua_State
*
L
);
static
int32
effect_get_activate_location
(
lua_State
*
L
);
static
int32
effect_get_activate_sequence
(
lua_State
*
L
);
static
int32
effect_check_count_limit
(
lua_State
*
L
);
static
int32
effect_use_count_limit
(
lua_State
*
L
);
//Group functions
static
int32
group_new
(
lua_State
*
L
);
...
...
mobile/assets/changelog.html
View file @
1956626c
...
...
@@ -16,7 +16,16 @@
特别感谢: 菜菜,尸体,晓L,废话多,幻兽L,龙道香姐 的支持与努力.
</pre>
<ul>
<li
style=
"color:#ffff00"
>
3.1.9
</li>
<li
style=
"color:#ffff00"
>
3.2.1
</li>
</ul>
<pre>
更新:
1.更新ygo内核;;
2.移除版本号修改功能;
;
</pre>
<ul>
<li
style=
"color:#ffffff"
>
3.1.9
</li>
</ul>
<pre>
更新:
...
...
mobile/build.gradle
View file @
1956626c
...
...
@@ -9,7 +9,7 @@ android {
applicationId
"cn.garymb.ygomobile"
minSdkVersion
16
targetSdkVersion
22
versionCode
3201042
4
versionCode
3201042
5
versionName
"3.2.1"
vectorDrawables
.
useSupportLibrary
=
true
ndk
{
...
...
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