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
59c43a45
Commit
59c43a45
authored
May 18, 2020
by
DailyShana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename varieble
parent
d9dc2f56
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
68 additions
and
72 deletions
+68
-72
card.cpp
card.cpp
+45
-49
card.h
card.h
+9
-9
field.cpp
field.cpp
+4
-4
field.h
field.h
+2
-2
operations.cpp
operations.cpp
+8
-8
No files found.
card.cpp
View file @
59c43a45
This diff is collapsed.
Click to expand it.
card.h
View file @
59c43a45
...
...
@@ -289,9 +289,9 @@ public:
void
filter_immune_effect
();
void
filter_disable_related_cards
();
int32
filter_summon_procedure
(
uint8
playerid
,
effect_set
*
eset
,
uint8
ignore_count
,
uint8
min_tribute
,
uint32
zone
);
int32
check_summon_procedure
(
effect
*
p
effect
,
uint8
playerid
,
uint8
ignore_count
,
uint8
min_tribute
,
uint32
zone
);
int32
check_summon_procedure
(
effect
*
p
roc
,
uint8
playerid
,
uint8
ignore_count
,
uint8
min_tribute
,
uint32
zone
);
int32
filter_set_procedure
(
uint8
playerid
,
effect_set
*
eset
,
uint8
ignore_count
,
uint8
min_tribute
,
uint32
zone
);
int32
check_set_procedure
(
effect
*
p
effect
,
uint8
playerid
,
uint8
ignore_count
,
uint8
min_tribute
,
uint32
zone
);
int32
check_set_procedure
(
effect
*
p
roc
,
uint8
playerid
,
uint8
ignore_count
,
uint8
min_tribute
,
uint32
zone
);
void
filter_spsummon_procedure
(
uint8
playerid
,
effect_set
*
eset
,
uint32
summon_type
);
void
filter_spsummon_procedure_g
(
uint8
playerid
,
effect_set
*
eset
);
effect
*
is_affected_by_effect
(
int32
code
);
...
...
@@ -307,8 +307,8 @@ public:
int32
check_cost_condition
(
int32
ecode
,
int32
playerid
,
int32
sumtype
);
int32
is_summonable_card
();
int32
is_fusion_summonable_card
(
uint32
summon_type
);
int32
is_spsummonable
(
effect
*
p
effect
);
int32
is_summonable
(
effect
*
p
effect
,
uint8
min_tribute
,
uint32
zone
=
0x1f
,
uint32
releasable
=
0xff00ff
);
int32
is_spsummonable
(
effect
*
p
roc
);
int32
is_summonable
(
effect
*
p
roc
,
uint8
min_tribute
,
uint32
zone
=
0x1f
,
uint32
releasable
=
0xff00ff
);
int32
is_can_be_summoned
(
uint8
playerid
,
uint8
ingore_count
,
effect
*
peffect
,
uint8
min_tribute
,
uint32
zone
=
0x1f
);
int32
get_summon_tribute_count
();
int32
get_set_tribute_count
();
...
...
@@ -317,16 +317,16 @@ public:
int32
is_can_be_special_summoned
(
effect
*
reason_effect
,
uint32
sumtype
,
uint8
sumpos
,
uint8
sumplayer
,
uint8
toplayer
,
uint8
nocheck
,
uint8
nolimit
,
uint32
zone
);
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_affect_by_effect
(
effect
*
p
effect
);
int32
is_affect_by_effect
(
effect
*
reason_
effect
);
int32
is_destructable
();
int32
is_destructable_by_battle
(
card
*
pcard
);
effect
*
check_indestructable_by_effect
(
effect
*
p
effect
,
uint8
playerid
);
int32
is_destructable_by_effect
(
effect
*
p
effect
,
uint8
playerid
);
effect
*
check_indestructable_by_effect
(
effect
*
reason_
effect
,
uint8
playerid
);
int32
is_destructable_by_effect
(
effect
*
reason_
effect
,
uint8
playerid
);
int32
is_removeable
(
uint8
playerid
,
uint8
pos
,
uint32
reason
);
int32
is_removeable_as_cost
(
uint8
playerid
,
uint8
pos
);
int32
is_releasable_by_summon
(
uint8
playerid
,
card
*
pcard
);
int32
is_releasable_by_nonsummon
(
uint8
playerid
);
int32
is_releasable_by_effect
(
uint8
playerid
,
effect
*
p
effect
);
int32
is_releasable_by_effect
(
uint8
playerid
,
effect
*
reason_
effect
);
int32
is_capable_send_to_grave
(
uint8
playerid
);
int32
is_capable_send_to_hand
(
uint8
playerid
);
int32
is_capable_send_to_deck
(
uint8
playerid
);
...
...
@@ -343,7 +343,7 @@ public:
int32
is_capable_change_control
();
int32
is_control_can_be_changed
(
int32
ignore_mzone
,
uint32
zone
);
int32
is_capable_be_battle_target
(
card
*
pcard
);
int32
is_capable_be_effect_target
(
effect
*
p
effect
,
uint8
playerid
);
int32
is_capable_be_effect_target
(
effect
*
reason_
effect
,
uint8
playerid
);
int32
is_capable_overlay
(
uint8
playerid
);
int32
is_can_be_fusion_material
(
card
*
fcard
,
uint32
summon_type
);
int32
is_can_be_synchro_material
(
card
*
scard
,
card
*
tuner
=
0
);
...
...
field.cpp
View file @
59c43a45
...
...
@@ -2865,7 +2865,7 @@ int32 field::is_player_can_discard_deck_as_cost(uint8 playerid, int32 count) {
}
return
TRUE
;
}
int32
field
::
is_player_can_discard_hand
(
uint8
playerid
,
card
*
pcard
,
effect
*
p
effect
,
uint32
reason
)
{
int32
field
::
is_player_can_discard_hand
(
uint8
playerid
,
card
*
pcard
,
effect
*
reason_
effect
,
uint32
reason
)
{
if
(
pcard
->
current
.
location
!=
LOCATION_HAND
)
return
FALSE
;
effect_set
eset
;
...
...
@@ -2875,7 +2875,7 @@ int32 field::is_player_can_discard_hand(uint8 playerid, card * pcard, effect * p
return
FALSE
;
pduel
->
lua
->
add_param
(
eset
[
i
],
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
pcard
,
PARAM_TYPE_CARD
);
pduel
->
lua
->
add_param
(
p
effect
,
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
reason_
effect
,
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
reason
,
PARAM_TYPE_INT
);
if
(
pduel
->
lua
->
check_condition
(
eset
[
i
]
->
target
,
4
))
return
FALSE
;
...
...
@@ -2951,7 +2951,7 @@ int32 field::is_player_can_spsummon(uint8 playerid) {
}
return
is_player_can_spsummon_count
(
playerid
,
1
);
}
int32
field
::
is_player_can_spsummon
(
effect
*
p
effect
,
uint32
sumtype
,
uint8
sumpos
,
uint8
playerid
,
uint8
toplayer
,
card
*
pcard
)
{
int32
field
::
is_player_can_spsummon
(
effect
*
reason_
effect
,
uint32
sumtype
,
uint8
sumpos
,
uint8
playerid
,
uint8
toplayer
,
card
*
pcard
)
{
if
(
pcard
->
is_affected_by_effect
(
EFFECT_CANNOT_SPECIAL_SUMMON
))
return
FALSE
;
if
(
pcard
->
is_status
(
STATUS_FORBIDDEN
))
...
...
@@ -2982,7 +2982,7 @@ int32 field::is_player_can_spsummon(effect* peffect, uint32 sumtype, uint8 sumpo
pduel
->
lua
->
add_param
(
sumtype
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
sumpos
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
toplayer
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
p
effect
,
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
reason_
effect
,
PARAM_TYPE_EFFECT
);
if
(
pduel
->
lua
->
check_condition
(
eset
[
i
]
->
target
,
7
))
return
FALSE
;
}
...
...
field.h
View file @
59c43a45
...
...
@@ -455,13 +455,13 @@ public:
int32
is_player_can_draw
(
uint8
playerid
);
int32
is_player_can_discard_deck
(
uint8
playerid
,
int32
count
);
int32
is_player_can_discard_deck_as_cost
(
uint8
playerid
,
int32
count
);
int32
is_player_can_discard_hand
(
uint8
playerid
,
card
*
pcard
,
effect
*
p
effect
,
uint32
reason
);
int32
is_player_can_discard_hand
(
uint8
playerid
,
card
*
pcard
,
effect
*
reason_
effect
,
uint32
reason
);
int32
is_player_can_action
(
uint8
playerid
,
uint32
actionlimit
);
int32
is_player_can_summon
(
uint32
sumtype
,
uint8
playerid
,
card
*
pcard
,
uint8
toplayer
);
int32
is_player_can_mset
(
uint32
sumtype
,
uint8
playerid
,
card
*
pcard
,
uint8
toplayer
);
int32
is_player_can_sset
(
uint8
playerid
,
card
*
pcard
);
int32
is_player_can_spsummon
(
uint8
playerid
);
int32
is_player_can_spsummon
(
effect
*
p
effect
,
uint32
sumtype
,
uint8
sumpos
,
uint8
playerid
,
uint8
toplayer
,
card
*
pcard
);
int32
is_player_can_spsummon
(
effect
*
reason_
effect
,
uint32
sumtype
,
uint8
sumpos
,
uint8
playerid
,
uint8
toplayer
,
card
*
pcard
);
int32
is_player_can_flipsummon
(
uint8
playerid
,
card
*
pcard
);
int32
is_player_can_spsummon_monster
(
uint8
playerid
,
uint8
toplayer
,
uint8
sumpos
,
uint32
sumtype
,
card_data
*
pdata
);
int32
is_player_can_spsummon_count
(
uint8
playerid
,
uint32
count
);
...
...
operations.cpp
View file @
59c43a45
...
...
@@ -1603,8 +1603,8 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
core
.
units
.
begin
()
->
ptr1
=
0
;
return
FALSE
;
}
effect
*
p
effect
=
core
.
select_effects
[
returns
.
ivalue
[
0
]];
core
.
units
.
begin
()
->
peffect
=
p
effect
;
effect
*
p
roc
=
core
.
select_effects
[
returns
.
ivalue
[
0
]];
core
.
units
.
begin
()
->
peffect
=
p
roc
;
core
.
select_effects
.
clear
();
core
.
select_options
.
clear
();
if
(
ignore_count
||
core
.
summon_count
[
sumplayer
]
<
get_summon_count_limit
(
sumplayer
))
{
...
...
@@ -1619,10 +1619,10 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
int32
new_zone
=
retval
.
size
()
>
1
?
retval
[
1
]
:
0x1f
;
int32
releasable
=
retval
.
size
()
>
2
?
(
retval
[
2
]
<
0
?
0xff00ff
+
retval
[
2
]
:
retval
[
2
])
:
0xff00ff
;
new_zone
&=
zone
;
if
(
p
effect
)
{
if
(
p
roc
)
{
if
(
new_min_tribute
<
(
int32
)
min_tribute
)
new_min_tribute
=
min_tribute
;
if
(
!
target
->
is_summonable
(
p
effect
,
new_min_tribute
,
new_zone
,
releasable
))
if
(
!
target
->
is_summonable
(
p
roc
,
new_min_tribute
,
new_zone
,
releasable
))
continue
;
}
else
{
int32
rcount
=
target
->
get_summon_tribute_count
();
...
...
@@ -2139,8 +2139,8 @@ int32 field::mset(uint16 step, uint8 setplayer, card* target, effect* proc, uint
core
.
units
.
begin
()
->
ptr1
=
0
;
return
FALSE
;
}
effect
*
p
effect
=
core
.
select_effects
[
returns
.
ivalue
[
0
]];
core
.
units
.
begin
()
->
peffect
=
p
effect
;
effect
*
p
roc
=
core
.
select_effects
[
returns
.
ivalue
[
0
]];
core
.
units
.
begin
()
->
peffect
=
p
roc
;
core
.
select_effects
.
clear
();
core
.
select_options
.
clear
();
if
(
ignore_count
||
core
.
summon_count
[
setplayer
]
<
get_summon_count_limit
(
setplayer
))
{
...
...
@@ -2155,10 +2155,10 @@ int32 field::mset(uint16 step, uint8 setplayer, card* target, effect* proc, uint
int32
new_zone
=
retval
.
size
()
>
1
?
retval
[
1
]
:
0x1f
;
int32
releasable
=
retval
.
size
()
>
2
?
(
retval
[
2
]
<
0
?
0xff00ff
+
retval
[
2
]
:
retval
[
2
])
:
0xff00ff
;
new_zone
&=
zone
;
if
(
p
effect
)
{
if
(
p
roc
)
{
if
(
new_min_tribute
<
(
int32
)
min_tribute
)
new_min_tribute
=
min_tribute
;
if
(
!
target
->
is_summonable
(
p
effect
,
new_min_tribute
,
new_zone
,
releasable
))
if
(
!
target
->
is_summonable
(
p
roc
,
new_min_tribute
,
new_zone
,
releasable
))
continue
;
}
else
{
int32
rcount
=
target
->
get_set_tribute_count
();
...
...
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