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
504a4bc5
Commit
504a4bc5
authored
Mar 26, 2020
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sync ocgcore
parent
0efc6394
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
2 deletions
+22
-2
Classes/ocgcore/libcard.cpp
Classes/ocgcore/libcard.cpp
+1
-1
Classes/ocgcore/libduel.cpp
Classes/ocgcore/libduel.cpp
+19
-0
Classes/ocgcore/scriptlib.h
Classes/ocgcore/scriptlib.h
+2
-1
No files found.
Classes/ocgcore/libcard.cpp
View file @
504a4bc5
...
...
@@ -2275,7 +2275,7 @@ int32 scriptlib::card_is_releasable_by_effect(lua_State *L) {
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
uint32
p
=
pcard
->
pduel
->
game_field
->
core
.
reason_player
;
effect
*
re
=
pcard
->
pduel
->
game_field
->
core
.
reason_effect
;
if
(
pcard
->
is_releasable_by_effect
(
p
,
re
))
if
(
pcard
->
is_releasable_by_
nonsummon
(
p
)
&&
pcard
->
is_releasable_by_
effect
(
p
,
re
))
lua_pushboolean
(
L
,
1
);
else
lua_pushboolean
(
L
,
0
);
...
...
Classes/ocgcore/libduel.cpp
View file @
504a4bc5
...
...
@@ -2189,6 +2189,24 @@ int32 scriptlib::duel_get_attack_target(lua_State *L) {
interpreter
::
card2value
(
L
,
pcard
);
return
1
;
}
int32
scriptlib
::
duel_get_battle_monster
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_INT
,
1
);
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
uint32
playerid
=
(
uint32
)
lua_tointeger
(
L
,
1
);
card
*
attacker
=
pduel
->
game_field
->
core
.
attacker
;
card
*
defender
=
pduel
->
game_field
->
core
.
attack_target
;
for
(
int32
i
=
0
;
i
<
2
;
i
++
)
{
if
(
attacker
&&
attacker
->
current
.
controler
==
playerid
)
interpreter
::
card2value
(
L
,
attacker
);
else
if
(
defender
&&
defender
->
current
.
controler
==
playerid
)
interpreter
::
card2value
(
L
,
defender
);
else
lua_pushnil
(
L
);
playerid
=
1
-
playerid
;
}
return
2
;
}
int32
scriptlib
::
duel_disable_attack
(
lua_State
*
L
)
{
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
pduel
->
game_field
->
add_process
(
PROCESSOR_ATTACK_DISABLE
,
0
,
0
,
0
,
0
,
0
);
...
...
@@ -4451,6 +4469,7 @@ static const struct luaL_Reg duellib[] = {
{
"IsDamageCalculated"
,
scriptlib
::
duel_is_damage_calculated
},
{
"GetAttacker"
,
scriptlib
::
duel_get_attacker
},
{
"GetAttackTarget"
,
scriptlib
::
duel_get_attack_target
},
{
"GetBattleMonster"
,
scriptlib
::
duel_get_battle_monster
},
{
"NegateAttack"
,
scriptlib
::
duel_disable_attack
},
{
"ChainAttack"
,
scriptlib
::
duel_chain_attack
},
{
"Readjust"
,
scriptlib
::
duel_readjust
},
...
...
Classes/ocgcore/scriptlib.h
View file @
504a4bc5
...
...
@@ -469,7 +469,8 @@ public:
static
int32
duel_skip_phase
(
lua_State
*
L
);
static
int32
duel_is_damage_calculated
(
lua_State
*
L
);
static
int32
duel_get_attacker
(
lua_State
*
L
);
static
int32
duel_get_attack_target
(
lua_State
*
L
);
static
int32
duel_get_attack_target
(
lua_State
*
L
);
static
int32
duel_get_battle_monster
(
lua_State
*
L
);
static
int32
duel_disable_attack
(
lua_State
*
L
);
static
int32
duel_chain_attack
(
lua_State
*
L
);
static
int32
duel_readjust
(
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