Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-2pick
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
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
MyCard
ygopro-2pick
Commits
74cbf991
Commit
74cbf991
authored
Mar 13, 2012
by
argon.sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
973e13c2
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
185 additions
and
154 deletions
+185
-154
ocgcore/card.cpp
ocgcore/card.cpp
+1
-1
ocgcore/effect.h
ocgcore/effect.h
+1
-0
ocgcore/field.h
ocgcore/field.h
+1
-1
ocgcore/operations.cpp
ocgcore/operations.cpp
+24
-11
ocgcore/processor.cpp
ocgcore/processor.cpp
+141
-119
script/c11021521.lua
script/c11021521.lua
+1
-0
script/c14087893.lua
script/c14087893.lua
+1
-1
script/c48206762.lua
script/c48206762.lua
+1
-1
script/c58996430.lua
script/c58996430.lua
+9
-18
script/c74694807.lua
script/c74694807.lua
+1
-1
script/c98045062.lua
script/c98045062.lua
+1
-0
script/constant.lua
script/constant.lua
+2
-0
system.conf
system.conf
+1
-1
No files found.
ocgcore/card.cpp
View file @
74cbf991
...
@@ -1607,7 +1607,7 @@ int32 card::is_can_be_special_summoned(effect * reason_effect, uint32 sumtype, u
...
@@ -1607,7 +1607,7 @@ int32 card::is_can_be_special_summoned(effect * reason_effect, uint32 sumtype, u
int32
card
::
is_setable_mzone
(
uint8
playerid
,
uint8
ignore_count
,
effect
*
peffect
)
{
int32
card
::
is_setable_mzone
(
uint8
playerid
,
uint8
ignore_count
,
effect
*
peffect
)
{
if
(
!
(
data
.
type
&
TYPE_MONSTER
))
if
(
!
(
data
.
type
&
TYPE_MONSTER
))
return
FALSE
;
return
FALSE
;
if
(
is_status
(
STATUS_REVIVE_LIMIT
))
if
(
status
&
(
STATUS_REVIVE_LIMIT
|
STATUS_UNSUMMONABLE_CARD
))
return
FALSE
;
return
FALSE
;
if
(
current
.
location
!=
LOCATION_HAND
)
if
(
current
.
location
!=
LOCATION_HAND
)
return
FALSE
;
return
FALSE
;
...
...
ocgcore/effect.h
View file @
74cbf991
...
@@ -153,6 +153,7 @@ public:
...
@@ -153,6 +153,7 @@ public:
#define EFFECT_FLAG_OWNER_RELATE 0x1000000 //
#define EFFECT_FLAG_OWNER_RELATE 0x1000000 //
#define EFFECT_FLAG_AVAILABLE_BD 0x2000000 //
#define EFFECT_FLAG_AVAILABLE_BD 0x2000000 //
#define EFFECT_FLAG_CLIENT_HINT 0x4000000 //
#define EFFECT_FLAG_CLIENT_HINT 0x4000000 //
#define EFFECT_FLAG_CHAIN_UNIQUE 0x8000000 //
//========== Codes ==========
//========== Codes ==========
#define EFFECT_IMMUNE_EFFECT 1 //
#define EFFECT_IMMUNE_EFFECT 1 //
#define EFFECT_DISABLE 2 //
#define EFFECT_DISABLE 2 //
...
...
ocgcore/field.h
View file @
74cbf991
...
@@ -507,7 +507,7 @@ public:
...
@@ -507,7 +507,7 @@ public:
#define TIMING_TOHAND 0x200000
#define TIMING_TOHAND 0x200000
#define TIMING_TODECK 0x400000
#define TIMING_TODECK 0x400000
#define TIMING_TOGRAVE 0x800000
#define TIMING_TOGRAVE 0x800000
#define TIMING_BATTLE_PHASE 0x1000000
//
//
#define PROCESSOR_NONE 0
#define PROCESSOR_NONE 0
#define PROCESSOR_WAITING 0x10000
#define PROCESSOR_WAITING 0x10000
...
...
ocgcore/operations.cpp
View file @
74cbf991
...
@@ -1136,14 +1136,21 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
...
@@ -1136,14 +1136,21 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
core
.
phase_action
=
TRUE
;
core
.
phase_action
=
TRUE
;
target
->
current
.
reason
=
REASON_SUMMON
;
target
->
current
.
reason
=
REASON_SUMMON
;
target
->
summon_player
=
sumplayer
;
target
->
summon_player
=
sumplayer
;
if
(
core
.
current_chain
.
size
()
>
1
||
target
->
is_affected_by_effect
(
EFFECT_CANNOT_DISABLE_SUMMON
))
{
if
(
core
.
current_chain
.
size
()
==
0
)
{
core
.
units
.
begin
()
->
step
=
14
;
if
(
target
->
is_affected_by_effect
(
EFFECT_CANNOT_DISABLE_SUMMON
))
core
.
units
.
begin
()
->
step
=
14
;
return
FALSE
;
return
FALSE
;
}
else
if
(
core
.
current_chain
.
size
()
==
0
)
{
}
else
if
(
core
.
current_chain
.
size
()
>
1
)
{
core
.
units
.
begin
()
->
step
=
9
;
core
.
units
.
begin
()
->
step
=
14
;
return
FALSE
;
return
FALSE
;
}
else
{
if
(
target
->
is_affected_by_effect
(
EFFECT_CANNOT_DISABLE_SUMMON
))
core
.
units
.
begin
()
->
step
=
15
;
else
core
.
units
.
begin
()
->
step
=
10
;
core
.
reserved
=
core
.
units
.
front
();
return
TRUE
;
}
}
core
.
reserved
=
core
.
units
.
front
();
return
TRUE
;
return
TRUE
;
}
}
case
10
:
{
case
10
:
{
...
@@ -1628,15 +1635,21 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card * target) {
...
@@ -1628,15 +1635,21 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card * target) {
target
->
set_status
(
STATUS_SUMMONING
,
TRUE
);
target
->
set_status
(
STATUS_SUMMONING
,
TRUE
);
target
->
set_status
(
STATUS_SUMMON_DISABLED
,
FALSE
);
target
->
set_status
(
STATUS_SUMMON_DISABLED
,
FALSE
);
core
.
spsummoning_card
=
target
;
core
.
spsummoning_card
=
target
;
if
(
core
.
current_chain
.
size
()
>
1
||
target
->
is_affected_by_effect
(
EFFECT_CANNOT_DISABLE_SPSUMMON
))
{
if
(
core
.
current_chain
.
size
()
==
0
)
{
core
.
units
.
begin
()
->
step
=
14
;
if
(
target
->
is_affected_by_effect
(
EFFECT_CANNOT_DISABLE_SPSUMMON
))
core
.
units
.
begin
()
->
step
=
14
;
return
FALSE
;
return
FALSE
;
}
else
if
(
core
.
current_chain
.
size
()
==
0
)
{
}
else
if
(
core
.
current_chain
.
size
()
>
1
)
{
core
.
units
.
begin
()
->
step
=
9
;
core
.
units
.
begin
()
->
step
=
14
;
return
FALSE
;
return
FALSE
;
}
else
{
if
(
target
->
is_affected_by_effect
(
EFFECT_CANNOT_DISABLE_SPSUMMON
))
core
.
units
.
begin
()
->
step
=
15
;
else
core
.
units
.
begin
()
->
step
=
10
;
core
.
reserved
=
core
.
units
.
front
();
return
TRUE
;
}
}
core
.
reserved
=
core
.
units
.
front
();
return
TRUE
;
}
}
case
10
:
{
case
10
:
{
pduel
->
write_buffer8
(
MSG_SPSUMMONING
);
pduel
->
write_buffer8
(
MSG_SPSUMMONING
);
...
...
ocgcore/processor.cpp
View file @
74cbf991
...
@@ -1215,8 +1215,7 @@ int32 field::process_phase_event(int16 step, int32 phase) {
...
@@ -1215,8 +1215,7 @@ int32 field::process_phase_event(int16 step, int32 phase) {
return
FALSE
;
return
FALSE
;
}
}
int32
phase_event
=
EVENT_PHASE
+
phase
;
int32
phase_event
=
EVENT_PHASE
+
phase
;
pair
<
effect_container
::
iterator
,
effect_container
::
iterator
>
pr
;
auto
pr
=
effects
.
trigger_f_effect
.
equal_range
(
phase_event
);
pr
=
effects
.
trigger_f_effect
.
equal_range
(
phase_event
);
effect
*
peffect
;
effect
*
peffect
;
effect
*
solve_effect
=
0
;
effect
*
solve_effect
=
0
;
nil_event
.
event_code
=
phase_event
;
nil_event
.
event_code
=
phase_event
;
...
@@ -1276,8 +1275,7 @@ int32 field::process_phase_event(int16 step, int32 phase) {
...
@@ -1276,8 +1275,7 @@ int32 field::process_phase_event(int16 step, int32 phase) {
}
}
case
3
:
{
case
3
:
{
int32
phase_event
=
EVENT_PHASE
+
phase
;
int32
phase_event
=
EVENT_PHASE
+
phase
;
pair
<
effect_container
::
iterator
,
effect_container
::
iterator
>
pr
;
auto
pr
=
effects
.
trigger_o_effect
.
equal_range
(
phase_event
);
pr
=
effects
.
trigger_o_effect
.
equal_range
(
phase_event
);
effect
*
peffect
;
effect
*
peffect
;
nil_event
.
event_code
=
phase_event
;
nil_event
.
event_code
=
phase_event
;
nil_event
.
event_player
=
infos
.
turn_player
;
nil_event
.
event_player
=
infos
.
turn_player
;
...
@@ -1337,7 +1335,7 @@ int32 field::process_phase_event(int16 step, int32 phase) {
...
@@ -1337,7 +1335,7 @@ int32 field::process_phase_event(int16 step, int32 phase) {
}
}
core
.
select_chains
.
clear
();
core
.
select_chains
.
clear
();
if
(
core
.
tpchain
.
size
())
{
if
(
core
.
tpchain
.
size
())
{
for
(
chain_list
::
iterator
clit
=
core
.
tpchain
.
begin
();
clit
!=
core
.
tpchain
.
end
();
++
clit
)
for
(
auto
clit
=
core
.
tpchain
.
begin
();
clit
!=
core
.
tpchain
.
end
();
++
clit
)
core
.
select_chains
.
push_back
(
*
clit
);
core
.
select_chains
.
push_back
(
*
clit
);
pduel
->
write_buffer8
(
MSG_HINT
);
pduel
->
write_buffer8
(
MSG_HINT
);
pduel
->
write_buffer8
(
HINT_EVENT
);
pduel
->
write_buffer8
(
HINT_EVENT
);
...
@@ -1517,11 +1515,8 @@ int32 field::process_phase_event(int16 step, int32 phase) {
...
@@ -1517,11 +1515,8 @@ int32 field::process_phase_event(int16 step, int32 phase) {
return
TRUE
;
return
TRUE
;
}
}
int32
field
::
process_point_event
(
int16
step
,
int32
special
,
int32
skip_new
)
{
int32
field
::
process_point_event
(
int16
step
,
int32
special
,
int32
skip_new
)
{
chain_list
::
iterator
clit
;
switch
(
step
)
{
switch
(
step
)
{
case
0
:
{
case
0
:
{
if
(
core
.
instant_event
.
size
()
==
0
)
return
TRUE
;
core
.
select_chains
.
clear
();
core
.
select_chains
.
clear
();
core
.
point_event
.
splice
(
core
.
point_event
.
end
(),
core
.
instant_event
);
core
.
point_event
.
splice
(
core
.
point_event
.
end
(),
core
.
instant_event
);
if
(
special
)
{
if
(
special
)
{
...
@@ -1533,7 +1528,7 @@ int32 field::process_point_event(int16 step, int32 special, int32 skip_new) {
...
@@ -1533,7 +1528,7 @@ int32 field::process_point_event(int16 step, int32 special, int32 skip_new) {
//flip
//flip
core
.
tpchain
.
clear
();
core
.
tpchain
.
clear
();
core
.
ntpchain
.
clear
();
core
.
ntpchain
.
clear
();
for
(
clit
=
core
.
flip_chain
.
begin
();
clit
!=
core
.
flip_chain
.
end
();
++
clit
)
{
for
(
auto
clit
=
core
.
flip_chain
.
begin
();
clit
!=
core
.
flip_chain
.
end
();
++
clit
)
{
if
(
clit
->
triggering_effect
->
is_chainable
(
clit
->
triggering_player
)
if
(
clit
->
triggering_effect
->
is_chainable
(
clit
->
triggering_player
)
&&
clit
->
triggering_effect
->
is_activateable
(
clit
->
triggering_player
,
clit
->
evt
,
TRUE
))
{
&&
clit
->
triggering_effect
->
is_activateable
(
clit
->
triggering_player
,
clit
->
evt
,
TRUE
))
{
if
(
clit
->
triggering_player
==
infos
.
turn_player
)
if
(
clit
->
triggering_player
==
infos
.
turn_player
)
...
@@ -1559,7 +1554,7 @@ int32 field::process_point_event(int16 step, int32 special, int32 skip_new) {
...
@@ -1559,7 +1554,7 @@ int32 field::process_point_event(int16 step, int32 special, int32 skip_new) {
}
}
case
2
:
{
case
2
:
{
//forced trigger
//forced trigger
for
(
clit
=
core
.
new_fchain_s
.
begin
();
clit
!=
core
.
new_fchain_s
.
end
();
++
clit
)
{
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
->
flag
&
EFFECT_FLAG_EVENT_PLAYER
))
{
if
(
clit
->
triggering_effect
->
handler
->
current
.
reason
&
REASON_TEMPORARY
)
if
(
clit
->
triggering_effect
->
handler
->
current
.
reason
&
REASON_TEMPORARY
)
clit
->
triggering_player
=
clit
->
triggering_effect
->
handler
->
previous
.
controler
;
clit
->
triggering_player
=
clit
->
triggering_effect
->
handler
->
previous
.
controler
;
...
@@ -1590,104 +1585,111 @@ int32 field::process_point_event(int16 step, int32 special, int32 skip_new) {
...
@@ -1590,104 +1585,111 @@ int32 field::process_point_event(int16 step, int32 special, int32 skip_new) {
}
}
case
4
:
{
case
4
:
{
//optional trigger
//optional trigger
for
(
clit
=
core
.
new_ochain_s
.
begin
();
clit
!=
core
.
new_ochain_s
.
end
();
++
clit
)
{
if
(
core
.
new_ochain_s
.
size
()
==
0
)
{
core
.
units
.
begin
()
->
step
=
6
;
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
->
flag
&
EFFECT_FLAG_EVENT_PLAYER
))
{
if
(
clit
->
triggering_effect
->
handler
->
current
.
reason
&
REASON_TEMPORARY
)
if
(
clit
->
triggering_effect
->
handler
->
current
.
reason
&
REASON_TEMPORARY
)
clit
->
triggering_player
=
clit
->
triggering_effect
->
handler
->
previous
.
controler
;
clit
->
triggering_player
=
clit
->
triggering_effect
->
handler
->
previous
.
controler
;
else
else
clit
->
triggering_player
=
clit
->
triggering_effect
->
handler
->
current
.
controler
;
clit
->
triggering_player
=
clit
->
triggering_effect
->
handler
->
current
.
controler
;
}
}
if
(
clit
->
triggering_effect
->
is_chainable
(
clit
->
triggering_player
)
&&
clit
->
triggering_effect
->
is_activateable
(
clit
->
triggering_player
,
clit
->
evt
,
TRUE
))
{
if
(
clit
->
triggering_player
==
infos
.
turn_player
)
if
(
clit
->
triggering_player
==
infos
.
turn_player
)
core
.
tpchain
.
push_back
(
*
clit
);
core
.
tpchain
.
push_back
(
*
clit
);
else
else
core
.
ntpchain
.
push_back
(
*
clit
);
core
.
ntpchain
.
push_back
(
*
clit
);
clit
->
triggering_effect
->
handler
->
set_status
(
STATUS_CHAINING
,
TRUE
);
}
}
}
if
(
core
.
tpchain
.
size
()
>
1
)
add_process
(
PROCESSOR_SORT_CHAIN
,
0
,
0
,
0
,
1
,
infos
.
turn_player
);
if
(
core
.
ntpchain
.
size
()
>
1
)
add_process
(
PROCESSOR_SORT_CHAIN
,
0
,
0
,
0
,
0
,
infos
.
turn_player
);
core
.
new_ochain_s
.
clear
();
core
.
new_ochain_s
.
clear
();
core
.
new_ochain_s
.
splice
(
core
.
new_ochain_s
.
end
(),
core
.
tpchain
);
core
.
new_ochain_s
.
splice
(
core
.
new_ochain_s
.
end
(),
core
.
ntpchain
);
return
FALSE
;
return
FALSE
;
}
}
case
5
:
{
case
5
:
{
bool
act
;
if
(
core
.
new_ochain_s
.
size
()
==
0
)
{
if
(
core
.
tpchain
.
size
())
{
if
(
core
.
tpchain
.
size
()
>
1
)
act
=
true
;
add_process
(
PROCESSOR_SORT_CHAIN
,
0
,
0
,
0
,
1
,
infos
.
turn_player
);
chain_list
::
iterator
clit
;
if
(
core
.
ntpchain
.
size
()
>
1
)
chain_list
::
iterator
tpit
=
core
.
tpchain
.
begin
();
add_process
(
PROCESSOR_SORT_CHAIN
,
0
,
0
,
0
,
0
,
infos
.
turn_player
);
if
(
!
(
tpit
->
triggering_effect
->
flag
&
EFFECT_FLAG_MULTIACT_HAND
))
{
core
.
units
.
begin
()
->
step
=
6
;
for
(
clit
=
core
.
new_chains
.
begin
();
clit
!=
core
.
new_chains
.
end
();
++
clit
)
{
return
FALSE
;
if
(
tpit
->
triggering_location
==
LOCATION_HAND
)
{
}
if
((
clit
->
triggering_location
==
LOCATION_HAND
&&
clit
->
triggering_player
==
tpit
->
triggering_player
)
auto
clit
=
core
.
new_ochain_s
.
begin
();
||
clit
->
triggering_effect
->
handler
->
data
.
code
==
tpit
->
triggering_effect
->
handler
->
data
.
code
)
{
uint8
tp
=
clit
->
triggering_player
;
act
=
false
;
bool
act
=
true
;
break
;
if
(
clit
->
triggering_effect
->
is_chainable
(
tp
)
&&
clit
->
triggering_effect
->
is_activateable
(
tp
,
clit
->
evt
,
TRUE
))
{
}
if
(
tp
==
infos
.
turn_player
)
{
}
else
{
for
(
auto
tpit
=
core
.
tpchain
.
begin
();
tpit
!=
core
.
tpchain
.
end
();
++
tpit
)
{
if
(
clit
->
triggering_location
==
LOCATION_HAND
&&
clit
->
triggering_player
==
tpit
->
triggering_player
if
(
!
(
clit
->
triggering_effect
->
flag
&
EFFECT_FLAG_MULTIACT_HAND
))
{
&&
clit
->
triggering_effect
->
handler
->
data
.
code
==
tpit
->
triggering_effect
->
handler
->
data
.
code
)
{
if
(
tpit
->
triggering_location
==
LOCATION_HAND
)
{
act
=
false
;
if
(
tpit
->
triggering_location
==
LOCATION_HAND
||
tpit
->
triggering_effect
->
handler
->
data
.
code
==
clit
->
triggering_effect
->
handler
->
data
.
code
)
{
break
;
act
=
false
;
break
;
}
}
else
{
if
(
tpit
->
triggering_location
==
LOCATION_HAND
&&
tpit
->
triggering_effect
->
handler
->
data
.
code
==
clit
->
triggering_effect
->
handler
->
data
.
code
)
{
act
=
false
;
break
;
}
}
}
}
}
if
(
act
&&
(
clit
->
triggering_effect
->
flag
&
EFFECT_FLAG_CHAIN_UNIQUE
)
&&
tpit
->
triggering_effect
->
handler
->
data
.
code
==
clit
->
triggering_effect
->
handler
->
data
.
code
)
{
act
=
false
;
break
;
}
}
}
}
}
else
{
if
(
act
)
for
(
auto
ntpit
=
core
.
ntpchain
.
begin
();
ntpit
!=
core
.
ntpchain
.
end
();
++
ntpit
)
{
add_process
(
PROCESSOR_SELECT_EFFECTYN
,
0
,
0
,
(
group
*
)
tpit
->
triggering_effect
->
handler
,
tpit
->
triggering_player
,
0
);
if
(
!
(
clit
->
triggering_effect
->
flag
&
EFFECT_FLAG_MULTIACT_HAND
))
{
else
returns
.
ivalue
[
0
]
=
FALSE
;
if
(
ntpit
->
triggering_location
==
LOCATION_HAND
)
{
}
else
if
(
core
.
ntpchain
.
size
())
{
if
(
ntpit
->
triggering_location
==
LOCATION_HAND
||
ntpit
->
triggering_effect
->
handler
->
data
.
code
==
clit
->
triggering_effect
->
handler
->
data
.
code
)
{
act
=
true
;
act
=
false
;
chain_list
::
iterator
clit
;
break
;
chain_list
::
iterator
ntpit
=
core
.
ntpchain
.
begin
();
}
if
(
!
(
ntpit
->
triggering_effect
->
flag
&
EFFECT_FLAG_MULTIACT_HAND
))
{
}
else
{
for
(
clit
=
core
.
new_chains
.
begin
();
clit
!=
core
.
new_chains
.
end
();
++
clit
)
{
if
(
ntpit
->
triggering_location
==
LOCATION_HAND
&&
ntpit
->
triggering_effect
->
handler
->
data
.
code
==
clit
->
triggering_effect
->
handler
->
data
.
code
)
{
if
(
ntpit
->
triggering_location
==
LOCATION_HAND
)
{
act
=
false
;
if
((
clit
->
triggering_location
==
LOCATION_HAND
&&
clit
->
triggering_player
==
ntpit
->
triggering_player
)
break
;
||
clit
->
triggering_effect
->
handler
->
data
.
code
==
ntpit
->
triggering_effect
->
handler
->
data
.
code
)
{
}
act
=
false
;
break
;
}
}
else
{
if
(
clit
->
triggering_location
==
LOCATION_HAND
&&
clit
->
triggering_player
==
ntpit
->
triggering_player
&&
clit
->
triggering_effect
->
handler
->
data
.
code
==
ntpit
->
triggering_effect
->
handler
->
data
.
code
)
{
act
=
false
;
break
;
}
}
}
}
if
(
act
&&
(
clit
->
triggering_effect
->
flag
&
EFFECT_FLAG_CHAIN_UNIQUE
)
&&
ntpit
->
triggering_effect
->
handler
->
data
.
code
==
clit
->
triggering_effect
->
handler
->
data
.
code
)
{
act
=
false
;
break
;
}
}
}
}
}
if
(
act
)
}
else
act
=
false
;
add_process
(
PROCESSOR_SELECT_EFFECTYN
,
0
,
0
,
(
group
*
)
ntpit
->
triggering_effect
->
handler
,
ntpit
->
triggering_player
,
0
);
if
(
act
)
else
returns
.
ivalue
[
0
]
=
FALSE
;
add_process
(
PROCESSOR_SELECT_EFFECTYN
,
0
,
0
,
(
group
*
)
clit
->
triggering_effect
->
handler
,
tp
,
0
);
}
else
{
else
returns
.
ivalue
[
0
]
=
FALSE
;
core
.
units
.
begin
()
->
step
=
6
;
if
(
core
.
new_chains
.
size
())
add_process
(
PROCESSOR_ADD_CHAIN
,
0
,
0
,
0
,
0
,
0
);
}
return
FALSE
;
return
FALSE
;
}
}
case
6
:
{
case
6
:
{
auto
clit
=
core
.
new_ochain_s
.
begin
();
uint8
tp
=
clit
->
triggering_player
;
if
(
returns
.
ivalue
[
0
])
{
if
(
returns
.
ivalue
[
0
])
{
if
(
core
.
tpchain
.
size
())
{
clit
->
triggering_effect
->
handler
->
set_status
(
STATUS_CHAINING
,
TRUE
);
core
.
new_chains
.
push_back
(
core
.
tpchain
.
front
());
if
(
tp
==
infos
.
turn_player
)
core
.
tpchain
.
pop_front
();
core
.
tpchain
.
push_back
(
*
clit
);
}
else
{
core
.
new_chains
.
push_back
(
core
.
ntpchain
.
front
());
core
.
ntpchain
.
pop_front
();
}
}
else
{
if
(
core
.
tpchain
.
size
())
core
.
tpchain
.
pop_front
();
else
else
core
.
ntpchain
.
p
op_front
(
);
core
.
ntpchain
.
p
ush_back
(
*
clit
);
}
}
core
.
new_ochain_s
.
pop_front
();
core
.
units
.
begin
()
->
step
=
4
;
core
.
units
.
begin
()
->
step
=
4
;
return
FALSE
;
return
FALSE
;
}
}
case
7
:
{
case
7
:
{
core
.
new_chains
.
splice
(
core
.
new_chains
.
end
(),
core
.
tpchain
);
core
.
new_chains
.
splice
(
core
.
new_chains
.
end
(),
core
.
ntpchain
);
if
(
core
.
new_chains
.
size
())
add_process
(
PROCESSOR_ADD_CHAIN
,
0
,
0
,
0
,
0
,
0
);
return
FALSE
;
}
case
8
:
{
if
(
!
(
core
.
duel_options
&
DUEL_ENABLE_PRIORITY
)
||
(
infos
.
phase
!=
PHASE_MAIN1
&&
infos
.
phase
!=
PHASE_MAIN2
))
if
(
!
(
core
.
duel_options
&
DUEL_ENABLE_PRIORITY
)
||
(
infos
.
phase
!=
PHASE_MAIN1
&&
infos
.
phase
!=
PHASE_MAIN2
))
return
FALSE
;
return
FALSE
;
// Due to the new official rules, the priority of ignition effects when summon, special summon, flip summon is canceled
// Due to the new official rules, the priority of ignition effects when summon, special summon, flip summon is canceled
...
@@ -1724,7 +1726,7 @@ int32 field::process_point_event(int16 step, int32 special, int32 skip_new) {
...
@@ -1724,7 +1726,7 @@ int32 field::process_point_event(int16 step, int32 special, int32 skip_new) {
}
}
return
FALSE
;
return
FALSE
;
}
}
case
8
:
{
case
9
:
{
infos
.
priorities
[
0
]
=
0
;
infos
.
priorities
[
0
]
=
0
;
infos
.
priorities
[
1
]
=
0
;
infos
.
priorities
[
1
]
=
0
;
if
(
core
.
current_chain
.
size
()
==
0
)
if
(
core
.
current_chain
.
size
()
==
0
)
...
@@ -1733,7 +1735,7 @@ int32 field::process_point_event(int16 step, int32 special, int32 skip_new) {
...
@@ -1733,7 +1735,7 @@ int32 field::process_point_event(int16 step, int32 special, int32 skip_new) {
add_process
(
PROCESSOR_QUICK_EFFECT
,
0
,
0
,
0
,
special
,
1
-
core
.
current_chain
.
rbegin
()
->
triggering_player
);
add_process
(
PROCESSOR_QUICK_EFFECT
,
0
,
0
,
0
,
special
,
1
-
core
.
current_chain
.
rbegin
()
->
triggering_player
);
return
FALSE
;
return
FALSE
;
}
}
case
9
:
{
case
10
:
{
if
(
core
.
chain_limit
)
{
if
(
core
.
chain_limit
)
{
luaL_unref
(
pduel
->
lua
->
lua_state
,
LUA_REGISTRYINDEX
,
core
.
chain_limit
);
luaL_unref
(
pduel
->
lua
->
lua_state
,
LUA_REGISTRYINDEX
,
core
.
chain_limit
);
core
.
chain_limit
=
0
;
core
.
chain_limit
=
0
;
...
@@ -1743,7 +1745,6 @@ int32 field::process_point_event(int16 step, int32 special, int32 skip_new) {
...
@@ -1743,7 +1745,6 @@ int32 field::process_point_event(int16 step, int32 special, int32 skip_new) {
for
(
cait
=
core
.
current_chain
.
begin
();
cait
!=
core
.
current_chain
.
end
();
++
cait
)
for
(
cait
=
core
.
current_chain
.
begin
();
cait
!=
core
.
current_chain
.
end
();
++
cait
)
cait
->
triggering_effect
->
handler
->
set_status
(
STATUS_CHAINING
,
FALSE
);
cait
->
triggering_effect
->
handler
->
set_status
(
STATUS_CHAINING
,
FALSE
);
add_process
(
PROCESSOR_SOLVE_CHAIN
,
0
,
0
,
0
,
skip_new
,
0
);
add_process
(
PROCESSOR_SOLVE_CHAIN
,
0
,
0
,
0
,
skip_new
,
0
);
return
FALSE
;
}
else
{
}
else
{
core
.
used_event
.
splice
(
core
.
used_event
.
end
(),
core
.
point_event
);
core
.
used_event
.
splice
(
core
.
used_event
.
end
(),
core
.
point_event
);
if
(
core
.
chain_limit_p
)
{
if
(
core
.
chain_limit_p
)
{
...
@@ -1752,13 +1753,10 @@ int32 field::process_point_event(int16 step, int32 special, int32 skip_new) {
...
@@ -1752,13 +1753,10 @@ int32 field::process_point_event(int16 step, int32 special, int32 skip_new) {
}
}
reset_chain
();
reset_chain
();
returns
.
ivalue
[
0
]
=
FALSE
;
returns
.
ivalue
[
0
]
=
FALSE
;
return
TRUE
;
}
}
}
case
10
:
returns
.
ivalue
[
0
]
=
TRUE
;
return
TRUE
;
return
TRUE
;
}
}
}
return
TRUE
;
return
TRUE
;
}
}
int32
field
::
process_quick_effect
(
int16
step
,
int32
special
,
uint8
priority
)
{
int32
field
::
process_quick_effect
(
int16
step
,
int32
special
,
uint8
priority
)
{
...
@@ -2360,7 +2358,7 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -2360,7 +2358,7 @@ int32 field::process_battle_command(uint16 step) {
core
.
attacker
=
0
;
core
.
attacker
=
0
;
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
=
2
9
;
core
.
units
.
begin
()
->
step
=
3
9
;
core
.
units
.
begin
()
->
arg1
=
2
;
core
.
units
.
begin
()
->
arg1
=
2
;
if
(
!
peffect
->
value
)
if
(
!
peffect
->
value
)
add_process
(
PROCESSOR_PHASE_EVENT
,
0
,
0
,
0
,
PHASE_BATTLE
,
0
);
add_process
(
PROCESSOR_PHASE_EVENT
,
0
,
0
,
0
,
PHASE_BATTLE
,
0
);
...
@@ -2476,7 +2474,7 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -2476,7 +2474,7 @@ int32 field::process_battle_command(uint16 step) {
}
}
return
FALSE
;
return
FALSE
;
}
else
{
}
else
{
core
.
units
.
begin
()
->
step
=
2
9
;
core
.
units
.
begin
()
->
step
=
3
9
;
core
.
units
.
begin
()
->
arg1
=
ctype
;
core
.
units
.
begin
()
->
arg1
=
ctype
;
add_process
(
PROCESSOR_PHASE_EVENT
,
0
,
0
,
0
,
PHASE_BATTLE
,
0
);
add_process
(
PROCESSOR_PHASE_EVENT
,
0
,
0
,
0
,
PHASE_BATTLE
,
0
);
adjust_all
();
adjust_all
();
...
@@ -2603,10 +2601,29 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -2603,10 +2601,29 @@ int32 field::process_battle_command(uint16 step) {
process_single_event
();
process_single_event
();
process_instant_event
();
process_instant_event
();
core
.
hint_timing
[
infos
.
turn_player
]
=
TIMING_ATTACK
;
core
.
hint_timing
[
infos
.
turn_player
]
=
TIMING_ATTACK
;
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
0
,
0
);
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
0
,
TRUE
);
return
FALSE
;
return
FALSE
;
}
}
case
8
:
{
case
8
:
{
pduel
->
write_buffer8
(
MSG_HINT
);
pduel
->
write_buffer8
(
HINT_EVENT
);
pduel
->
write_buffer8
(
0
);
pduel
->
write_buffer32
(
24
);
pduel
->
write_buffer8
(
MSG_HINT
);
pduel
->
write_buffer8
(
HINT_EVENT
);
pduel
->
write_buffer8
(
1
);
pduel
->
write_buffer32
(
24
);
core
.
hint_timing
[
0
]
=
TIMING_BATTLE_PHASE
;
core
.
hint_timing
[
1
]
=
TIMING_BATTLE_PHASE
;
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
0
,
TRUE
);
return
FALSE
;
}
case
9
:
{
if
(
returns
.
ivalue
[
0
])
core
.
units
.
begin
()
->
step
=
7
;
return
FALSE
;
}
case
10
:
{
bool
rollback
=
false
;
bool
rollback
=
false
;
bool
atk_disabled
=
false
;
bool
atk_disabled
=
false
;
uint32
acon
=
core
.
units
.
begin
()
->
arg2
>>
16
;
uint32
acon
=
core
.
units
.
begin
()
->
arg2
>>
16
;
...
@@ -2630,7 +2647,7 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -2630,7 +2647,7 @@ int32 field::process_battle_command(uint16 step) {
core
.
attacker
->
attacked_count
++
;
core
.
attacker
->
attacked_count
++
;
core
.
attacker
->
announce_count
++
;
core
.
attacker
->
announce_count
++
;
}
}
core
.
units
.
begin
()
->
step
=
2
9
;
core
.
units
.
begin
()
->
step
=
3
9
;
core
.
units
.
begin
()
->
arg1
=
2
;
core
.
units
.
begin
()
->
arg1
=
2
;
if
(
!
peffect
->
value
)
if
(
!
peffect
->
value
)
add_process
(
PROCESSOR_PHASE_EVENT
,
0
,
0
,
0
,
PHASE_BATTLE
,
0
);
add_process
(
PROCESSOR_PHASE_EVENT
,
0
,
0
,
0
,
PHASE_BATTLE
,
0
);
...
@@ -2675,7 +2692,7 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -2675,7 +2692,7 @@ int32 field::process_battle_command(uint16 step) {
core
.
attacker
->
attacked_cards
[
0
]
=
0
;
core
.
attacker
->
attacked_cards
[
0
]
=
0
;
pduel
->
write_buffer32
(
0
);
pduel
->
write_buffer32
(
0
);
}
}
core
.
units
.
begin
()
->
step
=
9
;
core
.
units
.
begin
()
->
step
=
1
9
;
return
FALSE
;
return
FALSE
;
}
}
if
(
core
.
chain_attack
&&
core
.
chain_attack_target
)
{
if
(
core
.
chain_attack
&&
core
.
chain_attack_target
)
{
...
@@ -2691,7 +2708,7 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -2691,7 +2708,7 @@ int32 field::process_battle_command(uint16 step) {
reset_phase
(
PHASE_DAMAGE
);
reset_phase
(
PHASE_DAMAGE
);
return
FALSE
;
return
FALSE
;
}
}
core
.
units
.
begin
()
->
step
=
9
;
core
.
units
.
begin
()
->
step
=
1
9
;
return
FALSE
;
return
FALSE
;
}
}
core
.
select_cards
.
clear
();
core
.
select_cards
.
clear
();
...
@@ -2721,7 +2738,7 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -2721,7 +2738,7 @@ int32 field::process_battle_command(uint16 step) {
core
.
attacker
->
announced_cards
[
0
]
=
0
;
core
.
attacker
->
announced_cards
[
0
]
=
0
;
core
.
attacker
->
attacked_cards
[
0
]
=
0
;
core
.
attacker
->
attacked_cards
[
0
]
=
0
;
}
}
core
.
units
.
begin
()
->
step
=
9
;
core
.
units
.
begin
()
->
step
=
1
9
;
adjust_instant
();
adjust_instant
();
adjust_all
();
adjust_all
();
return
FALSE
;
return
FALSE
;
...
@@ -2742,7 +2759,7 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -2742,7 +2759,7 @@ int32 field::process_battle_command(uint16 step) {
}
}
return
FALSE
;
return
FALSE
;
}
}
case
9
:
{
case
11
:
{
if
(
returns
.
ivalue
[
0
])
{
if
(
returns
.
ivalue
[
0
])
{
core
.
units
.
begin
()
->
arg1
=
TRUE
;
core
.
units
.
begin
()
->
arg1
=
TRUE
;
core
.
units
.
begin
()
->
step
=
3
;
core
.
units
.
begin
()
->
step
=
3
;
...
@@ -2757,9 +2774,10 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -2757,9 +2774,10 @@ int32 field::process_battle_command(uint16 step) {
reset_phase
(
PHASE_DAMAGE
);
reset_phase
(
PHASE_DAMAGE
);
adjust_instant
();
adjust_instant
();
adjust_all
();
adjust_all
();
core
.
units
.
begin
()
->
step
=
19
;
return
FALSE
;
return
FALSE
;
}
}
case
1
0
:
{
case
2
0
:
{
infos
.
phase
=
PHASE_DAMAGE
;
infos
.
phase
=
PHASE_DAMAGE
;
pduel
->
write_buffer8
(
MSG_DAMAGE_STEP_START
);
pduel
->
write_buffer8
(
MSG_DAMAGE_STEP_START
);
core
.
units
.
begin
()
->
arg1
=
FALSE
;
core
.
units
.
begin
()
->
arg1
=
FALSE
;
...
@@ -2788,16 +2806,16 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -2788,16 +2806,16 @@ int32 field::process_battle_command(uint16 step) {
}
}
return
FALSE
;
return
FALSE
;
}
}
case
1
1
:
{
case
2
1
:
{
if
(
core
.
attacker
->
current
.
location
!=
LOCATION_MZONE
||
core
.
attacker
->
fieldid
!=
core
.
pre_field
[
0
]
if
(
core
.
attacker
->
current
.
location
!=
LOCATION_MZONE
||
core
.
attacker
->
fieldid
!=
core
.
pre_field
[
0
]
||
(
core
.
attack_target
&&
(
core
.
attack_target
->
current
.
location
!=
LOCATION_MZONE
||
core
.
attack_target
->
fieldid
!=
core
.
pre_field
[
1
])))
{
||
(
core
.
attack_target
&&
(
core
.
attack_target
->
current
.
location
!=
LOCATION_MZONE
||
core
.
attack_target
->
fieldid
!=
core
.
pre_field
[
1
])))
{
core
.
units
.
begin
()
->
arg1
=
0
;
core
.
units
.
begin
()
->
arg1
=
0
;
core
.
damage_calculated
=
TRUE
;
core
.
damage_calculated
=
TRUE
;
core
.
units
.
begin
()
->
step
=
2
0
;
core
.
units
.
begin
()
->
step
=
3
0
;
return
FALSE
;
return
FALSE
;
}
}
if
(
!
core
.
attack_target
)
{
if
(
!
core
.
attack_target
)
{
core
.
units
.
begin
()
->
step
=
1
3
;
core
.
units
.
begin
()
->
step
=
2
3
;
if
(
!
core
.
units
.
begin
()
->
arg1
)
{
if
(
!
core
.
units
.
begin
()
->
arg1
)
{
pduel
->
write_buffer8
(
MSG_HINT
);
pduel
->
write_buffer8
(
MSG_HINT
);
pduel
->
write_buffer8
(
HINT_EVENT
);
pduel
->
write_buffer8
(
HINT_EVENT
);
...
@@ -2822,7 +2840,7 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -2822,7 +2840,7 @@ int32 field::process_battle_command(uint16 step) {
}
}
return
FALSE
;
return
FALSE
;
}
}
case
1
2
:
{
case
2
2
:
{
raise_single_event
(
core
.
attacker
,
0
,
EVENT_BATTLE_CONFIRM
,
0
,
0
,
0
,
0
,
0
);
raise_single_event
(
core
.
attacker
,
0
,
EVENT_BATTLE_CONFIRM
,
0
,
0
,
0
,
0
,
0
);
if
(
core
.
attack_target
)
{
if
(
core
.
attack_target
)
{
if
(
core
.
attack_target
->
temp
.
position
&
POS_FACEDOWN
)
if
(
core
.
attack_target
->
temp
.
position
&
POS_FACEDOWN
)
...
@@ -2851,11 +2869,11 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -2851,11 +2869,11 @@ int32 field::process_battle_command(uint16 step) {
}
}
return
FALSE
;
return
FALSE
;
}
}
case
1
3
:
{
case
2
3
:
{
if
((
core
.
sub_attack_target
!=
(
card
*
)
0xffffffff
)
||
core
.
sub_attacker
)
{
if
((
core
.
sub_attack_target
!=
(
card
*
)
0xffffffff
)
||
core
.
sub_attacker
)
{
core
.
attacker
=
core
.
sub_attacker
;
core
.
attacker
=
core
.
sub_attacker
;
core
.
attack_target
=
core
.
sub_attack_target
;
core
.
attack_target
=
core
.
sub_attack_target
;
core
.
units
.
begin
()
->
step
=
1
0
;
core
.
units
.
begin
()
->
step
=
2
0
;
core
.
pre_field
[
0
]
=
core
.
attacker
->
fieldid
;
core
.
pre_field
[
0
]
=
core
.
attacker
->
fieldid
;
if
(
core
.
attack_target
)
if
(
core
.
attack_target
)
core
.
pre_field
[
1
]
=
core
.
attack_target
->
fieldid
;
core
.
pre_field
[
1
]
=
core
.
attack_target
->
fieldid
;
...
@@ -2867,12 +2885,12 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -2867,12 +2885,12 @@ int32 field::process_battle_command(uint16 step) {
||
(
core
.
attack_target
&&
(
core
.
attack_target
->
current
.
location
!=
LOCATION_MZONE
||
core
.
attack_target
->
fieldid
!=
core
.
pre_field
[
1
])))
{
||
(
core
.
attack_target
&&
(
core
.
attack_target
->
current
.
location
!=
LOCATION_MZONE
||
core
.
attack_target
->
fieldid
!=
core
.
pre_field
[
1
])))
{
core
.
units
.
begin
()
->
arg1
=
0
;
core
.
units
.
begin
()
->
arg1
=
0
;
core
.
damage_calculated
=
TRUE
;
core
.
damage_calculated
=
TRUE
;
core
.
units
.
begin
()
->
step
=
2
0
;
core
.
units
.
begin
()
->
step
=
3
0
;
return
FALSE
;
return
FALSE
;
}
}
return
FALSE
;
return
FALSE
;
}
}
case
1
4
:
{
case
2
4
:
{
infos
.
phase
=
PHASE_DAMAGE_CAL
;
infos
.
phase
=
PHASE_DAMAGE_CAL
;
raise_single_event
(
core
.
attacker
,
0
,
EVENT_PRE_DAMAGE_CALCULATE
,
0
,
0
,
0
,
0
,
0
);
raise_single_event
(
core
.
attacker
,
0
,
EVENT_PRE_DAMAGE_CALCULATE
,
0
,
0
,
0
,
0
,
0
);
if
(
core
.
attack_target
)
if
(
core
.
attack_target
)
...
@@ -2892,12 +2910,12 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -2892,12 +2910,12 @@ int32 field::process_battle_command(uint16 step) {
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
0
,
TRUE
);
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
0
,
TRUE
);
return
FALSE
;
return
FALSE
;
}
}
case
1
5
:
{
case
2
5
:
{
if
(
core
.
attacker
->
current
.
location
!=
LOCATION_MZONE
||
core
.
attacker
->
fieldid
!=
core
.
pre_field
[
0
]
if
(
core
.
attacker
->
current
.
location
!=
LOCATION_MZONE
||
core
.
attacker
->
fieldid
!=
core
.
pre_field
[
0
]
||
(
core
.
attack_target
&&
(
core
.
attack_target
->
current
.
location
!=
LOCATION_MZONE
||
core
.
attack_target
->
fieldid
!=
core
.
pre_field
[
1
])))
{
||
(
core
.
attack_target
&&
(
core
.
attack_target
->
current
.
location
!=
LOCATION_MZONE
||
core
.
attack_target
->
fieldid
!=
core
.
pre_field
[
1
])))
{
core
.
units
.
begin
()
->
arg1
=
0
;
core
.
units
.
begin
()
->
arg1
=
0
;
core
.
damage_calculated
=
TRUE
;
core
.
damage_calculated
=
TRUE
;
core
.
units
.
begin
()
->
step
=
2
0
;
core
.
units
.
begin
()
->
step
=
3
0
;
return
FALSE
;
return
FALSE
;
}
}
raise_event
((
card
*
)
0
,
EVENT_DAMAGE_CALCULATING
,
0
,
0
,
0
,
0
,
0
);
raise_event
((
card
*
)
0
,
EVENT_DAMAGE_CALCULATING
,
0
,
0
,
0
,
0
,
0
);
...
@@ -2906,7 +2924,7 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -2906,7 +2924,7 @@ int32 field::process_battle_command(uint16 step) {
core
.
new_fchain
.
clear
();
core
.
new_fchain
.
clear
();
return
FALSE
;
return
FALSE
;
}
}
case
1
6
:
{
case
2
6
:
{
uint32
a
=
core
.
attacker
->
get_attack
(),
d
;
uint32
a
=
core
.
attacker
->
get_attack
(),
d
;
uint8
pa
=
core
.
attacker
->
current
.
controler
,
pd
;
uint8
pa
=
core
.
attacker
->
current
.
controler
,
pd
;
uint8
damp
=
0
;
uint8
damp
=
0
;
...
@@ -3082,7 +3100,7 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -3082,7 +3100,7 @@ int32 field::process_battle_command(uint16 step) {
core
.
damage_calculated
=
TRUE
;
core
.
damage_calculated
=
TRUE
;
return
FALSE
;
return
FALSE
;
}
}
case
1
7
:
{
case
2
7
:
{
infos
.
phase
=
PHASE_DAMAGE
;
infos
.
phase
=
PHASE_DAMAGE
;
core
.
hint_timing
[
infos
.
turn_player
]
=
0
;
core
.
hint_timing
[
infos
.
turn_player
]
=
0
;
core
.
chain_attack
=
FALSE
;
core
.
chain_attack
=
FALSE
;
...
@@ -3119,7 +3137,7 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -3119,7 +3137,7 @@ int32 field::process_battle_command(uint16 step) {
adjust_all
();
adjust_all
();
return
FALSE
;
return
FALSE
;
}
}
case
1
8
:
{
case
2
8
:
{
card_set
des
;
card_set
des
;
effect
*
peffect
;
effect
*
peffect
;
uint32
dest
,
seq
;
uint32
dest
,
seq
;
...
@@ -3177,7 +3195,7 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -3177,7 +3195,7 @@ int32 field::process_battle_command(uint16 step) {
}
}
return
FALSE
;
return
FALSE
;
}
}
case
1
9
:
{
case
2
9
:
{
core
.
selfdes_disabled
=
FALSE
;
core
.
selfdes_disabled
=
FALSE
;
group
*
des
=
core
.
units
.
begin
()
->
ptarget
;
group
*
des
=
core
.
units
.
begin
()
->
ptarget
;
if
(
!
des
||
!
des
->
container
.
size
())
if
(
!
des
||
!
des
->
container
.
size
())
...
@@ -3190,7 +3208,7 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -3190,7 +3208,7 @@ int32 field::process_battle_command(uint16 step) {
adjust_all
();
adjust_all
();
return
FALSE
;
return
FALSE
;
}
}
case
2
0
:
{
case
3
0
:
{
raise_single_event
(
core
.
attacker
,
0
,
EVENT_BATTLE_END
,
0
,
0
,
PLAYER_NONE
,
0
,
0
);
raise_single_event
(
core
.
attacker
,
0
,
EVENT_BATTLE_END
,
0
,
0
,
PLAYER_NONE
,
0
,
0
);
if
(
core
.
attack_target
)
if
(
core
.
attack_target
)
raise_single_event
(
core
.
attack_target
,
0
,
EVENT_BATTLE_END
,
0
,
0
,
PLAYER_NONE
,
0
,
1
);
raise_single_event
(
core
.
attack_target
,
0
,
EVENT_BATTLE_END
,
0
,
0
,
PLAYER_NONE
,
0
,
1
);
...
@@ -3202,7 +3220,7 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -3202,7 +3220,7 @@ int32 field::process_battle_command(uint16 step) {
core
.
units
.
begin
()
->
arg1
=
1
;
core
.
units
.
begin
()
->
arg1
=
1
;
return
FALSE
;
return
FALSE
;
}
}
case
2
1
:
{
case
3
1
:
{
core
.
flip_delayed
=
FALSE
;
core
.
flip_delayed
=
FALSE
;
core
.
new_fchain
.
splice
(
core
.
new_fchain
.
begin
(),
core
.
new_fchain_b
);
core
.
new_fchain
.
splice
(
core
.
new_fchain
.
begin
(),
core
.
new_fchain_b
);
core
.
new_ochain
.
splice
(
core
.
new_ochain
.
begin
(),
core
.
new_ochain_b
);
core
.
new_ochain
.
splice
(
core
.
new_ochain
.
begin
(),
core
.
new_ochain_b
);
...
@@ -3219,7 +3237,7 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -3219,7 +3237,7 @@ int32 field::process_battle_command(uint16 step) {
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
FALSE
,
FALSE
);
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
FALSE
,
FALSE
);
return
FALSE
;
return
FALSE
;
}
}
case
2
2
:
{
case
3
2
:
{
group
*
des
=
core
.
units
.
begin
()
->
ptarget
;
group
*
des
=
core
.
units
.
begin
()
->
ptarget
;
if
(
core
.
battle_destroy_rep
.
size
())
if
(
core
.
battle_destroy_rep
.
size
())
destroy
(
&
core
.
battle_destroy_rep
,
0
,
REASON_EFFECT
,
PLAYER_NONE
);
destroy
(
&
core
.
battle_destroy_rep
,
0
,
REASON_EFFECT
,
PLAYER_NONE
);
...
@@ -3236,7 +3254,7 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -3236,7 +3254,7 @@ int32 field::process_battle_command(uint16 step) {
}
}
return
FALSE
;
return
FALSE
;
}
}
case
2
3
:
{
case
3
3
:
{
core
.
units
.
begin
()
->
ptarget
=
0
;
core
.
units
.
begin
()
->
ptarget
=
0
;
card_set
ing
;
card_set
ing
;
card_set
ed
;
card_set
ed
;
...
@@ -3266,10 +3284,10 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -3266,10 +3284,10 @@ int32 field::process_battle_command(uint16 step) {
if
(
core
.
attack_target
)
if
(
core
.
attack_target
)
core
.
attack_target
->
set_status
(
STATUS_BATTLE_DESTROYED
,
FALSE
);
core
.
attack_target
->
set_status
(
STATUS_BATTLE_DESTROYED
,
FALSE
);
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
FALSE
,
FALSE
);
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
FALSE
,
FALSE
);
core
.
units
.
begin
()
->
step
=
2
8
;
core
.
units
.
begin
()
->
step
=
3
8
;
return
FALSE
;
return
FALSE
;
}
}
case
2
9
:
{
case
3
9
:
{
core
.
units
.
begin
()
->
step
=
-
1
;
core
.
units
.
begin
()
->
step
=
-
1
;
infos
.
phase
=
PHASE_BATTLE
;
infos
.
phase
=
PHASE_BATTLE
;
pduel
->
write_buffer8
(
MSG_DAMAGE_STEP_END
);
pduel
->
write_buffer8
(
MSG_DAMAGE_STEP_END
);
...
@@ -3307,7 +3325,7 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -3307,7 +3325,7 @@ int32 field::process_battle_command(uint16 step) {
}
}
return
FALSE
;
return
FALSE
;
}
}
case
3
0
:
{
case
4
0
:
{
returns
.
ivalue
[
0
]
=
core
.
units
.
begin
()
->
arg1
;
returns
.
ivalue
[
0
]
=
core
.
units
.
begin
()
->
arg1
;
return
TRUE
;
return
TRUE
;
}
}
...
@@ -3923,15 +3941,19 @@ int32 field::solve_chain(uint16 step, uint32 skip_new) {
...
@@ -3923,15 +3941,19 @@ int32 field::solve_chain(uint16 step, uint32 skip_new) {
core
.
chain_limit_p
=
0
;
core
.
chain_limit_p
=
0
;
}
}
reset_chain
();
reset_chain
();
if
(
core
.
summoning_card
||
core
.
spsummoning_card
)
{
if
(
core
.
summoning_card
||
core
.
spsummoning_card
)
core
.
subunits
.
push_back
(
core
.
reserved
);
core
.
subunits
.
push_back
(
core
.
reserved
);
}
else
if
(
!
skip_new
)
{
return
FALSE
;
}
case
13
:
{
if
(
!
skip_new
)
{
raise_event
((
card
*
)
0
,
EVENT_CHAIN_END
,
0
,
0
,
0
,
0
,
0
);
raise_event
((
card
*
)
0
,
EVENT_CHAIN_END
,
0
,
0
,
0
,
0
,
0
);
process_instant_event
();
process_instant_event
();
core
.
hint_timing
[
0
]
|=
TIMING_CHAIN_END
;
core
.
hint_timing
[
0
]
|=
TIMING_CHAIN_END
;
core
.
hint_timing
[
1
]
|=
TIMING_CHAIN_END
;
core
.
hint_timing
[
1
]
|=
TIMING_CHAIN_END
;
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
0
,
0
);
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
0
,
0
);
}
}
returns
.
ivalue
[
0
]
=
TRUE
;
return
TRUE
;
return
TRUE
;
}
}
}
}
...
...
script/c11021521.lua
View file @
74cbf991
--ネコマネキング
--ネコマネキング
function
c11021521
.
initial_effect
(
c
)
function
c11021521
.
initial_effect
(
c
)
c
:
SetStatus
(
STATUS_UNSUMMONABLE_CARD
,
true
)
--end turn
--end turn
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
11021521
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
11021521
,
0
))
...
...
script/c14087893.lua
View file @
74cbf991
...
@@ -6,7 +6,7 @@ function c14087893.initial_effect(c)
...
@@ -6,7 +6,7 @@ function c14087893.initial_effect(c)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
TIMING_
ATTACK
,
0x11c0
)
e1
:
SetHintTiming
(
TIMING_
BATTLE_PHASE
,
0x1c0
+
TIMING_BATTLE_PHASE
)
e1
:
SetTarget
(
c14087893
.
target
)
e1
:
SetTarget
(
c14087893
.
target
)
e1
:
SetOperation
(
c14087893
.
activate
)
e1
:
SetOperation
(
c14087893
.
activate
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
...
...
script/c48206762.lua
View file @
74cbf991
...
@@ -40,7 +40,7 @@ function c48206762.operation(e,tp,eg,ep,ev,re,r,rp)
...
@@ -40,7 +40,7 @@ function c48206762.operation(e,tp,eg,ep,ev,re,r,rp)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsRelateToEffect
(
e
)
and
tc
:
IsRelateToEffect
(
e
)
then
if
c
:
IsRelateToEffect
(
e
)
and
tc
:
IsRelateToEffect
(
e
)
then
if
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
_ATTACK
)
==
0
then
return
end
if
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
==
0
then
return
end
Duel
.
Equip
(
tp
,
c
,
tc
)
Duel
.
Equip
(
tp
,
c
,
tc
)
--Add Equip limit
--Add Equip limit
local
e1
=
Effect
.
CreateEffect
(
tc
)
local
e1
=
Effect
.
CreateEffect
(
tc
)
...
...
script/c58996430.lua
View file @
74cbf991
--ライトロード·ビースト ウォルフ
--ライトロード·ビースト ウォルフ
function
c58996430
.
initial_effect
(
c
)
function
c58996430
.
initial_effect
(
c
)
--cannot normal summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CANNOT_SUMMON
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_CANNOT_MSET
)
c
:
RegisterEffect
(
e2
)
c
:
SetStatus
(
STATUS_UNSUMMONABLE_CARD
,
true
)
c
:
SetStatus
(
STATUS_UNSUMMONABLE_CARD
,
true
)
--special summon
--special summon
local
e
3
=
Effect
.
CreateEffect
(
c
)
local
e
1
=
Effect
.
CreateEffect
(
c
)
e
3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e
1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e
3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e
1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e
3
:
SetDescription
(
aux
.
Stringid
(
58996430
,
0
))
e
1
:
SetDescription
(
aux
.
Stringid
(
58996430
,
0
))
e
3
:
SetCode
(
EVENT_TO_GRAVE
)
e
1
:
SetCode
(
EVENT_TO_GRAVE
)
e
3
:
SetCondition
(
c58996430
.
condtion
)
e
1
:
SetCondition
(
c58996430
.
condtion
)
e
3
:
SetTarget
(
c58996430
.
target
)
e
1
:
SetTarget
(
c58996430
.
target
)
e
3
:
SetOperation
(
c58996430
.
operation
)
e
1
:
SetOperation
(
c58996430
.
operation
)
c
:
RegisterEffect
(
e
3
)
c
:
RegisterEffect
(
e
1
)
end
end
function
c58996430
.
condtion
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c58996430
.
condtion
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetPreviousLocation
()
==
LOCATION_DECK
return
e
:
GetHandler
():
GetPreviousLocation
()
==
LOCATION_DECK
...
...
script/c74694807.lua
View file @
74cbf991
...
@@ -40,7 +40,7 @@ function c74694807.operation(e,tp,eg,ep,ev,re,r,rp)
...
@@ -40,7 +40,7 @@ function c74694807.operation(e,tp,eg,ep,ev,re,r,rp)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsRelateToEffect
(
e
)
and
tc
:
IsRelateToEffect
(
e
)
then
if
c
:
IsRelateToEffect
(
e
)
and
tc
:
IsRelateToEffect
(
e
)
then
if
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
_ATTACK
)
==
0
then
return
end
if
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
==
0
then
return
end
Duel
.
Equip
(
tp
,
c
,
tc
)
Duel
.
Equip
(
tp
,
c
,
tc
)
--Add Equip limit
--Add Equip limit
local
e1
=
Effect
.
CreateEffect
(
tc
)
local
e1
=
Effect
.
CreateEffect
(
tc
)
...
...
script/c98045062.lua
View file @
74cbf991
...
@@ -6,6 +6,7 @@ function c98045062.initial_effect(c)
...
@@ -6,6 +6,7 @@ function c98045062.initial_effect(c)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
TIMING_BATTLE_PHASE
)
e1
:
SetCost
(
c98045062
.
cost
)
e1
:
SetCost
(
c98045062
.
cost
)
e1
:
SetTarget
(
c98045062
.
target
)
e1
:
SetTarget
(
c98045062
.
target
)
e1
:
SetOperation
(
c98045062
.
activate
)
e1
:
SetOperation
(
c98045062
.
activate
)
...
...
script/constant.lua
View file @
74cbf991
...
@@ -236,6 +236,7 @@ EFFECT_FLAG_EVENT_PLAYER =0x800000 --
...
@@ -236,6 +236,7 @@ EFFECT_FLAG_EVENT_PLAYER =0x800000 --
EFFECT_FLAG_OWNER_RELATE
=
0x1000000
--
EFFECT_FLAG_OWNER_RELATE
=
0x1000000
--
EFFECT_FLAG_AVAILABLE_BD
=
0x2000000
--
EFFECT_FLAG_AVAILABLE_BD
=
0x2000000
--
EFFECT_FLAG_CLIENT_HINT
=
0x4000000
--
EFFECT_FLAG_CLIENT_HINT
=
0x4000000
--
EFFECT_FLAG_CHAIN_UNIQUE
=
0x8000000
--
--========== Codes ==========
--========== Codes ==========
EFFECT_IMMUNE_EFFECT
=
1
--
EFFECT_IMMUNE_EFFECT
=
1
--
EFFECT_DISABLE
=
2
--
EFFECT_DISABLE
=
2
--
...
@@ -583,3 +584,4 @@ TIMING_REMOVE =0x100000
...
@@ -583,3 +584,4 @@ TIMING_REMOVE =0x100000
TIMING_TOHAND
=
0x200000
TIMING_TOHAND
=
0x200000
TIMING_TODECK
=
0x400000
TIMING_TODECK
=
0x400000
TIMING_TOGRAVE
=
0x800000
TIMING_TOGRAVE
=
0x800000
TIMING_BATTLE_PHASE
=
0x1000000
\ No newline at end of file
system.conf
View file @
74cbf991
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
antialias
=
2
antialias
=
2
nickname
=
Player
nickname
=
Player
gamename
=
Game
gamename
=
Game
lastdeck
=
sample
lastdeck
=
test
textfont
=
c
:/
windows
/
fonts
/
simsun
.
ttc
14
textfont
=
c
:/
windows
/
fonts
/
simsun
.
ttc
14
numfont
=
c
:/
windows
/
fonts
/
arialbd
.
ttf
numfont
=
c
:/
windows
/
fonts
/
arialbd
.
ttf
serverport
=
7911
serverport
=
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