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
YGOPRO-520DIY
ygopro
Commits
6077b005
Commit
6077b005
authored
Nov 20, 2014
by
Argon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
97fd88a8
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
19 deletions
+18
-19
ocgcore/card.cpp
ocgcore/card.cpp
+5
-7
ocgcore/libcard.cpp
ocgcore/libcard.cpp
+9
-9
ocgcore/processor.cpp
ocgcore/processor.cpp
+3
-2
script/c81210420.lua
script/c81210420.lua
+1
-1
No files found.
ocgcore/card.cpp
View file @
6077b005
...
@@ -496,7 +496,7 @@ int32 card::get_defence(uint8 swap) {
...
@@ -496,7 +496,7 @@ int32 card::get_defence(uint8 swap) {
return
def
;
return
def
;
}
}
uint32
card
::
get_level
()
{
uint32
card
::
get_level
()
{
if
(
data
.
type
&
TYPE_XYZ
||
single_effect
.
count
(
0x14d72c34
)
>
0
||
(
current
.
location
!=
LOCATION_MZONE
&&
data
.
type
&
(
TYPE_SPELL
+
TYPE_TRAP
)
))
if
(
(
data
.
type
&
TYPE_XYZ
)
||
(
status
&
STATUS_NO_LEVEL
))
return
0
;
return
0
;
if
(
assume_type
==
ASSUME_LEVEL
)
if
(
assume_type
==
ASSUME_LEVEL
)
return
assume_value
;
return
assume_value
;
...
@@ -529,7 +529,7 @@ uint32 card::get_level() {
...
@@ -529,7 +529,7 @@ uint32 card::get_level() {
return
level
;
return
level
;
}
}
uint32
card
::
get_rank
()
{
uint32
card
::
get_rank
()
{
if
(
!
(
data
.
type
&
TYPE_XYZ
))
if
(
!
(
data
.
type
&
TYPE_XYZ
)
||
(
status
&
STATUS_NO_LEVEL
)
)
return
0
;
return
0
;
if
(
assume_type
==
ASSUME_RANK
)
if
(
assume_type
==
ASSUME_RANK
)
return
assume_value
;
return
assume_value
;
...
@@ -562,7 +562,7 @@ uint32 card::get_rank() {
...
@@ -562,7 +562,7 @@ uint32 card::get_rank() {
return
rank
;
return
rank
;
}
}
uint32
card
::
get_synchro_level
(
card
*
pcard
)
{
uint32
card
::
get_synchro_level
(
card
*
pcard
)
{
if
(
data
.
type
&
TYPE_XYZ
||
single_effect
.
count
(
0x14d72c34
)
>
0
||
(
current
.
location
!=
LOCATION_MZONE
&&
data
.
type
&
(
TYPE_SPELL
+
TYPE_TRAP
)
))
if
(
(
data
.
type
&
TYPE_XYZ
)
||
(
status
&
STATUS_NO_LEVEL
))
return
0
;
return
0
;
uint32
lev
;
uint32
lev
;
effect_set
eset
;
effect_set
eset
;
...
@@ -574,7 +574,7 @@ uint32 card::get_synchro_level(card* pcard) {
...
@@ -574,7 +574,7 @@ uint32 card::get_synchro_level(card* pcard) {
return
lev
;
return
lev
;
}
}
uint32
card
::
get_ritual_level
(
card
*
pcard
)
{
uint32
card
::
get_ritual_level
(
card
*
pcard
)
{
if
(
data
.
type
&
TYPE_XYZ
||
single_effect
.
count
(
0x14d72c34
)
>
0
||
(
current
.
location
!=
LOCATION_MZONE
&&
data
.
type
&
(
TYPE_SPELL
+
TYPE_TRAP
)
))
if
(
(
data
.
type
&
TYPE_XYZ
)
||
(
status
&
STATUS_NO_LEVEL
))
return
0
;
return
0
;
uint32
lev
;
uint32
lev
;
effect_set
eset
;
effect_set
eset
;
...
@@ -586,7 +586,7 @@ uint32 card::get_ritual_level(card* pcard) {
...
@@ -586,7 +586,7 @@ uint32 card::get_ritual_level(card* pcard) {
return
lev
;
return
lev
;
}
}
uint32
card
::
is_xyz_level
(
card
*
pcard
,
uint32
lv
)
{
uint32
card
::
is_xyz_level
(
card
*
pcard
,
uint32
lv
)
{
if
(
data
.
type
&
TYPE_XYZ
||
single_effect
.
count
(
0x14d72c34
)
>
0
||
(
current
.
location
!=
LOCATION_MZONE
&&
data
.
type
&
(
TYPE_SPELL
+
TYPE_TRAP
)
))
if
(
(
data
.
type
&
TYPE_XYZ
)
||
(
status
&
STATUS_NO_LEVEL
))
return
FALSE
;
return
FALSE
;
uint32
lev
;
uint32
lev
;
effect_set
eset
;
effect_set
eset
;
...
@@ -1826,8 +1826,6 @@ int32 card::is_special_summonable(uint8 playerid) {
...
@@ -1826,8 +1826,6 @@ int32 card::is_special_summonable(uint8 playerid) {
return
FALSE
;
return
FALSE
;
if
(
is_affected_by_effect
(
EFFECT_FORBIDDEN
))
if
(
is_affected_by_effect
(
EFFECT_FORBIDDEN
))
return
FALSE
;
return
FALSE
;
if
(
current
.
location
&
(
LOCATION_GRAVE
+
LOCATION_REMOVED
)
&&
is_status
(
STATUS_REVIVE_LIMIT
)
&&
!
is_status
(
STATUS_PROC_COMPLETE
))
return
FALSE
;
pduel
->
game_field
->
save_lp_cost
();
pduel
->
game_field
->
save_lp_cost
();
effect_set
eset
;
effect_set
eset
;
filter_effect
(
EFFECT_SPSUMMON_COST
,
&
eset
);
filter_effect
(
EFFECT_SPSUMMON_COST
,
&
eset
);
...
...
ocgcore/libcard.cpp
View file @
6077b005
...
@@ -95,7 +95,7 @@ int32 scriptlib::card_get_origin_level(lua_State *L) {
...
@@ -95,7 +95,7 @@ int32 scriptlib::card_get_origin_level(lua_State *L) {
check_param_count
(
L
,
1
);
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
if
(
pcard
->
data
.
type
&
TYPE_XYZ
||
pcard
->
single_effect
.
count
(
0x14d72c34
)
>
0
||
(
pcard
->
current
.
location
!=
LOCATION_MZONE
&&
pcard
->
data
.
type
&
(
TYPE_SPELL
+
TYPE_TRAP
)
))
if
(
(
pcard
->
data
.
type
&
TYPE_XYZ
)
||
(
pcard
->
status
&
STATUS_NO_LEVEL
))
lua_pushinteger
(
L
,
0
);
lua_pushinteger
(
L
,
0
);
else
else
lua_pushinteger
(
L
,
pcard
->
data
.
level
);
lua_pushinteger
(
L
,
pcard
->
data
.
level
);
...
@@ -146,7 +146,7 @@ int32 scriptlib::card_get_origin_attribute(lua_State *L) {
...
@@ -146,7 +146,7 @@ int32 scriptlib::card_get_origin_attribute(lua_State *L) {
check_param_count
(
L
,
1
);
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
if
(
pcard
->
s
ingle_effect
.
count
(
0x14d72c34
)
>
0
||
(
pcard
->
current
.
location
!=
LOCATION_MZONE
&&
pcard
->
data
.
type
&
(
TYPE_SPELL
+
TYPE_TRAP
))
)
if
(
pcard
->
s
tatus
&
STATUS_NO_LEVEL
)
lua_pushinteger
(
L
,
0
);
lua_pushinteger
(
L
,
0
);
else
else
lua_pushinteger
(
L
,
pcard
->
data
.
attribute
);
lua_pushinteger
(
L
,
pcard
->
data
.
attribute
);
...
@@ -163,7 +163,7 @@ int32 scriptlib::card_get_origin_race(lua_State *L) {
...
@@ -163,7 +163,7 @@ int32 scriptlib::card_get_origin_race(lua_State *L) {
check_param_count
(
L
,
1
);
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
if
(
pcard
->
s
ingle_effect
.
count
(
0x14d72c34
)
>
0
||
(
pcard
->
current
.
location
!=
LOCATION_MZONE
&&
pcard
->
data
.
type
&
(
TYPE_SPELL
+
TYPE_TRAP
))
)
if
(
pcard
->
s
tatus
&
STATUS_NO_LEVEL
)
lua_pushinteger
(
L
,
0
);
lua_pushinteger
(
L
,
0
);
else
else
lua_pushinteger
(
L
,
pcard
->
data
.
race
);
lua_pushinteger
(
L
,
pcard
->
data
.
race
);
...
@@ -187,7 +187,7 @@ int32 scriptlib::card_get_text_attack(lua_State *L) {
...
@@ -187,7 +187,7 @@ int32 scriptlib::card_get_text_attack(lua_State *L) {
check_param_count
(
L
,
1
);
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
if
(
pcard
->
s
ingle_effect
.
count
(
0x14d72c34
)
>
0
||
(
pcard
->
current
.
location
!=
LOCATION_MZONE
&&
pcard
->
data
.
type
&
(
TYPE_SPELL
+
TYPE_TRAP
))
)
if
(
pcard
->
s
tatus
&
STATUS_NO_LEVEL
)
lua_pushinteger
(
L
,
0
);
lua_pushinteger
(
L
,
0
);
else
else
lua_pushinteger
(
L
,
pcard
->
data
.
attack
);
lua_pushinteger
(
L
,
pcard
->
data
.
attack
);
...
@@ -211,7 +211,7 @@ int32 scriptlib::card_get_text_defence(lua_State *L) {
...
@@ -211,7 +211,7 @@ int32 scriptlib::card_get_text_defence(lua_State *L) {
check_param_count
(
L
,
1
);
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
if
(
pcard
->
s
ingle_effect
.
count
(
0x14d72c34
)
>
0
||
(
pcard
->
current
.
location
!=
LOCATION_MZONE
&&
pcard
->
data
.
type
&
(
TYPE_SPELL
+
TYPE_TRAP
))
)
if
(
pcard
->
s
tatus
&
STATUS_NO_LEVEL
)
lua_pushinteger
(
L
,
0
);
lua_pushinteger
(
L
,
0
);
else
else
lua_pushinteger
(
L
,
pcard
->
data
.
defence
);
lua_pushinteger
(
L
,
pcard
->
data
.
defence
);
...
@@ -1521,7 +1521,7 @@ int32 scriptlib::card_is_level_below(lua_State *L) {
...
@@ -1521,7 +1521,7 @@ int32 scriptlib::card_is_level_below(lua_State *L) {
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
uint32
lvl
=
lua_tointeger
(
L
,
2
);
uint32
lvl
=
lua_tointeger
(
L
,
2
);
if
((
pcard
->
data
.
type
&
TYPE_XYZ
)
||
(
!
(
pcard
->
data
.
type
&
TYPE_MONSTER
)
&&
!
(
pcard
->
current
.
location
&
LOCATION_MZONE
))
||
pcard
->
single_effect
.
count
(
0x14d72c34
)
>
0
)
if
((
pcard
->
data
.
type
&
TYPE_XYZ
)
||
(
pcard
->
status
&
STATUS_NO_LEVEL
)
)
lua_pushboolean
(
L
,
0
);
lua_pushboolean
(
L
,
0
);
else
else
lua_pushboolean
(
L
,
pcard
->
get_level
()
<=
lvl
);
lua_pushboolean
(
L
,
pcard
->
get_level
()
<=
lvl
);
...
@@ -1532,7 +1532,7 @@ int32 scriptlib::card_is_level_above(lua_State *L) {
...
@@ -1532,7 +1532,7 @@ int32 scriptlib::card_is_level_above(lua_State *L) {
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
uint32
lvl
=
lua_tointeger
(
L
,
2
);
uint32
lvl
=
lua_tointeger
(
L
,
2
);
if
((
pcard
->
data
.
type
&
TYPE_XYZ
)
||
(
!
(
pcard
->
data
.
type
&
TYPE_MONSTER
)
&&
!
(
pcard
->
current
.
location
&
LOCATION_MZONE
))
||
pcard
->
single_effect
.
count
(
0x14d72c34
)
>
0
)
if
((
pcard
->
data
.
type
&
TYPE_XYZ
)
||
(
pcard
->
status
&
STATUS_NO_LEVEL
)
)
lua_pushboolean
(
L
,
0
);
lua_pushboolean
(
L
,
0
);
else
else
lua_pushboolean
(
L
,
pcard
->
get_level
()
>=
lvl
);
lua_pushboolean
(
L
,
pcard
->
get_level
()
>=
lvl
);
...
@@ -1543,7 +1543,7 @@ int32 scriptlib::card_is_rank_below(lua_State *L) {
...
@@ -1543,7 +1543,7 @@ int32 scriptlib::card_is_rank_below(lua_State *L) {
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
uint32
rnk
=
lua_tointeger
(
L
,
2
);
uint32
rnk
=
lua_tointeger
(
L
,
2
);
if
(
!
(
pcard
->
data
.
type
&
TYPE_XYZ
))
if
(
!
(
pcard
->
data
.
type
&
TYPE_XYZ
)
||
(
pcard
->
status
&
STATUS_NO_LEVEL
)
)
lua_pushboolean
(
L
,
0
);
lua_pushboolean
(
L
,
0
);
else
else
lua_pushboolean
(
L
,
pcard
->
get_rank
()
<=
rnk
);
lua_pushboolean
(
L
,
pcard
->
get_rank
()
<=
rnk
);
...
@@ -1554,7 +1554,7 @@ int32 scriptlib::card_is_rank_above(lua_State *L) {
...
@@ -1554,7 +1554,7 @@ int32 scriptlib::card_is_rank_above(lua_State *L) {
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
uint32
rnk
=
lua_tointeger
(
L
,
2
);
uint32
rnk
=
lua_tointeger
(
L
,
2
);
if
(
!
(
pcard
->
data
.
type
&
TYPE_XYZ
))
if
(
!
(
pcard
->
data
.
type
&
TYPE_XYZ
)
||
(
pcard
->
status
&
STATUS_NO_LEVEL
)
)
lua_pushboolean
(
L
,
0
);
lua_pushboolean
(
L
,
0
);
else
else
lua_pushboolean
(
L
,
pcard
->
get_rank
()
>=
rnk
);
lua_pushboolean
(
L
,
pcard
->
get_rank
()
>=
rnk
);
...
...
ocgcore/processor.cpp
View file @
6077b005
...
@@ -4536,9 +4536,8 @@ int32 field::solve_chain(uint16 step, uint32 skip_new) {
...
@@ -4536,9 +4536,8 @@ int32 field::solve_chain(uint16 step, uint32 skip_new) {
return
FALSE
;
return
FALSE
;
}
}
}
}
if
(
cait
->
opinfos
.
count
(
0x200
))
core
.
spsummon_state_count
[
cait
->
triggering_player
]
--
;
core
.
units
.
begin
()
->
peffect
=
(
effect
*
)(
size_t
)
cait
->
triggering_effect
->
operation
;
core
.
units
.
begin
()
->
peffect
=
(
effect
*
)(
size_t
)
cait
->
triggering_effect
->
operation
;
core
.
units
.
begin
()
->
arg2
=
core
.
spsummon_state_count
[
cait
->
triggering_player
];
if
(
cait
->
replace_op
)
if
(
cait
->
replace_op
)
cait
->
triggering_effect
->
operation
=
cait
->
replace_op
;
cait
->
triggering_effect
->
operation
=
cait
->
replace_op
;
if
(
cait
->
triggering_effect
->
operation
)
{
if
(
cait
->
triggering_effect
->
operation
)
{
...
@@ -4550,6 +4549,8 @@ int32 field::solve_chain(uint16 step, uint32 skip_new) {
...
@@ -4550,6 +4549,8 @@ int32 field::solve_chain(uint16 step, uint32 skip_new) {
case
3
:
{
case
3
:
{
effect
*
peffect
=
cait
->
triggering_effect
;
effect
*
peffect
=
cait
->
triggering_effect
;
peffect
->
operation
=
(
ptr
)
core
.
units
.
begin
()
->
peffect
;
peffect
->
operation
=
(
ptr
)
core
.
units
.
begin
()
->
peffect
;
if
(
cait
->
opinfos
.
count
(
0x200
)
&&
(
core
.
units
.
begin
()
->
arg2
!=
core
.
spsummon_state_count
[
cait
->
triggering_player
]))
core
.
spsummon_state_count
[
cait
->
triggering_player
]
--
;
if
(
core
.
special_summoning
.
size
())
if
(
core
.
special_summoning
.
size
())
core
.
special_summoning
.
clear
();
core
.
special_summoning
.
clear
();
if
(
core
.
equiping_cards
.
size
())
if
(
core
.
equiping_cards
.
size
())
...
...
script/c81210420.lua
View file @
6077b005
...
@@ -68,7 +68,7 @@ function c81210420.activate(e,tp,eg,ep,ev,re,r,rp)
...
@@ -68,7 +68,7 @@ function c81210420.activate(e,tp,eg,ep,ev,re,r,rp)
e5
:
SetCode
(
EFFECT_SET_BASE_DEFENCE
)
e5
:
SetCode
(
EFFECT_SET_BASE_DEFENCE
)
e5
:
SetValue
(
0
)
e5
:
SetValue
(
0
)
tg
:
RegisterEffect
(
e5
,
true
)
tg
:
RegisterEffect
(
e5
,
true
)
tg
:
RegisterFlagEffect
(
81210420
,
RESET_EVENT
+
0x47c0000
+
RESET_PHASE
+
PHASE_BATTLE
,
0
,
1
)
tg
:
SetStatus
(
STATUS_NO_LEVEL
)
tg
=
sg
:
GetNext
()
tg
=
sg
:
GetNext
()
end
end
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
true
,
false
,
POS_FACEDOWN_DEFENCE
)
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
true
,
false
,
POS_FACEDOWN_DEFENCE
)
...
...
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