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
wyykak
ygopro
Commits
e8ce8c55
Commit
e8ce8c55
authored
Nov 05, 2014
by
Argon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
summon location
parent
ac044801
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
18 deletions
+27
-18
ocgcore/card.h
ocgcore/card.h
+1
-1
ocgcore/interpreter.cpp
ocgcore/interpreter.cpp
+1
-0
ocgcore/libcard.cpp
ocgcore/libcard.cpp
+8
-1
ocgcore/operations.cpp
ocgcore/operations.cpp
+16
-16
ocgcore/scriptlib.h
ocgcore/scriptlib.h
+1
-0
No files found.
ocgcore/card.h
View file @
e8ce8c55
...
...
@@ -94,7 +94,7 @@ public:
query_cache
q_cache
;
uint8
owner
;
uint8
summon_player
;
uint32
summon_
type
;
uint32
summon_
info
;
uint32
status
;
uint32
operation_param
;
uint8
announce_count
;
...
...
ocgcore/interpreter.cpp
View file @
e8ce8c55
...
...
@@ -63,6 +63,7 @@ static const struct luaL_Reg cardlib[] = {
{
"GetSequence"
,
scriptlib
::
card_get_sequence
},
{
"GetPreviousSequence"
,
scriptlib
::
card_get_previous_sequence
},
{
"GetSummonType"
,
scriptlib
::
card_get_summon_type
},
{
"GetSummonLocation"
,
scriptlib
::
card_get_summon_location
},
{
"GetSummonPlayer"
,
scriptlib
::
card_get_summon_player
},
{
"GetDestination"
,
scriptlib
::
card_get_destination
},
{
"GetLeaveFieldDest"
,
scriptlib
::
card_get_leave_field_dest
},
...
...
ocgcore/libcard.cpp
View file @
e8ce8c55
...
...
@@ -366,7 +366,14 @@ int32 scriptlib::card_get_summon_type(lua_State *L) {
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
lua_pushinteger
(
L
,
pcard
->
summon_type
);
lua_pushinteger
(
L
,
pcard
->
summon_info
&
0xff00ffff
);
return
1
;
}
int32
scriptlib
::
card_get_summon_location
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
lua_pushinteger
(
L
,
(
pcard
->
summon_info
>>
16
)
&
0xff
);
return
1
;
}
int32
scriptlib
::
card_get_summon_player
(
lua_State
*
L
)
{
...
...
ocgcore/operations.cpp
View file @
e8ce8c55
...
...
@@ -140,7 +140,7 @@ void field::special_summon(card_set* target, uint32 sumtype, uint32 sumplayer, u
pcard
->
temp
.
reason
=
pcard
->
current
.
reason
;
pcard
->
temp
.
reason_effect
=
pcard
->
current
.
reason_effect
;
pcard
->
temp
.
reason_player
=
pcard
->
current
.
reason_player
;
pcard
->
summon_
type
=
(
sumtype
&
0xfffffff
)
|
SUMMON_TYPE_SPECIAL
;
pcard
->
summon_
info
=
(
sumtype
&
0xf00ffff
)
|
SUMMON_TYPE_SPECIAL
|
((
uint32
)
pcard
->
current
.
location
<<
16
)
;
pcard
->
summon_player
=
sumplayer
;
pcard
->
current
.
reason
=
REASON_SPSUMMON
;
pcard
->
current
.
reason_effect
=
core
.
reason_effect
;
...
...
@@ -158,7 +158,7 @@ void field::special_summon_step(card* target, uint32 sumtype, uint32 sumplayer,
target
->
temp
.
reason
=
target
->
current
.
reason
;
target
->
temp
.
reason_effect
=
target
->
current
.
reason_effect
;
target
->
temp
.
reason_player
=
target
->
current
.
reason_player
;
target
->
summon_
type
=
(
sumtype
&
0xfffffff
)
|
SUMMON_TYPE_SPECIAL
;
target
->
summon_
info
=
(
sumtype
&
0xf00ffff
)
|
SUMMON_TYPE_SPECIAL
|
((
uint32
)
target
->
current
.
location
<<
16
)
;
target
->
summon_player
=
sumplayer
;
target
->
current
.
reason
=
REASON_SPSUMMON
;
target
->
current
.
reason_effect
=
core
.
reason_effect
;
...
...
@@ -1270,19 +1270,19 @@ int32 field::summon(uint16 step, uint8 sumplayer, card * target, effect * proc,
target
->
set_material
(
&
tributes
);
release
(
&
tributes
,
0
,
REASON_SUMMON
|
REASON_MATERIAL
,
sumplayer
);
if
(
tributes
.
size
())
target
->
summon_
type
=
SUMMON_TYPE_NORMAL
|
SUMMON_TYPE_ADVANCE
;
target
->
summon_
info
=
SUMMON_TYPE_NORMAL
|
SUMMON_TYPE_ADVANCE
|
(
LOCATION_HAND
<<
16
)
;
else
target
->
summon_
type
=
SUMMON_TYPE_NORMAL
;
target
->
summon_
info
=
SUMMON_TYPE_NORMAL
|
(
LOCATION_HAND
<<
16
)
;
adjust_all
();
}
else
target
->
summon_
type
=
SUMMON_TYPE_NORMAL
;
target
->
summon_
info
=
SUMMON_TYPE_NORMAL
|
(
LOCATION_HAND
<<
16
)
;
target
->
current
.
reason_effect
=
0
;
target
->
current
.
reason_player
=
sumplayer
;
core
.
units
.
begin
()
->
step
=
4
;
return
FALSE
;
}
case
4
:
{
target
->
summon_
type
=
(
proc
->
get_value
(
target
)
&
0xfffffff
)
|
SUMMON_TYPE_NORMAL
;
target
->
summon_
info
=
(
proc
->
get_value
(
target
)
&
0xfffffff
)
|
SUMMON_TYPE_NORMAL
|
(
LOCATION_HAND
<<
16
)
;
target
->
current
.
reason_effect
=
proc
;
target
->
current
.
reason_player
=
sumplayer
;
if
(
proc
->
operation
)
{
...
...
@@ -1684,12 +1684,12 @@ int32 field::mset(uint16 step, uint8 setplayer, card * target, effect * proc, ui
target
->
set_material
(
&
tributes
);
release
(
&
tributes
,
0
,
REASON_SUMMON
|
REASON_MATERIAL
,
setplayer
);
if
(
tributes
.
size
())
target
->
summon_
type
=
SUMMON_TYPE_NORMAL
|
SUMMON_TYPE_ADVANCE
;
target
->
summon_
info
=
SUMMON_TYPE_NORMAL
|
SUMMON_TYPE_ADVANCE
|
(
LOCATION_HAND
<<
16
)
;
else
target
->
summon_
type
=
SUMMON_TYPE_NORMAL
;
target
->
summon_
info
=
SUMMON_TYPE_NORMAL
|
(
LOCATION_HAND
<<
16
)
;
adjust_all
();
}
else
target
->
summon_
type
=
SUMMON_TYPE_NORMAL
;
target
->
summon_
info
=
SUMMON_TYPE_NORMAL
|
(
LOCATION_HAND
<<
16
)
;
target
->
summon_player
=
setplayer
;
target
->
current
.
reason_effect
=
0
;
target
->
current
.
reason_player
=
setplayer
;
...
...
@@ -1697,7 +1697,7 @@ int32 field::mset(uint16 step, uint8 setplayer, card * target, effect * proc, ui
return
FALSE
;
}
case
4
:
{
target
->
summon_
type
=
(
proc
->
get_value
(
target
)
&
0xfffffff
)
|
SUMMON_TYPE_NORMAL
;
target
->
summon_
info
=
(
proc
->
get_value
(
target
)
&
0xfffffff
)
|
SUMMON_TYPE_NORMAL
|
(
LOCATION_HAND
<<
16
)
;
target
->
current
.
reason_effect
=
proc
;
target
->
current
.
reason_player
=
setplayer
;
pduel
->
lua
->
add_param
(
target
,
PARAM_TYPE_CARD
);
...
...
@@ -1968,7 +1968,7 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card * target) {
core
.
units
.
begin
()
->
step
=
19
;
return
FALSE
;
}
target
->
summon_
type
=
(
peffect
->
get_value
(
target
)
&
0xfffffff
)
|
SUMMON_TYPE_SPECIAL
;
target
->
summon_
info
=
(
peffect
->
get_value
(
target
)
&
0xf00ffff
)
|
SUMMON_TYPE_SPECIAL
|
((
uint32
)
target
->
current
.
location
<<
16
)
;
if
(
peffect
->
operation
)
{
pduel
->
lua
->
add_param
(
target
,
PARAM_TYPE_CARD
);
if
(
core
.
limit_tuner
||
core
.
limit_syn
)
{
...
...
@@ -2162,12 +2162,12 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card * target) {
effect
*
peffect
=
core
.
units
.
begin
()
->
peffect
;
card
*
pcard
=
*
core
.
units
.
begin
()
->
ptarget
->
it
;
pcard
->
enable_field_effect
(
FALSE
);
move_to_field
(
pcard
,
sumplayer
,
sumplayer
,
LOCATION_MZONE
,
POS_FACEUP
);
pcard
->
current
.
reason
=
REASON_SPSUMMON
;
pcard
->
current
.
reason_effect
=
peffect
;
pcard
->
current
.
reason_player
=
sumplayer
;
pcard
->
summon_player
=
sumplayer
;
pcard
->
summon_type
=
(
peffect
->
get_value
(
pcard
)
&
0xfffffff
)
|
SUMMON_TYPE_SPECIAL
;
pcard
->
summon_info
=
(
peffect
->
get_value
(
pcard
)
&
0xf00ffff
)
|
SUMMON_TYPE_SPECIAL
|
((
uint32
)
target
->
current
.
location
<<
16
);
move_to_field
(
pcard
,
sumplayer
,
sumplayer
,
LOCATION_MZONE
,
POS_FACEUP
);
return
FALSE
;
}
case
24
:
{
...
...
@@ -2269,7 +2269,7 @@ int32 field::special_summon_step(uint16 step, group * targets, card * target) {
}
if
(
!
result
||
(
target
->
current
.
location
==
LOCATION_MZONE
)
||
check_unique_onfield
(
target
,
playerid
)
||
!
is_player_can_spsummon
(
core
.
reason_effect
,
target
->
summon_
type
,
positions
,
target
->
summon_player
,
playerid
,
target
)
||
!
is_player_can_spsummon
(
core
.
reason_effect
,
target
->
summon_
info
&
0xff000000
,
positions
,
target
->
summon_player
,
playerid
,
target
)
||
target
->
is_affected_by_effect
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
||
get_useable_count
(
playerid
,
LOCATION_MZONE
,
target
->
summon_player
,
LOCATION_REASON_TOFIELD
)
<=
0
||
(
!
nocheck
&&
!
(
target
->
data
.
type
&
TYPE_MONSTER
)))
...
...
@@ -2279,7 +2279,7 @@ int32 field::special_summon_step(uint16 step, group * targets, card * target) {
for
(
int32
i
=
0
;
i
<
eset
.
count
;
++
i
)
{
pduel
->
lua
->
add_param
(
core
.
reason_effect
,
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
target
->
summon_player
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
target
->
summon_
type
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
target
->
summon_
info
&
0xff00ffff
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
positions
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
playerid
,
PARAM_TYPE_INT
);
if
(
!
eset
[
i
]
->
check_value_condition
(
5
))
{
...
...
@@ -2364,7 +2364,7 @@ int32 field::special_summon(uint16 step, effect * reason_effect, uint8 reason_pl
for
(
auto
cit
=
targets
->
container
.
begin
();
cit
!=
targets
->
container
.
end
();
++
cit
)
{
if
(
!
((
*
cit
)
->
current
.
position
&
POS_FACEDOWN
))
raise_single_event
(
*
cit
,
0
,
EVENT_SPSUMMON_SUCCESS
,
(
*
cit
)
->
current
.
reason_effect
,
0
,
(
*
cit
)
->
current
.
reason_player
,
(
*
cit
)
->
summon_player
,
0
);
int32
summontype
=
(
*
cit
)
->
summon_
type
&
0xff000000
;
int32
summontype
=
(
*
cit
)
->
summon_
info
&
0xff000000
;
if
(
summontype
&&
(
*
cit
)
->
material_cards
.
size
())
{
int32
matreason
=
(
summontype
==
SUMMON_TYPE_FUSION
)
?
REASON_FUSION
:
(
summontype
==
SUMMON_TYPE_RITUAL
)
?
REASON_RITUAL
:
(
summontype
==
SUMMON_TYPE_XYZ
)
?
REASON_XYZ
:
0
;
for
(
auto
mit
=
(
*
cit
)
->
material_cards
.
begin
();
mit
!=
(
*
cit
)
->
material_cards
.
end
();
++
mit
)
...
...
ocgcore/scriptlib.h
View file @
e8ce8c55
...
...
@@ -65,6 +65,7 @@ public:
static
int32
card_get_sequence
(
lua_State
*
L
);
static
int32
card_get_previous_sequence
(
lua_State
*
L
);
static
int32
card_get_summon_type
(
lua_State
*
L
);
static
int32
card_get_summon_location
(
lua_State
*
L
);
static
int32
card_get_summon_player
(
lua_State
*
L
);
static
int32
card_get_destination
(
lua_State
*
L
);
static
int32
card_get_leave_field_dest
(
lua_State
*
L
);
...
...
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