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
b6d8b0e9
Commit
b6d8b0e9
authored
Mar 07, 2023
by
Chen Bill
Committed by
GitHub
Mar 07, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix card::is_can_be_disabled_by_effect() (#490)
parent
095aee5e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
4 deletions
+9
-4
card.cpp
card.cpp
+4
-2
card.h
card.h
+1
-1
libcard.cpp
libcard.cpp
+4
-1
No files found.
card.cpp
View file @
b6d8b0e9
...
@@ -3434,8 +3434,10 @@ int32 card::is_affect_by_effect(effect* reason_effect) {
...
@@ -3434,8 +3434,10 @@ int32 card::is_affect_by_effect(effect* reason_effect) {
return FALSE;
return FALSE;
return TRUE;
return TRUE;
}
}
int32
card
::
is_can_be_disabled_by_effect
(
effect
*
reason_effect
)
{
int32 card::is_can_be_disabled_by_effect(effect* reason_effect, bool is_monster_effect) {
if
(
is_status
(
STATUS_DISABLED
))
if (is_monster_effect && is_status(STATUS_DISABLED))
return FALSE;
if(!is_monster_effect && !(get_type() & TYPE_TRAPMONSTER) && is_status(STATUS_DISABLED))
return FALSE;
return FALSE;
if (is_affected_by_effect(EFFECT_CANNOT_DISABLE))
if (is_affected_by_effect(EFFECT_CANNOT_DISABLE))
return FALSE;
return FALSE;
...
...
card.h
View file @
b6d8b0e9
...
@@ -353,7 +353,7 @@ public:
...
@@ -353,7 +353,7 @@ public:
int32
is_setable_mzone
(
uint8
playerid
,
uint8
ignore_count
,
effect
*
peffect
,
uint8
min_tribute
,
uint32
zone
=
0x1f
);
int32
is_setable_mzone
(
uint8
playerid
,
uint8
ignore_count
,
effect
*
peffect
,
uint8
min_tribute
,
uint32
zone
=
0x1f
);
int32
is_setable_szone
(
uint8
playerid
,
uint8
ignore_fd
=
0
);
int32
is_setable_szone
(
uint8
playerid
,
uint8
ignore_fd
=
0
);
int32
is_affect_by_effect
(
effect
*
reason_effect
);
int32
is_affect_by_effect
(
effect
*
reason_effect
);
int32
is_can_be_disabled_by_effect
(
effect
*
reason_effect
);
int32
is_can_be_disabled_by_effect
(
effect
*
reason_effect
,
bool
is_monster_effect
);
int32
is_destructable
();
int32
is_destructable
();
int32
is_destructable_by_battle
(
card
*
pcard
);
int32
is_destructable_by_battle
(
card
*
pcard
);
effect
*
check_indestructable_by_effect
(
effect
*
reason_effect
,
uint8
playerid
);
effect
*
check_indestructable_by_effect
(
effect
*
reason_effect
,
uint8
playerid
);
...
...
libcard.cpp
View file @
b6d8b0e9
...
@@ -3004,7 +3004,10 @@ int32 scriptlib::card_is_can_be_disabled_by_effect(lua_State* L) {
...
@@ -3004,7 +3004,10 @@ int32 scriptlib::card_is_can_be_disabled_by_effect(lua_State* L) {
check_param
(
L
,
PARAM_TYPE_EFFECT
,
2
);
check_param
(
L
,
PARAM_TYPE_EFFECT
,
2
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
effect
*
peffect
=
*
(
effect
**
)
lua_touserdata
(
L
,
2
);
effect
*
peffect
=
*
(
effect
**
)
lua_touserdata
(
L
,
2
);
lua_pushboolean
(
L
,
pcard
->
is_can_be_disabled_by_effect
(
peffect
));
bool
is_monster_effect
=
true
;
if
(
lua_gettop
(
L
)
>
2
)
is_monster_effect
=
lua_toboolean
(
L
,
3
);
lua_pushboolean
(
L
,
pcard
->
is_can_be_disabled_by_effect
(
peffect
,
is_monster_effect
));
return
1
;
return
1
;
}
}
int32
scriptlib
::
card_is_can_be_effect_target
(
lua_State
*
L
)
{
int32
scriptlib
::
card_is_can_be_effect_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