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
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
MyCard
ygopro-core
Commits
0d2d78fc
Commit
0d2d78fc
authored
Apr 08, 2016
by
salix5
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
edit
parent
9516857b
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
47 additions
and
38 deletions
+47
-38
card.cpp
card.cpp
+8
-1
card.h
card.h
+1
-1
effect.cpp
effect.cpp
+1
-1
field.cpp
field.cpp
+2
-0
libdebug.cpp
libdebug.cpp
+1
-1
libduel.cpp
libduel.cpp
+3
-3
ocgapi.cpp
ocgapi.cpp
+1
-1
operations.cpp
operations.cpp
+26
-26
processor.cpp
processor.cpp
+4
-4
No files found.
card.cpp
View file @
0d2d78fc
...
...
@@ -999,7 +999,7 @@ void card::cancel_field_effect() {
if
(
unique_code
&&
(
current
.
location
&
unique_location
))
pduel
->
game_field
->
remove_unique_card
(
this
);
}
void
card
::
enable_field_effect
(
int32
enabled
)
{
void
card
::
enable_field_effect
(
bool
enabled
)
{
if
(
current
.
location
==
0
)
return
;
if
((
enabled
&&
get_status
(
STATUS_EFFECT_ENABLED
))
||
(
!
enabled
&&
!
get_status
(
STATUS_EFFECT_ENABLED
)))
...
...
@@ -1390,6 +1390,7 @@ void card::reset_effect_count() {
peffect
->
recharge
();
}
}
// refresh STATUS_DISABLED based on EFFECT_DISABLE and EFFECT_CANNOT_DISABLE
int32
card
::
refresh_disable_status
()
{
int32
pre_dis
=
is_status
(
STATUS_DISABLED
);
filter_immune_effect
();
...
...
@@ -1687,6 +1688,7 @@ void card::filter_single_continuous_effect(int32 code, effect_set* eset, uint8 s
if
(
sort
)
eset
->
sort
();
}
// refresh this->immune_effect
void
card
::
filter_immune_effect
()
{
effect
*
peffect
;
immune_effect
.
clear
();
...
...
@@ -1712,6 +1714,9 @@ void card::filter_immune_effect() {
}
immune_effect
.
sort
();
}
// for all disable-related peffect of this,
// 1. put all cards in the target of peffect into effects.disable_check_set, effects.disable_check_list
// 2. add equiping_target of peffect into effects.disable_check_set, effects.disable_check_list
void
card
::
filter_disable_related_cards
()
{
for
(
auto
it
=
indexer
.
begin
();
it
!=
indexer
.
end
();
++
it
)
{
effect
*
peffect
=
it
->
first
;
...
...
@@ -1858,6 +1863,7 @@ void card::filter_spsummon_procedure_g(uint8 playerid, effect_set* peset) {
pduel
->
game_field
->
core
.
reason_player
=
op
;
}
}
// return: an effect with code which affects this or 0
effect
*
card
::
is_affected_by_effect
(
int32
code
)
{
effect
*
peffect
;
auto
rg
=
single_effect
.
equal_range
(
code
);
...
...
@@ -2319,6 +2325,7 @@ int32 card::is_setable_szone(uint8 playerid, uint8 ignore_fd) {
pduel
->
game_field
->
restore_lp_cost
();
return
TRUE
;
}
// return: this is affected by peffect or not
int32
card
::
is_affect_by_effect
(
effect
*
peffect
)
{
if
(
is_status
(
STATUS_SUMMONING
))
return
FALSE
;
...
...
card.h
View file @
0d2d78fc
...
...
@@ -187,7 +187,7 @@ public:
void
xyz_remove
(
card
*
mat
);
void
apply_field_effect
();
void
cancel_field_effect
();
void
enable_field_effect
(
int32
enabled
);
void
enable_field_effect
(
bool
enabled
);
int32
add_effect
(
effect
*
peffect
);
void
remove_effect
(
effect
*
peffect
);
void
remove_effect
(
effect
*
peffect
,
effect_container
::
iterator
it
);
...
...
effect.cpp
View file @
0d2d78fc
...
...
@@ -376,7 +376,7 @@ int32 effect::is_activate_check(uint8 playerid, const tevent& e, int32 neglect_c
pduel
->
game_field
->
restore_lp_cost
();
return
result
;
}
// check if pcard is the target of
a field effect
// check if pcard is the target of
the field effect this
int32
effect
::
is_target
(
card
*
pcard
)
{
if
(
type
&
EFFECT_TYPE_ACTIONS
)
return
FALSE
;
...
...
field.cpp
View file @
0d2d78fc
...
...
@@ -897,6 +897,7 @@ void field::filter_field_effect(uint32 code, effect_set* eset, uint8 sort) {
if
(
sort
)
eset
->
sort
();
}
// put all cards in the target of peffect into cset
void
field
::
filter_affected_cards
(
effect
*
peffect
,
card_set
*
cset
)
{
if
((
peffect
->
type
&
EFFECT_TYPE_ACTIONS
)
||
!
(
peffect
->
type
&
EFFECT_TYPE_FIELD
)
||
peffect
->
is_flag
(
EFFECT_FLAG_PLAYER_TARGET
))
return
;
...
...
@@ -1389,6 +1390,7 @@ int32 field::get_overlay_count(uint8 self, uint8 s, uint8 o) {
}
return
count
;
}
// put all cards in the target of peffect into effects.disable_check_set, effects.disable_check_list
void
field
::
update_disable_check_list
(
effect
*
peffect
)
{
card_set
cset
;
filter_affected_cards
(
peffect
,
&
cset
);
...
...
libdebug.cpp
View file @
0d2d78fc
...
...
@@ -43,7 +43,7 @@ int32 scriptlib::debug_add_card(lua_State *L) {
pduel
->
game_field
->
add_card
(
playerid
,
pcard
,
location
,
sequence
);
pcard
->
current
.
position
=
position
;
if
(
!
(
location
&
LOCATION_ONFIELD
)
||
(
position
&
POS_FACEUP
))
{
pcard
->
enable_field_effect
(
TRUE
);
pcard
->
enable_field_effect
(
true
);
pduel
->
game_field
->
adjust_instant
();
}
if
(
proc
)
...
...
libduel.cpp
View file @
0d2d78fc
...
...
@@ -599,7 +599,7 @@ int32 scriptlib::duel_move_to_field(lua_State *L) {
uint32
positions
=
lua_tointeger
(
L
,
5
);
uint32
enable
=
lua_toboolean
(
L
,
6
);
duel
*
pduel
=
pcard
->
pduel
;
pcard
->
enable_field_effect
(
FALSE
);
pcard
->
enable_field_effect
(
false
);
pduel
->
game_field
->
adjust_instant
();
pduel
->
game_field
->
move_to_field
(
pcard
,
move_player
,
playerid
,
destination
,
positions
,
enable
);
pduel
->
game_field
->
core
.
subunits
.
begin
()
->
type
=
PROCESSOR_MOVETOFIELD_S
;
...
...
@@ -616,7 +616,7 @@ int32 scriptlib::duel_return_to_field(lua_State *L) {
if
(
lua_gettop
(
L
)
>
1
)
pos
=
lua_tointeger
(
L
,
2
);
duel
*
pduel
=
pcard
->
pduel
;
pcard
->
enable_field_effect
(
FALSE
);
pcard
->
enable_field_effect
(
false
);
pduel
->
game_field
->
adjust_instant
();
pduel
->
game_field
->
refresh_location_info_instant
();
pduel
->
game_field
->
move_to_field
(
pcard
,
pcard
->
previous
.
controler
,
pcard
->
previous
.
controler
,
pcard
->
previous
.
location
,
pos
,
TRUE
,
1
);
...
...
@@ -974,7 +974,7 @@ int32 scriptlib::duel_equip_complete(lua_State *L) {
for
(
auto
cit
=
pduel
->
game_field
->
core
.
equiping_cards
.
begin
();
cit
!=
pduel
->
game_field
->
core
.
equiping_cards
.
end
();
++
cit
)
{
card
*
equip_card
=
*
cit
;
if
(
equip_card
->
is_position
(
POS_FACEUP
))
equip_card
->
enable_field_effect
(
TRUE
);
equip_card
->
enable_field_effect
(
true
);
etargets
.
insert
(
equip_card
->
equiping_target
);
}
pduel
->
game_field
->
adjust_instant
();
...
...
ocgapi.cpp
View file @
0d2d78fc
...
...
@@ -140,7 +140,7 @@ extern "C" DECL_DLLEXPORT void new_card(ptr pduel, uint32 code, uint8 owner, uin
ptduel
->
game_field
->
add_card
(
playerid
,
pcard
,
location
,
sequence
);
pcard
->
current
.
position
=
position
;
if
(
!
(
location
&
LOCATION_ONFIELD
)
||
(
position
&
POS_FACEUP
))
{
pcard
->
enable_field_effect
(
TRUE
);
pcard
->
enable_field_effect
(
true
);
ptduel
->
game_field
->
adjust_instant
();
}
if
(
location
&
LOCATION_ONFIELD
)
{
...
...
operations.cpp
View file @
0d2d78fc
This diff is collapsed.
Click to expand it.
processor.cpp
View file @
0d2d78fc
...
...
@@ -4243,7 +4243,7 @@ int32 field::add_chain(uint16 step) {
}
}
if
(
peffect
->
handler
->
current
.
location
==
LOCATION_HAND
)
{
peffect
->
handler
->
enable_field_effect
(
FALSE
);
peffect
->
handler
->
enable_field_effect
(
false
);
peffect
->
handler
->
set_status
(
STATUS_ACT_FROM_HAND
,
TRUE
);
move_to_field
(
peffect
->
handler
,
peffect
->
handler
->
current
.
controler
,
peffect
->
handler
->
current
.
controler
,
LOCATION_SZONE
,
POS_FACEUP
);
}
else
{
...
...
@@ -4567,12 +4567,12 @@ int32 field::solve_chain(uint16 step, uint32 chainend_arg1, uint32 chainend_arg2
card
*
pcard
=
peffect
->
handler
;
if
((
peffect
->
type
&
EFFECT_TYPE_ACTIVATE
)
&&
pcard
->
is_has_relation
(
*
cait
))
{
pcard
->
set_status
(
STATUS_ACTIVATED
,
TRUE
);
pcard
->
enable_field_effect
(
TRUE
);
pcard
->
enable_field_effect
(
true
);
if
(
core
.
duel_options
&
DUEL_OBSOLETE_RULING
)
{
if
(
pcard
->
data
.
type
&
TYPE_FIELD
)
{
card
*
fscard
=
player
[
1
-
pcard
->
current
.
controler
].
list_szone
[
5
];
if
(
fscard
&&
fscard
->
is_position
(
POS_FACEUP
))
fscard
->
enable_field_effect
(
FALSE
);
fscard
->
enable_field_effect
(
false
);
}
}
adjust_instant
();
...
...
@@ -4717,7 +4717,7 @@ int32 field::solve_chain(uint16 step, uint32 chainend_arg1, uint32 chainend_arg2
}
for
(
auto
cit
=
core
.
delayed_enable_set
.
begin
();
cit
!=
core
.
delayed_enable_set
.
end
();
++
cit
)
{
if
((
*
cit
)
->
current
.
location
==
LOCATION_MZONE
)
(
*
cit
)
->
enable_field_effect
(
TRUE
);
(
*
cit
)
->
enable_field_effect
(
true
);
}
core
.
delayed_enable_set
.
clear
();
adjust_all
();
...
...
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