Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile
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
fallenstardust
YGOMobile
Commits
950143a4
Commit
950143a4
authored
May 27, 2019
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sync ocgcore/processor.cpp
parent
65f536df
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
35 deletions
+29
-35
Classes/gframe/game.cpp
Classes/gframe/game.cpp
+1
-3
Classes/ocgcore/processor.cpp
Classes/ocgcore/processor.cpp
+28
-32
No files found.
Classes/gframe/game.cpp
View file @
950143a4
...
...
@@ -567,10 +567,9 @@ bool Game::Initialize() {
btnPSDD
->
setImageScale
(
core
::
vector2df
(
0.5
*
xScale
,
0.5
*
yScale
));
btnPSDD
->
setImageRotation
(
270
);
btnPSDD
->
setImage
(
imageManager
.
tCover
[
2
],
rect
<
s32
>
(
0
,
0
,
CARD_IMG_WIDTH
,
CARD_IMG_HEIGHT
));
//card select
#ifdef _IRR_ANDROID_PLATFORM_
//card select
wCardSelect
=
env
->
addWindow
(
rect
<
s32
>
(
320
*
xScale
,
100
*
yScale
,
1000
*
xScale
,
430
*
yScale
),
false
,
L""
);
#endif
wCardSelect
->
getCloseButton
()
->
setVisible
(
false
);
wCardSelect
->
setVisible
(
false
);
for
(
int
i
=
0
;
i
<
5
;
++
i
)
{
...
...
@@ -580,7 +579,6 @@ bool Game::Initialize() {
btnCardSelect
[
i
]
=
irr
::
gui
::
CGUIImageButton
::
addImageButton
(
env
,
rect
<
s32
>
((
30
+
125
*
i
)
*
xScale
,
55
*
yScale
,
(
150
+
125
*
i
)
*
xScale
,
225
*
yScale
),
wCardSelect
,
BUTTON_CARD_0
+
i
);
btnCardSelect
[
i
]
->
setImageScale
(
core
::
vector2df
(
0.6
f
*
xScale
,
0.6
f
*
yScale
));
}
#ifdef _IRR_ANDROID_PLATFORM_
scrCardList
=
env
->
addScrollBar
(
true
,
rect
<
s32
>
(
30
*
xScale
,
235
*
yScale
,
650
*
xScale
,
275
*
yScale
),
wCardSelect
,
SCROLL_CARD_SELECT
);
btnSelectOK
=
env
->
addButton
(
rect
<
s32
>
(
300
*
xScale
,
285
*
yScale
,
380
*
xScale
,
325
*
yScale
),
wCardSelect
,
BUTTON_CARD_SEL_OK
,
dataManager
.
GetSysString
(
1211
));
//card display
...
...
Classes/ocgcore/processor.cpp
View file @
950143a4
...
...
@@ -3142,11 +3142,7 @@ int32 field::process_battle_command(uint16 step) {
return
FALSE
;
}
case
21
:
{
if
(
core
.
attacker
->
current
.
location
!=
LOCATION_MZONE
||
core
.
attacker
->
fieldid_r
!=
core
.
pre_field
[
0
]
||
core
.
attacker
->
current
.
controler
!=
core
.
attacker
->
attack_controler
||
(
core
.
attack_target
&&
(
core
.
attack_target
->
current
.
location
!=
LOCATION_MZONE
||
core
.
attack_target
->
current
.
controler
!=
core
.
attack_target
->
attack_controler
||
core
.
attack_target
->
fieldid_r
!=
core
.
pre_field
[
1
])))
{
if
(
core
.
attacker
->
is_status
(
STATUS_ATTACK_CANCELED
))
{
core
.
units
.
begin
()
->
step
=
32
;
return
FALSE
;
}
...
...
@@ -3184,12 +3180,7 @@ int32 field::process_battle_command(uint16 step) {
return
FALSE
;
}
case
23
:
{
if
(
core
.
attacker
->
current
.
location
!=
LOCATION_MZONE
||
core
.
attacker
->
fieldid_r
!=
core
.
pre_field
[
0
]
||
((
core
.
attacker
->
current
.
position
&
POS_DEFENSE
)
&&
!
(
core
.
attacker
->
is_affected_by_effect
(
EFFECT_DEFENSE_ATTACK
)))
||
core
.
attacker
->
current
.
controler
!=
core
.
attacker
->
attack_controler
||
(
core
.
attack_target
&&
(
core
.
attack_target
->
current
.
location
!=
LOCATION_MZONE
||
core
.
attack_target
->
current
.
controler
!=
core
.
attack_target
->
attack_controler
||
core
.
attack_target
->
fieldid_r
!=
core
.
pre_field
[
1
])))
{
if
(
core
.
attacker
->
is_status
(
STATUS_ATTACK_CANCELED
))
{
core
.
units
.
begin
()
->
step
=
32
;
return
FALSE
;
}
...
...
@@ -3219,11 +3210,7 @@ int32 field::process_battle_command(uint16 step) {
return
FALSE
;
}
case
25
:
{
if
(
core
.
attacker
->
current
.
location
!=
LOCATION_MZONE
||
core
.
attacker
->
fieldid_r
!=
core
.
pre_field
[
0
]
||
core
.
attacker
->
current
.
controler
!=
core
.
attacker
->
attack_controler
||
(
core
.
attack_target
&&
(
core
.
attack_target
->
current
.
location
!=
LOCATION_MZONE
||
core
.
attack_target
->
current
.
controler
!=
core
.
attack_target
->
attack_controler
||
core
.
attack_target
->
fieldid_r
!=
core
.
pre_field
[
1
])))
{
if
(
core
.
attacker
->
is_status
(
STATUS_ATTACK_CANCELED
))
{
reset_phase
(
PHASE_DAMAGE_CAL
);
adjust_all
();
infos
.
phase
=
PHASE_DAMAGE
;
...
...
@@ -3472,7 +3459,6 @@ int32 field::process_battle_command(uint16 step) {
}
case
33
:
{
core
.
units
.
begin
()
->
ptarget
=
0
;
// for unexpected end of damage step
core
.
damage_calculated
=
TRUE
;
core
.
selfdes_disabled
=
FALSE
;
core
.
flip_delayed
=
FALSE
;
...
...
@@ -4970,7 +4956,7 @@ int32 field::adjust_step(uint16 step) {
return
FALSE
;
}
case
1
:
{
//win check
(deck=0 or lp=0)
//win check
uint32
winp
=
5
,
rea
=
1
;
if
(
player
[
0
].
lp
<=
0
&&
player
[
1
].
lp
>
0
)
{
winp
=
1
;
...
...
@@ -5229,21 +5215,31 @@ int32 field::adjust_step(uint16 step) {
return
FALSE
;
if
(
attacker
->
is_status
(
STATUS_ATTACK_CANCELED
))
return
FALSE
;
if
(
!
core
.
attacker
->
is_capable_attack
()
||
core
.
attacker
->
current
.
controler
!=
core
.
attacker
->
attack_controler
||
core
.
attacker
->
fieldid_r
!=
core
.
pre_field
[
0
])
{
attacker
->
set_status
(
STATUS_ATTACK_CANCELED
,
TRUE
);
return
FALSE
;
}
if
(
core
.
attack_rollback
)
return
FALSE
;
std
::
set
<
uint16
>
fidset
;
for
(
auto
&
pcard
:
player
[
1
-
infos
.
turn_player
].
list_mzone
)
{
if
(
pcard
)
fidset
.
insert
(
pcard
->
fieldid_r
);
if
(
infos
.
phase
!=
PHASE_DAMAGE
&&
infos
.
phase
!=
PHASE_DAMAGE_CAL
)
{
if
(
!
core
.
attacker
->
is_capable_attack
()
||
core
.
attacker
->
current
.
controler
!=
core
.
attacker
->
attack_controler
||
core
.
attacker
->
fieldid_r
!=
core
.
pre_field
[
0
])
{
attacker
->
set_status
(
STATUS_ATTACK_CANCELED
,
TRUE
);
return
FALSE
;
}
if
(
core
.
attack_rollback
)
return
FALSE
;
std
::
set
<
uint16
>
fidset
;
for
(
auto
&
pcard
:
player
[
1
-
infos
.
turn_player
].
list_mzone
)
{
if
(
pcard
)
fidset
.
insert
(
pcard
->
fieldid_r
);
}
if
(
fidset
!=
core
.
opp_mzone
||
!
confirm_attack_target
())
core
.
attack_rollback
=
TRUE
;
}
else
{
if
(
core
.
attacker
->
current
.
location
!=
LOCATION_MZONE
||
core
.
attacker
->
fieldid_r
!=
core
.
pre_field
[
0
]
||
((
core
.
attacker
->
current
.
position
&
POS_DEFENSE
)
&&
!
(
core
.
attacker
->
is_affected_by_effect
(
EFFECT_DEFENSE_ATTACK
)))
||
core
.
attacker
->
current
.
controler
!=
core
.
attacker
->
attack_controler
||
(
core
.
attack_target
&&
(
core
.
attack_target
->
current
.
location
!=
LOCATION_MZONE
||
core
.
attack_target
->
current
.
controler
!=
core
.
attack_target
->
attack_controler
||
core
.
attack_target
->
fieldid_r
!=
core
.
pre_field
[
1
])))
core
.
attacker
->
set_status
(
STATUS_ATTACK_CANCELED
,
TRUE
);
}
if
(
fidset
!=
core
.
opp_mzone
||
!
confirm_attack_target
())
core
.
attack_rollback
=
TRUE
;
return
FALSE
;
}
case
15
:
{
...
...
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