Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile
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
fallenstardust
YGOMobile
Commits
dc0a736a
Commit
dc0a736a
authored
Sep 06, 2022
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sync ocgcore
parent
26d9b67a
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
0 deletions
+21
-0
Classes/ocgcore/card.cpp
Classes/ocgcore/card.cpp
+9
-0
Classes/ocgcore/card.h
Classes/ocgcore/card.h
+1
-0
Classes/ocgcore/libcard.cpp
Classes/ocgcore/libcard.cpp
+10
-0
Classes/ocgcore/scriptlib.h
Classes/ocgcore/scriptlib.h
+1
-0
No files found.
Classes/ocgcore/card.cpp
View file @
dc0a736a
...
@@ -3398,6 +3398,15 @@ int32 card::is_affect_by_effect(effect* reason_effect) {
...
@@ -3398,6 +3398,15 @@ 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
)
{
if
(
is_status
(
STATUS_DISABLED
))
return
FALSE
;
if
(
is_affected_by_effect
(
EFFECT_CANNOT_DISABLE
))
return
FALSE
;
if
(
!
is_affect_by_effect
(
reason_effect
))
return
FALSE
;
return
TRUE
;
}
int32
card
::
is_destructable
()
{
int32
card
::
is_destructable
()
{
if
(
overlay_target
)
if
(
overlay_target
)
return
FALSE
;
return
FALSE
;
...
...
Classes/ocgcore/card.h
View file @
dc0a736a
...
@@ -351,6 +351,7 @@ public:
...
@@ -351,6 +351,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_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
);
...
...
Classes/ocgcore/libcard.cpp
View file @
dc0a736a
...
@@ -2971,6 +2971,15 @@ int32 scriptlib::card_is_immune_to_effect(lua_State *L) {
...
@@ -2971,6 +2971,15 @@ int32 scriptlib::card_is_immune_to_effect(lua_State *L) {
lua_pushboolean
(
L
,
!
pcard
->
is_affect_by_effect
(
peffect
));
lua_pushboolean
(
L
,
!
pcard
->
is_affect_by_effect
(
peffect
));
return
1
;
return
1
;
}
}
int32
scriptlib
::
card_is_can_be_disabled_by_effect
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
check_param
(
L
,
PARAM_TYPE_EFFECT
,
2
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
effect
*
peffect
=
*
(
effect
**
)
lua_touserdata
(
L
,
2
);
lua_pushboolean
(
L
,
pcard
->
is_can_be_disabled_by_effect
(
peffect
));
return
1
;
}
int32
scriptlib
::
card_is_can_be_effect_target
(
lua_State
*
L
)
{
int32
scriptlib
::
card_is_can_be_effect_target
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
...
@@ -3474,6 +3483,7 @@ static const struct luaL_Reg cardlib[] = {
...
@@ -3474,6 +3483,7 @@ static const struct luaL_Reg cardlib[] = {
{
"CheckFusionMaterial"
,
scriptlib
::
card_check_fusion_material
},
{
"CheckFusionMaterial"
,
scriptlib
::
card_check_fusion_material
},
{
"CheckFusionSubstitute"
,
scriptlib
::
card_check_fusion_substitute
},
{
"CheckFusionSubstitute"
,
scriptlib
::
card_check_fusion_substitute
},
{
"IsImmuneToEffect"
,
scriptlib
::
card_is_immune_to_effect
},
{
"IsImmuneToEffect"
,
scriptlib
::
card_is_immune_to_effect
},
{
"IsCanBeDisabledByEffect"
,
scriptlib
::
card_is_can_be_disabled_by_effect
},
{
"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
},
...
...
Classes/ocgcore/scriptlib.h
View file @
dc0a736a
...
@@ -266,6 +266,7 @@ public:
...
@@ -266,6 +266,7 @@ public:
static
int32
card_check_fusion_material
(
lua_State
*
L
);
static
int32
card_check_fusion_material
(
lua_State
*
L
);
static
int32
card_check_fusion_substitute
(
lua_State
*
L
);
static
int32
card_check_fusion_substitute
(
lua_State
*
L
);
static
int32
card_is_immune_to_effect
(
lua_State
*
L
);
static
int32
card_is_immune_to_effect
(
lua_State
*
L
);
static
int32
card_is_can_be_disabled_by_effect
(
lua_State
*
L
);
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
);
...
...
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