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
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-core
Commits
b2d98347
Commit
b2d98347
authored
Sep 25, 2016
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add Duel.AnnounceCardFilter
parent
c4bc9cad
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
3 deletions
+40
-3
field.h
field.h
+15
-0
interpreter.cpp
interpreter.cpp
+1
-0
libduel.cpp
libduel.cpp
+12
-0
playerop.cpp
playerop.cpp
+11
-3
scriptlib.h
scriptlib.h
+1
-0
No files found.
field.h
View file @
b2d98347
...
...
@@ -742,6 +742,20 @@ public:
//
#define EDESC_OPERATION 1
#define EDESC_RESET 2
//
#define OPCODE_ADD 0x40000000
#define OPCODE_SUB 0x40000001
#define OPCODE_MUL 0x40000002
#define OPCODE_DIV 0x40000003
#define OPCODE_AND 0x40000004
#define OPCODE_OR 0x40000005
#define OPCODE_NEG 0x40000006
#define OPCODE_NOT 0x40000007
#define OPCODE_ISCODE 0x40000100
#define OPCODE_ISSETCARD 0x40000101
#define OPCODE_ISTYPE 0x40000102
#define OPCODE_ISRACE 0x40000103
#define OPCODE_ISATTRIBUTE 0x40000104
//Messages
#define MSG_RETRY 1
#define MSG_HINT 2
...
...
@@ -824,6 +838,7 @@ public:
#define MSG_ANNOUNCE_ATTRIB 141
#define MSG_ANNOUNCE_CARD 142
#define MSG_ANNOUNCE_NUMBER 143
#define MSG_ANNOUNCE_CARD_FILTER 144
#define MSG_CARD_HINT 160
#define MSG_TAG_SWAP 161
#define MSG_RELOAD_FIELD 162 // Debug.ReloadFieldEnd()
...
...
interpreter.cpp
View file @
b2d98347
...
...
@@ -465,6 +465,7 @@ static const struct luaL_Reg duellib[] = {
{
"AnnounceAttribute"
,
scriptlib
::
duel_announce_attribute
},
{
"AnnounceLevel"
,
scriptlib
::
duel_announce_level
},
{
"AnnounceCard"
,
scriptlib
::
duel_announce_card
},
{
"AnnounceCardFilter"
,
scriptlib
::
duel_announce_card_filter
},
{
"AnnounceType"
,
scriptlib
::
duel_announce_type
},
{
"AnnounceNumber"
,
scriptlib
::
duel_announce_number
},
{
"AnnounceCoin"
,
scriptlib
::
duel_announce_coin
},
...
...
libduel.cpp
View file @
b2d98347
...
...
@@ -2787,12 +2787,24 @@ int32 scriptlib::duel_announce_card(lua_State * L) {
check_param_count
(
L
,
1
);
int32
playerid
=
lua_tointeger
(
L
,
1
);
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
pduel
->
game_field
->
core
.
select_options
.
clear
();
uint32
ttype
=
TYPE_MONSTER
|
TYPE_SPELL
|
TYPE_TRAP
;
if
(
lua_gettop
(
L
)
>=
2
)
ttype
=
lua_tointeger
(
L
,
2
);
pduel
->
game_field
->
add_process
(
PROCESSOR_ANNOUNCE_CARD
,
0
,
0
,
0
,
playerid
,
ttype
);
return
lua_yield
(
L
,
0
);
}
int32
scriptlib
::
duel_announce_card_filter
(
lua_State
*
L
)
{
check_action_permission
(
L
);
check_param_count
(
L
,
2
);
int32
playerid
=
lua_tointeger
(
L
,
1
);
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
pduel
->
game_field
->
core
.
select_options
.
clear
();
for
(
int32
i
=
2
;
i
<=
lua_gettop
(
L
);
++
i
)
pduel
->
game_field
->
core
.
select_options
.
push_back
(
lua_tointeger
(
L
,
i
));
pduel
->
game_field
->
add_process
(
PROCESSOR_ANNOUNCE_CARD
,
0
,
0
,
0
,
playerid
,
0
);
return
lua_yield
(
L
,
0
);
}
int32
scriptlib
::
duel_announce_type
(
lua_State
*
L
)
{
check_action_permission
(
L
);
check_param_count
(
L
,
1
);
...
...
playerop.cpp
View file @
b2d98347
...
...
@@ -769,9 +769,17 @@ int32 field::announce_attribute(int16 step, uint8 playerid, int32 count, int32 a
}
int32
field
::
announce_card
(
int16
step
,
uint8
playerid
,
uint32
ttype
)
{
if
(
step
==
0
)
{
pduel
->
write_buffer8
(
MSG_ANNOUNCE_CARD
);
pduel
->
write_buffer8
(
playerid
);
pduel
->
write_buffer32
(
ttype
);
if
(
core
.
select_options
.
size
()
==
0
)
{
pduel
->
write_buffer8
(
MSG_ANNOUNCE_CARD
);
pduel
->
write_buffer8
(
playerid
);
pduel
->
write_buffer32
(
ttype
);
}
else
{
pduel
->
write_buffer8
(
MSG_ANNOUNCE_CARD_FILTER
);
pduel
->
write_buffer8
(
playerid
);
pduel
->
write_buffer8
(
core
.
select_options
.
size
());
for
(
uint32
i
=
0
;
i
<
core
.
select_options
.
size
();
++
i
)
pduel
->
write_buffer32
(
core
.
select_options
[
i
]);
}
return
FALSE
;
}
else
{
pduel
->
write_buffer8
(
MSG_HINT
);
...
...
scriptlib.h
View file @
b2d98347
...
...
@@ -464,6 +464,7 @@ public:
static
int32
duel_announce_attribute
(
lua_State
*
L
);
static
int32
duel_announce_level
(
lua_State
*
L
);
static
int32
duel_announce_card
(
lua_State
*
L
);
static
int32
duel_announce_card_filter
(
lua_State
*
L
);
static
int32
duel_announce_type
(
lua_State
*
L
);
static
int32
duel_announce_number
(
lua_State
*
L
);
static
int32
duel_announce_coin
(
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