Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
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
REIKAI
ygopro
Commits
3245c21b
Commit
3245c21b
authored
Dec 29, 2014
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
de2ff509
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
10 additions
and
35 deletions
+10
-35
ocgcore/field.h
ocgcore/field.h
+1
-0
ocgcore/interpreter.cpp
ocgcore/interpreter.cpp
+1
-1
ocgcore/libduel.cpp
ocgcore/libduel.cpp
+1
-1
ocgcore/processor.cpp
ocgcore/processor.cpp
+6
-2
script/c13959634.lua
script/c13959634.lua
+0
-3
script/c2356994.lua
script/c2356994.lua
+0
-3
script/c29223325.lua
script/c29223325.lua
+0
-7
script/c35842855.lua
script/c35842855.lua
+0
-3
script/c53027855.lua
script/c53027855.lua
+0
-3
script/c57069605.lua
script/c57069605.lua
+1
-9
script/c61468779.lua
script/c61468779.lua
+0
-3
No files found.
ocgcore/field.h
View file @
3245c21b
...
@@ -276,6 +276,7 @@ struct processor {
...
@@ -276,6 +276,7 @@ struct processor {
uint8
attack_state_count
[
2
];
uint8
attack_state_count
[
2
];
uint8
battle_phase_count
[
2
];
uint8
battle_phase_count
[
2
];
uint8
phase_action
;
uint8
phase_action
;
uint8
battle_phase_action
;
uint32
hint_timing
[
2
];
uint32
hint_timing
[
2
];
uint8
current_player
;
uint8
current_player
;
std
::
unordered_map
<
uint32
,
std
::
pair
<
uint32
,
uint32
>
>
summon_counter
;
std
::
unordered_map
<
uint32
,
std
::
pair
<
uint32
,
uint32
>
>
summon_counter
;
...
...
ocgcore/interpreter.cpp
View file @
3245c21b
...
@@ -208,7 +208,7 @@ static const struct luaL_Reg cardlib[] = {
...
@@ -208,7 +208,7 @@ static const struct luaL_Reg cardlib[] = {
{
"CheckUniqueOnField"
,
scriptlib
::
card_check_unique_onfield
},
{
"CheckUniqueOnField"
,
scriptlib
::
card_check_unique_onfield
},
{
"ResetNegateEffect"
,
scriptlib
::
card_reset_negate_effect
},
{
"ResetNegateEffect"
,
scriptlib
::
card_reset_negate_effect
},
{
"AssumeProperty"
,
scriptlib
::
card_assume_prop
},
{
"AssumeProperty"
,
scriptlib
::
card_assume_prop
},
{
"SetSPSummonOnce"
,
scriptlib
::
card_set_spsummon_once
},
{
"SetSPSummonOnce"
,
scriptlib
::
card_set_spsummon_once
},
{
NULL
,
NULL
}
{
NULL
,
NULL
}
};
};
...
...
ocgcore/libduel.cpp
View file @
3245c21b
...
@@ -3138,7 +3138,7 @@ int32 scriptlib::duel_get_custom_activity_count(lua_State *L) {
...
@@ -3138,7 +3138,7 @@ int32 scriptlib::duel_get_custom_activity_count(lua_State *L) {
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
int32
val
=
0
;
int32
val
=
0
;
switch
(
activity_type
)
{
switch
(
activity_type
)
{
case
1
:{
case
1
:
{
auto
iter
=
pduel
->
game_field
->
core
.
summon_counter
.
find
(
counter_id
);
auto
iter
=
pduel
->
game_field
->
core
.
summon_counter
.
find
(
counter_id
);
if
(
iter
!=
pduel
->
game_field
->
core
.
summon_counter
.
end
())
if
(
iter
!=
pduel
->
game_field
->
core
.
summon_counter
.
end
())
val
=
iter
->
second
.
second
;
val
=
iter
->
second
.
second
;
...
...
ocgcore/processor.cpp
View file @
3245c21b
...
@@ -2822,7 +2822,9 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -2822,7 +2822,9 @@ int32 field::process_battle_command(uint16 step) {
core
.
attack_target
=
0
;
core
.
attack_target
=
0
;
if
((
peffect
=
is_player_affected_by_effect
(
infos
.
turn_player
,
EFFECT_SKIP_BP
)))
{
if
((
peffect
=
is_player_affected_by_effect
(
infos
.
turn_player
,
EFFECT_SKIP_BP
)))
{
core
.
units
.
begin
()
->
step
=
39
;
core
.
units
.
begin
()
->
step
=
39
;
core
.
units
.
begin
()
->
arg1
=
2
;
if
(
core
.
battle_phase_action
)
core
.
units
.
begin
()
->
arg1
=
2
;
else
core
.
units
.
begin
()
->
arg1
=
3
;
if
(
is_player_affected_by_effect
(
infos
.
turn_player
,
EFFECT_BP_TWICE
))
if
(
is_player_affected_by_effect
(
infos
.
turn_player
,
EFFECT_BP_TWICE
))
core
.
units
.
begin
()
->
arg2
=
1
;
core
.
units
.
begin
()
->
arg2
=
1
;
else
core
.
units
.
begin
()
->
arg2
=
0
;
else
core
.
units
.
begin
()
->
arg2
=
0
;
...
@@ -2835,6 +2837,7 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -2835,6 +2837,7 @@ int32 field::process_battle_command(uint16 step) {
}
}
return
FALSE
;
return
FALSE
;
}
}
core
.
battle_phase_action
=
TRUE
;
pr
=
effects
.
activate_effect
.
equal_range
(
EVENT_FREE_CHAIN
);
pr
=
effects
.
activate_effect
.
equal_range
(
EVENT_FREE_CHAIN
);
for
(;
pr
.
first
!=
pr
.
second
;
++
pr
.
first
)
{
for
(;
pr
.
first
!=
pr
.
second
;
++
pr
.
first
)
{
peffect
=
pr
.
first
->
second
;
peffect
=
pr
.
first
->
second
;
...
@@ -4172,6 +4175,7 @@ int32 field::process_turn(uint16 step, uint8 turn_player) {
...
@@ -4172,6 +4175,7 @@ int32 field::process_turn(uint16 step, uint8 turn_player) {
}
}
infos
.
phase
=
PHASE_BATTLE
;
infos
.
phase
=
PHASE_BATTLE
;
core
.
phase_action
=
FALSE
;
core
.
phase_action
=
FALSE
;
core
.
battle_phase_action
=
FALSE
;
core
.
battle_phase_count
[
infos
.
turn_player
]
++
;
core
.
battle_phase_count
[
infos
.
turn_player
]
++
;
pduel
->
write_buffer8
(
MSG_NEW_PHASE
);
pduel
->
write_buffer8
(
MSG_NEW_PHASE
);
pduel
->
write_buffer8
(
infos
.
phase
);
pduel
->
write_buffer8
(
infos
.
phase
);
...
@@ -4740,7 +4744,7 @@ int32 field::solve_chain(uint16 step, uint32 skip_new) {
...
@@ -4740,7 +4744,7 @@ int32 field::solve_chain(uint16 step, uint32 skip_new) {
++
opit
;
++
opit
;
check_card_counter
(
*
opit
,
3
,
1
-
sumplayer
);
check_card_counter
(
*
opit
,
3
,
1
-
sumplayer
);
}
else
{
}
else
{
uint32
sumplayer
=
cait
.
triggering_player
;
uint32
sumplayer
=
cait
->
triggering_player
;
if
(
optarget
.
op_player
==
1
)
if
(
optarget
.
op_player
==
1
)
sumplayer
=
1
-
sumplayer
;
sumplayer
=
1
-
sumplayer
;
for
(
auto
opit
=
optarget
.
op_cards
->
container
.
begin
();
opit
!=
optarget
.
op_cards
->
container
.
end
();
++
opit
)
{
for
(
auto
opit
=
optarget
.
op_cards
->
container
.
begin
();
opit
!=
optarget
.
op_cards
->
container
.
end
();
++
opit
)
{
...
...
script/c13959634.lua
View file @
3245c21b
...
@@ -60,9 +60,6 @@ function c13959634.leaveop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -60,9 +60,6 @@ function c13959634.leaveop(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
+
RESET_SELF_TURN
,
1
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
+
RESET_SELF_TURN
,
1
)
end
end
Duel
.
RegisterEffect
(
e1
,
effp
)
Duel
.
RegisterEffect
(
e1
,
effp
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_SKIP_M2
)
Duel
.
RegisterEffect
(
e2
,
effp
)
end
end
function
c13959634
.
skipcon
(
e
)
function
c13959634
.
skipcon
(
e
)
return
Duel
.
GetTurnCount
()
~=
e
:
GetLabel
()
return
Duel
.
GetTurnCount
()
~=
e
:
GetLabel
()
...
...
script/c2356994.lua
View file @
3245c21b
...
@@ -42,9 +42,6 @@ function c2356994.skipop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -42,9 +42,6 @@ function c2356994.skipop(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
+
RESET_OPPO_TURN
,
1
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
+
RESET_OPPO_TURN
,
1
)
end
end
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterEffect
(
e1
,
tp
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_SKIP_M2
)
Duel
.
RegisterEffect
(
e2
,
tp
)
end
end
function
c2356994
.
bpcon
(
e
)
function
c2356994
.
bpcon
(
e
)
return
Duel
.
GetTurnCount
()
~=
e
:
GetLabel
()
return
Duel
.
GetTurnCount
()
~=
e
:
GetLabel
()
...
...
script/c29223325.lua
View file @
3245c21b
...
@@ -74,21 +74,14 @@ function c29223325.desop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -74,21 +74,14 @@ function c29223325.desop(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetCode
(
EFFECT_SKIP_BP
)
e1
:
SetCode
(
EFFECT_SKIP_BP
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetTargetRange
(
0
,
1
)
e1
:
SetTargetRange
(
0
,
1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_SKIP_M2
)
if
Duel
.
GetTurnPlayer
()
~=
tp
and
ph
>
PHASE_MAIN1
and
ph
<
PHASE_MAIN2
then
if
Duel
.
GetTurnPlayer
()
~=
tp
and
ph
>
PHASE_MAIN1
and
ph
<
PHASE_MAIN2
then
e1
:
SetLabel
(
Duel
.
GetTurnCount
())
e1
:
SetLabel
(
Duel
.
GetTurnCount
())
e1
:
SetCondition
(
c29223325
.
skipcon
)
e1
:
SetCondition
(
c29223325
.
skipcon
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_BATTLE
+
RESET_OPPO_TURN
,
2
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_BATTLE
+
RESET_OPPO_TURN
,
2
)
e2
:
SetLabel
(
Duel
.
GetTurnCount
())
e2
:
SetCondition
(
c29223325
.
skipcon
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_MAIN2
+
RESET_OPPO_TURN
,
2
)
else
else
e1
:
SetReset
(
RESET_PHASE
+
PHASE_BATTLE
+
RESET_OPPO_TURN
,
1
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_BATTLE
+
RESET_OPPO_TURN
,
1
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_MAIN2
+
RESET_OPPO_TURN
,
1
)
end
end
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterEffect
(
e2
,
tp
)
end
end
function
c29223325
.
skipcon
(
e
)
function
c29223325
.
skipcon
(
e
)
return
Duel
.
GetTurnCount
()
~=
e
:
GetLabel
()
return
Duel
.
GetTurnCount
()
~=
e
:
GetLabel
()
...
...
script/c35842855.lua
View file @
3245c21b
...
@@ -74,9 +74,6 @@ function c35842855.leaveop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -74,9 +74,6 @@ function c35842855.leaveop(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
+
RESET_SELF_TURN
,
1
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
+
RESET_SELF_TURN
,
1
)
end
end
Duel
.
RegisterEffect
(
e1
,
effp
)
Duel
.
RegisterEffect
(
e1
,
effp
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_SKIP_M2
)
Duel
.
RegisterEffect
(
e2
,
effp
)
end
end
function
c35842855
.
skipcon
(
e
)
function
c35842855
.
skipcon
(
e
)
return
Duel
.
GetTurnCount
()
~=
e
:
GetLabel
()
return
Duel
.
GetTurnCount
()
~=
e
:
GetLabel
()
...
...
script/c53027855.lua
View file @
3245c21b
...
@@ -64,9 +64,6 @@ function c53027855.leaveop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -64,9 +64,6 @@ function c53027855.leaveop(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
+
RESET_SELF_TURN
,
1
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
+
RESET_SELF_TURN
,
1
)
end
end
Duel
.
RegisterEffect
(
e1
,
effp
)
Duel
.
RegisterEffect
(
e1
,
effp
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_SKIP_M2
)
Duel
.
RegisterEffect
(
e2
,
effp
)
end
end
function
c53027855
.
skipcon
(
e
)
function
c53027855
.
skipcon
(
e
)
return
Duel
.
GetTurnCount
()
~=
e
:
GetLabel
()
return
Duel
.
GetTurnCount
()
~=
e
:
GetLabel
()
...
...
script/c57069605.lua
View file @
3245c21b
...
@@ -13,27 +13,19 @@ function c57069605.condition(e,tp,eg,ep,ev,re,r,rp)
...
@@ -13,27 +13,19 @@ function c57069605.condition(e,tp,eg,ep,ev,re,r,rp)
return
Duel
.
GetLP
(
tp
)
+
2000
<=
Duel
.
GetLP
(
1
-
tp
)
return
Duel
.
GetLP
(
tp
)
+
2000
<=
Duel
.
GetLP
(
1
-
tp
)
end
end
function
c57069605
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c57069605
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ph
=
Duel
.
GetCurrentPhase
()
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SKIP_BP
)
e1
:
SetCode
(
EFFECT_SKIP_BP
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetTargetRange
(
0
,
1
)
e1
:
SetTargetRange
(
0
,
1
)
local
e2
=
e1
:
Clone
()
if
Duel
.
GetTurnPlayer
()
~=
tp
and
Duel
.
GetCurrentPhase
()
==
PHASE_BATTLE
then
e2
:
SetCode
(
EFFECT_SKIP_M2
)
if
Duel
.
GetTurnPlayer
()
~=
tp
and
ph
>
PHASE_MAIN1
and
ph
<
PHASE_MAIN2
then
e1
:
SetLabel
(
Duel
.
GetTurnCount
())
e1
:
SetLabel
(
Duel
.
GetTurnCount
())
e1
:
SetCondition
(
c57069605
.
skipcon
)
e1
:
SetCondition
(
c57069605
.
skipcon
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_BATTLE
+
RESET_OPPO_TURN
,
2
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_BATTLE
+
RESET_OPPO_TURN
,
2
)
e2
:
SetLabel
(
Duel
.
GetTurnCount
())
e2
:
SetCondition
(
c57069605
.
skipcon
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_MAIN2
+
RESET_OPPO_TURN
,
2
)
else
else
e1
:
SetReset
(
RESET_PHASE
+
PHASE_BATTLE
+
RESET_OPPO_TURN
,
1
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_BATTLE
+
RESET_OPPO_TURN
,
1
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_MAIN2
+
RESET_OPPO_TURN
,
1
)
end
end
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterEffect
(
e2
,
tp
)
end
end
function
c57069605
.
skipcon
(
e
)
function
c57069605
.
skipcon
(
e
)
return
Duel
.
GetTurnCount
()
~=
e
:
GetLabel
()
return
Duel
.
GetTurnCount
()
~=
e
:
GetLabel
()
...
...
script/c61468779.lua
View file @
3245c21b
...
@@ -69,9 +69,6 @@ function c61468779.leaveop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -69,9 +69,6 @@ function c61468779.leaveop(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
+
RESET_SELF_TURN
,
1
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
+
RESET_SELF_TURN
,
1
)
end
end
Duel
.
RegisterEffect
(
e1
,
effp
)
Duel
.
RegisterEffect
(
e1
,
effp
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_SKIP_M2
)
Duel
.
RegisterEffect
(
e2
,
effp
)
end
end
function
c61468779
.
skipcon
(
e
)
function
c61468779
.
skipcon
(
e
)
return
Duel
.
GetTurnCount
()
~=
e
:
GetLabel
()
return
Duel
.
GetTurnCount
()
~=
e
:
GetLabel
()
...
...
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