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
497921cd
Commit
497921cd
authored
Sep 19, 2018
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/Fluorohydride/ygopro-core
parents
883f539c
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 @
497921cd
...
@@ -2775,37 +2775,6 @@ int32 scriptlib::card_add_monster_attribute(lua_State *L) {
...
@@ -2775,37 +2775,6 @@ int32 scriptlib::card_add_monster_attribute(lua_State *L) {
return
0
;
return
0
;
}
}
int32
scriptlib
::
card_add_monster_attribute_complete
(
lua_State
*
L
)
{
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
;
return
0
;
}
}
int32
scriptlib
::
card_cancel_to_grave
(
lua_State
*
L
)
{
int32
scriptlib
::
card_cancel_to_grave
(
lua_State
*
L
)
{
...
...
operations.cpp
View file @
497921cd
...
@@ -4280,7 +4280,7 @@ int32 field::move_to_field(uint16 step, card* target, uint32 enable, uint32 ret,
...
@@ -4280,7 +4280,7 @@ int32 field::move_to_field(uint16 step, card* target, uint32 enable, uint32 ret,
if
(
!
(
target
->
current
.
location
&
LOCATION_ONFIELD
))
if
(
!
(
target
->
current
.
location
&
LOCATION_ONFIELD
))
target
->
clear_relate_effect
();
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
)
{
||
ret
==
1
&&
target
->
turnid
!=
infos
.
turn_id
)
{
target
->
set_status
(
STATUS_SUMMON_TURN
,
FALSE
);
target
->
set_status
(
STATUS_SUMMON_TURN
,
FALSE
);
target
->
set_status
(
STATUS_FLIP_SUMMON_TURN
,
FALSE
);
target
->
set_status
(
STATUS_FLIP_SUMMON_TURN
,
FALSE
);
...
@@ -4374,6 +4374,32 @@ int32 field::move_to_field(uint16 step, card* target, uint32 enable, uint32 ret,
...
@@ -4374,6 +4374,32 @@ int32 field::move_to_field(uint16 step, card* target, uint32 enable, uint32 ret,
peffect
->
dec_count
();
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
)))
if
(
enable
||
((
ret
==
1
)
&&
target
->
is_position
(
POS_FACEUP
)))
target
->
enable_field_effect
(
true
);
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