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
dd9e6bbf
Commit
dd9e6bbf
authored
Jun 09, 2021
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sync ocgcore
parent
a67a3605
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
15 deletions
+38
-15
Classes/ocgcore/card.cpp
Classes/ocgcore/card.cpp
+29
-9
Classes/ocgcore/effect.h
Classes/ocgcore/effect.h
+1
-1
Classes/ocgcore/field.cpp
Classes/ocgcore/field.cpp
+5
-2
Classes/ocgcore/operations.cpp
Classes/ocgcore/operations.cpp
+3
-3
No files found.
Classes/ocgcore/card.cpp
View file @
dd9e6bbf
...
...
@@ -2947,28 +2947,48 @@ int32 card::check_cost_condition(int32 ecode, int32 playerid) {
effect_set
eset
;
pduel
->
game_field
->
filter_player_effect
(
playerid
,
ecode
,
&
eset
,
FALSE
);
filter_effect
(
ecode
,
&
eset
);
int32
res
=
TRUE
;
effect
*
oreason
=
pduel
->
game_field
->
core
.
reason_effect
;
uint8
op
=
pduel
->
game_field
->
core
.
reason_player
;
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
pduel
->
lua
->
add_param
(
eset
[
i
],
PARAM_TYPE_EFFECT
);
effect
*
peffect
=
eset
[
i
];
pduel
->
game_field
->
core
.
reason_effect
=
peffect
;
pduel
->
game_field
->
core
.
reason_player
=
playerid
;
pduel
->
lua
->
add_param
(
peffect
,
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
this
,
PARAM_TYPE_CARD
);
pduel
->
lua
->
add_param
(
playerid
,
PARAM_TYPE_INT
);
if
(
!
pduel
->
lua
->
check_condition
(
eset
[
i
]
->
cost
,
3
))
return
FALSE
;
if
(
!
pduel
->
lua
->
check_condition
(
peffect
->
cost
,
3
))
{
res
=
FALSE
;
break
;
}
}
return
TRUE
;
pduel
->
game_field
->
core
.
reason_effect
=
oreason
;
pduel
->
game_field
->
core
.
reason_player
=
op
;
return
res
;
}
int32
card
::
check_cost_condition
(
int32
ecode
,
int32
playerid
,
int32
sumtype
)
{
effect_set
eset
;
pduel
->
game_field
->
filter_player_effect
(
playerid
,
ecode
,
&
eset
,
FALSE
);
filter_effect
(
ecode
,
&
eset
);
int32
res
=
TRUE
;
effect
*
oreason
=
pduel
->
game_field
->
core
.
reason_effect
;
uint8
op
=
pduel
->
game_field
->
core
.
reason_player
;
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
pduel
->
lua
->
add_param
(
eset
[
i
],
PARAM_TYPE_EFFECT
);
effect
*
peffect
=
eset
[
i
];
pduel
->
game_field
->
core
.
reason_effect
=
peffect
;
pduel
->
game_field
->
core
.
reason_player
=
playerid
;
pduel
->
lua
->
add_param
(
peffect
,
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
this
,
PARAM_TYPE_CARD
);
pduel
->
lua
->
add_param
(
playerid
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
sumtype
,
PARAM_TYPE_INT
);
if
(
!
pduel
->
lua
->
check_condition
(
eset
[
i
]
->
cost
,
4
))
return
FALSE
;
if
(
!
pduel
->
lua
->
check_condition
(
peffect
->
cost
,
4
))
{
res
=
FALSE
;
break
;
}
}
return
TRUE
;
pduel
->
game_field
->
core
.
reason_effect
=
oreason
;
pduel
->
game_field
->
core
.
reason_player
=
op
;
return
res
;
}
int32
card
::
is_summonable_card
()
{
if
(
!
(
data
.
type
&
TYPE_MONSTER
))
...
...
@@ -3240,7 +3260,7 @@ int32 card::is_can_be_special_summoned(effect* reason_effect, uint32 sumtype, ui
if
((
data
.
type
&
TYPE_PENDULUM
)
&&
current
.
location
==
LOCATION_EXTRA
&&
(
current
.
position
&
POS_FACEUP
)
&&
(
sumtype
==
SUMMON_TYPE_FUSION
||
sumtype
==
SUMMON_TYPE_SYNCHRO
||
sumtype
==
SUMMON_TYPE_XYZ
))
return
FALSE
;
if
((
sumpos
&
POS_FACEDOWN
)
&&
pduel
->
game_field
->
is_player_affected_by_effect
(
sumplayer
,
EFFECT_D
E
VINE_LIGHT
))
if
((
sumpos
&
POS_FACEDOWN
)
&&
pduel
->
game_field
->
is_player_affected_by_effect
(
sumplayer
,
EFFECT_D
I
VINE_LIGHT
))
sumpos
=
(
sumpos
&
POS_FACEUP
)
|
((
sumpos
&
POS_FACEDOWN
)
>>
1
);
if
(
!
(
sumpos
&
POS_FACEDOWN
)
&&
pduel
->
game_field
->
check_unique_onfield
(
this
,
toplayer
,
LOCATION_MZONE
))
return
FALSE
;
...
...
Classes/ocgcore/effect.h
View file @
dd9e6bbf
...
...
@@ -240,7 +240,7 @@ inline effect_flag operator|(effect_flag flag1, effect_flag flag2)
#define EFFECT_EXTRA_SET_COUNT 35 //
#define EFFECT_SET_PROC 36 //
#define EFFECT_LIMIT_SET_PROC 37 //
#define EFFECT_D
E
VINE_LIGHT 38 //
#define EFFECT_D
I
VINE_LIGHT 38 //
#define EFFECT_CANNOT_DISABLE_FLIP_SUMMON 39 //
#define EFFECT_INDESTRUCTABLE 40 //
#define EFFECT_INDESTRUCTABLE_EFFECT 41 //
...
...
Classes/ocgcore/field.cpp
View file @
dd9e6bbf
...
...
@@ -1048,6 +1048,7 @@ void field::swap_deck_and_grave(uint8 playerid) {
++
clit
;
}
for
(
auto
&
pcard
:
player
[
playerid
].
list_grave
)
{
pcard
->
current
.
position
=
POS_FACEUP
;
pcard
->
current
.
location
=
LOCATION_GRAVE
;
pcard
->
current
.
reason
=
REASON_EFFECT
;
pcard
->
current
.
reason_effect
=
core
.
reason_effect
;
...
...
@@ -1057,6 +1058,7 @@ void field::swap_deck_and_grave(uint8 playerid) {
pcard
->
reset
(
RESET_TOGRAVE
,
RESET_EVENT
);
}
for
(
auto
&
pcard
:
player
[
playerid
].
list_main
)
{
pcard
->
current
.
position
=
POS_FACEDOWN_DEFENSE
;
pcard
->
current
.
location
=
LOCATION_DECK
;
pcard
->
current
.
reason
=
REASON_EFFECT
;
pcard
->
current
.
reason_effect
=
core
.
reason_effect
;
...
...
@@ -1066,6 +1068,7 @@ void field::swap_deck_and_grave(uint8 playerid) {
pcard
->
reset
(
RESET_TODECK
,
RESET_EVENT
);
}
for
(
auto
&
pcard
:
ex
)
{
pcard
->
current
.
position
=
POS_FACEDOWN_DEFENSE
;
pcard
->
current
.
location
=
LOCATION_EXTRA
;
pcard
->
current
.
reason
=
REASON_EFFECT
;
pcard
->
current
.
reason_effect
=
core
.
reason_effect
;
...
...
@@ -1074,7 +1077,7 @@ void field::swap_deck_and_grave(uint8 playerid) {
pcard
->
enable_field_effect
(
true
);
pcard
->
reset
(
RESET_TODECK
,
RESET_EVENT
);
}
player
[
playerid
].
list_extra
.
insert
(
player
[
playerid
].
list_extra
.
end
(),
ex
.
begin
(),
ex
.
end
());
player
[
playerid
].
list_extra
.
insert
(
player
[
playerid
].
list_extra
.
end
()
-
player
[
playerid
].
extra_p_count
,
ex
.
begin
(),
ex
.
end
());
reset_sequence
(
playerid
,
LOCATION_GRAVE
);
reset_sequence
(
playerid
,
LOCATION_EXTRA
);
pduel
->
write_buffer8
(
MSG_SWAP_GRAVE_DECK
);
...
...
@@ -3057,7 +3060,7 @@ int32 field::is_player_can_spsummon(effect* reason_effect, uint32 sumtype, uint8
return
FALSE
;
}
restore_lp_cost
();
if
(
sumpos
&
POS_FACEDOWN
&&
is_player_affected_by_effect
(
playerid
,
EFFECT_D
E
VINE_LIGHT
))
if
(
sumpos
&
POS_FACEDOWN
&&
is_player_affected_by_effect
(
playerid
,
EFFECT_D
I
VINE_LIGHT
))
sumpos
=
(
sumpos
&
POS_FACEUP
)
|
((
sumpos
&
POS_FACEDOWN
)
>>
1
);
effect_set
eset
;
filter_player_effect
(
playerid
,
EFFECT_CANNOT_SPECIAL_SUMMON
,
&
eset
);
...
...
Classes/ocgcore/operations.cpp
View file @
dd9e6bbf
...
...
@@ -159,7 +159,7 @@ void field::special_summon_rule(uint32 sumplayer, card* target, uint32 summon_ty
add_process
(
PROCESSOR_SPSUMMON_RULE
,
0
,
0
,
(
group
*
)
target
,
sumplayer
,
summon_type
);
}
void
field
::
special_summon
(
card_set
*
target
,
uint32
sumtype
,
uint32
sumplayer
,
uint32
playerid
,
uint32
nocheck
,
uint32
nolimit
,
uint32
positions
,
uint32
zone
)
{
if
((
positions
&
POS_FACEDOWN
)
&&
is_player_affected_by_effect
(
sumplayer
,
EFFECT_D
E
VINE_LIGHT
))
if
((
positions
&
POS_FACEDOWN
)
&&
is_player_affected_by_effect
(
sumplayer
,
EFFECT_D
I
VINE_LIGHT
))
positions
=
(
positions
&
POS_FACEUP
)
|
((
positions
&
POS_FACEDOWN
)
>>
1
);
for
(
auto
&
pcard
:
*
target
)
{
pcard
->
temp
.
reason
=
pcard
->
current
.
reason
;
...
...
@@ -177,7 +177,7 @@ void field::special_summon(card_set* target, uint32 sumtype, uint32 sumplayer, u
add_process
(
PROCESSOR_SPSUMMON
,
0
,
core
.
reason_effect
,
pgroup
,
core
.
reason_player
,
zone
);
}
void
field
::
special_summon_step
(
card
*
target
,
uint32
sumtype
,
uint32
sumplayer
,
uint32
playerid
,
uint32
nocheck
,
uint32
nolimit
,
uint32
positions
,
uint32
zone
)
{
if
((
positions
&
POS_FACEDOWN
)
&&
is_player_affected_by_effect
(
sumplayer
,
EFFECT_D
E
VINE_LIGHT
))
if
((
positions
&
POS_FACEDOWN
)
&&
is_player_affected_by_effect
(
sumplayer
,
EFFECT_D
I
VINE_LIGHT
))
positions
=
(
positions
&
POS_FACEUP
)
|
((
positions
&
POS_FACEDOWN
)
>>
1
);
target
->
temp
.
reason
=
target
->
current
.
reason
;
target
->
temp
.
reason_effect
=
target
->
current
.
reason_effect
;
...
...
@@ -1761,7 +1761,7 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
case
8
:
{
uint8
targetplayer
=
sumplayer
;
uint8
positions
=
POS_FACEUP_ATTACK
;
if
(
is_player_affected_by_effect
(
sumplayer
,
EFFECT_D
E
VINE_LIGHT
))
if
(
is_player_affected_by_effect
(
sumplayer
,
EFFECT_D
I
VINE_LIGHT
))
positions
=
POS_FACEUP
;
if
(
proc
&&
proc
->
is_flag
(
EFFECT_FLAG_SPSUM_PARAM
))
{
positions
=
(
uint8
)
proc
->
s_range
&
POS_FACEUP
;
...
...
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