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
58020204
Commit
58020204
authored
Aug 04, 2018
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sync ocgcore
parent
38740665
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
13 additions
and
58 deletions
+13
-58
Classes/ocgcore/card.cpp
Classes/ocgcore/card.cpp
+0
-22
Classes/ocgcore/card.h
Classes/ocgcore/card.h
+0
-2
Classes/ocgcore/effect.h
Classes/ocgcore/effect.h
+1
-0
Classes/ocgcore/interpreter.cpp
Classes/ocgcore/interpreter.cpp
+0
-2
Classes/ocgcore/libcard.cpp
Classes/ocgcore/libcard.cpp
+0
-28
Classes/ocgcore/libduel.cpp
Classes/ocgcore/libduel.cpp
+2
-0
Classes/ocgcore/processor.cpp
Classes/ocgcore/processor.cpp
+10
-2
Classes/ocgcore/scriptlib.h
Classes/ocgcore/scriptlib.h
+0
-2
No files found.
Classes/ocgcore/card.cpp
View file @
58020204
...
@@ -3318,28 +3318,6 @@ int32 card::is_removeable_as_cost(uint8 playerid) {
...
@@ -3318,28 +3318,6 @@ int32 card::is_removeable_as_cost(uint8 playerid) {
return
FALSE
;
return
FALSE
;
return
TRUE
;
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
)
{
int32
card
::
is_releasable_by_summon
(
uint8
playerid
,
card
*
pcard
)
{
if
(
is_status
(
STATUS_SUMMONING
))
if
(
is_status
(
STATUS_SUMMONING
))
return
FALSE
;
return
FALSE
;
...
...
Classes/ocgcore/card.h
View file @
58020204
...
@@ -320,8 +320,6 @@ public:
...
@@ -320,8 +320,6 @@ public:
int32
is_destructable_by_effect
(
effect
*
peffect
,
uint8
playerid
);
int32
is_destructable_by_effect
(
effect
*
peffect
,
uint8
playerid
);
int32
is_removeable
(
uint8
playerid
);
int32
is_removeable
(
uint8
playerid
);
int32
is_removeable_as_cost
(
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_summon
(
uint8
playerid
,
card
*
pcard
);
int32
is_releasable_by_nonsummon
(
uint8
playerid
);
int32
is_releasable_by_nonsummon
(
uint8
playerid
);
int32
is_releasable_by_effect
(
uint8
playerid
,
effect
*
peffect
);
int32
is_releasable_by_effect
(
uint8
playerid
,
effect
*
peffect
);
...
...
Classes/ocgcore/effect.h
View file @
58020204
...
@@ -345,6 +345,7 @@ inline effect_flag operator|(effect_flag flag1, effect_flag flag2)
...
@@ -345,6 +345,7 @@ inline effect_flag operator|(effect_flag flag1, effect_flag flag2)
#define EFFECT_CANNOT_M2 186
#define EFFECT_CANNOT_M2 186
#define EFFECT_CANNOT_EP 187
#define EFFECT_CANNOT_EP 187
#define EFFECT_SKIP_TURN 188
#define EFFECT_SKIP_TURN 188
#define EFFECT_SKIP_EP 189
#define EFFECT_DEFENSE_ATTACK 190
#define EFFECT_DEFENSE_ATTACK 190
#define EFFECT_MUST_ATTACK 191
#define EFFECT_MUST_ATTACK 191
#define EFFECT_FIRST_ATTACK 192
#define EFFECT_FIRST_ATTACK 192
...
...
Classes/ocgcore/interpreter.cpp
View file @
58020204
...
@@ -205,8 +205,6 @@ static const struct luaL_Reg cardlib[] = {
...
@@ -205,8 +205,6 @@ static const struct luaL_Reg cardlib[] = {
{
"IsAbleToDeckOrExtraAsCost"
,
scriptlib
::
card_is_able_to_deck_or_extra_as_cost
},
{
"IsAbleToDeckOrExtraAsCost"
,
scriptlib
::
card_is_able_to_deck_or_extra_as_cost
},
{
"IsAbleToGraveAsCost"
,
scriptlib
::
card_is_able_to_grave_as_cost
},
{
"IsAbleToGraveAsCost"
,
scriptlib
::
card_is_able_to_grave_as_cost
},
{
"IsAbleToRemoveAsCost"
,
scriptlib
::
card_is_able_to_remove_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
},
{
"IsReleasable"
,
scriptlib
::
card_is_releasable
},
{
"IsReleasableByEffect"
,
scriptlib
::
card_is_releasable_by_effect
},
{
"IsReleasableByEffect"
,
scriptlib
::
card_is_releasable_by_effect
},
{
"IsDiscardable"
,
scriptlib
::
card_is_discardable
},
{
"IsDiscardable"
,
scriptlib
::
card_is_discardable
},
...
...
Classes/ocgcore/libcard.cpp
View file @
58020204
...
@@ -2112,34 +2112,6 @@ int32 scriptlib::card_is_able_to_remove_as_cost(lua_State *L) {
...
@@ -2112,34 +2112,6 @@ int32 scriptlib::card_is_able_to_remove_as_cost(lua_State *L) {
lua_pushboolean
(
L
,
0
);
lua_pushboolean
(
L
,
0
);
return
1
;
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
)
{
int32
scriptlib
::
card_is_releasable
(
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
);
...
...
Classes/ocgcore/libduel.cpp
View file @
58020204
...
@@ -1986,6 +1986,8 @@ int32 scriptlib::duel_skip_phase(lua_State *L) {
...
@@ -1986,6 +1986,8 @@ int32 scriptlib::duel_skip_phase(lua_State *L) {
code
=
EFFECT_SKIP_BP
;
code
=
EFFECT_SKIP_BP
;
else
if
(
phase
==
PHASE_MAIN2
)
else
if
(
phase
==
PHASE_MAIN2
)
code
=
EFFECT_SKIP_M2
;
code
=
EFFECT_SKIP_M2
;
else
if
(
phase
==
PHASE_END
)
code
=
EFFECT_SKIP_EP
;
else
else
return
0
;
return
0
;
effect
*
peffect
=
pduel
->
new_effect
();
effect
*
peffect
=
pduel
->
new_effect
();
...
...
Classes/ocgcore/processor.cpp
View file @
58020204
...
@@ -1366,7 +1366,9 @@ int32 field::process_phase_event(int16 step, int32 phase) {
...
@@ -1366,7 +1366,9 @@ int32 field::process_phase_event(int16 step, int32 phase) {
case
0
:
{
case
0
:
{
if
((
phase
==
PHASE_DRAW
&&
is_player_affected_by_effect
(
infos
.
turn_player
,
EFFECT_SKIP_DP
))
if
((
phase
==
PHASE_DRAW
&&
is_player_affected_by_effect
(
infos
.
turn_player
,
EFFECT_SKIP_DP
))
||
(
phase
==
PHASE_STANDBY
&&
is_player_affected_by_effect
(
infos
.
turn_player
,
EFFECT_SKIP_SP
))
||
(
phase
==
PHASE_STANDBY
&&
is_player_affected_by_effect
(
infos
.
turn_player
,
EFFECT_SKIP_SP
))
||
(
phase
==
PHASE_BATTLE_START
&&
is_player_affected_by_effect
(
infos
.
turn_player
,
EFFECT_SKIP_BP
)))
{
||
(
phase
==
PHASE_BATTLE_START
&&
is_player_affected_by_effect
(
infos
.
turn_player
,
EFFECT_SKIP_BP
))
||
(
phase
==
PHASE_BATTLE
&&
is_player_affected_by_effect
(
infos
.
turn_player
,
EFFECT_SKIP_BP
))
||
(
phase
==
PHASE_END
&&
is_player_affected_by_effect
(
infos
.
turn_player
,
EFFECT_SKIP_EP
)))
{
core
.
units
.
begin
()
->
step
=
24
;
core
.
units
.
begin
()
->
step
=
24
;
return
FALSE
;
return
FALSE
;
}
}
...
@@ -4198,6 +4200,12 @@ int32 field::process_turn(uint16 step, uint8 turn_player) {
...
@@ -4198,6 +4200,12 @@ int32 field::process_turn(uint16 step, uint8 turn_player) {
//End Phase
//End Phase
infos
.
phase
=
PHASE_END
;
infos
.
phase
=
PHASE_END
;
core
.
phase_action
=
FALSE
;
core
.
phase_action
=
FALSE
;
if
(
is_player_affected_by_effect
(
infos
.
turn_player
,
EFFECT_SKIP_EP
))
{
core
.
units
.
begin
()
->
step
=
17
;
reset_phase
(
PHASE_END
);
adjust_all
();
return
FALSE
;
}
pduel
->
write_buffer8
(
MSG_NEW_PHASE
);
pduel
->
write_buffer8
(
MSG_NEW_PHASE
);
pduel
->
write_buffer16
(
infos
.
phase
);
pduel
->
write_buffer16
(
infos
.
phase
);
raise_event
((
card
*
)
0
,
EVENT_PHASE_START
+
PHASE_END
,
0
,
0
,
0
,
turn_player
,
0
);
raise_event
((
card
*
)
0
,
EVENT_PHASE_START
+
PHASE_END
,
0
,
0
,
0
,
turn_player
,
0
);
...
...
Classes/ocgcore/scriptlib.h
View file @
58020204
...
@@ -207,8 +207,6 @@ public:
...
@@ -207,8 +207,6 @@ public:
static
int32
card_is_able_to_extra_as_cost
(
lua_State
*
L
);
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_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_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
(
lua_State
*
L
);
static
int32
card_is_releasable_by_effect
(
lua_State
*
L
);
static
int32
card_is_releasable_by_effect
(
lua_State
*
L
);
static
int32
card_is_discardable
(
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