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
50c4565e
Commit
50c4565e
authored
Apr 30, 2019
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sync ocgcore
parent
cb4874e5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
10 deletions
+26
-10
Classes/ocgcore/card.cpp
Classes/ocgcore/card.cpp
+18
-8
Classes/ocgcore/libcard.cpp
Classes/ocgcore/libcard.cpp
+6
-2
Classes/ocgcore/processor.cpp
Classes/ocgcore/processor.cpp
+2
-0
No files found.
Classes/ocgcore/card.cpp
View file @
50c4565e
...
...
@@ -2229,12 +2229,14 @@ int32 card::remove_counter(uint16 countertype, uint16 count) {
}
int32
card
::
is_can_add_counter
(
uint8
playerid
,
uint16
countertype
,
uint16
count
,
uint8
singly
,
uint32
loc
)
{
effect_set
eset
;
if
(
!
pduel
->
game_field
->
is_player_can_place_counter
(
playerid
,
this
,
countertype
,
count
))
return
FALSE
;
if
(
!
loc
&&
(
!
(
current
.
location
&
LOCATION_ONFIELD
)
||
!
is_position
(
POS_FACEUP
)))
return
FALSE
;
if
((
countertype
&
COUNTER_NEED_ENABLE
)
&&
is_status
(
STATUS_DISABLED
))
return
FALSE
;
if
(
count
>
0
)
{
if
(
!
pduel
->
game_field
->
is_player_can_place_counter
(
playerid
,
this
,
countertype
,
count
))
return
FALSE
;
if
(
!
loc
&&
(
!
(
current
.
location
&
LOCATION_ONFIELD
)
||
!
is_position
(
POS_FACEUP
)))
return
FALSE
;
if
((
countertype
&
COUNTER_NEED_ENABLE
)
&&
is_status
(
STATUS_DISABLED
))
return
FALSE
;
}
uint32
check
=
countertype
&
COUNTER_WITHOUT_PERMIT
;
if
(
!
check
)
{
filter_effect
(
EFFECT_COUNTER_PERMIT
+
(
countertype
&
0xffff
),
&
eset
);
...
...
@@ -2242,8 +2244,16 @@ int32 card::is_can_add_counter(uint8 playerid, uint16 countertype, uint16 count,
uint32
prange
=
eset
[
i
]
->
get_value
();
if
(
loc
)
check
=
loc
&
prange
;
else
check
=
current
.
is_location
(
prange
)
&&
is_position
(
POS_FACEUP
);
else
if
(
current
.
location
&
LOCATION_ONFIELD
)
{
uint32
filter
=
TRUE
;
if
(
eset
[
i
]
->
target
)
{
pduel
->
lua
->
add_param
(
eset
[
i
],
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
this
,
PARAM_TYPE_CARD
);
filter
=
pduel
->
lua
->
check_condition
(
eset
[
i
]
->
target
,
2
);
}
check
=
current
.
is_location
(
prange
)
&&
is_position
(
POS_FACEUP
)
&&
filter
;
}
else
check
=
TRUE
;
if
(
check
)
break
;
}
...
...
Classes/ocgcore/libcard.cpp
View file @
50c4565e
...
...
@@ -2556,6 +2556,8 @@ int32 scriptlib::card_enable_counter_permit(lua_State *L) {
peffect
->
type
=
EFFECT_TYPE_SINGLE
;
peffect
->
code
=
EFFECT_COUNTER_PERMIT
|
countertype
;
peffect
->
value
=
prange
;
if
(
lua_gettop
(
L
)
>
3
&&
lua_isfunction
(
L
,
4
))
peffect
->
target
=
interpreter
::
get_function_handle
(
L
,
4
);
pcard
->
add_effect
(
peffect
);
return
0
;
}
...
...
@@ -2587,11 +2589,13 @@ int32 scriptlib::card_is_can_turn_set(lua_State *L) {
return
1
;
}
int32
scriptlib
::
card_is_can_add_counter
(
lua_State
*
L
)
{
check_param_count
(
L
,
3
);
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
uint32
countertype
=
lua_tointeger
(
L
,
2
);
uint32
count
=
lua_tointeger
(
L
,
3
);
uint32
count
=
0
;
if
(
lua_gettop
(
L
)
>
2
)
count
=
lua_tointeger
(
L
,
3
);
uint8
singly
=
FALSE
;
if
(
lua_gettop
(
L
)
>
3
)
singly
=
lua_toboolean
(
L
,
4
);
...
...
Classes/ocgcore/processor.cpp
View file @
50c4565e
...
...
@@ -1351,6 +1351,7 @@ int32 field::check_hint_timing(effect* peffect) {
else
return
(
peffect
->
hint_timing
[
0
]
&
core
.
hint_timing
[
1
])
||
(
peffect
->
hint_timing
[
1
]
&
core
.
hint_timing
[
0
]);
}
// core.spe_effect[p]: # of optional trigger effects, activate/quick effect with hints
int32
field
::
process_phase_event
(
int16
step
,
int32
phase
)
{
switch
(
step
)
{
case
0
:
{
...
...
@@ -1645,6 +1646,7 @@ int32 field::process_phase_event(int16 step, int32 phase) {
}
return
TRUE
;
}
// core.tmp_chains: used in step 8 (obsolete ignition effect ruling)
int32
field
::
process_point_event
(
int16
step
,
int32
skip_trigger
,
int32
skip_freechain
,
int32
skip_new
)
{
switch
(
step
)
{
case
0
:
{
...
...
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