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
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-core
Commits
9cc9bb5c
You need to sign in or sign up before continuing.
Commit
9cc9bb5c
authored
Sep 19, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/Fluorohydride/ygopro-core
parents
e4cd79bf
60e18710
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
32 deletions
+27
-32
libcard.cpp
libcard.cpp
+0
-31
operations.cpp
operations.cpp
+27
-1
No files found.
libcard.cpp
View file @
9cc9bb5c
...
...
@@ -2926,37 +2926,6 @@ int32 scriptlib::card_add_monster_attribute(lua_State *L) {
return
0
;
}
int32
scriptlib
::
card_add_monster_attribute_complete
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
effect
*
teffect
=
pcard
->
is_affected_by_effect
(
EFFECT_PRE_MONSTER
);
if
(
!
teffect
)
return
0
;
int32
type
=
teffect
->
value
;
if
(
type
&
TYPE_TRAP
)
type
|=
TYPE_TRAPMONSTER
|
pcard
->
data
.
type
;
pcard
->
reset
(
EFFECT_PRE_MONSTER
,
RESET_CODE
);
duel
*
pduel
=
pcard
->
pduel
;
// add type
effect
*
peffect
=
pduel
->
new_effect
();
peffect
->
owner
=
pcard
;
peffect
->
type
=
EFFECT_TYPE_SINGLE
;
peffect
->
code
=
EFFECT_CHANGE_TYPE
;
peffect
->
flag
[
0
]
=
EFFECT_FLAG_CANNOT_DISABLE
;
peffect
->
reset_flag
=
RESET_EVENT
+
0x1fc0000
;
peffect
->
value
=
TYPE_MONSTER
|
type
;
pcard
->
add_effect
(
peffect
);
// extra block
if
(
type
&
TYPE_TRAPMONSTER
)
{
peffect
=
pduel
->
new_effect
();
peffect
->
owner
=
pcard
;
peffect
->
type
=
EFFECT_TYPE_FIELD
;
peffect
->
range
=
LOCATION_MZONE
;
peffect
->
code
=
EFFECT_USE_EXTRA_SZONE
;
peffect
->
flag
[
0
]
=
EFFECT_FLAG_CANNOT_DISABLE
;
peffect
->
reset_flag
=
RESET_EVENT
+
0x1fe0000
;
peffect
->
value
=
1
+
(
0x10000
<<
pcard
->
previous
.
sequence
);
pcard
->
add_effect
(
peffect
);
}
return
0
;
}
int32
scriptlib
::
card_cancel_to_grave
(
lua_State
*
L
)
{
...
...
operations.cpp
View file @
9cc9bb5c
...
...
@@ -4333,7 +4333,7 @@ int32 field::move_to_field(uint16 step, card* target, uint32 enable, uint32 ret,
if
(
!
(
target
->
current
.
location
&
LOCATION_ONFIELD
))
target
->
clear_relate_effect
();
}
if
(
ret
!=
1
&&
location
!=
target
->
current
.
location
if
(
ret
==
0
&&
location
!=
target
->
current
.
location
||
ret
==
1
&&
target
->
turnid
!=
infos
.
turn_id
)
{
target
->
set_status
(
STATUS_SUMMON_TURN
,
FALSE
);
target
->
set_status
(
STATUS_FLIP_SUMMON_TURN
,
FALSE
);
...
...
@@ -4427,6 +4427,32 @@ int32 field::move_to_field(uint16 step, card* target, uint32 enable, uint32 ret,
peffect
->
dec_count
();
}
}
effect
*
teffect
;
if
(
teffect
=
target
->
is_affected_by_effect
(
EFFECT_PRE_MONSTER
))
{
uint32
type
=
teffect
->
value
;
if
(
type
&
TYPE_TRAP
)
type
|=
TYPE_TRAPMONSTER
|
target
->
data
.
type
;
target
->
reset
(
EFFECT_PRE_MONSTER
,
RESET_CODE
);
effect
*
peffect
=
pduel
->
new_effect
();
peffect
->
owner
=
target
;
peffect
->
type
=
EFFECT_TYPE_SINGLE
;
peffect
->
code
=
EFFECT_CHANGE_TYPE
;
peffect
->
flag
[
0
]
=
EFFECT_FLAG_CANNOT_DISABLE
;
peffect
->
reset_flag
=
RESET_EVENT
+
0x1fc0000
;
peffect
->
value
=
TYPE_MONSTER
|
type
;
target
->
add_effect
(
peffect
);
if
(
type
&
TYPE_TRAPMONSTER
)
{
peffect
=
pduel
->
new_effect
();
peffect
->
owner
=
target
;
peffect
->
type
=
EFFECT_TYPE_FIELD
;
peffect
->
range
=
LOCATION_MZONE
;
peffect
->
code
=
EFFECT_USE_EXTRA_SZONE
;
peffect
->
flag
[
0
]
=
EFFECT_FLAG_CANNOT_DISABLE
;
peffect
->
reset_flag
=
RESET_EVENT
+
0x1fe0000
;
peffect
->
value
=
1
+
(
0x10000
<<
target
->
previous
.
sequence
);
target
->
add_effect
(
peffect
);
}
}
}
if
(
enable
||
((
ret
==
1
)
&&
target
->
is_position
(
POS_FACEUP
)))
target
->
enable_field_effect
(
true
);
...
...
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