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
MobiusMei
ygopro
Commits
58385ed2
Commit
58385ed2
authored
Jul 26, 2014
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
ac298479
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
10 deletions
+13
-10
ocgcore/card.cpp
ocgcore/card.cpp
+3
-3
ocgcore/effect.cpp
ocgcore/effect.cpp
+3
-3
ocgcore/operations.cpp
ocgcore/operations.cpp
+1
-0
ocgcore/processor.cpp
ocgcore/processor.cpp
+4
-0
ocgcore/scriptlib.h
ocgcore/scriptlib.h
+0
-1
script/utility.lua
script/utility.lua
+2
-3
No files found.
ocgcore/card.cpp
View file @
58385ed2
...
@@ -1512,14 +1512,14 @@ void card::filter_spsummon_procedure(uint8 playerid, effect_set* peset) {
...
@@ -1512,14 +1512,14 @@ void card::filter_spsummon_procedure(uint8 playerid, effect_set* peset) {
}
}
if
(
peffect
->
is_available
()
&&
peffect
->
check_count_limit
(
playerid
)
&&
is_summonable
(
peffect
)
if
(
peffect
->
is_available
()
&&
peffect
->
check_count_limit
(
playerid
)
&&
is_summonable
(
peffect
)
&&
pduel
->
game_field
->
is_player_can_spsummon
(
peffect
,
peffect
->
get_value
(
this
),
topos
,
playerid
,
toplayer
,
this
))
&&
pduel
->
game_field
->
is_player_can_spsummon
(
peffect
,
peffect
->
get_value
(
this
),
topos
,
playerid
,
toplayer
,
this
))
peset
->
add_item
(
p
r
.
first
->
second
);
peset
->
add_item
(
p
effect
);
}
}
}
}
void
card
::
filter_spsummon_procedure_g
(
uint8
playerid
,
effect_set
*
peset
)
{
void
card
::
filter_spsummon_procedure_g
(
uint8
playerid
,
effect_set
*
peset
)
{
auto
pr
=
field_effect
.
equal_range
(
EFFECT_SPSUMMON_PROC_G
);
auto
pr
=
field_effect
.
equal_range
(
EFFECT_SPSUMMON_PROC_G
);
for
(;
pr
.
first
!=
pr
.
second
;
++
pr
.
first
)
{
for
(;
pr
.
first
!=
pr
.
second
;
++
pr
.
first
)
{
effect
*
peffect
=
pr
.
first
->
second
;
effect
*
peffect
=
pr
.
first
->
second
;
if
(
!
peffect
->
is_available
())
if
(
!
peffect
->
is_available
()
||
!
peffect
->
check_count_limit
(
playerid
)
)
continue
;
continue
;
effect
*
oreason
=
pduel
->
game_field
->
core
.
reason_effect
;
effect
*
oreason
=
pduel
->
game_field
->
core
.
reason_effect
;
uint8
op
=
pduel
->
game_field
->
core
.
reason_player
;
uint8
op
=
pduel
->
game_field
->
core
.
reason_player
;
...
@@ -1529,7 +1529,7 @@ void card::filter_spsummon_procedure_g(uint8 playerid, effect_set* peset) {
...
@@ -1529,7 +1529,7 @@ void card::filter_spsummon_procedure_g(uint8 playerid, effect_set* peset) {
pduel
->
lua
->
add_param
(
peffect
,
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
peffect
,
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
this
,
PARAM_TYPE_CARD
);
pduel
->
lua
->
add_param
(
this
,
PARAM_TYPE_CARD
);
if
(
pduel
->
lua
->
check_condition
(
peffect
->
condition
,
2
))
if
(
pduel
->
lua
->
check_condition
(
peffect
->
condition
,
2
))
peset
->
add_item
(
p
r
.
first
->
second
);
peset
->
add_item
(
p
effect
);
pduel
->
game_field
->
restore_lp_cost
();
pduel
->
game_field
->
restore_lp_cost
();
pduel
->
game_field
->
core
.
reason_effect
=
oreason
;
pduel
->
game_field
->
core
.
reason_effect
=
oreason
;
pduel
->
game_field
->
core
.
reason_player
=
op
;
pduel
->
game_field
->
core
.
reason_player
=
op
;
...
...
ocgcore/effect.cpp
View file @
58385ed2
...
@@ -61,7 +61,7 @@ int32 effect::is_available() {
...
@@ -61,7 +61,7 @@ int32 effect::is_available() {
if
(
type
&
EFFECT_TYPE_SINGLE
)
{
if
(
type
&
EFFECT_TYPE_SINGLE
)
{
if
(
handler
->
current
.
controler
==
PLAYER_NONE
)
if
(
handler
->
current
.
controler
==
PLAYER_NONE
)
return
FALSE
;
return
FALSE
;
if
((
flag
&
EFFECT_FLAG_SINGLE_RANGE
)
&&
!
(
range
&
handler
->
current
.
location
))
if
((
flag
&
EFFECT_FLAG_SINGLE_RANGE
)
&&
!
in_range
(
handler
->
current
.
location
,
handler
->
current
.
sequence
))
return
FALSE
;
return
FALSE
;
if
((
flag
&
EFFECT_FLAG_SINGLE_RANGE
)
&&
(
handler
->
current
.
location
&
LOCATION_ONFIELD
)
if
((
flag
&
EFFECT_FLAG_SINGLE_RANGE
)
&&
(
handler
->
current
.
location
&
LOCATION_ONFIELD
)
&&
(
handler
->
is_position
(
POS_FACEDOWN
)
||
!
handler
->
is_status
(
STATUS_EFFECT_ENABLED
)))
&&
(
handler
->
is_position
(
POS_FACEDOWN
)
||
!
handler
->
is_status
(
STATUS_EFFECT_ENABLED
)))
...
@@ -97,7 +97,7 @@ int32 effect::is_available() {
...
@@ -97,7 +97,7 @@ int32 effect::is_available() {
return
FALSE
;
return
FALSE
;
if
(
!
(
handler
->
get_status
(
STATUS_EFFECT_ENABLED
)))
if
(
!
(
handler
->
get_status
(
STATUS_EFFECT_ENABLED
)))
return
FALSE
;
return
FALSE
;
if
(
!
(
range
&
handler
->
current
.
location
))
if
(
!
in_range
(
handler
->
current
.
location
,
handler
->
current
.
sequence
))
return
FALSE
;
return
FALSE
;
if
((
handler
->
current
.
location
&
LOCATION_ONFIELD
)
&&
!
handler
->
is_position
(
POS_FACEUP
))
if
((
handler
->
current
.
location
&
LOCATION_ONFIELD
)
&&
!
handler
->
is_position
(
POS_FACEUP
))
return
FALSE
;
return
FALSE
;
...
@@ -201,7 +201,7 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con
...
@@ -201,7 +201,7 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con
if
(((
type
&
EFFECT_TYPE_FIELD
)
||
((
type
&
EFFECT_TYPE_SINGLE
)
&&
(
flag
&
EFFECT_FLAG_SINGLE_RANGE
)))
&&
(
handler
->
current
.
location
&
LOCATION_ONFIELD
)
if
(((
type
&
EFFECT_TYPE_FIELD
)
||
((
type
&
EFFECT_TYPE_SINGLE
)
&&
(
flag
&
EFFECT_FLAG_SINGLE_RANGE
)))
&&
(
handler
->
current
.
location
&
LOCATION_ONFIELD
)
&&
(
!
handler
->
is_position
(
POS_FACEUP
)
||
!
handler
->
is_status
(
STATUS_EFFECT_ENABLED
)))
&&
(
!
handler
->
is_position
(
POS_FACEUP
)
||
!
handler
->
is_status
(
STATUS_EFFECT_ENABLED
)))
return
FALSE
;
return
FALSE
;
if
((
type
&
EFFECT_TYPE_SINGLE
)
&&
(
flag
&
EFFECT_FLAG_SINGLE_RANGE
)
&&
!
(
handler
->
current
.
location
&
rang
e
))
if
((
type
&
EFFECT_TYPE_SINGLE
)
&&
(
flag
&
EFFECT_FLAG_SINGLE_RANGE
)
&&
!
in_range
(
handler
->
current
.
location
,
handler
->
current
.
sequenc
e
))
return
FALSE
;
return
FALSE
;
if
((
flag
&
EFFECT_FLAG_OWNER_RELATE
)
&&
!
(
flag
&
EFFECT_FLAG_CANNOT_DISABLE
)
&&
owner
->
is_status
(
STATUS_DISABLED
))
if
((
flag
&
EFFECT_FLAG_OWNER_RELATE
)
&&
!
(
flag
&
EFFECT_FLAG_CANNOT_DISABLE
)
&&
owner
->
is_status
(
STATUS_DISABLED
))
return
FALSE
;
return
FALSE
;
...
...
ocgcore/operations.cpp
View file @
58385ed2
...
@@ -2128,6 +2128,7 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card * target) {
...
@@ -2128,6 +2128,7 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card * target) {
pduel
->
lua
->
add_param
(
core
.
units
.
begin
()
->
ptarget
,
PARAM_TYPE_GROUP
);
pduel
->
lua
->
add_param
(
core
.
units
.
begin
()
->
ptarget
,
PARAM_TYPE_GROUP
);
add_process
(
PROCESSOR_EXECUTE_OPERATION
,
0
,
peffect
,
0
,
sumplayer
,
0
);
add_process
(
PROCESSOR_EXECUTE_OPERATION
,
0
,
peffect
,
0
,
sumplayer
,
0
);
}
}
peffect
->
dec_count
(
sumplayer
);
return
FALSE
;
return
FALSE
;
}
}
case
21
:
{
case
21
:
{
...
...
ocgcore/processor.cpp
View file @
58385ed2
...
@@ -2547,6 +2547,8 @@ int32 field::process_idle_command(uint16 step) {
...
@@ -2547,6 +2547,8 @@ int32 field::process_idle_command(uint16 step) {
filter_field_effect
(
EFFECT_SPSUMMON_PROC
,
&
eset
);
filter_field_effect
(
EFFECT_SPSUMMON_PROC
,
&
eset
);
for
(
int32
i
=
0
;
i
<
eset
.
count
;
++
i
)
{
for
(
int32
i
=
0
;
i
<
eset
.
count
;
++
i
)
{
pcard
=
eset
[
i
]
->
handler
;
pcard
=
eset
[
i
]
->
handler
;
if
(
!
eset
[
i
]
->
check_count_limit
(
pcard
->
current
.
controler
))
continue
;
if
(
pcard
->
current
.
controler
==
infos
.
turn_player
&&
pcard
->
is_special_summonable
(
infos
.
turn_player
))
if
(
pcard
->
current
.
controler
==
infos
.
turn_player
&&
pcard
->
is_special_summonable
(
infos
.
turn_player
))
core
.
spsummonable_cards
.
push_back
(
pcard
);
core
.
spsummonable_cards
.
push_back
(
pcard
);
}
}
...
@@ -2554,6 +2556,8 @@ int32 field::process_idle_command(uint16 step) {
...
@@ -2554,6 +2556,8 @@ int32 field::process_idle_command(uint16 step) {
filter_field_effect
(
EFFECT_SPSUMMON_PROC_G
,
&
eset
);
filter_field_effect
(
EFFECT_SPSUMMON_PROC_G
,
&
eset
);
for
(
int32
i
=
0
;
i
<
eset
.
count
;
++
i
)
{
for
(
int32
i
=
0
;
i
<
eset
.
count
;
++
i
)
{
pcard
=
eset
[
i
]
->
handler
;
pcard
=
eset
[
i
]
->
handler
;
if
(
!
eset
[
i
]
->
check_count_limit
(
pcard
->
current
.
controler
))
continue
;
if
(
pcard
->
current
.
controler
!=
infos
.
turn_player
)
if
(
pcard
->
current
.
controler
!=
infos
.
turn_player
)
continue
;
continue
;
effect
*
oreason
=
core
.
reason_effect
;
effect
*
oreason
=
core
.
reason_effect
;
...
...
ocgcore/scriptlib.h
View file @
58385ed2
...
@@ -467,7 +467,6 @@ public:
...
@@ -467,7 +467,6 @@ public:
static
int32
duel_is_player_can_summon_count
(
lua_State
*
L
);
static
int32
duel_is_player_can_summon_count
(
lua_State
*
L
);
static
int32
duel_is_player_can_spsummon_count
(
lua_State
*
L
);
static
int32
duel_is_player_can_spsummon_count
(
lua_State
*
L
);
static
int32
duel_is_player_can_flipsummon_count
(
lua_State
*
L
);
static
int32
duel_is_player_can_flipsummon_count
(
lua_State
*
L
);
static
int32
duel_is_player_can_release
(
lua_State
*
L
);
static
int32
duel_is_player_can_release
(
lua_State
*
L
);
static
int32
duel_is_player_can_remove
(
lua_State
*
L
);
static
int32
duel_is_player_can_remove
(
lua_State
*
L
);
static
int32
duel_is_player_can_send_to_hand
(
lua_State
*
L
);
static
int32
duel_is_player_can_send_to_hand
(
lua_State
*
L
);
...
...
script/utility.lua
View file @
58385ed2
...
@@ -892,7 +892,8 @@ function Auxiliary.AddPendulumProcedure(c)
...
@@ -892,7 +892,8 @@ function Auxiliary.AddPendulumProcedure(c)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC_G
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC_G
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetRange
(
LOCATION_SZONE
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCountLimit
(
1
,
10000000
)
e1
:
SetCondition
(
Auxiliary
.
PendCondition
())
e1
:
SetCondition
(
Auxiliary
.
PendCondition
())
e1
:
SetOperation
(
Auxiliary
.
PendOperation
())
e1
:
SetOperation
(
Auxiliary
.
PendOperation
())
e1
:
SetValue
(
SUMMON_TYPE_PENDULUM
)
e1
:
SetValue
(
SUMMON_TYPE_PENDULUM
)
...
@@ -907,7 +908,6 @@ function Auxiliary.PendCondition()
...
@@ -907,7 +908,6 @@ function Auxiliary.PendCondition()
return
function
(
e
,
c
,
og
)
return
function
(
e
,
c
,
og
)
if
c
==
nil
then
return
true
end
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
tp
=
c
:
GetControler
()
if
Duel
.
GetFlagEffect
(
tp
,
10000000
)
~=
0
then
return
false
end
if
c
:
GetSequence
()
~=
6
then
return
false
end
if
c
:
GetSequence
()
~=
6
then
return
false
end
local
rpz
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
7
)
local
rpz
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
7
)
if
rpz
==
nil
then
return
false
end
if
rpz
==
nil
then
return
false
end
...
@@ -925,7 +925,6 @@ function Auxiliary.PendCondition()
...
@@ -925,7 +925,6 @@ function Auxiliary.PendCondition()
end
end
function
Auxiliary
.
PendOperation
()
function
Auxiliary
.
PendOperation
()
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
sg
,
og
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
sg
,
og
)
Duel
.
RegisterFlagEffect
(
tp
,
10000000
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
local
rpz
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
7
)
local
rpz
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
7
)
local
lscale
=
c
:
GetLeftScale
()
local
lscale
=
c
:
GetLeftScale
()
local
rscale
=
rpz
:
GetRightScale
()
local
rscale
=
rpz
:
GetRightScale
()
...
...
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