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
3385a07e
Commit
3385a07e
authored
Apr 28, 2012
by
argon.sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
75fba7e9
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
86 additions
and
27 deletions
+86
-27
ocgcore/card.cpp
ocgcore/card.cpp
+2
-0
ocgcore/effect.h
ocgcore/effect.h
+1
-0
ocgcore/field.cpp
ocgcore/field.cpp
+2
-1
ocgcore/field.h
ocgcore/field.h
+1
-0
ocgcore/processor.cpp
ocgcore/processor.cpp
+41
-24
script/c94739788.lua
script/c94739788.lua
+14
-0
script/c9720537.lua
script/c9720537.lua
+22
-0
script/constant.lua
script/constant.lua
+2
-1
system.conf
system.conf
+1
-1
No files found.
ocgcore/card.cpp
View file @
3385a07e
...
...
@@ -975,6 +975,8 @@ int32 card::refresh_disable_status() {
}
uint8
card
::
refresh_control_status
()
{
uint8
final
=
owner
;
if
(
pduel
->
game_field
->
core
.
remove_brainwashing
)
return
final
;
effect_set
eset
;
filter_effect
(
EFFECT_SET_CONTROL
,
&
eset
);
if
(
eset
.
count
)
...
...
ocgcore/effect.h
View file @
3385a07e
...
...
@@ -336,6 +336,7 @@ public:
#define EFFECT_FORBIDDEN 292
#define EFFECT_NECRO_VALLEY_IM 293
#define EFFECT_REVERSE_DECK 294
#define EFFECT_REMOVE_BRAINWASHING 295
#define EVENT_STARTUP 1000
#define EVENT_FLIP 1001
...
...
ocgcore/field.cpp
View file @
3385a07e
...
...
@@ -71,6 +71,7 @@ field::field(duel* pduel) {
core
.
attacker
=
0
;
core
.
attack_target
=
0
;
core
.
deck_reversed
=
FALSE
;
core
.
remove_brainwashing
=
FALSE
;
core
.
effect_damage_step
=
FALSE
;
nil_event
.
event_code
=
0
;
nil_event
.
event_cards
=
0
;
...
...
@@ -300,7 +301,7 @@ void field::move_card(uint8 playerid, card* pcard, uint8 location, uint8 sequenc
add_card
(
playerid
,
pcard
,
location
,
sequence
);
}
void
field
::
set_control
(
card
*
pcard
,
uint8
playerid
,
uint8
reset_phase
,
uint8
reset_count
)
{
if
(
pcard
->
refresh_control_status
()
==
playerid
)
if
(
core
.
remove_brainwashing
||
pcard
->
refresh_control_status
()
==
playerid
)
return
;
effect
*
peffect
=
pduel
->
new_effect
();
if
(
core
.
reason_effect
)
...
...
ocgcore/field.h
View file @
3385a07e
...
...
@@ -240,6 +240,7 @@ struct processor {
uint8
shuffle_hand_check
[
2
];
uint8
shuffle_deck_check
[
2
];
uint8
deck_reversed
;
uint8
remove_brainwashing
;
uint8
flip_delayed
;
uint8
damage_calculated
;
uint8
summon_state
[
2
];
...
...
ocgcore/processor.cpp
View file @
3385a07e
...
...
@@ -1597,18 +1597,19 @@ int32 field::process_point_event(int16 step, int32 special, int32 skip_new) {
case
2
:
{
//forced trigger
for
(
auto
clit
=
core
.
new_fchain_s
.
begin
();
clit
!=
core
.
new_fchain_s
.
end
();
++
clit
)
{
if
(
!
(
clit
->
triggering_effect
->
flag
&
EFFECT_FLAG_EVENT_PLAYER
))
{
if
(
clit
->
triggering_effect
->
handler
->
current
.
reason
&
REASON_TEMPORARY
)
clit
->
triggering_player
=
clit
->
triggering_effect
->
handler
->
previous
.
controler
;
else
clit
->
triggering_player
=
clit
->
triggering_effect
->
handler
->
current
.
controler
;
effect
*
peffect
=
clit
->
triggering_effect
;
if
(
!
(
peffect
->
flag
&
EFFECT_FLAG_EVENT_PLAYER
)
&&
peffect
->
handler
->
is_has_relation
(
peffect
))
{
clit
->
triggering_player
=
peffect
->
handler
->
current
.
controler
;
clit
->
triggering_controler
=
peffect
->
handler
->
current
.
controler
;
clit
->
triggering_location
=
peffect
->
handler
->
current
.
location
;
clit
->
triggering_sequence
=
peffect
->
handler
->
current
.
sequence
;
}
if
(
clit
->
triggering_effect
->
is_chainable
(
clit
->
triggering_player
)
&&
clit
->
triggering_
effect
->
is_activateable
(
clit
->
triggering_player
,
clit
->
evt
,
TRUE
))
{
if
(
peffect
->
is_chainable
(
clit
->
triggering_player
)
&&
p
effect
->
is_activateable
(
clit
->
triggering_player
,
clit
->
evt
,
TRUE
))
{
if
(
clit
->
triggering_player
==
infos
.
turn_player
)
core
.
tpchain
.
push_back
(
*
clit
);
else
core
.
ntpchain
.
push_back
(
*
clit
);
clit
->
triggering_
effect
->
handler
->
set_status
(
STATUS_CHAINING
,
TRUE
);
p
effect
->
handler
->
set_status
(
STATUS_CHAINING
,
TRUE
);
}
}
if
(
core
.
tpchain
.
size
()
>
1
)
...
...
@@ -1632,11 +1633,12 @@ int32 field::process_point_event(int16 step, int32 special, int32 skip_new) {
return
FALSE
;
}
for
(
auto
clit
=
core
.
new_ochain_s
.
begin
();
clit
!=
core
.
new_ochain_s
.
end
();
++
clit
)
{
if
(
!
(
clit
->
triggering_effect
->
flag
&
EFFECT_FLAG_EVENT_PLAYER
))
{
if
(
clit
->
triggering_effect
->
handler
->
current
.
reason
&
REASON_TEMPORARY
)
clit
->
triggering_player
=
clit
->
triggering_effect
->
handler
->
previous
.
controler
;
else
clit
->
triggering_player
=
clit
->
triggering_effect
->
handler
->
current
.
controler
;
effect
*
peffect
=
clit
->
triggering_effect
;
if
(
!
(
peffect
->
flag
&
EFFECT_FLAG_EVENT_PLAYER
)
&&
peffect
->
handler
->
is_has_relation
(
peffect
))
{
clit
->
triggering_player
=
peffect
->
handler
->
current
.
controler
;
clit
->
triggering_controler
=
peffect
->
handler
->
current
.
controler
;
clit
->
triggering_location
=
peffect
->
handler
->
current
.
location
;
clit
->
triggering_sequence
=
peffect
->
handler
->
current
.
sequence
;
}
if
(
clit
->
triggering_player
==
infos
.
turn_player
)
core
.
tpchain
.
push_back
(
*
clit
);
...
...
@@ -4332,7 +4334,6 @@ int32 field::adjust_step(uint16 step) {
//win, isable, control, self_des, equip, position, trap_monster
switch
(
step
)
{
case
0
:
{
core
.
units
.
begin
()
->
arg1
=
FALSE
;
core
.
re_adjust
=
FALSE
;
return
FALSE
;
}
...
...
@@ -4412,7 +4413,7 @@ int32 field::adjust_step(uint16 step) {
pcard
->
reset
(
RESET_TURN_SET
,
RESET_EVENT
);
refresh_location_info_instant
();
move_to_field
(
pcard
,
tp
,
tp
,
LOCATION_SZONE
,
pcard
->
current
.
position
);
core
.
units
.
begin
()
->
arg1
=
TRUE
;
core
.
re_adjust
=
TRUE
;
}
}
tp
=
1
-
tp
;
...
...
@@ -4439,7 +4440,7 @@ int32 field::adjust_step(uint16 step) {
tp
=
1
-
tp
;
}
if
(
core
.
control_adjust_set
[
0
].
size
()
||
core
.
control_adjust_set
[
1
].
size
())
{
core
.
units
.
begin
()
->
arg1
=
TRUE
;
core
.
re_adjust
=
TRUE
;
add_process
(
PROCESSOR_CONTROL_ADJUST
,
0
,
0
,
0
,
0
,
0
);
}
core
.
units
.
begin
()
->
step
=
7
;
...
...
@@ -4491,7 +4492,7 @@ int32 field::adjust_step(uint16 step) {
}
case
9
:
{
if
(
returns
.
ivalue
[
0
]
>
0
)
core
.
units
.
begin
()
->
arg1
=
TRUE
;
core
.
re_adjust
=
TRUE
;
//equip check
uint8
tp
=
infos
.
turn_player
;
card
*
pcard
;
...
...
@@ -4505,7 +4506,7 @@ int32 field::adjust_step(uint16 step) {
tp
=
1
-
tp
;
}
if
(
core
.
destroy_set
.
size
())
{
core
.
units
.
begin
()
->
arg1
=
TRUE
;
core
.
re_adjust
=
TRUE
;
destroy
(
&
core
.
destroy_set
,
0
,
REASON_RULE
,
PLAYER_NONE
);
}
return
FALSE
;
...
...
@@ -4540,7 +4541,7 @@ int32 field::adjust_step(uint16 step) {
tp
=
1
-
tp
;
}
if
(
pos_adjust
.
size
())
{
core
.
units
.
begin
()
->
arg1
=
TRUE
;
core
.
re_adjust
=
TRUE
;
group
*
ng
=
pduel
->
new_group
();
ng
->
container
=
pos_adjust
;
ng
->
is_readonly
=
TRUE
;
...
...
@@ -4571,15 +4572,15 @@ int32 field::adjust_step(uint16 step) {
return
FALSE
;
}
case
12
:
{
//reverse_deck
//reverse_deck
&& remove brainwashing
effect_set
eset
;
filter_field_effect
(
EFFECT_REVERSE_DECK
,
&
eset
,
FALSE
);
uint8
r
v
=
eset
.
count
?
TRUE
:
FALSE
;
if
(
core
.
deck_reversed
^
r
v
)
{
uint8
r
es
=
eset
.
count
?
TRUE
:
FALSE
;
if
(
core
.
deck_reversed
^
r
es
)
{
reverse_deck
(
0
);
reverse_deck
(
1
);
pduel
->
write_buffer8
(
MSG_REVERSE_DECK
);
if
(
r
v
)
{
if
(
r
es
)
{
if
(
player
[
0
].
list_main
.
size
())
{
pduel
->
write_buffer8
(
MSG_DECK_TOP
);
pduel
->
write_buffer8
(
0
);
...
...
@@ -4594,7 +4595,23 @@ int32 field::adjust_step(uint16 step) {
}
}
}
core
.
deck_reversed
=
rv
;
core
.
deck_reversed
=
res
;
filter_field_effect
(
EFFECT_REMOVE_BRAINWASHING
,
&
eset
,
FALSE
);
res
=
eset
.
count
?
TRUE
:
FALSE
;
if
(
res
&&
!
core
.
remove_brainwashing
)
{
for
(
int
i
=
0
;
i
<
5
;
++
i
)
{
card
*
pcard
=
player
[
0
].
list_mzone
[
i
];
if
(
pcard
)
pcard
->
reset
(
EFFECT_SET_CONTROL
,
RESET_CODE
);
}
for
(
int
i
=
0
;
i
<
5
;
++
i
)
{
card
*
pcard
=
player
[
1
].
list_mzone
[
i
];
if
(
pcard
)
pcard
->
reset
(
EFFECT_SET_CONTROL
,
RESET_CODE
);
}
core
.
re_adjust
=
TRUE
;
}
core
.
remove_brainwashing
=
res
;
return
FALSE
;
}
case
13
:
{
...
...
@@ -4603,7 +4620,7 @@ int32 field::adjust_step(uint16 step) {
return
FALSE
;
}
case
14
:
{
if
(
core
.
re_adjust
||
core
.
units
.
begin
()
->
arg1
)
{
if
(
core
.
re_adjust
)
{
core
.
units
.
begin
()
->
step
=
-
1
;
return
FALSE
;
}
...
...
script/c94739788.lua
0 → 100644
View file @
3385a07e
--洗脳解除
function
c94739788
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_REMOVE_BRAINWASHING
)
e2
:
SetRange
(
LOCATION_SZONE
)
c
:
RegisterEffect
(
e2
)
end
script/c9720537.lua
0 → 100644
View file @
3385a07e
--所有者の刻印
function
c9720537
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_CONTROL
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c9720537
.
target
)
e1
:
SetOperation
(
c9720537
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
c9720537
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
)
>
0
end
end
function
c9720537
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
)
local
tc
=
g
:
GetFirst
()
while
tc
do
tc
:
ResetEffect
(
EFFECT_SET_CONTROL
,
RESET_CODE
)
tc
=
g
:
GetNext
()
end
end
script/constant.lua
View file @
3385a07e
...
...
@@ -414,6 +414,7 @@ EFFECT_NECRO_VALLEY =291
EFFECT_FORBIDDEN
=
292
EFFECT_NECRO_VALLEY_IM
=
293
EFFECT_REVERSE_DECK
=
294
EFFECT_REMOVE_BRAINWASHING
=
295
EVENT_STARTUP
=
1000
EVENT_FLIP
=
1001
...
...
@@ -432,7 +433,7 @@ EVENT_CHAIN_SOLVING =1020
EVENT_CHAIN_ACTIVATING
=
1021
EVENT_CHAIN_SOLVED
=
1022
EVENT_CHAIN_ACTIVATED
=
1023
EVENT_CHAIN_NEGATED
=
1024
EVENT_CHAIN_NEGATED
=
1024
EVENT_CHAIN_DISABLED
=
1025
EVENT_CHAIN_END
=
1026
EVENT_CHAINING
=
1027
...
...
system.conf
View file @
3385a07e
...
...
@@ -9,5 +9,5 @@ lastdeck = test
textfont
=
c
:/
windows
/
fonts
/
simsun
.
ttc
14
numfont
=
c
:/
windows
/
fonts
/
arialbd
.
ttf
serverport
=
7911
lastip
=
192
.
168
.
3
.
235
lastip
=
192
.
168
.
2
.
100
lastport
=
7911
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