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
e652b1d5
Commit
e652b1d5
authored
Apr 17, 2016
by
DailyShana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update EFFECT_INDESTRUCTABLE_COUNT
parent
94153dac
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
56 additions
and
24 deletions
+56
-24
card.cpp
card.cpp
+1
-0
card.h
card.h
+2
-0
operations.cpp
operations.cpp
+52
-24
processor.cpp
processor.cpp
+1
-0
No files found.
card.cpp
View file @
e652b1d5
...
...
@@ -1330,6 +1330,7 @@ void card::reset(uint32 id, uint32 reset_type) {
if
(
id
&
0x47c0000
)
clear_relate_effect
();
if
(
id
&
0x5fc0000
)
{
indestructable_effects
.
clear
();
announced_cards
.
clear
();
attacked_cards
.
clear
();
announce_count
=
0
;
...
...
card.h
View file @
e652b1d5
...
...
@@ -93,6 +93,7 @@ public:
typedef
std
::
unordered_set
<
std
::
pair
<
effect
*
,
uint16
>
,
effect_relation_hash
>
effect_relation
;
typedef
std
::
unordered_map
<
card
*
,
uint32
>
relation_map
;
typedef
std
::
map
<
uint16
,
std
::
array
<
uint16
,
2
>
>
counter_map
;
typedef
std
::
map
<
uint32
,
int32
>
effect_count
;
class
attacker_map
:
public
std
::
unordered_map
<
uint16
,
std
::
pair
<
card
*
,
uint32
>
>
{
public:
void
addcard
(
card
*
pcard
);
...
...
@@ -133,6 +134,7 @@ public:
card
*
overlay_target
;
relation_map
relations
;
counter_map
counters
;
effect_count
indestructable_effects
;
attacker_map
announced_cards
;
attacker_map
attacked_cards
;
attacker_map
battled_cards
;
...
...
operations.cpp
View file @
e652b1d5
...
...
@@ -2643,18 +2643,30 @@ int32 field::destroy(uint16 step, group * targets, effect * reason_effect, uint3
pcard
->
filter_effect
(
EFFECT_INDESTRUCTABLE_COUNT
,
&
eset
);
if
(
eset
.
size
())
{
bool
is_destructable
=
true
;
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
if
(
!
eset
[
i
]
->
is_flag
(
EFFECT_FLAG_COUNT_LIMIT
)
||
(
eset
[
i
]
->
reset_count
&
0xf00
)
==
0
)
continue
;
pduel
->
lua
->
add_param
(
pcard
->
current
.
reason_effect
,
PARAM_TYPE_EFFECT
)
;
pduel
->
lua
->
add_param
(
pcard
->
current
.
reason
,
PARAM_TYPE_IN
T
);
pduel
->
lua
->
add_param
(
pcard
->
current
.
reason_player
,
PARAM_TYPE_INT
);
if
(
eset
[
i
]
->
check_value_condition
(
3
))
{
eset
[
i
]
->
dec_count
();
if
(
reason_player
!=
5
)
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
if
(
eset
[
i
]
->
is_flag
(
EFFECT_FLAG_COUNT_LIMIT
))
{
if
((
eset
[
i
]
->
reset_count
&
0xf00
)
==
0
)
continue
;
pduel
->
lua
->
add_param
(
pcard
->
current
.
reason_effect
,
PARAM_TYPE_EFFEC
T
);
pduel
->
lua
->
add_param
(
pcard
->
current
.
reason
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
pcard
->
current
.
reason_player
,
PARAM_TYPE_INT
);
if
(
eset
[
i
]
->
check_value_condition
(
3
))
{
eset
[
i
]
->
dec_count
();
indestructable_effect_set
.
insert
(
eset
[
i
]);
is_destructable
=
false
;
break
;
is_destructable
=
false
;
}
}
else
{
pduel
->
lua
->
add_param
(
pcard
->
current
.
reason_effect
,
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
pcard
->
current
.
reason
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
pcard
->
current
.
reason_player
,
PARAM_TYPE_INT
);
int32
ct
;
if
(
ct
=
eset
[
i
]
->
get_value
(
3
))
{
auto
it
=
pcard
->
indestructable_effects
.
insert
(
std
::
make_pair
(
eset
[
i
]
->
id
,
0
));
if
(
++
it
.
first
->
second
<=
ct
)
{
indestructable_effect_set
.
insert
(
eset
[
i
]);
is_destructable
=
false
;
}
}
}
}
if
(
!
is_destructable
)
{
...
...
@@ -2837,19 +2849,35 @@ int32 field::destroy(uint16 step, group * targets, effect * reason_effect, uint3
if
(
eset
.
size
())
{
bool
indes
=
false
;
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
if
(
!
eset
[
i
]
->
is_flag
(
EFFECT_FLAG_COUNT_LIMIT
)
||
(
eset
[
i
]
->
reset_count
&
0xf00
)
==
0
)
continue
;
pduel
->
lua
->
add_param
(
pcard
->
current
.
reason_effect
,
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
pcard
->
current
.
reason
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
pcard
->
current
.
reason_player
,
PARAM_TYPE_INT
);
if
(
eset
[
i
]
->
check_value_condition
(
3
))
{
eset
[
i
]
->
dec_count
();
pduel
->
write_buffer8
(
MSG_HINT
);
pduel
->
write_buffer8
(
HINT_CARD
);
pduel
->
write_buffer8
(
0
);
pduel
->
write_buffer32
(
eset
[
i
]
->
owner
->
data
.
code
);
indes
=
true
;
break
;
if
(
eset
[
i
]
->
is_flag
(
EFFECT_FLAG_COUNT_LIMIT
))
{
if
((
eset
[
i
]
->
reset_count
&
0xf00
)
==
0
)
continue
;
pduel
->
lua
->
add_param
(
pcard
->
current
.
reason_effect
,
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
pcard
->
current
.
reason
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
pcard
->
current
.
reason_player
,
PARAM_TYPE_INT
);
if
(
eset
[
i
]
->
check_value_condition
(
3
))
{
eset
[
i
]
->
dec_count
();
pduel
->
write_buffer8
(
MSG_HINT
);
pduel
->
write_buffer8
(
HINT_CARD
);
pduel
->
write_buffer8
(
0
);
pduel
->
write_buffer32
(
eset
[
i
]
->
owner
->
data
.
code
);
indes
=
true
;
}
}
else
{
pduel
->
lua
->
add_param
(
pcard
->
current
.
reason_effect
,
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
pcard
->
current
.
reason
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
pcard
->
current
.
reason_player
,
PARAM_TYPE_INT
);
int32
ct
;
if
(
ct
=
eset
[
i
]
->
get_value
(
3
))
{
auto
it
=
pcard
->
indestructable_effects
.
insert
(
std
::
make_pair
(
eset
[
i
]
->
id
,
0
));
if
(
++
it
.
first
->
second
<=
ct
)
{
pduel
->
write_buffer8
(
MSG_HINT
);
pduel
->
write_buffer8
(
HINT_CARD
);
pduel
->
write_buffer8
(
0
);
pduel
->
write_buffer32
(
eset
[
i
]
->
owner
->
data
.
code
);
indes
=
true
;
}
}
}
}
if
(
indes
)
{
...
...
processor.cpp
View file @
e652b1d5
...
...
@@ -3902,6 +3902,7 @@ int32 field::process_turn(uint16 step, uint8 turn_player) {
pcard
->
set_status
(
STATUS_SPSUMMON_TURN
,
FALSE
);
pcard
->
set_status
(
STATUS_SET_TURN
,
FALSE
);
pcard
->
set_status
(
STATUS_FORM_CHANGED
,
FALSE
);
pcard
->
indestructable_effects
.
clear
();
pcard
->
announce_count
=
0
;
pcard
->
attacked_count
=
0
;
pcard
->
announced_cards
.
clear
();
...
...
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