Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-core
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
nanahira
ygopro-core
Commits
2d0d1888
Commit
2d0d1888
authored
Feb 12, 2024
by
salix5
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'salix5-patch-flip-summoning' into next
parents
b88b9708
4115d5be
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
143 additions
and
60 deletions
+143
-60
card.cpp
card.cpp
+22
-0
card.h
card.h
+3
-0
common.h
common.h
+20
-20
field.h
field.h
+2
-0
libduel.cpp
libduel.cpp
+47
-11
operations.cpp
operations.cpp
+49
-29
No files found.
card.cpp
View file @
2d0d1888
...
@@ -3395,6 +3395,28 @@ int32 card::is_can_be_summoned(uint8 playerid, uint8 ignore_count, effect* peffe
...
@@ -3395,6 +3395,28 @@ int32 card::is_can_be_summoned(uint8 playerid, uint8 ignore_count, effect* peffe
pduel
->
game_field
->
restore_lp_cost
();
pduel
->
game_field
->
restore_lp_cost
();
return
TRUE
;
return
TRUE
;
}
}
int32
card
::
is_summon_negatable
(
uint32
sumtype
,
effect
*
reason_effect
)
{
uint32
code
=
0
;
if
(
sumtype
&
SUMMON_TYPE_NORMAL
)
code
=
EFFECT_CANNOT_DISABLE_SUMMON
;
else
if
(
sumtype
&
SUMMON_TYPE_FLIP
)
code
=
EFFECT_CANNOT_DISABLE_FLIP_SUMMON
;
else
if
(
sumtype
&
SUMMON_TYPE_SPECIAL
)
code
=
EFFECT_CANNOT_DISABLE_SPSUMMON
;
else
return
FALSE
;
if
(
is_affected_by_effect
(
code
))
return
FALSE
;
if
(
sumtype
==
SUMMON_TYPE_DUAL
||
sumtype
&
SUMMON_TYPE_FLIP
)
{
if
(
!
is_status
(
STATUS_FLIP_SUMMONING
))
return
FALSE
;
if
(
!
is_affect_by_effect
(
reason_effect
))
return
FALSE
;
if
(
sumtype
==
SUMMON_TYPE_DUAL
&&
(
!
is_affected_by_effect
(
EFFECT_DUAL_SUMMONABLE
)
||
is_affected_by_effect
(
EFFECT_DUAL_STATUS
)))
return
FALSE
;
}
return
TRUE
;
}
int32
card
::
get_summon_tribute_count
()
{
int32
card
::
get_summon_tribute_count
()
{
int32
min
=
0
,
max
=
0
;
int32
min
=
0
,
max
=
0
;
int32
level
=
get_level
();
int32
level
=
get_level
();
...
...
card.h
View file @
2d0d1888
...
@@ -342,6 +342,7 @@ public:
...
@@ -342,6 +342,7 @@ public:
int32
is_spsummonable
(
effect
*
proc
,
material_info
info
=
null_info
);
int32
is_spsummonable
(
effect
*
proc
,
material_info
info
=
null_info
);
int32
is_summonable
(
effect
*
proc
,
uint8
min_tribute
,
uint32
zone
=
0x1f
,
uint32
releasable
=
0xff00ff
);
int32
is_summonable
(
effect
*
proc
,
uint8
min_tribute
,
uint32
zone
=
0x1f
,
uint32
releasable
=
0xff00ff
);
int32
is_can_be_summoned
(
uint8
playerid
,
uint8
ingore_count
,
effect
*
peffect
,
uint8
min_tribute
,
uint32
zone
=
0x1f
);
int32
is_can_be_summoned
(
uint8
playerid
,
uint8
ingore_count
,
effect
*
peffect
,
uint8
min_tribute
,
uint32
zone
=
0x1f
);
int32
is_summon_negatable
(
uint32
sumtype
,
effect
*
reason_effect
);
int32
get_summon_tribute_count
();
int32
get_summon_tribute_count
();
int32
get_set_tribute_count
();
int32
get_set_tribute_count
();
int32
is_can_be_flip_summoned
(
uint8
playerid
);
int32
is_can_be_flip_summoned
(
uint8
playerid
);
...
@@ -408,6 +409,8 @@ public:
...
@@ -408,6 +409,8 @@ public:
#define SUMMON_VALUE_CUSTOM_TYPE 0x0000ffff
#define SUMMON_VALUE_CUSTOM_TYPE 0x0000ffff
constexpr
uint32
DEFAULT_SUMMON_TYPE
=
SUMMON_VALUE_MAIN_TYPE
|
SUMMON_VALUE_SUB_TYPE
|
SUMMON_VALUE_CUSTOM_TYPE
;
constexpr
uint32
DEFAULT_SUMMON_TYPE
=
SUMMON_VALUE_MAIN_TYPE
|
SUMMON_VALUE_SUB_TYPE
|
SUMMON_VALUE_CUSTOM_TYPE
;
#define SUMMON_VALUE_FUTURE_FUSION 0x18
//Counter
//Counter
#define COUNTER_WITHOUT_PERMIT 0x1000
#define COUNTER_WITHOUT_PERMIT 0x1000
//#define COUNTER_NEED_ENABLE 0x2000
//#define COUNTER_NEED_ENABLE 0x2000
...
...
common.h
View file @
2d0d1888
...
@@ -180,27 +180,27 @@ struct card_sort {
...
@@ -180,27 +180,27 @@ struct card_sort {
#define REASONS_PROCEDURE (REASON_SYNCHRO | REASON_XYZ | REASON_LINK)
#define REASONS_PROCEDURE (REASON_SYNCHRO | REASON_XYZ | REASON_LINK)
//Status
//Status
#define STATUS_DISABLED 0x0001
//
#define STATUS_DISABLED 0x0001
#define STATUS_TO_ENABLE 0x0002
//
#define STATUS_TO_ENABLE 0x0002
#define STATUS_TO_DISABLE 0x0004
//
#define STATUS_TO_DISABLE 0x0004
#define STATUS_PROC_COMPLETE 0x0008
//
#define STATUS_PROC_COMPLETE 0x0008
#define STATUS_SET_TURN 0x0010
//
#define STATUS_SET_TURN 0x0010
#define STATUS_NO_LEVEL 0x0020
//
#define STATUS_NO_LEVEL 0x0020
#define STATUS_BATTLE_RESULT 0x0040
//
#define STATUS_BATTLE_RESULT 0x0040
#define STATUS_SPSUMMON_STEP 0x0080
//
#define STATUS_SPSUMMON_STEP 0x0080
#define STATUS_FORM_CHANGED 0x0100
//
#define STATUS_FORM_CHANGED 0x0100
#define STATUS_SUMMONING 0x0200
//
#define STATUS_SUMMONING 0x0200
#define STATUS_EFFECT_ENABLED 0x0400
//
#define STATUS_EFFECT_ENABLED 0x0400
#define STATUS_SUMMON_TURN 0x0800
//
#define STATUS_SUMMON_TURN 0x0800
#define STATUS_DESTROY_CONFIRMED 0x1000
//
#define STATUS_DESTROY_CONFIRMED 0x1000
#define STATUS_LEAVE_CONFIRMED 0x2000
//
#define STATUS_LEAVE_CONFIRMED 0x2000
#define STATUS_BATTLE_DESTROYED 0x4000
//
#define STATUS_BATTLE_DESTROYED 0x4000
#define STATUS_COPYING_EFFECT 0x8000
//
#define STATUS_COPYING_EFFECT 0x8000
#define STATUS_CHAINING 0x10000
//
#define STATUS_CHAINING 0x10000
#define STATUS_SUMMON_DISABLED 0x20000
//
#define STATUS_SUMMON_DISABLED 0x20000
#define STATUS_ACTIVATE_DISABLED 0x40000
//
#define STATUS_ACTIVATE_DISABLED 0x40000
#define STATUS_EFFECT_REPLACED 0x80000
#define STATUS_EFFECT_REPLACED 0x80000
#define STATUS_F
UTURE_FUSION
0x100000
#define STATUS_F
LIP_SUMMONING
0x100000
#define STATUS_ATTACK_CANCELED 0x200000
#define STATUS_ATTACK_CANCELED 0x200000
#define STATUS_INITIALIZING 0x400000
#define STATUS_INITIALIZING 0x400000
#define STATUS_TO_HAND_WITHOUT_CONFIRM 0x800000
#define STATUS_TO_HAND_WITHOUT_CONFIRM 0x800000
...
...
field.h
View file @
2d0d1888
...
@@ -308,6 +308,8 @@ struct processor {
...
@@ -308,6 +308,8 @@ struct processor {
uint8
coin_result
[
MAX_COIN_COUNT
]{};
uint8
coin_result
[
MAX_COIN_COUNT
]{};
int32
coin_count
{
0
};
int32
coin_count
{
0
};
bool
is_target_ready
{
false
};
bool
is_target_ready
{
false
};
bool
is_gemini_summoning
{
false
};
bool
is_summon_negated
{
false
};
uint8
to_bp
{
FALSE
};
uint8
to_bp
{
FALSE
};
uint8
to_m2
{
FALSE
};
uint8
to_m2
{
FALSE
};
...
...
libduel.cpp
View file @
2d0d1888
...
@@ -1833,30 +1833,66 @@ int32 scriptlib::duel_disable_summon(lua_State *L) {
...
@@ -1833,30 +1833,66 @@ int32 scriptlib::duel_disable_summon(lua_State *L) {
pduel
=
pgroup
->
pduel
;
pduel
=
pgroup
->
pduel
;
}
else
}
else
return
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
1
);
return
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
1
);
uint32
sumtype
=
0
;
if
(
pduel
->
game_field
->
check_event
(
EVENT_SUMMON
))
{
if
(
pduel
->
game_field
->
core
.
is_gemini_summoning
)
sumtype
=
SUMMON_TYPE_DUAL
;
else
sumtype
=
SUMMON_TYPE_NORMAL
;
}
else
if
(
pduel
->
game_field
->
check_event
(
EVENT_FLIP_SUMMON
))
sumtype
=
SUMMON_TYPE_FLIP
;
else
if
(
pduel
->
game_field
->
check_event
(
EVENT_SPSUMMON
))
sumtype
=
SUMMON_TYPE_SPECIAL
;
else
return
0
;
if
(
sumtype
&
SUMMON_TYPE_NORMAL
||
sumtype
&
SUMMON_TYPE_FLIP
)
{
if
(
pgroup
&&
pgroup
->
container
.
size
()
!=
1
)
return
0
;
if
(
!
pcard
)
pcard
=
*
pgroup
->
container
.
begin
();
}
uint8
sumplayer
=
PLAYER_NONE
;
uint8
sumplayer
=
PLAYER_NONE
;
if
(
pcard
)
{
effect
*
reason_effect
=
pduel
->
game_field
->
core
.
reason_effect
;
field
::
card_set
negated_cards
;
if
(
sumtype
==
SUMMON_TYPE_DUAL
||
sumtype
&
SUMMON_TYPE_FLIP
)
{
if
(
!
pcard
->
is_summon_negatable
(
sumtype
,
reason_effect
))
return
0
;
sumplayer
=
pcard
->
summon_player
;
sumplayer
=
pcard
->
summon_player
;
pcard
->
set_status
(
STATUS_SUMMONING
,
FALSE
);
pcard
->
set_status
(
STATUS_
FLIP_
SUMMONING
,
FALSE
);
pcard
->
set_status
(
STATUS_SUMMON_DISABLED
,
TRUE
);
pcard
->
set_status
(
STATUS_SUMMON_DISABLED
,
TRUE
);
if
(
!
match_all
(
pcard
->
summon_info
,
SUMMON_TYPE_FLIP
)
&&
!
match_all
(
pcard
->
summon_info
,
SUMMON_TYPE_DUAL
))
}
pcard
->
set_status
(
STATUS_PROC_COMPLETE
,
FALSE
);
else
{
}
else
{
if
(
pcard
)
{
for
(
auto
&
pcard
:
pgroup
->
container
)
{
if
(
!
pcard
->
is_summon_negatable
(
sumtype
,
reason_effect
))
return
0
;
sumplayer
=
pcard
->
summon_player
;
sumplayer
=
pcard
->
summon_player
;
pcard
->
set_status
(
STATUS_SUMMONING
,
FALSE
);
pcard
->
set_status
(
STATUS_SUMMONING
,
FALSE
);
pcard
->
set_status
(
STATUS_SUMMON_DISABLED
,
TRUE
);
pcard
->
set_status
(
STATUS_SUMMON_DISABLED
,
TRUE
);
if
(
!
match_all
(
pcard
->
summon_info
,
SUMMON_TYPE_FLIP
)
&&
!
match_all
(
pcard
->
summon_info
,
SUMMON_TYPE_DUAL
))
pcard
->
set_status
(
STATUS_PROC_COMPLETE
,
FALSE
);
}
else
{
for
(
auto
&
pcard
:
pgroup
->
container
)
{
if
(
!
pcard
->
is_summon_negatable
(
sumtype
,
reason_effect
))
continue
;
sumplayer
=
pcard
->
summon_player
;
pcard
->
set_status
(
STATUS_SUMMONING
,
FALSE
);
pcard
->
set_status
(
STATUS_SUMMON_DISABLED
,
TRUE
);
pcard
->
set_status
(
STATUS_PROC_COMPLETE
,
FALSE
);
pcard
->
set_status
(
STATUS_PROC_COMPLETE
,
FALSE
);
negated_cards
.
insert
(
pcard
);
}
if
(
!
negated_cards
.
size
())
return
0
;
}
}
}
}
pduel
->
game_field
->
core
.
is_summon_negated
=
true
;
uint32
event_code
=
0
;
uint32
event_code
=
0
;
if
(
pduel
->
game_field
->
check_event
(
EVENT_SUMMON
)
)
if
(
sumtype
&
SUMMON_TYPE_NORMAL
)
event_code
=
EVENT_SUMMON_NEGATED
;
event_code
=
EVENT_SUMMON_NEGATED
;
else
if
(
pduel
->
game_field
->
check_event
(
EVENT_FLIP_SUMMON
)
)
else
if
(
sumtype
&
SUMMON_TYPE_FLIP
)
event_code
=
EVENT_FLIP_SUMMON_NEGATED
;
event_code
=
EVENT_FLIP_SUMMON_NEGATED
;
else
if
(
pduel
->
game_field
->
check_event
(
EVENT_SPSUMMON
)
)
else
if
(
sumtype
&
SUMMON_TYPE_SPECIAL
)
event_code
=
EVENT_SPSUMMON_NEGATED
;
event_code
=
EVENT_SPSUMMON_NEGATED
;
effect
*
reason_effect
=
pduel
->
game_field
->
core
.
reason_effect
;
uint8
reason_player
=
pduel
->
game_field
->
core
.
reason_player
;
uint8
reason_player
=
pduel
->
game_field
->
core
.
reason_player
;
if
(
pcard
)
if
(
pcard
)
pduel
->
game_field
->
raise_event
(
pcard
,
event_code
,
reason_effect
,
REASON_EFFECT
,
reason_player
,
sumplayer
,
0
);
pduel
->
game_field
->
raise_event
(
pcard
,
event_code
,
reason_effect
,
REASON_EFFECT
,
reason_player
,
sumplayer
,
0
);
...
...
operations.cpp
View file @
2d0d1888
...
@@ -1830,6 +1830,7 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
...
@@ -1830,6 +1830,7 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
target
->
summon_info
|=
SUMMON_TYPE_NORMAL
;
target
->
summon_info
|=
SUMMON_TYPE_NORMAL
;
target
->
current
.
reason_effect
=
0
;
target
->
current
.
reason_effect
=
0
;
target
->
current
.
reason_player
=
sumplayer
;
target
->
current
.
reason_player
=
sumplayer
;
core
.
is_gemini_summoning
=
true
;
effect
*
deffect
=
pduel
->
new_effect
();
effect
*
deffect
=
pduel
->
new_effect
();
deffect
->
owner
=
target
;
deffect
->
owner
=
target
;
deffect
->
code
=
EFFECT_DUAL_STATUS
;
deffect
->
code
=
EFFECT_DUAL_STATUS
;
...
@@ -1889,7 +1890,14 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
...
@@ -1889,7 +1890,14 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
return
FALSE
;
return
FALSE
;
}
}
case
13
:
{
case
13
:
{
target
->
set_status
(
STATUS_SUMMONING
,
TRUE
);
if
(
core
.
is_gemini_summoning
)
{
target
->
set_status
(
STATUS_SUMMONING
,
FALSE
);
target
->
set_status
(
STATUS_FLIP_SUMMONING
,
TRUE
);
}
else
{
target
->
set_status
(
STATUS_SUMMONING
,
TRUE
);
target
->
set_status
(
STATUS_FLIP_SUMMONING
,
FALSE
);
}
target
->
set_status
(
STATUS_SUMMON_DISABLED
,
FALSE
);
target
->
set_status
(
STATUS_SUMMON_DISABLED
,
FALSE
);
raise_event
(
target
,
EVENT_SUMMON
,
proc
,
0
,
sumplayer
,
sumplayer
,
0
);
raise_event
(
target
,
EVENT_SUMMON
,
proc
,
0
,
sumplayer
,
sumplayer
,
0
);
process_instant_event
();
process_instant_event
();
...
@@ -1897,29 +1905,34 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
...
@@ -1897,29 +1905,34 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
return
FALSE
;
return
FALSE
;
}
}
case
14
:
{
case
14
:
{
if
(
target
->
is_status
(
STATUS_SUMMONING
))
{
if
(
core
.
is_gemini_summoning
&&
target
->
is_status
(
STATUS_FLIP_SUMMONING
)
||
!
core
.
is_gemini_summoning
&&
target
->
is_status
(
STATUS_SUMMONING
))
{
core
.
units
.
begin
()
->
step
=
14
;
core
.
units
.
begin
()
->
step
=
14
;
return
FALSE
;
return
FALSE
;
}
}
if
(
proc
)
{
if
(
core
.
is_summon_negated
)
{
remove_oath_effect
(
proc
);
if
(
proc
)
{
if
(
proc
->
is_flag
(
EFFECT_FLAG_COUNT_LIMIT
)
&&
(
proc
->
count_code
&
EFFECT_COUNT_CODE_OATH
))
{
remove_oath_effect
(
proc
);
dec_effect_code
(
proc
->
count_code
,
sumplayer
);
if
(
proc
->
is_flag
(
EFFECT_FLAG_COUNT_LIMIT
)
&&
(
proc
->
count_code
&
EFFECT_COUNT_CODE_OATH
))
{
dec_effect_code
(
proc
->
count_code
,
sumplayer
);
}
}
}
if
(
effect_set
*
peset
=
(
effect_set
*
)
core
.
units
.
begin
()
->
ptr2
)
{
for
(
int32
i
=
0
;
i
<
peset
->
size
();
++
i
)
remove_oath_effect
(
peset
->
at
(
i
));
delete
peset
;
core
.
units
.
begin
()
->
ptr2
=
0
;
}
if
(
target
->
is_status
(
STATUS_SUMMON_DISABLED
)
&&
target
->
current
.
location
==
LOCATION_MZONE
)
send_to
(
target
,
0
,
REASON_RULE
,
PLAYER_NONE
,
sumplayer
,
LOCATION_GRAVE
,
0
,
0
);
adjust_instant
();
}
}
if
(
effect_set
*
peset
=
(
effect_set
*
)
core
.
units
.
begin
()
->
ptr2
)
{
core
.
is_gemini_summoning
=
false
;
for
(
int32
i
=
0
;
i
<
peset
->
size
();
++
i
)
core
.
is_summon_negated
=
false
;
remove_oath_effect
(
peset
->
at
(
i
));
delete
peset
;
core
.
units
.
begin
()
->
ptr2
=
0
;
}
if
(
target
->
current
.
location
==
LOCATION_MZONE
)
send_to
(
target
,
0
,
REASON_RULE
,
PLAYER_NONE
,
sumplayer
,
LOCATION_GRAVE
,
0
,
0
);
adjust_instant
();
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
FALSE
,
0
);
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
FALSE
,
0
);
return
TRUE
;
return
TRUE
;
}
}
case
15
:
{
case
15
:
{
core
.
is_gemini_summoning
=
false
;
if
(
proc
)
{
if
(
proc
)
{
release_oath_relation
(
proc
);
release_oath_relation
(
proc
);
}
}
...
@@ -1930,6 +1943,7 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
...
@@ -1930,6 +1943,7 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
core
.
units
.
begin
()
->
ptr2
=
0
;
core
.
units
.
begin
()
->
ptr2
=
0
;
}
}
target
->
set_status
(
STATUS_SUMMONING
,
FALSE
);
target
->
set_status
(
STATUS_SUMMONING
,
FALSE
);
target
->
set_status
(
STATUS_FLIP_SUMMONING
,
FALSE
);
target
->
set_status
(
STATUS_SUMMON_TURN
,
TRUE
);
target
->
set_status
(
STATUS_SUMMON_TURN
,
TRUE
);
target
->
enable_field_effect
(
true
);
target
->
enable_field_effect
(
true
);
if
(
target
->
is_status
(
STATUS_DISABLED
))
if
(
target
->
is_status
(
STATUS_DISABLED
))
...
@@ -2004,7 +2018,7 @@ int32 field::flip_summon(uint16 step, uint8 sumplayer, card * target, uint32 act
...
@@ -2004,7 +2018,7 @@ int32 field::flip_summon(uint16 step, uint8 sumplayer, card * target, uint32 act
if
(
target
->
is_affected_by_effect
(
EFFECT_CANNOT_DISABLE_FLIP_SUMMON
))
if
(
target
->
is_affected_by_effect
(
EFFECT_CANNOT_DISABLE_FLIP_SUMMON
))
core
.
units
.
begin
()
->
step
=
2
;
core
.
units
.
begin
()
->
step
=
2
;
else
{
else
{
target
->
set_status
(
STATUS_SUMMONING
,
TRUE
);
target
->
set_status
(
STATUS_
FLIP_
SUMMONING
,
TRUE
);
target
->
set_status
(
STATUS_SUMMON_DISABLED
,
FALSE
);
target
->
set_status
(
STATUS_SUMMON_DISABLED
,
FALSE
);
raise_event
(
target
,
EVENT_FLIP_SUMMON
,
0
,
0
,
sumplayer
,
sumplayer
,
0
);
raise_event
(
target
,
EVENT_FLIP_SUMMON
,
0
,
0
,
sumplayer
,
sumplayer
,
0
);
process_instant_event
();
process_instant_event
();
...
@@ -2013,16 +2027,19 @@ int32 field::flip_summon(uint16 step, uint8 sumplayer, card * target, uint32 act
...
@@ -2013,16 +2027,19 @@ int32 field::flip_summon(uint16 step, uint8 sumplayer, card * target, uint32 act
return
FALSE
;
return
FALSE
;
}
}
case
2
:
{
case
2
:
{
if
(
target
->
is_status
(
STATUS_SUMMONING
))
if
(
target
->
is_status
(
STATUS_
FLIP_
SUMMONING
))
return
FALSE
;
return
FALSE
;
if
(
effect_set
*
peset
=
(
effect_set
*
)
core
.
units
.
begin
()
->
ptr1
)
{
if
(
core
.
is_summon_negated
)
{
for
(
int32
i
=
0
;
i
<
peset
->
size
();
++
i
)
if
(
effect_set
*
peset
=
(
effect_set
*
)
core
.
units
.
begin
()
->
ptr1
)
{
remove_oath_effect
(
peset
->
at
(
i
));
for
(
int32
i
=
0
;
i
<
peset
->
size
();
++
i
)
delete
peset
;
remove_oath_effect
(
peset
->
at
(
i
));
core
.
units
.
begin
()
->
ptr1
=
0
;
delete
peset
;
core
.
units
.
begin
()
->
ptr1
=
0
;
}
if
(
target
->
is_status
(
STATUS_SUMMON_DISABLED
)
&&
target
->
current
.
location
==
LOCATION_MZONE
)
send_to
(
target
,
0
,
REASON_RULE
,
PLAYER_NONE
,
sumplayer
,
LOCATION_GRAVE
,
0
,
0
);
}
}
if
(
target
->
current
.
location
==
LOCATION_MZONE
)
core
.
is_summon_negated
=
false
;
send_to
(
target
,
0
,
REASON_RULE
,
PLAYER_NONE
,
sumplayer
,
LOCATION_GRAVE
,
0
,
0
);
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
FALSE
,
0
);
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
FALSE
,
0
);
return
TRUE
;
return
TRUE
;
}
}
...
@@ -2033,7 +2050,7 @@ int32 field::flip_summon(uint16 step, uint8 sumplayer, card * target, uint32 act
...
@@ -2033,7 +2050,7 @@ int32 field::flip_summon(uint16 step, uint8 sumplayer, card * target, uint32 act
delete
peset
;
delete
peset
;
core
.
units
.
begin
()
->
ptr1
=
0
;
core
.
units
.
begin
()
->
ptr1
=
0
;
}
}
target
->
set_status
(
STATUS_SUMMONING
,
FALSE
);
target
->
set_status
(
STATUS_
FLIP_
SUMMONING
,
FALSE
);
target
->
enable_field_effect
(
true
);
target
->
enable_field_effect
(
true
);
if
(
target
->
is_status
(
STATUS_DISABLED
))
if
(
target
->
is_status
(
STATUS_DISABLED
))
target
->
reset
(
RESET_DISABLE
,
RESET_EVENT
);
target
->
reset
(
RESET_DISABLE
,
RESET_EVENT
);
...
@@ -2903,7 +2920,7 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card* target, uin
...
@@ -2903,7 +2920,7 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card* target, uin
delete
peset
;
delete
peset
;
core
.
units
.
begin
()
->
ptr1
=
0
;
core
.
units
.
begin
()
->
ptr1
=
0
;
}
}
if
(
target
->
current
.
location
==
LOCATION_MZONE
)
if
(
target
->
is_status
(
STATUS_SUMMON_DISABLED
)
&&
target
->
current
.
location
==
LOCATION_MZONE
)
send_to
(
target
,
0
,
REASON_RULE
,
PLAYER_NONE
,
sumplayer
,
LOCATION_GRAVE
,
0
,
0
);
send_to
(
target
,
0
,
REASON_RULE
,
PLAYER_NONE
,
sumplayer
,
LOCATION_GRAVE
,
0
,
0
);
adjust_instant
();
adjust_instant
();
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
FALSE
,
0
);
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
FALSE
,
0
);
...
@@ -3087,7 +3104,7 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card* target, uin
...
@@ -3087,7 +3104,7 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card* target, uin
card
*
pcard
=
*
cit
;
card
*
pcard
=
*
cit
;
if
(
!
pcard
->
is_status
(
STATUS_SUMMONING
))
{
if
(
!
pcard
->
is_status
(
STATUS_SUMMONING
))
{
cit
=
pgroup
->
container
.
erase
(
cit
);
cit
=
pgroup
->
container
.
erase
(
cit
);
if
(
pcard
->
current
.
location
==
LOCATION_MZONE
)
if
(
pcard
->
is_status
(
STATUS_SUMMON_DISABLED
)
&&
pcard
->
current
.
location
==
LOCATION_MZONE
)
cset
.
insert
(
pcard
);
cset
.
insert
(
pcard
);
}
}
else
else
...
@@ -3355,7 +3372,8 @@ int32 field::special_summon(uint16 step, effect* reason_effect, uint8 reason_pla
...
@@ -3355,7 +3372,8 @@ int32 field::special_summon(uint16 step, effect* reason_effect, uint8 reason_pla
if
(
!
(
pcard
->
current
.
position
&
POS_FACEDOWN
))
if
(
!
(
pcard
->
current
.
position
&
POS_FACEDOWN
))
raise_single_event
(
pcard
,
0
,
EVENT_SPSUMMON_SUCCESS
,
pcard
->
current
.
reason_effect
,
0
,
pcard
->
current
.
reason_player
,
pcard
->
summon_player
,
0
);
raise_single_event
(
pcard
,
0
,
EVENT_SPSUMMON_SUCCESS
,
pcard
->
current
.
reason_effect
,
0
,
pcard
->
current
.
reason_player
,
pcard
->
summon_player
,
0
);
int32
summontype
=
pcard
->
summon_info
&
(
SUMMON_VALUE_MAIN_TYPE
|
SUMMON_VALUE_SUB_TYPE
);
int32
summontype
=
pcard
->
summon_info
&
(
SUMMON_VALUE_MAIN_TYPE
|
SUMMON_VALUE_SUB_TYPE
);
if
(
summontype
&&
pcard
->
material_cards
.
size
()
&&
!
pcard
->
is_status
(
STATUS_FUTURE_FUSION
))
{
int32
custom_type
=
pcard
->
summon_info
&
SUMMON_VALUE_CUSTOM_TYPE
;
if
(
summontype
&&
pcard
->
material_cards
.
size
()
&&
custom_type
!=
SUMMON_VALUE_FUTURE_FUSION
)
{
int32
matreason
=
0
;
int32
matreason
=
0
;
if
(
summontype
==
SUMMON_TYPE_FUSION
)
if
(
summontype
==
SUMMON_TYPE_FUSION
)
matreason
=
REASON_FUSION
;
matreason
=
REASON_FUSION
;
...
@@ -3369,7 +3387,6 @@ int32 field::special_summon(uint16 step, effect* reason_effect, uint8 reason_pla
...
@@ -3369,7 +3387,6 @@ int32 field::special_summon(uint16 step, effect* reason_effect, uint8 reason_pla
raise_single_event
(
mcard
,
&
targets
->
container
,
EVENT_BE_MATERIAL
,
pcard
->
current
.
reason_effect
,
matreason
,
pcard
->
current
.
reason_player
,
pcard
->
summon_player
,
0
);
raise_single_event
(
mcard
,
&
targets
->
container
,
EVENT_BE_MATERIAL
,
pcard
->
current
.
reason_effect
,
matreason
,
pcard
->
current
.
reason_player
,
pcard
->
summon_player
,
0
);
raise_event
(
&
(
pcard
->
material_cards
),
EVENT_BE_MATERIAL
,
reason_effect
,
matreason
,
reason_player
,
pcard
->
summon_player
,
0
);
raise_event
(
&
(
pcard
->
material_cards
),
EVENT_BE_MATERIAL
,
reason_effect
,
matreason
,
reason_player
,
pcard
->
summon_player
,
0
);
}
}
pcard
->
set_status
(
STATUS_FUTURE_FUSION
,
FALSE
);
}
}
process_single_event
();
process_single_event
();
process_instant_event
();
process_instant_event
();
...
@@ -4142,6 +4159,7 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
...
@@ -4142,6 +4159,7 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
if
((
core
.
deck_reversed
&&
pcard
->
current
.
location
==
LOCATION_DECK
)
||
(
pcard
->
current
.
position
==
POS_FACEUP_DEFENSE
))
if
((
core
.
deck_reversed
&&
pcard
->
current
.
location
==
LOCATION_DECK
)
||
(
pcard
->
current
.
position
==
POS_FACEUP_DEFENSE
))
param
->
show_decktop
[
pcard
->
current
.
controler
]
=
true
;
param
->
show_decktop
[
pcard
->
current
.
controler
]
=
true
;
pcard
->
set_status
(
STATUS_LEAVE_CONFIRMED
,
FALSE
);
pcard
->
set_status
(
STATUS_LEAVE_CONFIRMED
,
FALSE
);
pcard
->
set_status
(
STATUS_FLIP_SUMMONING
,
FALSE
);
if
(
pcard
->
status
&
(
STATUS_SUMMON_DISABLED
|
STATUS_ACTIVATE_DISABLED
))
{
if
(
pcard
->
status
&
(
STATUS_SUMMON_DISABLED
|
STATUS_ACTIVATE_DISABLED
))
{
pcard
->
set_status
(
STATUS_SUMMON_DISABLED
|
STATUS_ACTIVATE_DISABLED
,
FALSE
);
pcard
->
set_status
(
STATUS_SUMMON_DISABLED
|
STATUS_ACTIVATE_DISABLED
,
FALSE
);
pcard
->
previous
.
location
=
0
;
pcard
->
previous
.
location
=
0
;
...
@@ -4190,6 +4208,7 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
...
@@ -4190,6 +4208,7 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
pduel
->
write_buffer32
(
pcard
->
get_info_location
());
pduel
->
write_buffer32
(
pcard
->
get_info_location
());
pduel
->
write_buffer32
(
pcard
->
current
.
reason
);
pduel
->
write_buffer32
(
pcard
->
current
.
reason
);
pcard
->
set_status
(
STATUS_LEAVE_CONFIRMED
,
FALSE
);
pcard
->
set_status
(
STATUS_LEAVE_CONFIRMED
,
FALSE
);
pcard
->
set_status
(
STATUS_FLIP_SUMMONING
,
FALSE
);
if
(
pcard
->
status
&
(
STATUS_SUMMON_DISABLED
|
STATUS_ACTIVATE_DISABLED
))
{
if
(
pcard
->
status
&
(
STATUS_SUMMON_DISABLED
|
STATUS_ACTIVATE_DISABLED
))
{
pcard
->
set_status
(
STATUS_SUMMON_DISABLED
|
STATUS_ACTIVATE_DISABLED
,
FALSE
);
pcard
->
set_status
(
STATUS_SUMMON_DISABLED
|
STATUS_ACTIVATE_DISABLED
,
FALSE
);
pcard
->
previous
.
location
=
0
;
pcard
->
previous
.
location
=
0
;
...
@@ -4903,6 +4922,7 @@ int32 field::change_position(uint16 step, group * targets, effect * reason_effec
...
@@ -4903,6 +4922,7 @@ int32 field::change_position(uint16 step, group * targets, effect * reason_effec
trapmonster
=
true
;
trapmonster
=
true
;
if
(
pcard
->
status
&
(
STATUS_SUMMON_DISABLED
|
STATUS_ACTIVATE_DISABLED
))
if
(
pcard
->
status
&
(
STATUS_SUMMON_DISABLED
|
STATUS_ACTIVATE_DISABLED
))
pcard
->
set_status
(
STATUS_SUMMON_DISABLED
|
STATUS_ACTIVATE_DISABLED
,
FALSE
);
pcard
->
set_status
(
STATUS_SUMMON_DISABLED
|
STATUS_ACTIVATE_DISABLED
,
FALSE
);
pcard
->
set_status
(
STATUS_FLIP_SUMMONING
,
FALSE
);
pcard
->
reset
(
RESET_TURN_SET
,
RESET_EVENT
);
pcard
->
reset
(
RESET_TURN_SET
,
RESET_EVENT
);
pcard
->
clear_card_target
();
pcard
->
clear_card_target
();
pcard
->
set_status
(
STATUS_SET_TURN
,
TRUE
);
pcard
->
set_status
(
STATUS_SET_TURN
,
TRUE
);
...
...
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