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
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
xiaoye
ygopro-core
Commits
992aedb9
Commit
992aedb9
authored
Jan 22, 2021
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:Fluorohydride/ygopro-core
parents
dc493c19
08d55ffd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
3 deletions
+44
-3
card.cpp
card.cpp
+4
-2
libcard.cpp
libcard.cpp
+36
-0
processor.cpp
processor.cpp
+1
-1
scriptlib.h
scriptlib.h
+3
-0
No files found.
card.cpp
View file @
992aedb9
...
@@ -2010,8 +2010,10 @@ void card::reset(uint32 id, uint32 reset_type) {
...
@@ -2010,8 +2010,10 @@ void card::reset(uint32 id, uint32 reset_type) {
battled_cards
.
clear
();
battled_cards
.
clear
();
reset_effect_count
();
reset_effect_count
();
auto
pr
=
field_effect
.
equal_range
(
EFFECT_DISABLE_FIELD
);
auto
pr
=
field_effect
.
equal_range
(
EFFECT_DISABLE_FIELD
);
for
(;
pr
.
first
!=
pr
.
second
;
++
pr
.
first
)
for
(;
pr
.
first
!=
pr
.
second
;
++
pr
.
first
){
pr
.
first
->
second
->
value
=
0
;
if
(
!
pr
.
first
->
second
->
is_flag
(
EFFECT_FLAG_FUNC_VALUE
))
pr
.
first
->
second
->
value
=
0
;
}
}
}
if
(
id
&
(
RESET_TODECK
|
RESET_TOHAND
|
RESET_TOGRAVE
|
RESET_REMOVE
|
RESET_TEMP_REMOVE
if
(
id
&
(
RESET_TODECK
|
RESET_TOHAND
|
RESET_TOGRAVE
|
RESET_REMOVE
|
RESET_TEMP_REMOVE
|
RESET_OVERLAY
|
RESET_MSCHANGE
|
RESET_TOFIELD
|
RESET_TURN_SET
))
{
|
RESET_OVERLAY
|
RESET_MSCHANGE
|
RESET_TOFIELD
|
RESET_TURN_SET
))
{
...
...
libcard.cpp
View file @
992aedb9
...
@@ -1284,6 +1284,28 @@ int32 scriptlib::card_is_summon_type(lua_State *L) {
...
@@ -1284,6 +1284,28 @@ int32 scriptlib::card_is_summon_type(lua_State *L) {
lua_pushboolean
(
L
,
0
);
lua_pushboolean
(
L
,
0
);
return
1
;
return
1
;
}
}
int32
scriptlib
::
card_is_summon_location
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
uint32
tloc
=
(
uint32
)
lua_tointeger
(
L
,
2
);
if
(((
pcard
->
summon_info
>>
16
)
&
0xff
)
&
tloc
)
lua_pushboolean
(
L
,
1
);
else
lua_pushboolean
(
L
,
0
);
return
1
;
}
int32
scriptlib
::
card_is_summon_player
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
uint32
con
=
(
uint32
)
lua_tointeger
(
L
,
2
);
if
(
pcard
->
summon_player
==
con
)
lua_pushboolean
(
L
,
1
);
else
lua_pushboolean
(
L
,
0
);
return
1
;
}
int32
scriptlib
::
card_is_status
(
lua_State
*
L
)
{
int32
scriptlib
::
card_is_status
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
...
@@ -2582,6 +2604,17 @@ int32 scriptlib::card_is_controler(lua_State *L) {
...
@@ -2582,6 +2604,17 @@ int32 scriptlib::card_is_controler(lua_State *L) {
lua_pushboolean
(
L
,
0
);
lua_pushboolean
(
L
,
0
);
return
1
;
return
1
;
}
}
int32
scriptlib
::
card_is_pre_controler
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
uint32
con
=
(
uint32
)
lua_tointeger
(
L
,
2
);
if
(
pcard
->
previous
.
controler
==
con
)
lua_pushboolean
(
L
,
1
);
else
lua_pushboolean
(
L
,
0
);
return
1
;
}
int32
scriptlib
::
card_is_onfield
(
lua_State
*
L
)
{
int32
scriptlib
::
card_is_onfield
(
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
);
...
@@ -3413,6 +3446,8 @@ static const struct luaL_Reg cardlib[] = {
...
@@ -3413,6 +3446,8 @@ static const struct luaL_Reg cardlib[] = {
{
"IsLinkAttribute"
,
scriptlib
::
card_is_link_attribute
},
{
"IsLinkAttribute"
,
scriptlib
::
card_is_link_attribute
},
{
"IsReason"
,
scriptlib
::
card_is_reason
},
{
"IsReason"
,
scriptlib
::
card_is_reason
},
{
"IsSummonType"
,
scriptlib
::
card_is_summon_type
},
{
"IsSummonType"
,
scriptlib
::
card_is_summon_type
},
{
"IsSummonLocation"
,
scriptlib
::
card_is_summon_location
},
{
"IsSummonPlayer"
,
scriptlib
::
card_is_summon_player
},
{
"IsStatus"
,
scriptlib
::
card_is_status
},
{
"IsStatus"
,
scriptlib
::
card_is_status
},
{
"IsNotTuner"
,
scriptlib
::
card_is_not_tuner
},
{
"IsNotTuner"
,
scriptlib
::
card_is_not_tuner
},
{
"SetStatus"
,
scriptlib
::
card_set_status
},
{
"SetStatus"
,
scriptlib
::
card_set_status
},
...
@@ -3511,6 +3546,7 @@ static const struct luaL_Reg cardlib[] = {
...
@@ -3511,6 +3546,7 @@ static const struct luaL_Reg cardlib[] = {
{
"IsPosition"
,
scriptlib
::
card_is_position
},
{
"IsPosition"
,
scriptlib
::
card_is_position
},
{
"IsPreviousPosition"
,
scriptlib
::
card_is_pre_position
},
{
"IsPreviousPosition"
,
scriptlib
::
card_is_pre_position
},
{
"IsControler"
,
scriptlib
::
card_is_controler
},
{
"IsControler"
,
scriptlib
::
card_is_controler
},
{
"IsPreviousControler"
,
scriptlib
::
card_is_pre_controler
},
{
"IsOnField"
,
scriptlib
::
card_is_onfield
},
{
"IsOnField"
,
scriptlib
::
card_is_onfield
},
{
"IsLocation"
,
scriptlib
::
card_is_location
},
{
"IsLocation"
,
scriptlib
::
card_is_location
},
{
"IsPreviousLocation"
,
scriptlib
::
card_is_pre_location
},
{
"IsPreviousLocation"
,
scriptlib
::
card_is_pre_location
},
...
...
processor.cpp
View file @
992aedb9
...
@@ -4555,7 +4555,7 @@ int32 field::refresh_location_info(uint16 step) {
...
@@ -4555,7 +4555,7 @@ int32 field::refresh_location_info(uint16 step) {
filter_field_effect
(
EFFECT_DISABLE_FIELD
,
&
eset
);
filter_field_effect
(
EFFECT_DISABLE_FIELD
,
&
eset
);
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
uint32
value
=
eset
[
i
]
->
get_value
();
uint32
value
=
eset
[
i
]
->
get_value
();
if
(
value
&&
!
eset
[
i
]
->
is_flag
(
EFFECT_FLAG_REPEAT
)
)
{
if
(
value
)
{
player
[
0
].
disabled_location
|=
value
&
0x1f7f
;
player
[
0
].
disabled_location
|=
value
&
0x1f7f
;
player
[
1
].
disabled_location
|=
(
value
>>
16
)
&
0x1f7f
;
player
[
1
].
disabled_location
|=
(
value
>>
16
)
&
0x1f7f
;
}
else
}
else
...
...
scriptlib.h
View file @
992aedb9
...
@@ -143,6 +143,8 @@ public:
...
@@ -143,6 +143,8 @@ public:
static
int32
card_is_link_attribute
(
lua_State
*
L
);
static
int32
card_is_link_attribute
(
lua_State
*
L
);
static
int32
card_is_reason
(
lua_State
*
L
);
static
int32
card_is_reason
(
lua_State
*
L
);
static
int32
card_is_summon_type
(
lua_State
*
L
);
static
int32
card_is_summon_type
(
lua_State
*
L
);
static
int32
card_is_summon_location
(
lua_State
*
L
);
static
int32
card_is_summon_player
(
lua_State
*
L
);
static
int32
card_is_status
(
lua_State
*
L
);
static
int32
card_is_status
(
lua_State
*
L
);
static
int32
card_is_not_tuner
(
lua_State
*
L
);
static
int32
card_is_not_tuner
(
lua_State
*
L
);
static
int32
card_set_status
(
lua_State
*
L
);
static
int32
card_set_status
(
lua_State
*
L
);
...
@@ -243,6 +245,7 @@ public:
...
@@ -243,6 +245,7 @@ public:
static
int32
card_is_position
(
lua_State
*
L
);
static
int32
card_is_position
(
lua_State
*
L
);
static
int32
card_is_pre_position
(
lua_State
*
L
);
static
int32
card_is_pre_position
(
lua_State
*
L
);
static
int32
card_is_controler
(
lua_State
*
L
);
static
int32
card_is_controler
(
lua_State
*
L
);
static
int32
card_is_pre_controler
(
lua_State
*
L
);
static
int32
card_is_onfield
(
lua_State
*
L
);
static
int32
card_is_onfield
(
lua_State
*
L
);
static
int32
card_is_location
(
lua_State
*
L
);
static
int32
card_is_location
(
lua_State
*
L
);
static
int32
card_is_pre_location
(
lua_State
*
L
);
static
int32
card_is_pre_location
(
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