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
71d322a4
Commit
71d322a4
authored
Jun 05, 2017
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
3ad6304e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
12 deletions
+13
-12
field.cpp
field.cpp
+6
-4
field.h
field.h
+3
-3
operations.cpp
operations.cpp
+0
-1
processor.cpp
processor.cpp
+4
-4
No files found.
field.cpp
View file @
71d322a4
...
...
@@ -45,8 +45,8 @@ field::field(duel* pduel) {
infos
.
phase
=
0
;
infos
.
turn_player
=
0
;
for
(
int32
i
=
0
;
i
<
2
;
++
i
)
{
cost
[
i
].
count
=
0
;
cost
[
i
].
amount
=
0
;
//
cost[i].count = 0;
//
cost[i].amount = 0;
core
.
hint_timing
[
i
]
=
0
;
player
[
i
].
lp
=
8000
;
player
[
i
].
start_count
=
5
;
...
...
@@ -2024,11 +2024,12 @@ int32 field::check_lp_cost(uint8 playerid, uint32 lp) {
e
.
reason_player
=
playerid
;
if
(
effect_replace_check
(
EFFECT_LPCOST_REPLACE
,
e
))
return
TRUE
;
cost
[
playerid
].
amount
+=
val
;
if
(
cost
[
playerid
].
amount
<=
player
[
playerid
].
lp
)
//
cost[playerid].amount += val;
if
(
val
<=
player
[
playerid
].
lp
)
return
TRUE
;
return
FALSE
;
}
/*
void field::save_lp_cost() {
for(uint8 playerid = 0; playerid < 2; ++playerid) {
if(cost[playerid].count < 8)
...
...
@@ -2043,6 +2044,7 @@ void field::restore_lp_cost() {
cost[playerid].amount = cost[playerid].lpstack[cost[playerid].count];
}
}
*/
uint32
field
::
get_field_counter
(
uint8
self
,
uint8
s
,
uint8
o
,
uint16
countertype
)
{
uint8
c
=
s
;
uint32
count
=
0
;
...
...
field.h
View file @
71d322a4
...
...
@@ -325,7 +325,7 @@ public:
player_info
player
[
2
];
card
*
temp_card
;
field_info
infos
;
lpcost
cost
[
2
];
//
lpcost cost[2];
field_effect
effects
;
processor
core
;
return_value
returns
;
...
...
@@ -401,8 +401,8 @@ public:
int32
check_spsummon_counter
(
uint8
playerid
,
uint8
ct
=
1
);
int32
check_lp_cost
(
uint8
playerid
,
uint32
cost
);
void
save_lp_cost
()
;
void
restore_lp_cost
()
;
void
save_lp_cost
()
{}
void
restore_lp_cost
()
{}
int32
pay_lp_cost
(
uint32
step
,
uint8
playerid
,
uint32
cost
);
uint32
get_field_counter
(
uint8
self
,
uint8
s
,
uint8
o
,
uint16
countertype
);
...
...
operations.cpp
View file @
71d322a4
...
...
@@ -625,7 +625,6 @@ int32 field::pay_lp_cost(uint32 step, uint8 playerid, uint32 cost) {
effect
*
peffect
=
core
.
select_effects
[
returns
.
ivalue
[
0
]];
if
(
!
peffect
)
{
player
[
playerid
].
lp
-=
cost
;
this
->
cost
[
playerid
].
amount
-=
cost
;
pduel
->
write_buffer8
(
MSG_PAY_LPCOST
);
pduel
->
write_buffer8
(
playerid
);
pduel
->
write_buffer32
(
cost
);
...
...
processor.cpp
View file @
71d322a4
...
...
@@ -1165,10 +1165,10 @@ int32 field::execute_operation(uint16 step, effect * triggering_effect, uint8 tr
shuffle
(
0
,
LOCATION_DECK
);
if
(
core
.
shuffle_deck_check
[
1
])
shuffle
(
1
,
LOCATION_DECK
);
cost
[
0
].
count
=
0
;
cost
[
1
].
count
=
0
;
cost
[
0
].
amount
=
0
;
cost
[
1
].
amount
=
0
;
//
cost[0].count = 0;
//
cost[1].count = 0;
//
cost[0].amount = 0;
//
cost[1].amount = 0;
}
core
.
shuffle_check_disabled
=
FALSE
;
return
TRUE
;
...
...
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