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
nanahira
ygopro-core
Commits
095aee5e
Commit
095aee5e
authored
Feb 12, 2023
by
salix5
Committed by
GitHub
Feb 12, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add EFFECT_TUNER (#488)
parent
97f0a5fc
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
1 deletion
+24
-1
card.cpp
card.cpp
+10
-0
card.h
card.h
+1
-0
effect.h
effect.h
+1
-0
field.cpp
field.cpp
+1
-1
libcard.cpp
libcard.cpp
+10
-0
scriptlib.h
scriptlib.h
+1
-0
No files found.
card.cpp
View file @
095aee5e
...
...
@@ -2917,6 +2917,16 @@ int32 card::is_not_tuner(card* scard) {
return
TRUE
;
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
)
{
if
(
!
unique_code
)
return
FALSE
;
...
...
card.h
View file @
095aee5e
...
...
@@ -332,6 +332,7 @@ public:
void
fusion_select
(
uint8
playerid
,
group
*
fusion_m
,
card
*
cg
,
uint32
chkf
,
uint8
not_material
);
int32
check_fusion_substitute
(
card
*
fcard
);
int32
is_not_tuner
(
card
*
scard
);
int32
is_tuner
(
card
*
scard
);
int32
check_unique_code
(
card
*
pcard
);
void
get_unique_target
(
card_set
*
cset
,
int32
controler
,
card
*
icard
=
0
);
...
...
effect.h
View file @
095aee5e
...
...
@@ -467,6 +467,7 @@ inline effect_flag operator|(effect_flag flag1, effect_flag flag2)
#define EFFECT_CHANGE_GRAVE_RACE 366
#define EFFECT_ACTIVATION_COUNT_LIMIT 367
#define EFFECT_LIMIT_SPECIAL_SUMMON_POSITION 368
#define EFFECT_TUNER 369
//#define EVENT_STARTUP 1000
#define EVENT_FLIP 1001
...
...
field.cpp
View file @
095aee5e
...
...
@@ -2524,7 +2524,7 @@ int32 field::check_synchro_material(card* pcard, int32 findex1, int32 findex2, i
return
FALSE
;
}
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
;
effect
*
pcheck
=
tuner
->
is_affected_by_effect
(
EFFECT_SYNCHRO_CHECK
);
if
(
pcheck
)
...
...
libcard.cpp
View file @
095aee5e
...
...
@@ -1262,6 +1262,15 @@ int32 scriptlib::card_is_not_tuner(lua_State *L) {
lua_pushboolean
(
L
,
pcard
->
is_not_tuner
(
scard
));
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
)
{
check_param_count
(
L
,
3
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
...
...
@@ -3368,6 +3377,7 @@ static const struct luaL_Reg cardlib[] = {
{
"IsSummonPlayer"
,
scriptlib
::
card_is_summon_player
},
{
"IsStatus"
,
scriptlib
::
card_is_status
},
{
"IsNotTuner"
,
scriptlib
::
card_is_not_tuner
},
{
"IsTuner"
,
scriptlib
::
card_is_tuner
},
{
"SetStatus"
,
scriptlib
::
card_set_status
},
{
"IsDualState"
,
scriptlib
::
card_is_dual_state
},
{
"EnableDualState"
,
scriptlib
::
card_enable_dual_state
},
...
...
scriptlib.h
View file @
095aee5e
...
...
@@ -133,6 +133,7 @@ public:
static
int32
card_is_summon_player
(
lua_State
*
L
);
static
int32
card_is_status
(
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_is_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