Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-2pick
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
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
MyCard
ygopro-2pick
Commits
de30ec70
Commit
de30ec70
authored
Feb 06, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/purerosefallen/ygopro-222DIY
parents
03e3b64b
e9376985
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
457 additions
and
192 deletions
+457
-192
cards.cdb
cards.cdb
+0
-0
lflist.conf
lflist.conf
+367
-191
ocgcore/card.cpp
ocgcore/card.cpp
+5
-0
ocgcore/duel.cpp
ocgcore/duel.cpp
+6
-0
ocgcore/field.h
ocgcore/field.h
+3
-0
ocgcore/interpreter.cpp
ocgcore/interpreter.cpp
+4
-1
ocgcore/libcard.cpp
ocgcore/libcard.cpp
+24
-0
ocgcore/libduel.cpp
ocgcore/libduel.cpp
+40
-0
ocgcore/operations.cpp
ocgcore/operations.cpp
+5
-0
ocgcore/scriptlib.h
ocgcore/scriptlib.h
+3
-0
No files found.
cards.cdb
View file @
de30ec70
No preview for this file type
lflist.conf
View file @
de30ec70
This diff is collapsed.
Click to expand it.
ocgcore/card.cpp
View file @
de30ec70
...
...
@@ -1007,6 +1007,11 @@ uint32 card::get_ritual_level(card* pcard) {
uint32
card
::
check_xyz_level
(
card
*
pcard
,
uint32
lv
)
{
if
(
status
&
STATUS_NO_LEVEL
)
return
0
;
//modded - rose xyz summon
card
*
rcard
=
pduel
->
game_field
->
rose_card
;
uint32
rlv
=
pduel
->
game_field
->
rose_level
;
if
(
rcard
==
this
&&
rlv
==
lv
)
return
rlv
;
uint32
lev
;
effect_set
eset
;
filter_effect
(
EFFECT_XYZ_LEVEL
,
&
eset
);
...
...
ocgcore/duel.cpp
View file @
de30ec70
...
...
@@ -18,6 +18,9 @@ duel::duel() {
lua
=
new
interpreter
(
this
);
game_field
=
new
field
(
this
);
game_field
->
temp_card
=
new_card
(
0
);
//modded - for rose xyz summon
game_field
->
rose_card
=
0
;
game_field
->
rose_level
=
0
;
clear_buffer
();
}
duel
::~
duel
()
{
...
...
@@ -43,6 +46,9 @@ void duel::clear() {
effects
.
clear
();
game_field
=
new
field
(
this
);
game_field
->
temp_card
=
new_card
(
0
);
//modded - for rose xyz summon
game_field
->
rose_card
=
0
;
game_field
->
rose_level
=
0
;
}
card
*
duel
::
new_card
(
uint32
code
)
{
card
*
pcard
=
new
card
(
this
);
...
...
ocgcore/field.h
View file @
de30ec70
...
...
@@ -342,6 +342,9 @@ public:
processor
core
;
return_value
returns
;
tevent
nil_event
;
//modded - for rose xyz summon
card
*
rose_card
;
uint32
rose_level
;
static
int32
field_used_count
[
32
];
explicit
field
(
duel
*
pduel
);
...
...
ocgcore/interpreter.cpp
View file @
de30ec70
...
...
@@ -23,6 +23,7 @@ static const struct luaL_Reg cardlib[] = {
{
"SetCardData"
,
scriptlib
::
card_set_card_data
},
{
"GetLinkMarker"
,
scriptlib
::
card_get_link_marker
},
{
"GetOriginalLinkMarker"
,
scriptlib
::
card_get_origin_link_marker
},
{
"IsXyzSummonableByRose"
,
scriptlib
::
card_is_xyz_summonable_by_rose
},
{
"GetCode"
,
scriptlib
::
card_get_code
},
{
"GetOriginalCode"
,
scriptlib
::
card_get_origin_code
},
...
...
@@ -387,7 +388,9 @@ static const struct luaL_Reg duellib[] = {
{
"Exile"
,
scriptlib
::
duel_exile
},
{
"DisableActionCheck"
,
scriptlib
::
duel_disable_action_check
},
{
"SetMetatable"
,
scriptlib
::
duel_setmetatable
},
{
"MoveTurnCount"
,
scriptlib
::
duel_move_turn_count
},
{
"MoveTurnCount"
,
scriptlib
::
duel_move_turn_count
},
{
"GetCardsInZone"
,
scriptlib
::
duel_get_cards_in_zone
},
{
"XyzSummonByRose"
,
scriptlib
::
duel_xyz_summon_by_rose
},
{
"EnableGlobalFlag"
,
scriptlib
::
duel_enable_global_flag
},
{
"GetLP"
,
scriptlib
::
duel_get_lp
},
...
...
ocgcore/libcard.cpp
View file @
de30ec70
...
...
@@ -100,6 +100,30 @@ int32 scriptlib::card_get_origin_link_marker(lua_State *L) {
lua_pushinteger
(
L
,
pcard
->
data
.
link_marker
);
return
1
;
}
int32
scriptlib
::
card_is_xyz_summonable_by_rose
(
lua_State
*
L
)
{
check_param_count
(
L
,
3
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
3
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
if
(
!
(
pcard
->
data
.
type
&
TYPE_XYZ
))
return
0
;
card
*
rcard
=
*
(
card
**
)
lua_touserdata
(
L
,
2
);
card
*
mcard
=
*
(
card
**
)
lua_touserdata
(
L
,
3
);
group
*
materials
=
pcard
->
pduel
->
new_group
(
rcard
);
materials
->
container
.
insert
(
mcard
);
uint32
p
=
pcard
->
pduel
->
game_field
->
core
.
reason_player
;
pcard
->
pduel
->
game_field
->
core
.
limit_xyz
=
materials
;
pcard
->
pduel
->
game_field
->
core
.
limit_xyz_minc
=
2
;
pcard
->
pduel
->
game_field
->
core
.
limit_xyz_maxc
=
2
;
pcard
->
pduel
->
game_field
->
rose_card
=
rcard
;
pcard
->
pduel
->
game_field
->
rose_level
=
mcard
->
get_level
();
int32
result
=
pcard
->
is_special_summonable
(
p
,
SUMMON_TYPE_XYZ
);
pcard
->
pduel
->
game_field
->
rose_card
=
0
;
pcard
->
pduel
->
game_field
->
rose_level
=
0
;
lua_pushboolean
(
L
,
result
);
return
1
;
}
int32
scriptlib
::
card_get_code
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
...
...
ocgcore/libduel.cpp
View file @
de30ec70
...
...
@@ -204,6 +204,46 @@ int32 scriptlib::duel_move_turn_count(lua_State *L) {
pduel
->
write_buffer8
(
turn_player
|
0x2
);
return
0
;
}
int32
scriptlib
::
duel_get_cards_in_zone
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
uint32
rplayer
=
lua_tonumberint
(
L
,
1
);
if
(
rplayer
!=
0
&&
rplayer
!=
1
)
return
0
;
uint32
zone
=
lua_tonumberint
(
L
,
2
);
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
field
::
card_set
cset
;
pduel
->
game_field
->
get_cards_in_zone
(
&
cset
,
zone
,
rplayer
,
LOCATION_MZONE
);
pduel
->
game_field
->
get_cards_in_zone
(
&
cset
,
zone
,
rplayer
,
LOCATION_SZONE
);
pduel
->
game_field
->
get_cards_in_zone
(
&
cset
,
zone
>>
16
,
1
-
rplayer
,
LOCATION_MZONE
);
pduel
->
game_field
->
get_cards_in_zone
(
&
cset
,
zone
>>
16
,
1
-
rplayer
,
LOCATION_SZONE
);
group
*
pgroup
=
pduel
->
new_group
(
cset
);
interpreter
::
group2value
(
L
,
pgroup
);
return
1
;
}
int32
scriptlib
::
duel_xyz_summon_by_rose
(
lua_State
*
L
)
{
check_action_permission
(
L
);
check_param_count
(
L
,
4
);
check_param
(
L
,
PARAM_TYPE_CARD
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
3
);
check_param
(
L
,
PARAM_TYPE_CARD
,
4
);
uint32
playerid
=
lua_tonumberint
(
L
,
1
);
if
(
playerid
!=
0
&&
playerid
!=
1
)
return
0
;
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
2
);
card
*
rcard
=
*
(
card
**
)
lua_touserdata
(
L
,
3
);
card
*
mcard
=
*
(
card
**
)
lua_touserdata
(
L
,
4
);
duel
*
pduel
=
pcard
->
pduel
;
group
*
materials
=
pduel
->
new_group
(
rcard
);
materials
->
container
.
insert
(
mcard
);
pduel
->
game_field
->
core
.
limit_xyz
=
materials
;
pduel
->
game_field
->
core
.
limit_xyz_minc
=
0
;
pduel
->
game_field
->
core
.
limit_xyz_maxc
=
0
;
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
pduel
->
game_field
->
rose_card
=
rcard
;
pduel
->
game_field
->
rose_level
=
mcard
->
get_level
();
pduel
->
game_field
->
special_summon_rule
(
playerid
,
pcard
,
SUMMON_TYPE_XYZ
);
return
lua_yield
(
L
,
0
);
}
int32
scriptlib
::
duel_enable_global_flag
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
...
...
ocgcore/operations.cpp
View file @
de30ec70
...
...
@@ -2570,7 +2570,12 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card* target, uin
if
(
proc
->
value
==
SUMMON_TYPE_SYNCHRO
)
matreason
=
REASON_SYNCHRO
;
else
if
(
proc
->
value
==
SUMMON_TYPE_XYZ
)
{
matreason
=
REASON_XYZ
;
//modded - rose xyz summon
pduel
->
game_field
->
rose_card
=
0
;
pduel
->
game_field
->
rose_level
=
0
;
}
else
if
(
proc
->
value
==
SUMMON_TYPE_LINK
)
matreason
=
REASON_LINK
;
if
(
target
->
material_cards
.
size
())
{
...
...
ocgcore/scriptlib.h
View file @
de30ec70
...
...
@@ -28,6 +28,7 @@ public:
static
int32
card_set_card_data
(
lua_State
*
L
);
static
int32
card_get_link_marker
(
lua_State
*
L
);
static
int32
card_get_origin_link_marker
(
lua_State
*
L
);
static
int32
card_is_xyz_summonable_by_rose
(
lua_State
*
L
);
static
int32
effect_set_owner
(
lua_State
*
L
);
static
int32
effect_get_range
(
lua_State
*
L
);
static
int32
effect_get_count_limit
(
lua_State
*
L
);
...
...
@@ -38,6 +39,8 @@ public:
static
int32
duel_disable_action_check
(
lua_State
*
L
);
static
int32
duel_setmetatable
(
lua_State
*
L
);
static
int32
duel_move_turn_count
(
lua_State
*
L
);
static
int32
duel_get_cards_in_zone
(
lua_State
*
L
);
static
int32
duel_xyz_summon_by_rose
(
lua_State
*
L
);
//metatable
static
int32
group_meta_add
(
lua_State
*
L
);
static
int32
group_meta_sub
(
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