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
5816b47a
Commit
5816b47a
authored
Mar 09, 2023
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/Fluorohydride/ygopro-core
parents
e19c7a35
b6d8b0e9
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
5 deletions
+33
-5
card.cpp
card.cpp
+14
-2
card.h
card.h
+2
-1
effect.h
effect.h
+1
-0
field.cpp
field.cpp
+1
-1
libcard.cpp
libcard.cpp
+14
-1
scriptlib.h
scriptlib.h
+1
-0
No files found.
card.cpp
View file @
5816b47a
...
@@ -2917,6 +2917,16 @@ int32 card::is_not_tuner(card* scard) {
...
@@ -2917,6 +2917,16 @@ int32 card::is_not_tuner(card* scard) {
return
TRUE
;
return
TRUE
;
return
FALSE
;
return
FALSE
;
}
}
int32
card
::
is_tuner
(
card
*
scard
)
{
if
(
get_synchro_type
()
&
TYPE_TUNER
)
return
TRUE
;
effect_set
eset
;
filter_effect
(
EFFECT_TUNER
,
&
eset
);
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
if
(
!
eset
[
i
]
->
value
||
eset
[
i
]
->
get_value
(
scard
))
return
TRUE
;
return
FALSE
;
}
int32
card
::
check_unique_code
(
card
*
pcard
)
{
int32
card
::
check_unique_code
(
card
*
pcard
)
{
if
(
!
unique_code
)
if
(
!
unique_code
)
return
FALSE
;
return
FALSE
;
...
@@ -3424,8 +3434,10 @@ int32 card::is_affect_by_effect(effect* reason_effect) {
...
@@ -3424,8 +3434,10 @@ int32 card::is_affect_by_effect(effect* reason_effect) {
return
FALSE
;
return
FALSE
;
return
TRUE
;
return
TRUE
;
}
}
int32
card
::
is_can_be_disabled_by_effect
(
effect
*
reason_effect
)
{
int32
card
::
is_can_be_disabled_by_effect
(
effect
*
reason_effect
,
bool
is_monster_effect
)
{
if
(
is_status
(
STATUS_DISABLED
))
if
(
is_monster_effect
&&
is_status
(
STATUS_DISABLED
))
return
FALSE
;
if
(
!
is_monster_effect
&&
!
(
get_type
()
&
TYPE_TRAPMONSTER
)
&&
is_status
(
STATUS_DISABLED
))
return
FALSE
;
return
FALSE
;
if
(
is_affected_by_effect
(
EFFECT_CANNOT_DISABLE
))
if
(
is_affected_by_effect
(
EFFECT_CANNOT_DISABLE
))
return
FALSE
;
return
FALSE
;
...
...
card.h
View file @
5816b47a
...
@@ -332,6 +332,7 @@ public:
...
@@ -332,6 +332,7 @@ public:
void
fusion_select
(
uint8
playerid
,
group
*
fusion_m
,
card
*
cg
,
uint32
chkf
,
uint8
not_material
);
void
fusion_select
(
uint8
playerid
,
group
*
fusion_m
,
card
*
cg
,
uint32
chkf
,
uint8
not_material
);
int32
check_fusion_substitute
(
card
*
fcard
);
int32
check_fusion_substitute
(
card
*
fcard
);
int32
is_not_tuner
(
card
*
scard
);
int32
is_not_tuner
(
card
*
scard
);
int32
is_tuner
(
card
*
scard
);
int32
check_unique_code
(
card
*
pcard
);
int32
check_unique_code
(
card
*
pcard
);
void
get_unique_target
(
card_set
*
cset
,
int32
controler
,
card
*
icard
=
0
);
void
get_unique_target
(
card_set
*
cset
,
int32
controler
,
card
*
icard
=
0
);
...
@@ -352,7 +353,7 @@ public:
...
@@ -352,7 +353,7 @@ public:
int32
is_setable_mzone
(
uint8
playerid
,
uint8
ignore_count
,
effect
*
peffect
,
uint8
min_tribute
,
uint32
zone
=
0x1f
);
int32
is_setable_mzone
(
uint8
playerid
,
uint8
ignore_count
,
effect
*
peffect
,
uint8
min_tribute
,
uint32
zone
=
0x1f
);
int32
is_setable_szone
(
uint8
playerid
,
uint8
ignore_fd
=
0
);
int32
is_setable_szone
(
uint8
playerid
,
uint8
ignore_fd
=
0
);
int32
is_affect_by_effect
(
effect
*
reason_effect
);
int32
is_affect_by_effect
(
effect
*
reason_effect
);
int32
is_can_be_disabled_by_effect
(
effect
*
reason_effect
);
int32
is_can_be_disabled_by_effect
(
effect
*
reason_effect
,
bool
is_monster_effect
);
int32
is_destructable
();
int32
is_destructable
();
int32
is_destructable_by_battle
(
card
*
pcard
);
int32
is_destructable_by_battle
(
card
*
pcard
);
effect
*
check_indestructable_by_effect
(
effect
*
reason_effect
,
uint8
playerid
);
effect
*
check_indestructable_by_effect
(
effect
*
reason_effect
,
uint8
playerid
);
...
...
effect.h
View file @
5816b47a
...
@@ -467,6 +467,7 @@ inline effect_flag operator|(effect_flag flag1, effect_flag flag2)
...
@@ -467,6 +467,7 @@ inline effect_flag operator|(effect_flag flag1, effect_flag flag2)
#define EFFECT_CHANGE_GRAVE_RACE 366
#define EFFECT_CHANGE_GRAVE_RACE 366
#define EFFECT_ACTIVATION_COUNT_LIMIT 367
#define EFFECT_ACTIVATION_COUNT_LIMIT 367
#define EFFECT_LIMIT_SPECIAL_SUMMON_POSITION 368
#define EFFECT_LIMIT_SPECIAL_SUMMON_POSITION 368
#define EFFECT_TUNER 369
//#define EVENT_STARTUP 1000
//#define EVENT_STARTUP 1000
#define EVENT_FLIP 1001
#define EVENT_FLIP 1001
...
...
field.cpp
View file @
5816b47a
...
@@ -2524,7 +2524,7 @@ int32 field::check_synchro_material(card* pcard, int32 findex1, int32 findex2, i
...
@@ -2524,7 +2524,7 @@ int32 field::check_synchro_material(card* pcard, int32 findex1, int32 findex2, i
return
FALSE
;
return
FALSE
;
}
}
int32
field
::
check_tuner_material
(
card
*
pcard
,
card
*
tuner
,
int32
findex1
,
int32
findex2
,
int32
min
,
int32
max
,
card
*
smat
,
group
*
mg
)
{
int32
field
::
check_tuner_material
(
card
*
pcard
,
card
*
tuner
,
int32
findex1
,
int32
findex2
,
int32
min
,
int32
max
,
card
*
smat
,
group
*
mg
)
{
if
(
!
tuner
||
(
tuner
->
current
.
location
==
LOCATION_MZONE
&&
!
tuner
->
is_position
(
POS_FACEUP
))
||
!
(
tuner
->
get_synchro_type
()
&
TYPE_TUNER
)
||
!
tuner
->
is_can_be_synchro_material
(
pcard
))
if
(
!
tuner
||
(
tuner
->
current
.
location
==
LOCATION_MZONE
&&
!
tuner
->
is_position
(
POS_FACEUP
))
||
!
tuner
->
is_tuner
(
pcard
)
||
!
tuner
->
is_can_be_synchro_material
(
pcard
))
return
FALSE
;
return
FALSE
;
effect
*
pcheck
=
tuner
->
is_affected_by_effect
(
EFFECT_SYNCHRO_CHECK
);
effect
*
pcheck
=
tuner
->
is_affected_by_effect
(
EFFECT_SYNCHRO_CHECK
);
if
(
pcheck
)
if
(
pcheck
)
...
...
libcard.cpp
View file @
5816b47a
...
@@ -1262,6 +1262,15 @@ int32 scriptlib::card_is_not_tuner(lua_State *L) {
...
@@ -1262,6 +1262,15 @@ int32 scriptlib::card_is_not_tuner(lua_State *L) {
lua_pushboolean
(
L
,
pcard
->
is_not_tuner
(
scard
));
lua_pushboolean
(
L
,
pcard
->
is_not_tuner
(
scard
));
return
1
;
return
1
;
}
}
int32
scriptlib
::
card_is_tuner
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
2
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
card
*
scard
=
*
(
card
**
)
lua_touserdata
(
L
,
2
);
lua_pushboolean
(
L
,
pcard
->
is_tuner
(
scard
));
return
1
;
}
int32
scriptlib
::
card_set_status
(
lua_State
*
L
)
{
int32
scriptlib
::
card_set_status
(
lua_State
*
L
)
{
check_param_count
(
L
,
3
);
check_param_count
(
L
,
3
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
...
@@ -2995,7 +3004,10 @@ int32 scriptlib::card_is_can_be_disabled_by_effect(lua_State* L) {
...
@@ -2995,7 +3004,10 @@ int32 scriptlib::card_is_can_be_disabled_by_effect(lua_State* L) {
check_param
(
L
,
PARAM_TYPE_EFFECT
,
2
);
check_param
(
L
,
PARAM_TYPE_EFFECT
,
2
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
effect
*
peffect
=
*
(
effect
**
)
lua_touserdata
(
L
,
2
);
effect
*
peffect
=
*
(
effect
**
)
lua_touserdata
(
L
,
2
);
lua_pushboolean
(
L
,
pcard
->
is_can_be_disabled_by_effect
(
peffect
));
bool
is_monster_effect
=
true
;
if
(
lua_gettop
(
L
)
>
2
)
is_monster_effect
=
lua_toboolean
(
L
,
3
);
lua_pushboolean
(
L
,
pcard
->
is_can_be_disabled_by_effect
(
peffect
,
is_monster_effect
));
return
1
;
return
1
;
}
}
int32
scriptlib
::
card_is_can_be_effect_target
(
lua_State
*
L
)
{
int32
scriptlib
::
card_is_can_be_effect_target
(
lua_State
*
L
)
{
...
@@ -3368,6 +3380,7 @@ static const struct luaL_Reg cardlib[] = {
...
@@ -3368,6 +3380,7 @@ static const struct luaL_Reg cardlib[] = {
{
"IsSummonPlayer"
,
scriptlib
::
card_is_summon_player
},
{
"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
},
{
"IsTuner"
,
scriptlib
::
card_is_tuner
},
{
"SetStatus"
,
scriptlib
::
card_set_status
},
{
"SetStatus"
,
scriptlib
::
card_set_status
},
{
"IsDualState"
,
scriptlib
::
card_is_dual_state
},
{
"IsDualState"
,
scriptlib
::
card_is_dual_state
},
{
"EnableDualState"
,
scriptlib
::
card_enable_dual_state
},
{
"EnableDualState"
,
scriptlib
::
card_enable_dual_state
},
...
...
scriptlib.h
View file @
5816b47a
...
@@ -133,6 +133,7 @@ public:
...
@@ -133,6 +133,7 @@ public:
static
int32
card_is_summon_player
(
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_is_tuner
(
lua_State
*
L
);
static
int32
card_set_status
(
lua_State
*
L
);
static
int32
card_set_status
(
lua_State
*
L
);
static
int32
card_is_dual_state
(
lua_State
*
L
);
static
int32
card_is_dual_state
(
lua_State
*
L
);
static
int32
card_enable_dual_state
(
lua_State
*
L
);
static
int32
card_enable_dual_state
(
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