Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
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
REIKAI
ygopro
Commits
2d7f3eb7
Commit
2d7f3eb7
authored
Jul 23, 2015
by
salix5
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
effect::reset()
parent
0cdcfd48
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
ocgcore/effect.cpp
ocgcore/effect.cpp
+8
-4
script/c70284332.lua
script/c70284332.lua
+1
-1
No files found.
ocgcore/effect.cpp
View file @
2d7f3eb7
...
@@ -363,7 +363,8 @@ int32 effect::is_target(card* pcard) {
...
@@ -363,7 +363,8 @@ int32 effect::is_target(card* pcard) {
return
FALSE
;
return
FALSE
;
if
((
type
&
EFFECT_TYPE_SINGLE
)
||
(
type
&
EFFECT_TYPE_EQUIP
))
if
((
type
&
EFFECT_TYPE_SINGLE
)
||
(
type
&
EFFECT_TYPE_EQUIP
))
return
TRUE
;
return
TRUE
;
if
(
pcard
&&
!
(
flag
&
EFFECT_FLAG_SET_AVAILABLE
)
&&
(
pcard
->
current
.
location
&
LOCATION_ONFIELD
)
&&
!
pcard
->
is_position
(
POS_FACEUP
))
if
(
pcard
&&
!
(
flag
&
EFFECT_FLAG_SET_AVAILABLE
)
&&
(
pcard
->
current
.
location
&
LOCATION_ONFIELD
)
&&
!
pcard
->
is_position
(
POS_FACEUP
))
return
FALSE
;
return
FALSE
;
if
(
!
(
flag
&
EFFECT_FLAG_IGNORE_RANGE
))
{
if
(
!
(
flag
&
EFFECT_FLAG_IGNORE_RANGE
))
{
if
(
pcard
->
get_status
(
STATUS_SUMMONING
+
STATUS_SUMMON_DISABLED
))
if
(
pcard
->
get_status
(
STATUS_SUMMONING
+
STATUS_SUMMON_DISABLED
))
...
@@ -441,7 +442,8 @@ int32 effect::is_chainable(uint8 tp) {
...
@@ -441,7 +442,8 @@ int32 effect::is_chainable(uint8 tp) {
if
((
type
&
EFFECT_TYPE_ACTIVATE
)
&&
(
sp
<=
1
)
&&
!
(
flag
&
EFFECT_FLAG_COF
))
if
((
type
&
EFFECT_TYPE_ACTIVATE
)
&&
(
sp
<=
1
)
&&
!
(
flag
&
EFFECT_FLAG_COF
))
return
FALSE
;
return
FALSE
;
if
(
pduel
->
game_field
->
core
.
current_chain
.
size
())
{
if
(
pduel
->
game_field
->
core
.
current_chain
.
size
())
{
if
(
!
(
flag
&
EFFECT_FLAG_FIELD_ONLY
)
&&
(
type
&
EFFECT_TYPE_TRIGGER_O
)
&&
(
handler
->
current
.
location
==
LOCATION_HAND
))
{
if
(
!
(
flag
&
EFFECT_FLAG_FIELD_ONLY
)
&&
(
type
&
EFFECT_TYPE_TRIGGER_O
)
&&
(
handler
->
current
.
location
==
LOCATION_HAND
))
{
if
(
pduel
->
game_field
->
core
.
current_chain
.
rbegin
()
->
triggering_effect
->
get_speed
()
>
2
)
if
(
pduel
->
game_field
->
core
.
current_chain
.
rbegin
()
->
triggering_effect
->
get_speed
()
>
2
)
return
FALSE
;
return
FALSE
;
}
else
if
(
sp
<
pduel
->
game_field
->
core
.
current_chain
.
rbegin
()
->
triggering_effect
->
get_speed
())
}
else
if
(
sp
<
pduel
->
game_field
->
core
.
current_chain
.
rbegin
()
->
triggering_effect
->
get_speed
())
...
@@ -486,7 +488,8 @@ int32 effect::reset(uint32 reset_level, uint32 reset_type) {
...
@@ -486,7 +488,8 @@ int32 effect::reset(uint32 reset_level, uint32 reset_type) {
return
FALSE
;
return
FALSE
;
uint8
pid
=
get_handler_player
();
uint8
pid
=
get_handler_player
();
uint8
tp
=
handler
->
pduel
->
game_field
->
infos
.
turn_player
;
uint8
tp
=
handler
->
pduel
->
game_field
->
infos
.
turn_player
;
if
((((
reset_flag
&
RESET_SELF_TURN
)
&&
pid
==
tp
)
||
((
reset_flag
&
RESET_OPPO_TURN
)
&&
pid
!=
tp
))
&&
(
reset_level
&
0xff
&
reset_flag
))
if
((((
reset_flag
&
RESET_SELF_TURN
)
&&
pid
==
tp
)
||
((
reset_flag
&
RESET_OPPO_TURN
)
&&
pid
!=
tp
))
&&
(
reset_level
&
0xff
&
reset_flag
))
reset_count
--
;
reset_count
--
;
if
((
reset_count
&
0xff
)
==
0
)
if
((
reset_count
&
0xff
)
==
0
)
return
TRUE
;
return
TRUE
;
...
@@ -494,7 +497,8 @@ int32 effect::reset(uint32 reset_level, uint32 reset_type) {
...
@@ -494,7 +497,8 @@ int32 effect::reset(uint32 reset_level, uint32 reset_type) {
break
;
break
;
}
}
case
RESET_CODE
:
{
case
RESET_CODE
:
{
return
(
code
==
reset_level
)
&&
(
type
&
EFFECT_TYPE_SINGLE
)
&&
!
(
type
&
EFFECT_TYPE_ACTIONS
);
return
(
code
==
reset_level
)
&&
(
type
&
EFFECT_TYPE_SINGLE
)
&&
!
(
type
&
EFFECT_TYPE_ACTIONS
)
&&
!
(
flag
&
EFFECT_FLAG_SINGLE_RANGE
);
break
;
break
;
}
}
case
RESET_COPY
:
{
case
RESET_COPY
:
{
...
...
script/c70284332.lua
View file @
2d7f3eb7
...
@@ -37,7 +37,7 @@ function c70284332.operation(e,tp,eg,ep,ev,re,r,rp)
...
@@ -37,7 +37,7 @@ function c70284332.operation(e,tp,eg,ep,ev,re,r,rp)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_CONTROL
)
e1
:
SetCode
(
EFFECT_SET_CONTROL
)
e1
:
SetProperty
(
EFFECT_FLAG_
CANNOT_DISABLE
+
EFFECT_FLAG_
SINGLE_RANGE
+
EFFECT_FLAG_OWNER_RELATE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
+
EFFECT_FLAG_OWNER_RELATE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetValue
(
tp
)
e1
:
SetValue
(
tp
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fc0000
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fc0000
)
...
...
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