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
cc3e0748
Commit
cc3e0748
authored
Jul 22, 2018
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sync ocgcore
parent
76f3a4dd
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
47 additions
and
23 deletions
+47
-23
Classes/gframe/single_mode.cpp
Classes/gframe/single_mode.cpp
+3
-0
Classes/ocgcore/card.cpp
Classes/ocgcore/card.cpp
+18
-14
Classes/ocgcore/card.h
Classes/ocgcore/card.h
+1
-0
Classes/ocgcore/operations.cpp
Classes/ocgcore/operations.cpp
+20
-7
mobile/assets/changelog.html
mobile/assets/changelog.html
+4
-1
mobile/build.gradle
mobile/build.gradle
+1
-1
No files found.
Classes/gframe/single_mode.cpp
View file @
cc3e0748
...
...
@@ -411,6 +411,7 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) {
break
;
}
case
MSG_SHUFFLE_SET_CARD
:
{
pbuf
++
;
count
=
BufferIO
::
ReadInt8
(
pbuf
);
pbuf
+=
count
*
8
;
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
...
...
@@ -741,6 +742,8 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) {
xcard
->
overlayTarget
=
ccard
;
xcard
->
location
=
0x80
;
xcard
->
sequence
=
ccard
->
overlayed
.
size
()
-
1
;
xcard
->
owner
=
p
;
xcard
->
controler
=
p
;
}
}
}
...
...
Classes/ocgcore/card.cpp
View file @
cc3e0748
...
...
@@ -1564,6 +1564,7 @@ void card::xyz_overlay(card_set* materials) {
pduel
->
game_field
->
remove_unique_card
(
pcard
);
if
(
pcard
->
equiping_target
)
pcard
->
unequip
();
pcard
->
clear_card_target
();
xyz_add
(
pcard
,
&
des
);
}
else
{
field
::
card_vector
cv
;
...
...
@@ -1576,6 +1577,7 @@ void card::xyz_overlay(card_set* materials) {
pduel
->
game_field
->
remove_unique_card
(
*
cvit
);
if
((
*
cvit
)
->
equiping_target
)
(
*
cvit
)
->
unequip
();
(
*
cvit
)
->
clear_card_target
();
xyz_add
(
*
cvit
,
&
des
);
}
}
...
...
@@ -1993,20 +1995,6 @@ void card::reset(uint32 id, uint32 reset_type) {
}
if
(
id
&
0xd7e0000
)
{
counters
.
clear
();
for
(
auto
cit
=
effect_target_owner
.
begin
();
cit
!=
effect_target_owner
.
end
();
++
cit
)
(
*
cit
)
->
effect_target_cards
.
erase
(
this
);
for
(
auto
cit
=
effect_target_cards
.
begin
();
cit
!=
effect_target_cards
.
end
();
++
cit
)
{
card
*
pcard
=
*
cit
;
pcard
->
effect_target_owner
.
erase
(
this
);
for
(
auto
it
=
pcard
->
single_effect
.
begin
();
it
!=
pcard
->
single_effect
.
end
();)
{
auto
rm
=
it
++
;
effect
*
peffect
=
rm
->
second
;
if
((
peffect
->
owner
==
this
)
&&
peffect
->
is_flag
(
EFFECT_FLAG_OWNER_RELATE
))
pcard
->
remove_effect
(
peffect
,
rm
);
}
}
effect_target_owner
.
clear
();
effect_target_cards
.
clear
();
}
if
(
id
&
0x3fe0000
)
{
auto
pr
=
field_effect
.
equal_range
(
EFFECT_USE_EXTRA_MZONE
);
...
...
@@ -2342,6 +2330,22 @@ void card::cancel_card_target(card* pcard) {
pduel
->
write_buffer32
(
pcard
->
get_info_location
());
}
}
void
card
::
clear_card_target
()
{
for
(
auto
cit
=
effect_target_owner
.
begin
();
cit
!=
effect_target_owner
.
end
();
++
cit
)
(
*
cit
)
->
effect_target_cards
.
erase
(
this
);
for
(
auto
cit
=
effect_target_cards
.
begin
();
cit
!=
effect_target_cards
.
end
();
++
cit
)
{
card
*
pcard
=
*
cit
;
pcard
->
effect_target_owner
.
erase
(
this
);
for
(
auto
it
=
pcard
->
single_effect
.
begin
();
it
!=
pcard
->
single_effect
.
end
();)
{
auto
rm
=
it
++
;
effect
*
peffect
=
rm
->
second
;
if
((
peffect
->
owner
==
this
)
&&
peffect
->
is_flag
(
EFFECT_FLAG_OWNER_RELATE
))
pcard
->
remove_effect
(
peffect
,
rm
);
}
}
effect_target_owner
.
clear
();
effect_target_cards
.
clear
();
}
void
card
::
filter_effect
(
int32
code
,
effect_set
*
eset
,
uint8
sort
)
{
effect
*
peffect
;
auto
rg
=
single_effect
.
equal_range
(
code
);
...
...
Classes/ocgcore/card.h
View file @
cc3e0748
...
...
@@ -277,6 +277,7 @@ public:
void
set_material
(
card_set
*
materials
);
void
add_card_target
(
card
*
pcard
);
void
cancel_card_target
(
card
*
pcard
);
void
clear_card_target
();
void
filter_effect
(
int32
code
,
effect_set
*
eset
,
uint8
sort
=
TRUE
);
void
filter_single_effect
(
int32
code
,
effect_set
*
eset
,
uint8
sort
=
TRUE
);
...
...
Classes/ocgcore/operations.cpp
View file @
cc3e0748
...
...
@@ -3933,6 +3933,7 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
pcard
->
previous
.
location
=
0
;
}
else
if
(
oloc
&
LOCATION_ONFIELD
)
{
pcard
->
reset
(
RESET_LEAVE
+
RESET_MSCHANGE
,
RESET_EVENT
);
pcard
->
clear_card_target
();
param
->
leave
.
insert
(
pcard
);
}
if
(
param
->
predirect
->
operation
)
{
...
...
@@ -3974,6 +3975,22 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
pduel
->
write_buffer32
(
ptop
->
data
.
code
|
0x80000000
);
}
}
for
(
auto
cit
=
param
->
targets
->
container
.
begin
();
cit
!=
param
->
targets
->
container
.
end
();
++
cit
)
{
card
*
pcard
=
*
cit
;
uint8
nloc
=
pcard
->
current
.
location
;
if
(
nloc
==
LOCATION_HAND
)
pcard
->
reset
(
RESET_TOHAND
,
RESET_EVENT
);
else
if
(
nloc
==
LOCATION_DECK
||
nloc
==
LOCATION_EXTRA
)
pcard
->
reset
(
RESET_TODECK
,
RESET_EVENT
);
else
if
(
nloc
==
LOCATION_GRAVE
)
pcard
->
reset
(
RESET_TOGRAVE
,
RESET_EVENT
);
if
(
nloc
==
LOCATION_REMOVED
||
((
pcard
->
data
.
type
&
TYPE_TOKEN
)
&&
pcard
->
sendto_param
.
location
==
LOCATION_REMOVED
))
{
if
(
pcard
->
current
.
reason
&
REASON_TEMPORARY
)
pcard
->
reset
(
RESET_TEMP_REMOVE
,
RESET_EVENT
);
else
pcard
->
reset
(
RESET_REMOVE
,
RESET_EVENT
);
}
}
for
(
auto
iter
=
param
->
leave
.
begin
();
iter
!=
param
->
leave
.
end
();
++
iter
)
raise_single_event
(
*
iter
,
0
,
EVENT_LEAVE_FIELD
,
(
*
iter
)
->
current
.
reason_effect
,
(
*
iter
)
->
current
.
reason
,
(
*
iter
)
->
current
.
reason_player
,
0
,
0
);
if
((
core
.
global_flag
&
GLOBALFLAG_DETACH_EVENT
)
&&
param
->
detach
.
size
())
{
...
...
@@ -4011,18 +4028,16 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
equipings
.
insert
(
equipc
);
}
}
pcard
->
clear_card_target
();
if
(
!
(
pcard
->
data
.
type
&
TYPE_TOKEN
))
{
pcard
->
enable_field_effect
(
true
);
if
(
nloc
==
LOCATION_HAND
)
{
tohand
.
insert
(
pcard
);
pcard
->
reset
(
RESET_TOHAND
,
RESET_EVENT
);
raise_single_event
(
pcard
,
0
,
EVENT_TO_HAND
,
pcard
->
current
.
reason_effect
,
pcard
->
current
.
reason
,
pcard
->
current
.
reason_player
,
0
,
0
);
}
else
if
(
nloc
==
LOCATION_DECK
||
nloc
==
LOCATION_EXTRA
)
{
todeck
.
insert
(
pcard
);
pcard
->
reset
(
RESET_TODECK
,
RESET_EVENT
);
raise_single_event
(
pcard
,
0
,
EVENT_TO_DECK
,
pcard
->
current
.
reason_effect
,
pcard
->
current
.
reason
,
pcard
->
current
.
reason_player
,
0
,
0
);
}
else
if
(
nloc
==
LOCATION_GRAVE
)
{
pcard
->
reset
(
RESET_TOGRAVE
,
RESET_EVENT
);
if
(
pcard
->
current
.
reason
&
REASON_RETURN
)
{
retgrave
.
insert
(
pcard
);
raise_single_event
(
pcard
,
0
,
EVENT_RETURN_TO_GRAVE
,
pcard
->
current
.
reason_effect
,
pcard
->
current
.
reason
,
pcard
->
current
.
reason_player
,
0
,
0
);
...
...
@@ -4034,10 +4049,6 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
}
if
(
nloc
==
LOCATION_REMOVED
||
((
pcard
->
data
.
type
&
TYPE_TOKEN
)
&&
pcard
->
sendto_param
.
location
==
LOCATION_REMOVED
))
{
remove
.
insert
(
pcard
);
if
(
pcard
->
current
.
reason
&
REASON_TEMPORARY
)
pcard
->
reset
(
RESET_TEMP_REMOVE
,
RESET_EVENT
);
else
pcard
->
reset
(
RESET_REMOVE
,
RESET_EVENT
);
raise_single_event
(
pcard
,
0
,
EVENT_REMOVE
,
pcard
->
current
.
reason_effect
,
pcard
->
current
.
reason
,
pcard
->
current
.
reason_player
,
0
,
0
);
}
if
(
pcard
->
current
.
reason
&
REASON_DISCARD
)
{
...
...
@@ -4386,6 +4397,7 @@ int32 field::move_to_field(uint16 step, card* target, uint32 enable, uint32 ret,
}
if
((
target
->
previous
.
location
==
LOCATION_SZONE
)
&&
target
->
equiping_target
)
target
->
unequip
();
target
->
clear_card_target
();
if
(
target
->
current
.
location
==
LOCATION_MZONE
)
{
effect_set
eset
;
filter_player_effect
(
0
,
EFFECT_MUST_USE_MZONE
,
&
eset
,
FALSE
);
...
...
@@ -4499,6 +4511,7 @@ int32 field::change_position(uint16 step, group * targets, effect * reason_effec
if
(
pcard
->
status
&
(
STATUS_SUMMON_DISABLED
|
STATUS_ACTIVATE_DISABLED
))
pcard
->
set_status
(
STATUS_SUMMON_DISABLED
|
STATUS_ACTIVATE_DISABLED
,
FALSE
);
pcard
->
reset
(
RESET_TURN_SET
,
RESET_EVENT
);
pcard
->
clear_card_target
();
pcard
->
set_status
(
STATUS_SET_TURN
,
TRUE
);
pcard
->
enable_field_effect
(
false
);
pcard
->
summon_info
&=
0xdf00ffff
;
...
...
mobile/assets/changelog.html
View file @
cc3e0748
...
...
@@ -24,7 +24,10 @@
1.更新ygo内核;
2.更新LP显示;
3.自定义头像;
4.新卡1006;
4.新卡1006+VJ+VF;
修复:
1.若干已知卡图错误;
2.本地脚本问题;
优化:
1.把过去的更新日志删了加快初启动速度;
2.可以自行设置头像;
...
...
mobile/build.gradle
View file @
cc3e0748
...
...
@@ -8,7 +8,7 @@ android {
applicationId
"cn.garymb.ygomobile"
minSdkVersion
16
targetSdkVersion
22
versionCode
3303072
0
versionCode
3303072
2
versionName
"3.3.3"
flavorDimensions
"versionCode"
vectorDrawables
.
useSupportLibrary
=
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