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
d28a280c
Commit
d28a280c
authored
Aug 03, 2018
by
Momobako
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/Fluorohydride/ygopro-core
parents
e8bf5b73
2504f2bc
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
0 additions
and
56 deletions
+0
-56
card.cpp
card.cpp
+0
-22
card.h
card.h
+0
-2
interpreter.cpp
interpreter.cpp
+0
-2
libcard.cpp
libcard.cpp
+0
-28
scriptlib.h
scriptlib.h
+0
-2
No files found.
card.cpp
View file @
d28a280c
...
...
@@ -3400,28 +3400,6 @@ int32 card::is_removeable_as_cost(uint8 playerid) {
return
FALSE
;
return
TRUE
;
}
int32
card
::
is_attack_decreasable_as_cost
(
uint8
playerid
,
int32
val
)
{
if
(
!
(
data
.
type
&
TYPE_MONSTER
)
&&
!
(
get_type
()
&
TYPE_MONSTER
))
return
FALSE
;
if
(
!
(
current
.
location
&
LOCATION_MZONE
)
||
is_position
(
POS_FACEDOWN
))
return
FALSE
;
if
(
is_affected_by_effect
(
EFFECT_SET_ATTACK_FINAL
)
||
is_affected_by_effect
(
EFFECT_REVERSE_UPDATE
))
return
FALSE
;
if
(
val
&&
get_attack
()
<
val
)
return
FALSE
;
return
TRUE
;
}
int32
card
::
is_defense_decreasable_as_cost
(
uint8
playerid
,
int32
val
)
{
if
(
!
(
data
.
type
&
TYPE_MONSTER
)
&&
!
(
get_type
()
&
TYPE_MONSTER
))
return
FALSE
;
if
(
!
(
current
.
location
&
LOCATION_MZONE
)
||
is_position
(
POS_FACEDOWN
)
||
(
data
.
type
&
TYPE_LINK
))
return
FALSE
;
if
(
is_affected_by_effect
(
EFFECT_SET_DEFENSE_FINAL
)
||
is_affected_by_effect
(
EFFECT_REVERSE_UPDATE
))
return
FALSE
;
if
(
val
&&
get_defense
()
<
val
)
return
FALSE
;
return
TRUE
;
}
int32
card
::
is_releasable_by_summon
(
uint8
playerid
,
card
*
pcard
)
{
if
(
is_status
(
STATUS_SUMMONING
))
return
FALSE
;
...
...
card.h
View file @
d28a280c
...
...
@@ -328,8 +328,6 @@ public:
int32
is_destructable_by_effect
(
effect
*
peffect
,
uint8
playerid
);
int32
is_removeable
(
uint8
playerid
);
int32
is_removeable_as_cost
(
uint8
playerid
);
int32
is_attack_decreasable_as_cost
(
uint8
playerid
,
int32
val
);
int32
is_defense_decreasable_as_cost
(
uint8
playerid
,
int32
val
);
int32
is_releasable_by_summon
(
uint8
playerid
,
card
*
pcard
);
int32
is_releasable_by_nonsummon
(
uint8
playerid
);
int32
is_releasable_by_effect
(
uint8
playerid
,
effect
*
peffect
);
...
...
interpreter.cpp
View file @
d28a280c
...
...
@@ -214,8 +214,6 @@ static const struct luaL_Reg cardlib[] = {
{
"IsAbleToDeckOrExtraAsCost"
,
scriptlib
::
card_is_able_to_deck_or_extra_as_cost
},
{
"IsAbleToGraveAsCost"
,
scriptlib
::
card_is_able_to_grave_as_cost
},
{
"IsAbleToRemoveAsCost"
,
scriptlib
::
card_is_able_to_remove_as_cost
},
{
"IsAbleToDecreaseAttackAsCost"
,
scriptlib
::
card_is_able_to_decrease_attack_as_cost
},
{
"IsAbleToDecreaseDefenseAsCost"
,
scriptlib
::
card_is_able_to_decrease_defense_as_cost
},
{
"IsReleasable"
,
scriptlib
::
card_is_releasable
},
{
"IsReleasableByEffect"
,
scriptlib
::
card_is_releasable_by_effect
},
{
"IsDiscardable"
,
scriptlib
::
card_is_discardable
},
...
...
libcard.cpp
View file @
d28a280c
...
...
@@ -2235,34 +2235,6 @@ int32 scriptlib::card_is_able_to_remove_as_cost(lua_State *L) {
lua_pushboolean
(
L
,
0
);
return
1
;
}
int32
scriptlib
::
card_is_able_to_decrease_attack_as_cost
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
uint32
p
=
pcard
->
pduel
->
game_field
->
core
.
reason_player
;
int32
val
=
0
;
if
(
lua_gettop
(
L
)
>
1
)
val
=
lua_tointeger
(
L
,
2
);
if
(
pcard
->
is_attack_decreasable_as_cost
(
p
,
val
))
lua_pushboolean
(
L
,
1
);
else
lua_pushboolean
(
L
,
0
);
return
1
;
}
int32
scriptlib
::
card_is_able_to_decrease_defense_as_cost
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
uint32
p
=
pcard
->
pduel
->
game_field
->
core
.
reason_player
;
int32
val
=
0
;
if
(
lua_gettop
(
L
)
>
1
)
val
=
lua_tointeger
(
L
,
2
);
if
(
pcard
->
is_defense_decreasable_as_cost
(
p
,
val
))
lua_pushboolean
(
L
,
1
);
else
lua_pushboolean
(
L
,
0
);
return
1
;
}
int32
scriptlib
::
card_is_releasable
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
...
...
scriptlib.h
View file @
d28a280c
...
...
@@ -226,8 +226,6 @@ public:
static
int32
card_is_able_to_extra_as_cost
(
lua_State
*
L
);
static
int32
card_is_able_to_deck_or_extra_as_cost
(
lua_State
*
L
);
static
int32
card_is_able_to_remove_as_cost
(
lua_State
*
L
);
static
int32
card_is_able_to_decrease_attack_as_cost
(
lua_State
*
L
);
static
int32
card_is_able_to_decrease_defense_as_cost
(
lua_State
*
L
);
static
int32
card_is_releasable
(
lua_State
*
L
);
static
int32
card_is_releasable_by_effect
(
lua_State
*
L
);
static
int32
card_is_discardable
(
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