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
6ee4147f
Commit
6ee4147f
authored
Dec 07, 2025
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nothing to test now
parent
91a69489
Pipeline
#42847
passed with stages
in 2 minutes and 31 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
28 deletions
+31
-28
card.cpp
card.cpp
+8
-0
field.cpp
field.cpp
+0
-12
libcard.cpp
libcard.cpp
+10
-10
libduel.cpp
libduel.cpp
+11
-4
scriptlib.h
scriptlib.h
+2
-2
No files found.
card.cpp
View file @
6ee4147f
...
...
@@ -4189,6 +4189,14 @@ int32_t card::is_can_be_fusion_material(card* fcard, uint32_t summon_type) {
if
(
eset
[
i
]
->
get_value
(
fcard
,
1
))
return
FALSE
;
}
eset
.
clear
();
filter_effect
(
EFFECT_EXTRA_FUSION_MATERIAL
,
&
eset
);
if
(
eset
.
size
())
{
for
(
effect_set
::
size_type
i
=
0
;
i
<
eset
.
size
();
++
i
)
if
(
eset
[
i
]
->
get_value
(
fcard
))
return
TRUE
;
return
FALSE
;
}
return
TRUE
;
}
int32_t
card
::
is_can_be_synchro_material
(
card
*
scard
,
card
*
tuner
)
{
...
...
field.cpp
View file @
6ee4147f
...
...
@@ -1944,26 +1944,14 @@ void field::get_fusion_material(uint8_t playerid, card_set* material_all, card_s
material_base
->
insert
(
pcard
);
}
}
// Fullmetalfoes Alkahest etc
for
(
auto
&
pcard
:
player
[
playerid
].
list_szone
)
{
if
(
pcard
&&
pcard
->
is_affected_by_effect
(
EFFECT_EXTRA_FUSION_MATERIAL
))
material_all
->
insert
(
pcard
);
}
// Lunalight Masquerade etc
for
(
auto
&
pcard
:
player
[
playerid
].
list_grave
)
{
if
(
pcard
->
is_affected_by_effect
(
EFFECT_EXTRA_FUSION_MATERIAL
))
material_all
->
insert
(
pcard
);
}
// Curse of the Shadow Prison
for
(
auto
&
pcard
:
player
[
1
-
playerid
].
list_mzone
)
{
if
(
pcard
&&
pcard
->
is_affected_by_effect
(
EFFECT_EXTRA_FUSION_MATERIAL
))
material_all
->
insert
(
pcard
);
}
// Amazoness Secret Arts
for
(
auto
&
pcard
:
player
[
playerid
].
list_extra
)
{
if
(
pcard
->
is_affected_by_effect
(
EFFECT_EXTRA_FUSION_MATERIAL
))
material_all
->
insert
(
pcard
);
}
material_all
->
insert
(
material_base
->
begin
(),
material_base
->
end
());
}
void
field
::
ritual_release
(
const
card_set
&
material
)
{
...
...
libcard.cpp
View file @
6ee4147f
...
...
@@ -193,6 +193,15 @@ int32_t scriptlib::card_get_removed_overlay_count(lua_State *L) {
lua_pushinteger
(
L
,
pcard
->
removed_overlay_count
);
return
1
;
}
int32_t
scriptlib
::
card_check_spsummon_once
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
auto
playerid
=
(
int32_t
)
lua_tointeger
(
L
,
2
);
auto
pduel
=
pcard
->
pduel
;
lua_pushboolean
(
L
,
pduel
->
game_field
->
check_spsummon_once
(
pcard
,
playerid
));
return
1
;
}
int32_t
scriptlib
::
card_get_code
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
...
...
@@ -3627,15 +3636,6 @@ int32_t scriptlib::card_clear_meta(lua_State *L) {
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
return
pcard
->
meta
.
luaop_clear
();
}
int32_t
scriptlib
::
card_check_spsummon_once
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
auto
playerid
=
(
int32_t
)
lua_tointeger
(
L
,
2
);
auto
pduel
=
pcard
->
pduel
;
lua_pushboolean
(
L
,
pduel
->
game_field
->
check_spsummon_once
(
pcard
,
playerid
));
return
1
;
}
static
const
struct
luaL_Reg
cardlib
[]
=
{
//millux
...
...
@@ -3649,6 +3649,7 @@ static const struct luaL_Reg cardlib[] = {
{
"GetRemovedOverlayCount"
,
scriptlib
::
card_get_removed_overlay_count
},
{
"IsAbleToDecreaseAttackAsCost"
,
scriptlib
::
card_is_able_to_decrease_attack_as_cost
},
{
"IsAbleToDecreaseDefenseAsCost"
,
scriptlib
::
card_is_able_to_decrease_defense_as_cost
},
{
"CheckSPSummonOnce"
,
scriptlib
::
card_check_spsummon_once
},
{
"GetCode"
,
scriptlib
::
card_get_code
},
{
"GetOriginalCode"
,
scriptlib
::
card_get_origin_code
},
...
...
@@ -3931,7 +3932,6 @@ static const struct luaL_Reg cardlib[] = {
{
"HasMetaValue"
,
scriptlib
::
card_has_meta_value
},
{
"ClearMeta"
,
scriptlib
::
card_clear_meta
},
{
"GetMetaKeys"
,
scriptlib
::
card_get_meta_keys
},
{
"CheckSPSummonOnce"
,
scriptlib
::
card_check_spsummon_once
},
{
nullptr
,
nullptr
}
};
void
scriptlib
::
open_cardlib
(
lua_State
*
L
)
{
...
...
libduel.cpp
View file @
6ee4147f
...
...
@@ -377,12 +377,19 @@ int32_t scriptlib::duel_enable_global_flag(lua_State *L) {
pduel
->
game_field
->
core
.
global_flag
|=
flag
;
return
0
;
}
int32_t
scriptlib
::
duel_is_global_flag
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
uint32_t
flag
=
(
u
int32_t
)
lua_tointeger
(
L
,
1
);
int32_t
flag
=
(
int32_t
)
lua_tointeger
(
L
,
1
);
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
lua_pushboolean
(
L
,
(
pduel
->
game_field
->
core
.
global_flag
&
flag
)
==
flag
);
return
1
;
if
((
pduel
->
game_field
->
core
.
global_flag
&
flag
)
==
flag
)
{
lua_pushboolean
(
L
,
1
);
// true
}
else
{
lua_pushboolean
(
L
,
0
);
// false
}
return
1
;
// 返回一个结果值
}
int32_t
scriptlib
::
duel_get_lp
(
lua_State
*
L
)
{
...
...
@@ -5343,9 +5350,9 @@ static const struct luaL_Reg duellib[] = {
{
"SetRegistry"
,
scriptlib
::
duel_set_registry
},
{
"GetRegistry"
,
scriptlib
::
duel_get_registry
},
{
"ClearRegistry"
,
scriptlib
::
duel_clear_registry
},
{
"IsGlobalFlag"
,
scriptlib
::
duel_is_global_flag
},
{
"EnableGlobalFlag"
,
scriptlib
::
duel_enable_global_flag
},
{
"IsGlobalFlag"
,
scriptlib
::
duel_is_global_flag
},
{
"GetLP"
,
scriptlib
::
duel_get_lp
},
{
"SetLP"
,
scriptlib
::
duel_set_lp
},
{
"IsTurnPlayer"
,
scriptlib
::
duel_is_turn_player
},
...
...
scriptlib.h
View file @
6ee4147f
...
...
@@ -37,6 +37,7 @@ public:
static
int32_t
card_get_origin_link_marker
(
lua_State
*
L
);
static
int32_t
card_is_xyz_summonable_by_rose
(
lua_State
*
L
);
static
int32_t
card_get_removed_overlay_count
(
lua_State
*
L
);
static
int32_t
card_check_spsummon_once
(
lua_State
*
L
);
static
int32_t
effect_set_owner
(
lua_State
*
L
);
static
int32_t
effect_get_count_limit
(
lua_State
*
L
);
static
int32_t
duel_get_master_rule
(
lua_State
*
L
);
...
...
@@ -57,6 +58,7 @@ public:
static
int32_t
duel_set_registry
(
lua_State
*
L
);
static
int32_t
duel_get_registry
(
lua_State
*
L
);
static
int32_t
duel_clear_registry
(
lua_State
*
L
);
static
int32_t
duel_is_global_flag
(
lua_State
*
L
);
//card lib
static
int32_t
card_get_code
(
lua_State
*
L
);
static
int32_t
card_get_origin_code
(
lua_State
*
L
);
...
...
@@ -336,7 +338,6 @@ public:
static
int32_t
card_reset_negate_effect
(
lua_State
*
L
);
static
int32_t
card_assume_prop
(
lua_State
*
L
);
static
int32_t
card_set_spsummon_once
(
lua_State
*
L
);
static
int32_t
card_check_spsummon_once
(
lua_State
*
L
);
static
void
open_cardlib
(
lua_State
*
L
);
//Effect functions
...
...
@@ -436,7 +437,6 @@ public:
//Duel functions
static
int32_t
duel_enable_global_flag
(
lua_State
*
L
);
static
int32_t
duel_is_global_flag
(
lua_State
*
L
);
static
int32_t
duel_get_lp
(
lua_State
*
L
);
static
int32_t
duel_set_lp
(
lua_State
*
L
);
static
int32_t
duel_is_turn_player
(
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