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
d755f16c
Commit
d755f16c
authored
Mar 20, 2015
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add Duel.IsAbleToEnterBP
parent
63fc6b5e
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
0 deletions
+13
-0
ocgcore/field.cpp
ocgcore/field.cpp
+5
-0
ocgcore/field.h
ocgcore/field.h
+1
-0
ocgcore/interpreter.cpp
ocgcore/interpreter.cpp
+1
-0
ocgcore/libduel.cpp
ocgcore/libduel.cpp
+5
-0
ocgcore/scriptlib.h
ocgcore/scriptlib.h
+1
-0
No files found.
ocgcore/field.cpp
View file @
d755f16c
...
@@ -2148,3 +2148,8 @@ int32 field::check_chain_target(uint8 chaincount, card * pcard) {
...
@@ -2148,3 +2148,8 @@ int32 field::check_chain_target(uint8 chaincount, card * pcard) {
pduel
->
lua
->
add_param
(
pcard
,
PARAM_TYPE_CARD
);
pduel
->
lua
->
add_param
(
pcard
,
PARAM_TYPE_CARD
);
return
pduel
->
lua
->
check_condition
(
peffect
->
target
,
10
);
return
pduel
->
lua
->
check_condition
(
peffect
->
target
,
10
);
}
}
int32
field
::
is_able_to_enter_bp
()
{
return
((
core
.
duel_options
&
DUEL_ATTACK_FIRST_TURN
)
||
infos
.
turn_id
!=
1
)
&&
infos
.
phase
<
PHASE_BATTLE
&&
!
is_player_affected_by_effect
(
infos
.
turn_player
,
EFFECT_CANNOT_BP
);
}
ocgcore/field.h
View file @
d755f16c
...
@@ -406,6 +406,7 @@ public:
...
@@ -406,6 +406,7 @@ public:
int32
is_chain_negatable
(
uint8
chaincount
,
uint8
naga_check
=
FALSE
);
int32
is_chain_negatable
(
uint8
chaincount
,
uint8
naga_check
=
FALSE
);
int32
is_chain_disablable
(
uint8
chaincount
,
uint8
naga_check
=
FALSE
);
int32
is_chain_disablable
(
uint8
chaincount
,
uint8
naga_check
=
FALSE
);
int32
check_chain_target
(
uint8
chaincount
,
card
*
pcard
);
int32
check_chain_target
(
uint8
chaincount
,
card
*
pcard
);
int32
is_able_to_enter_bp
();
void
add_process
(
uint16
type
,
uint16
step
,
effect
*
peffect
,
group
*
target
,
ptr
arg1
,
ptr
arg2
);
void
add_process
(
uint16
type
,
uint16
step
,
effect
*
peffect
,
group
*
target
,
ptr
arg1
,
ptr
arg2
);
int32
process
();
int32
process
();
...
...
ocgcore/interpreter.cpp
View file @
d755f16c
...
@@ -481,6 +481,7 @@ static const struct luaL_Reg duellib[] = {
...
@@ -481,6 +481,7 @@ static const struct luaL_Reg duellib[] = {
{
"CheckPhaseActivity"
,
scriptlib
::
duel_check_phase_activity
},
{
"CheckPhaseActivity"
,
scriptlib
::
duel_check_phase_activity
},
{
"AddCustomActivityCounter"
,
scriptlib
::
duel_add_custom_activity_counter
},
{
"AddCustomActivityCounter"
,
scriptlib
::
duel_add_custom_activity_counter
},
{
"GetCustomActivityCount"
,
scriptlib
::
duel_get_custom_activity_count
},
{
"GetCustomActivityCount"
,
scriptlib
::
duel_get_custom_activity_count
},
{
"IsAbleToEnterBP"
,
scriptlib
::
duel_is_able_to_enter_bp
},
{
"VenomSwampCheck"
,
scriptlib
::
duel_venom_swamp_check
},
{
"VenomSwampCheck"
,
scriptlib
::
duel_venom_swamp_check
},
{
"SwapDeckAndGrave"
,
scriptlib
::
duel_swap_deck_and_grave
},
{
"SwapDeckAndGrave"
,
scriptlib
::
duel_swap_deck_and_grave
},
{
"MajesticCopy"
,
scriptlib
::
duel_majestic_copy
},
{
"MajesticCopy"
,
scriptlib
::
duel_majestic_copy
},
...
...
ocgcore/libduel.cpp
View file @
d755f16c
...
@@ -3175,6 +3175,11 @@ int32 scriptlib::duel_get_custom_activity_count(lua_State *L) {
...
@@ -3175,6 +3175,11 @@ int32 scriptlib::duel_get_custom_activity_count(lua_State *L) {
lua_pushinteger
(
L
,
(
val
>>
16
)
&
0xffff
);
lua_pushinteger
(
L
,
(
val
>>
16
)
&
0xffff
);
return
1
;
return
1
;
}
}
int32
scriptlib
::
duel_is_able_to_enter_bp
(
lua_State
*
L
)
{
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
lua_pushboolean
(
L
,
pduel
->
game_field
->
is_able_to_enter_bp
());
return
1
;
}
int32
scriptlib
::
duel_venom_swamp_check
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_venom_swamp_check
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
2
);
...
...
ocgcore/scriptlib.h
View file @
d755f16c
...
@@ -481,6 +481,7 @@ public:
...
@@ -481,6 +481,7 @@ public:
static
int32
duel_check_phase_activity
(
lua_State
*
L
);
static
int32
duel_check_phase_activity
(
lua_State
*
L
);
static
int32
duel_add_custom_activity_counter
(
lua_State
*
L
);
static
int32
duel_add_custom_activity_counter
(
lua_State
*
L
);
static
int32
duel_get_custom_activity_count
(
lua_State
*
L
);
static
int32
duel_get_custom_activity_count
(
lua_State
*
L
);
static
int32
duel_is_able_to_enter_bp
(
lua_State
*
L
);
//specific card functions
//specific card functions
static
int32
duel_venom_swamp_check
(
lua_State
*
L
);
static
int32
duel_venom_swamp_check
(
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