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
cbcf0a2e
Commit
cbcf0a2e
authored
Jul 23, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add EFFECT_CHANGE_SUMMON_TYPE_KOISHI
parent
9411f472
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
4 deletions
+39
-4
card.cpp
card.cpp
+22
-0
card.h
card.h
+1
-0
effect.h
effect.h
+5
-1
interpreter.cpp
interpreter.cpp
+8
-0
libcard.cpp
libcard.cpp
+3
-3
No files found.
card.cpp
View file @
cbcf0a2e
...
@@ -38,6 +38,28 @@ uint32 card::set_entity_code(uint32 entity_code, bool remove_alias) {
...
@@ -38,6 +38,28 @@ uint32 card::set_entity_code(uint32 entity_code, bool remove_alias) {
pduel
->
write_buffer32
(
0
);
pduel
->
write_buffer32
(
0
);
return
code
;
return
code
;
}
}
uint32
card
::
get_summon_info
()
{
effect_set
effects
;
effect_set
effects2
;
uint32
res
=
summon_info
;
filter_effect
(
EFFECT_ADD_SUMMON_TYPE_KOISHI
,
&
effects
,
FALSE
);
filter_effect
(
EFFECT_REMOVE_SUMMON_TYPE_KOISHI
,
&
effects
);
filter_effect
(
EFFECT_CHANGE_SUMMON_TYPE_KOISHI
,
&
effects2
,
FALSE
);
filter_effect
(
EFFECT_CHANGE_SUMMON_LOCATION_KOISHI
,
&
effects2
);
for
(
int32
i
=
0
;
i
<
effects
.
size
();
++
i
)
{
if
(
effects
[
i
]
->
code
==
EFFECT_ADD_SUMMON_TYPE_KOISHI
)
res
|=
(
effects
[
i
]
->
get_value
(
this
)
&
0xff00ffff
);
else
res
&=
~
(
effects
[
i
]
->
get_value
(
this
)
&
0xff00ffff
);
}
for
(
int32
i
=
0
;
i
<
effects2
.
size
();
++
i
)
{
if
(
effects2
[
i
]
->
code
==
EFFECT_CHANGE_SUMMON_TYPE_KOISHI
)
res
=
(
res
&
0xff0000
)
|
(
effects2
[
i
]
->
get_value
(
this
)
&
0xff00ffff
);
else
res
=
((
effects2
[
i
]
->
get_value
(
this
)
&
0xff
)
<<
16
)
|
(
res
&
0xff00ffff
);
}
return
res
;
}
bool
card_sort
::
operator
()(
void
*
const
&
p1
,
void
*
const
&
p2
)
const
{
bool
card_sort
::
operator
()(
void
*
const
&
p1
,
void
*
const
&
p2
)
const
{
card
*
c1
=
(
card
*
)
p1
;
card
*
c1
=
(
card
*
)
p1
;
...
...
card.h
View file @
cbcf0a2e
...
@@ -110,6 +110,7 @@ public:
...
@@ -110,6 +110,7 @@ public:
//millux
//millux
uint32
get_ritual_type
();
uint32
get_ritual_type
();
uint32
set_entity_code
(
uint32
entity_code
,
bool
remove_alias
=
false
);
uint32
set_entity_code
(
uint32
entity_code
,
bool
remove_alias
=
false
);
uint32
get_summon_info
();
struct
sendto_param_t
{
struct
sendto_param_t
{
void
set
(
uint8
p
,
uint8
pos
,
uint8
loc
,
uint8
seq
=
0
)
{
void
set
(
uint8
p
,
uint8
pos
,
uint8
loc
,
uint8
seq
=
0
)
{
...
...
effect.h
View file @
cbcf0a2e
...
@@ -109,7 +109,7 @@ public:
...
@@ -109,7 +109,7 @@ public:
};
};
// KoishiPro effects
// KoishiPro effects
#define EFFECT_CHANGE_LINK_MARKER_KOISHI 710253
#define EFFECT_CHANGE_LINK_MARKER_KOISHI 710253
#define EFFECT_ADD_LINK_MARKER_KOISHI 37564151
#define EFFECT_ADD_LINK_MARKER_KOISHI 37564151
#define EFFECT_REMOVE_LINK_MARKER_KOISHI 37564152
#define EFFECT_REMOVE_LINK_MARKER_KOISHI 37564152
#define EFFECT_CANNOT_LOSE_KOISHI 37564153
#define EFFECT_CANNOT_LOSE_KOISHI 37564153
...
@@ -117,6 +117,10 @@ public:
...
@@ -117,6 +117,10 @@ public:
#define EFFECT_OVERLAY_REMOVE_COST_CHANGE_KOISHI 37564155
#define EFFECT_OVERLAY_REMOVE_COST_CHANGE_KOISHI 37564155
#define EFFECT_ALLOW_SYNCHRO_KOISHI 37564156
#define EFFECT_ALLOW_SYNCHRO_KOISHI 37564156
#define EFFECT_MINIATURE_GARDEN_GIRL 37564157
#define EFFECT_MINIATURE_GARDEN_GIRL 37564157
#define EFFECT_ADD_SUMMON_TYPE_KOISHI 37564158
#define EFFECT_REMOVE_SUMMON_TYPE_KOISHI 37564159
#define EFFECT_CHANGE_SUMMON_TYPE_KOISHI 37564160
#define EFFECT_CHANGE_SUMMON_LOCATION_KOISHI 37564161
//status
//status
#define EFFECT_STATUS_AVAILABLE 0x0001
#define EFFECT_STATUS_AVAILABLE 0x0001
...
...
interpreter.cpp
View file @
cbcf0a2e
...
@@ -709,6 +709,14 @@ interpreter::interpreter(duel* pd): coroutines(256) {
...
@@ -709,6 +709,14 @@ interpreter::interpreter(duel* pd): coroutines(256) {
lua_setglobal
(
lua_state
,
"EFFECT_ALLOW_SYNCHRO_KOISHI"
);
lua_setglobal
(
lua_state
,
"EFFECT_ALLOW_SYNCHRO_KOISHI"
);
lua_pushinteger
(
lua_state
,
EFFECT_MINIATURE_GARDEN_GIRL
);
lua_pushinteger
(
lua_state
,
EFFECT_MINIATURE_GARDEN_GIRL
);
lua_setglobal
(
lua_state
,
"EFFECT_MINIATURE_GARDEN_GIRL"
);
lua_setglobal
(
lua_state
,
"EFFECT_MINIATURE_GARDEN_GIRL"
);
lua_pushinteger
(
lua_state
,
EFFECT_ADD_SUMMON_TYPE_KOISHI
);
lua_setglobal
(
lua_state
,
"EFFECT_ADD_SUMMON_TYPE_KOISHI"
);
lua_pushinteger
(
lua_state
,
EFFECT_REMOVE_SUMMON_TYPE_KOISHI
);
lua_setglobal
(
lua_state
,
"EFFECT_REMOVE_SUMMON_TYPE_KOISHI"
);
lua_pushinteger
(
lua_state
,
EFFECT_CHANGE_SUMMON_TYPE_KOISHI
);
lua_setglobal
(
lua_state
,
"EFFECT_CHANGE_SUMMON_TYPE_KOISHI"
);
lua_pushinteger
(
lua_state
,
EFFECT_CHANGE_SUMMON_LOCATION_KOISHI
);
lua_setglobal
(
lua_state
,
"EFFECT_CHANGE_SUMMON_LOCATION_KOISHI"
);
//music hints
//music hints
lua_pushinteger
(
lua_state
,
HINT_MUSIC
);
lua_pushinteger
(
lua_state
,
HINT_MUSIC
);
lua_setglobal
(
lua_state
,
"HINT_MUSIC"
);
lua_setglobal
(
lua_state
,
"HINT_MUSIC"
);
...
...
libcard.cpp
View file @
cbcf0a2e
...
@@ -872,14 +872,14 @@ int32 scriptlib::card_get_summon_type(lua_State *L) {
...
@@ -872,14 +872,14 @@ int32 scriptlib::card_get_summon_type(lua_State *L) {
check_param_count
(
L
,
1
);
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
lua_pushinteger
(
L
,
pcard
->
summon_info
&
0xff00ffff
);
lua_pushinteger
(
L
,
pcard
->
get_summon_info
()
&
0xff00ffff
);
return
1
;
return
1
;
}
}
int32
scriptlib
::
card_get_summon_location
(
lua_State
*
L
)
{
int32
scriptlib
::
card_get_summon_location
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
lua_pushinteger
(
L
,
(
pcard
->
summon_info
>>
16
)
&
0xff
);
lua_pushinteger
(
L
,
(
pcard
->
get_summon_info
()
>>
16
)
&
0xff
);
return
1
;
return
1
;
}
}
int32
scriptlib
::
card_get_summon_player
(
lua_State
*
L
)
{
int32
scriptlib
::
card_get_summon_player
(
lua_State
*
L
)
{
...
@@ -1188,7 +1188,7 @@ int32 scriptlib::card_is_summon_type(lua_State *L) {
...
@@ -1188,7 +1188,7 @@ int32 scriptlib::card_is_summon_type(lua_State *L) {
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
uint32
ttype
=
lua_tointeger
(
L
,
2
);
uint32
ttype
=
lua_tointeger
(
L
,
2
);
if
(((
pcard
->
summon_info
&
0xff00ffff
)
&
ttype
)
==
ttype
)
if
(((
pcard
->
get_summon_info
()
&
0xff00ffff
)
&
ttype
)
==
ttype
)
lua_pushboolean
(
L
,
1
);
lua_pushboolean
(
L
,
1
);
else
else
lua_pushboolean
(
L
,
0
);
lua_pushboolean
(
L
,
0
);
...
...
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