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
54f3e946
Commit
54f3e946
authored
Jun 27, 2016
by
DailyShana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update spell/trap monster
parent
c1a9814f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
23 deletions
+32
-23
interpreter.cpp
interpreter.cpp
+1
-1
libcard.cpp
libcard.cpp
+30
-21
scriptlib.h
scriptlib.h
+1
-1
No files found.
interpreter.cpp
View file @
54f3e946
...
@@ -209,7 +209,7 @@ static const struct luaL_Reg cardlib[] = {
...
@@ -209,7 +209,7 @@ static const struct luaL_Reg cardlib[] = {
{
"IsCanBeEffectTarget"
,
scriptlib
::
card_is_can_be_effect_target
},
{
"IsCanBeEffectTarget"
,
scriptlib
::
card_is_can_be_effect_target
},
{
"IsCanBeBattleTarget"
,
scriptlib
::
card_is_can_be_battle_target
},
{
"IsCanBeBattleTarget"
,
scriptlib
::
card_is_can_be_battle_target
},
{
"AddMonsterAttribute"
,
scriptlib
::
card_add_monster_attribute
},
{
"AddMonsterAttribute"
,
scriptlib
::
card_add_monster_attribute
},
{
"
TrapMonsterComplete"
,
scriptlib
::
card_trap_monster
_complete
},
{
"
AddMonsterAttributeComplete"
,
scriptlib
::
card_add_monster_attribute
_complete
},
{
"CancelToGrave"
,
scriptlib
::
card_cancel_to_grave
},
{
"CancelToGrave"
,
scriptlib
::
card_cancel_to_grave
},
{
"GetTributeRequirement"
,
scriptlib
::
card_get_tribute_requirement
},
{
"GetTributeRequirement"
,
scriptlib
::
card_get_tribute_requirement
},
{
"GetBattleTarget"
,
scriptlib
::
card_get_battle_target
},
{
"GetBattleTarget"
,
scriptlib
::
card_get_battle_target
},
...
...
libcard.cpp
View file @
54f3e946
...
@@ -2069,13 +2069,14 @@ int32 scriptlib::card_is_can_be_battle_target(lua_State *L) {
...
@@ -2069,13 +2069,14 @@ int32 scriptlib::card_is_can_be_battle_target(lua_State *L) {
return
1
;
return
1
;
}
}
int32
scriptlib
::
card_add_monster_attribute
(
lua_State
*
L
)
{
int32
scriptlib
::
card_add_monster_attribute
(
lua_State
*
L
)
{
check_param_count
(
L
,
6
);
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
int32
attribute
=
lua_tointeger
(
L
,
2
);
int32
type
=
lua_tointeger
(
L
,
2
);
int32
race
=
lua_tointeger
(
L
,
3
);
int32
attribute
=
lua_tointeger
(
L
,
3
);
int32
level
=
lua_tointeger
(
L
,
4
);
int32
race
=
lua_tointeger
(
L
,
4
);
int32
atk
=
lua_tointeger
(
L
,
5
);
int32
level
=
lua_tointeger
(
L
,
5
);
int32
def
=
lua_tointeger
(
L
,
6
);
int32
atk
=
lua_tointeger
(
L
,
6
);
int32
def
=
lua_tointeger
(
L
,
7
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
duel
*
pduel
=
pcard
->
pduel
;
duel
*
pduel
=
pcard
->
pduel
;
pcard
->
set_status
(
STATUS_NO_LEVEL
,
FALSE
);
pcard
->
set_status
(
STATUS_NO_LEVEL
,
FALSE
);
...
@@ -2085,7 +2086,8 @@ int32 scriptlib::card_add_monster_attribute(lua_State *L) {
...
@@ -2085,7 +2086,8 @@ int32 scriptlib::card_add_monster_attribute(lua_State *L) {
peffect
->
type
=
EFFECT_TYPE_SINGLE
;
peffect
->
type
=
EFFECT_TYPE_SINGLE
;
peffect
->
code
=
EFFECT_PRE_MONSTER
;
peffect
->
code
=
EFFECT_PRE_MONSTER
;
peffect
->
flag
[
0
]
=
EFFECT_FLAG_CANNOT_DISABLE
;
peffect
->
flag
[
0
]
=
EFFECT_FLAG_CANNOT_DISABLE
;
peffect
->
reset_flag
=
RESET_CHAIN
+
RESET_EVENT
+
0x1fe0000
;
peffect
->
reset_flag
=
RESET_CHAIN
+
RESET_EVENT
+
0x47e0000
;
peffect
->
value
=
type
;
pcard
->
add_effect
(
peffect
);
pcard
->
add_effect
(
peffect
);
//attribute
//attribute
if
(
attribute
)
{
if
(
attribute
)
{
...
@@ -2144,31 +2146,38 @@ int32 scriptlib::card_add_monster_attribute(lua_State *L) {
...
@@ -2144,31 +2146,38 @@ int32 scriptlib::card_add_monster_attribute(lua_State *L) {
}
}
return
0
;
return
0
;
}
}
int32
scriptlib
::
card_
trap_monster
_complete
(
lua_State
*
L
)
{
int32
scriptlib
::
card_
add_monster_attribute
_complete
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
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
);
int32
extra_type
=
lua_tointeger
(
L
,
2
);
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
;
duel
*
pduel
=
pcard
->
pduel
;
// add type
// add type
effect
*
peffect
=
pduel
->
new_effect
();
effect
*
peffect
=
pduel
->
new_effect
();
peffect
->
owner
=
pcard
;
peffect
->
owner
=
pcard
;
peffect
->
type
=
EFFECT_TYPE_SINGLE
;
peffect
->
type
=
EFFECT_TYPE_SINGLE
;
peffect
->
code
=
EFFECT_
ADD
_TYPE
;
peffect
->
code
=
EFFECT_
CHANGE
_TYPE
;
peffect
->
flag
[
0
]
=
EFFECT_FLAG_CANNOT_DISABLE
;
peffect
->
flag
[
0
]
=
EFFECT_FLAG_CANNOT_DISABLE
;
peffect
->
reset_flag
=
RESET_EVENT
+
0x1fe0000
;
peffect
->
reset_flag
=
RESET_EVENT
+
0x1fe0000
;
peffect
->
value
=
TYPE_MONSTER
|
TYPE_TRAPMONSTER
|
extra_
type
;
peffect
->
value
=
TYPE_MONSTER
|
type
;
pcard
->
add_effect
(
peffect
);
pcard
->
add_effect
(
peffect
);
// extra block
// extra block
peffect
=
pduel
->
new_effect
();
if
(
type
&
TYPE_TRAPMONSTER
)
{
peffect
->
owner
=
pcard
;
peffect
=
pduel
->
new_effect
();
peffect
->
type
=
EFFECT_TYPE_FIELD
;
peffect
->
owner
=
pcard
;
peffect
->
range
=
LOCATION_MZONE
;
peffect
->
type
=
EFFECT_TYPE_FIELD
;
peffect
->
code
=
EFFECT_USE_EXTRA_SZONE
;
peffect
->
range
=
LOCATION_MZONE
;
peffect
->
flag
[
0
]
=
EFFECT_FLAG_CANNOT_DISABLE
;
peffect
->
code
=
EFFECT_USE_EXTRA_SZONE
;
peffect
->
reset_flag
=
RESET_EVENT
+
0x1fe0000
;
peffect
->
flag
[
0
]
=
EFFECT_FLAG_CANNOT_DISABLE
;
peffect
->
value
=
1
+
(
0x10000
<<
pcard
->
previous
.
sequence
);
peffect
->
reset_flag
=
RESET_EVENT
+
0x1fe0000
;
pcard
->
add_effect
(
peffect
);
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
)
{
...
...
scriptlib.h
View file @
54f3e946
...
@@ -211,7 +211,7 @@ public:
...
@@ -211,7 +211,7 @@ public:
static
int32
card_is_can_be_effect_target
(
lua_State
*
L
);
static
int32
card_is_can_be_effect_target
(
lua_State
*
L
);
static
int32
card_is_can_be_battle_target
(
lua_State
*
L
);
static
int32
card_is_can_be_battle_target
(
lua_State
*
L
);
static
int32
card_add_monster_attribute
(
lua_State
*
L
);
static
int32
card_add_monster_attribute
(
lua_State
*
L
);
static
int32
card_
trap_monster
_complete
(
lua_State
*
L
);
static
int32
card_
add_monster_attribute
_complete
(
lua_State
*
L
);
static
int32
card_cancel_to_grave
(
lua_State
*
L
);
static
int32
card_cancel_to_grave
(
lua_State
*
L
);
static
int32
card_get_tribute_requirement
(
lua_State
*
L
);
static
int32
card_get_tribute_requirement
(
lua_State
*
L
);
static
int32
card_get_battle_target
(
lua_State
*
L
);
static
int32
card_get_battle_target
(
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