Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-core
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
nanahira
ygopro-core
Commits
1d13adc3
Commit
1d13adc3
authored
Apr 16, 2016
by
salix5
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stat, field::equip()
parent
a9891440
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
8 deletions
+21
-8
card.cpp
card.cpp
+11
-3
operations.cpp
operations.cpp
+10
-5
No files found.
card.cpp
View file @
1d13adc3
...
...
@@ -603,13 +603,19 @@ void card::calc_attack_defence(int32 *patk, int32 *pdef) {
temp
.
base_defence
=
-
1
;
temp
.
defence
=
-
1
;
}
// Level/Attribute/Race is available for:
// 1. cards in LOCATION_MZONE or
// 2. cards with original type TYPE_MONSTER or
// 3. cards with current type TYPE_MONSTER(Ex. c87772572)
// They can be changed for cards satisfying 1 or 2 or current type TYPE_TRAPMONSTER.
// This is because some Phantom Knights is changed into TYPE_MONSTER but is not affected by Zombie World.
uint32
card
::
get_level
()
{
if
((
data
.
type
&
TYPE_XYZ
)
||
(
status
&
STATUS_NO_LEVEL
)
||
(
current
.
location
!=
LOCATION_MZONE
&&
!
(
data
.
type
&
TYPE_MONSTER
)
&&
!
(
get_type
()
&
TYPE_MONSTER
)))
return
0
;
if
(
assume_type
==
ASSUME_LEVEL
)
return
assume_value
;
if
(
!
(
current
.
location
&
LOCATION_MZONE
)
&&
!
(
data
.
type
&
TYPE_
MONSTER
))
if
(
current
.
location
!=
LOCATION_MZONE
&&
!
(
data
.
type
&
TYPE_MONSTER
)
&&
!
(
get_type
()
&
TYPE_TRAP
MONSTER
))
return
data
.
level
;
if
(
temp
.
level
!=
0xffffffff
)
return
temp
.
level
;
...
...
@@ -733,12 +739,13 @@ uint32 card::check_xyz_level(card* pcard, uint32 lv) {
return
(
lev
>>
16
)
&
0xffff
;
return
0
;
}
// see get_level()
uint32
card
::
get_attribute
()
{
if
(
assume_type
==
ASSUME_ATTRIBUTE
)
return
assume_value
;
if
(
current
.
location
!=
LOCATION_MZONE
&&
!
(
data
.
type
&
TYPE_MONSTER
)
&&
!
(
get_type
()
&
TYPE_MONSTER
))
return
0
;
if
(
!
(
current
.
location
&
(
LOCATION_MZONE
))
&&
!
(
data
.
type
&
TYPE_MONSTER
)
&&
!
(
get_type
()
&
TYPE_TRAPMONSTER
))
if
(
current
.
location
!=
LOCATION_MZONE
&&
!
(
data
.
type
&
TYPE_MONSTER
)
&&
!
(
get_type
()
&
TYPE_TRAPMONSTER
))
return
data
.
attribute
;
if
(
temp
.
attribute
!=
0xffffffff
)
return
temp
.
attribute
;
...
...
@@ -763,12 +770,13 @@ uint32 card::get_attribute() {
temp
.
attribute
=
0xffffffff
;
return
attribute
;
}
// see get_level()
uint32
card
::
get_race
()
{
if
(
assume_type
==
ASSUME_RACE
)
return
assume_value
;
if
(
current
.
location
!=
LOCATION_MZONE
&&
!
(
data
.
type
&
TYPE_MONSTER
)
&&
!
(
get_type
()
&
TYPE_MONSTER
))
return
0
;
if
(
!
(
current
.
location
&
(
LOCATION_MZONE
))
&&
!
(
data
.
type
&
TYPE_MONSTER
)
&&
!
(
get_type
()
&
TYPE_TRAPMONSTER
))
if
(
current
.
location
!=
LOCATION_MZONE
&&
!
(
data
.
type
&
TYPE_MONSTER
)
&&
!
(
get_type
()
&
TYPE_TRAPMONSTER
))
return
data
.
race
;
if
(
temp
.
race
!=
0xffffffff
)
return
temp
.
race
;
...
...
operations.cpp
View file @
1d13adc3
...
...
@@ -1114,13 +1114,18 @@ int32 field::equip(uint16 step, uint8 equip_player, card * equip_card, card * ta
peffect
->
owner
=
equip_card
;
peffect
->
handler
=
equip_card
;
peffect
->
type
=
EFFECT_TYPE_SINGLE
;
if
(
equip_card
->
get_type
()
&
TYPE_TRAP
)
{
peffect
->
code
=
EFFECT_ADD_TYPE
;
peffect
->
value
=
TYPE_EQUIP
;
}
else
if
(
equip_card
->
data
.
type
&
TYPE_UNION
)
{
peffect
->
code
=
EFFECT_CHANGE_TYPE
;
if
(
equip_card
->
data
.
type
&
TYPE_TRAP
)
peffect
->
value
=
TYPE_EQUIP
+
equip_card
->
data
.
type
;
else
if
(
equip_card
->
data
.
type
&
TYPE_UNION
)
peffect
->
value
=
TYPE_EQUIP
+
TYPE_SPELL
+
TYPE_UNION
;
else
}
else
{
peffect
->
code
=
EFFECT_CHANGE_TYPE
;
peffect
->
value
=
TYPE_EQUIP
+
TYPE_SPELL
;
}
peffect
->
flag
[
0
]
=
EFFECT_FLAG_CANNOT_DISABLE
;
peffect
->
reset_flag
=
RESET_EVENT
+
0x17e0000
;
equip_card
->
add_effect
(
peffect
);
...
...
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