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
6f8129ed
Commit
6f8129ed
authored
Jan 15, 2018
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/Fluorohydride/ygopro-core
parents
9f397160
2ca5402e
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
26 additions
and
11 deletions
+26
-11
card.cpp
card.cpp
+1
-1
effect.cpp
effect.cpp
+1
-1
effect.h
effect.h
+2
-1
interpreter.cpp
interpreter.cpp
+1
-0
libcard.cpp
libcard.cpp
+4
-1
libduel.cpp
libduel.cpp
+8
-5
libeffect.cpp
libeffect.cpp
+8
-2
scriptlib.h
scriptlib.h
+1
-0
No files found.
card.cpp
View file @
6f8129ed
...
@@ -2799,7 +2799,7 @@ void card::get_unique_target(card_set* cset, int32 controler, card* icard) {
...
@@ -2799,7 +2799,7 @@ void card::get_unique_target(card_set* cset, int32 controler, card* icard) {
if
(
unique_location
&
LOCATION_MZONE
)
{
if
(
unique_location
&
LOCATION_MZONE
)
{
for
(
auto
cit
=
player
.
list_mzone
.
begin
();
cit
!=
player
.
list_mzone
.
end
();
++
cit
)
{
for
(
auto
cit
=
player
.
list_mzone
.
begin
();
cit
!=
player
.
list_mzone
.
end
();
++
cit
)
{
card
*
pcard
=
*
cit
;
card
*
pcard
=
*
cit
;
if
(
pcard
&&
(
pcard
!=
icard
)
&&
pcard
->
is_position
(
POS_FACEUP
)
&&
!
pcard
->
is_status
(
STATUS_BATTLE_DESTROYED
)
if
(
pcard
&&
(
pcard
!=
icard
)
&&
pcard
->
is_position
(
POS_FACEUP
)
&&
!
pcard
->
get_status
(
STATUS_BATTLE_DESTROYED
|
STATUS_SPSUMMON_STEP
)
&&
check_unique_code
(
pcard
))
&&
check_unique_code
(
pcard
))
cset
->
insert
(
pcard
);
cset
->
insert
(
pcard
);
}
}
...
...
effect.cpp
View file @
6f8129ed
...
@@ -749,5 +749,5 @@ int32 effect::in_range(const chain& ch) {
...
@@ -749,5 +749,5 @@ int32 effect::in_range(const chain& ch) {
void
effect
::
set_activate_location
()
{
void
effect
::
set_activate_location
()
{
card
*
phandler
=
get_handler
();
card
*
phandler
=
get_handler
();
active_location
=
phandler
->
current
.
location
;
active_location
=
phandler
->
current
.
location
;
//
active_sequence = phandler->current.sequence;
active_sequence
=
phandler
->
current
.
sequence
;
}
}
effect.h
View file @
6f8129ed
...
@@ -51,7 +51,8 @@ public:
...
@@ -51,7 +51,8 @@ public:
uint32
hint_timing
[
2
];
uint32
hint_timing
[
2
];
uint32
card_type
;
uint32
card_type
;
uint32
active_type
;
uint32
active_type
;
uint32
active_location
;
uint16
active_location
;
uint16
active_sequence
;
card
*
active_handler
;
card
*
active_handler
;
uint16
status
;
uint16
status
;
uint32
label
;
uint32
label
;
...
...
interpreter.cpp
View file @
6f8129ed
...
@@ -315,6 +315,7 @@ static const struct luaL_Reg effectlib[] = {
...
@@ -315,6 +315,7 @@ static const struct luaL_Reg effectlib[] = {
{
"IsActivatable"
,
scriptlib
::
effect_is_activatable
},
{
"IsActivatable"
,
scriptlib
::
effect_is_activatable
},
{
"IsActivated"
,
scriptlib
::
effect_is_activated
},
{
"IsActivated"
,
scriptlib
::
effect_is_activated
},
{
"GetActivateLocation"
,
scriptlib
::
effect_get_activate_location
},
{
"GetActivateLocation"
,
scriptlib
::
effect_get_activate_location
},
{
"GetActivateSequence"
,
scriptlib
::
effect_get_activate_sequence
},
{
NULL
,
NULL
}
{
NULL
,
NULL
}
};
};
...
...
libcard.cpp
View file @
6f8129ed
...
@@ -1828,8 +1828,11 @@ int32 scriptlib::card_is_special_summonable(lua_State *L) {
...
@@ -1828,8 +1828,11 @@ int32 scriptlib::card_is_special_summonable(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
);
uint32
sumtype
=
0
;
if
(
lua_gettop
(
L
)
>=
2
)
sumtype
=
lua_tointeger
(
L
,
2
);
uint32
p
=
pcard
->
pduel
->
game_field
->
core
.
reason_player
;
uint32
p
=
pcard
->
pduel
->
game_field
->
core
.
reason_player
;
lua_pushboolean
(
L
,
pcard
->
is_special_summonable
(
p
,
0
));
lua_pushboolean
(
L
,
pcard
->
is_special_summonable
(
p
,
sumtype
));
return
1
;
return
1
;
}
}
int32
scriptlib
::
card_is_synchro_summonable
(
lua_State
*
L
)
{
int32
scriptlib
::
card_is_synchro_summonable
(
lua_State
*
L
)
{
...
...
libduel.cpp
View file @
6f8129ed
...
@@ -266,7 +266,7 @@ int32 scriptlib::duel_summon(lua_State *L) {
...
@@ -266,7 +266,7 @@ int32 scriptlib::duel_summon(lua_State *L) {
uint32
zone
=
0x1f
;
uint32
zone
=
0x1f
;
if
(
lua_gettop
(
L
)
>=
6
)
if
(
lua_gettop
(
L
)
>=
6
)
zone
=
lua_tointeger
(
L
,
6
);
zone
=
lua_tointeger
(
L
,
6
);
duel
*
pduel
=
pcard
->
pduel
;
duel
*
pduel
=
pcard
->
pduel
;
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
pduel
->
game_field
->
summon
(
playerid
,
pcard
,
peffect
,
ignore_count
,
min_tribute
,
zone
);
pduel
->
game_field
->
summon
(
playerid
,
pcard
,
peffect
,
ignore_count
,
min_tribute
,
zone
);
return
lua_yield
(
L
,
0
);
return
lua_yield
(
L
,
0
);
...
@@ -279,9 +279,12 @@ int32 scriptlib::duel_special_summon_rule(lua_State *L) {
...
@@ -279,9 +279,12 @@ int32 scriptlib::duel_special_summon_rule(lua_State *L) {
if
(
playerid
!=
0
&&
playerid
!=
1
)
if
(
playerid
!=
0
&&
playerid
!=
1
)
return
0
;
return
0
;
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
2
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
2
);
duel
*
pduel
=
pcard
->
pduel
;
duel
*
pduel
=
pcard
->
pduel
;
uint32
sumtype
=
0
;
if
(
lua_gettop
(
L
)
>=
3
)
sumtype
=
lua_tointeger
(
L
,
3
);
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
pduel
->
game_field
->
special_summon_rule
(
playerid
,
pcard
,
0
);
pduel
->
game_field
->
special_summon_rule
(
playerid
,
pcard
,
sumtype
);
return
lua_yield
(
L
,
0
);
return
lua_yield
(
L
,
0
);
}
}
int32
scriptlib
::
duel_synchro_summon
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_synchro_summon
(
lua_State
*
L
)
{
...
@@ -304,7 +307,7 @@ int32 scriptlib::duel_synchro_summon(lua_State *L) {
...
@@ -304,7 +307,7 @@ int32 scriptlib::duel_synchro_summon(lua_State *L) {
mg
=
*
(
group
**
)
lua_touserdata
(
L
,
4
);
mg
=
*
(
group
**
)
lua_touserdata
(
L
,
4
);
}
}
}
}
duel
*
pduel
=
pcard
->
pduel
;
duel
*
pduel
=
pcard
->
pduel
;
pduel
->
game_field
->
core
.
limit_tuner
=
tuner
;
pduel
->
game_field
->
core
.
limit_tuner
=
tuner
;
pduel
->
game_field
->
core
.
limit_syn
=
mg
;
pduel
->
game_field
->
core
.
limit_syn
=
mg
;
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
...
@@ -330,7 +333,7 @@ int32 scriptlib::duel_xyz_summon(lua_State *L) {
...
@@ -330,7 +333,7 @@ int32 scriptlib::duel_xyz_summon(lua_State *L) {
int32
maxc
=
0
;
int32
maxc
=
0
;
if
(
lua_gettop
(
L
)
>=
5
)
if
(
lua_gettop
(
L
)
>=
5
)
maxc
=
lua_tointeger
(
L
,
5
);
maxc
=
lua_tointeger
(
L
,
5
);
duel
*
pduel
=
pcard
->
pduel
;
duel
*
pduel
=
pcard
->
pduel
;
pduel
->
game_field
->
core
.
limit_xyz
=
materials
;
pduel
->
game_field
->
core
.
limit_xyz
=
materials
;
pduel
->
game_field
->
core
.
limit_xyz_minc
=
minc
;
pduel
->
game_field
->
core
.
limit_xyz_minc
=
minc
;
pduel
->
game_field
->
core
.
limit_xyz_maxc
=
maxc
;
pduel
->
game_field
->
core
.
limit_xyz_maxc
=
maxc
;
...
...
libeffect.cpp
View file @
6f8129ed
...
@@ -516,11 +516,17 @@ int32 scriptlib::effect_is_activated(lua_State * L) {
...
@@ -516,11 +516,17 @@ int32 scriptlib::effect_is_activated(lua_State * L) {
lua_pushboolean
(
L
,
(
peffect
->
type
&
0x7f0
));
lua_pushboolean
(
L
,
(
peffect
->
type
&
0x7f0
));
return
1
;
return
1
;
}
}
int32
scriptlib
::
effect_get_activate_location
(
lua_State
*
L
)
{
int32
scriptlib
::
effect_get_activate_location
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_EFFECT
,
1
);
check_param
(
L
,
PARAM_TYPE_EFFECT
,
1
);
effect
*
peffect
=
*
(
effect
**
)
lua_touserdata
(
L
,
1
);
effect
*
peffect
=
*
(
effect
**
)
lua_touserdata
(
L
,
1
);
lua_pushinteger
(
L
,
peffect
->
active_location
);
lua_pushinteger
(
L
,
peffect
->
active_location
);
return
1
;
return
1
;
}
}
\ No newline at end of file
int32
scriptlib
::
effect_get_activate_sequence
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_EFFECT
,
1
);
effect
*
peffect
=
*
(
effect
**
)
lua_touserdata
(
L
,
1
);
lua_pushinteger
(
L
,
peffect
->
active_sequence
);
return
1
;
}
scriptlib.h
View file @
6f8129ed
...
@@ -315,6 +315,7 @@ public:
...
@@ -315,6 +315,7 @@ public:
static
int32
effect_is_activatable
(
lua_State
*
L
);
static
int32
effect_is_activatable
(
lua_State
*
L
);
static
int32
effect_is_activated
(
lua_State
*
L
);
static
int32
effect_is_activated
(
lua_State
*
L
);
static
int32
effect_get_activate_location
(
lua_State
*
L
);
static
int32
effect_get_activate_location
(
lua_State
*
L
);
static
int32
effect_get_activate_sequence
(
lua_State
*
L
);
//Group functions
//Group functions
static
int32
group_new
(
lua_State
*
L
);
static
int32
group_new
(
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