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
a6e26326
Commit
a6e26326
authored
May 04, 2024
by
wind2009
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'purero/patch-trap-setinturn' into develop
parents
ed67d74c
d74180b0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
1 deletion
+27
-1
effect.cpp
effect.cpp
+2
-1
processor.cpp
processor.cpp
+25
-0
No files found.
effect.cpp
View file @
a6e26326
...
...
@@ -218,7 +218,8 @@ int32 effect::get_required_handorset_effects(effect_set* eset, uint8 playerid, c
pduel
->
lua
->
add_param
(
e
.
reason
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
e
.
reason_player
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
0
,
PARAM_TYPE_INT
);
if
(
pduel
->
lua
->
check_condition
(
peffect
->
cost
,
9
))
{
pduel
->
lua
->
add_param
(
this
,
PARAM_TYPE_EFFECT
);
if
(
pduel
->
lua
->
check_condition
(
peffect
->
cost
,
10
))
{
available
=
2
;
eset
->
add_item
(
peffect
);
}
...
...
processor.cpp
View file @
a6e26326
...
...
@@ -4154,6 +4154,30 @@ int32 field::add_chain(uint16 step) {
if
(
clit
.
required_handorset_effects
.
size
()
==
1
)
{
returns
.
ivalue
[
0
]
=
0
;
return
FALSE
;
}
else
{
// check if there's only one type of ceffects
auto
peffect
=
clit
.
triggering_effect
;
auto
playerid
=
clit
.
triggering_player
;
int32
ceffect_unique_id
=
0
;
for
(
int32
i
=
0
;
i
<
clit
.
required_handorset_effects
.
size
();
++
i
)
{
pduel
->
lua
->
add_param
(
peffect
,
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
playerid
,
PARAM_TYPE_INT
);
auto
id
=
clit
.
required_handorset_effects
[
i
]
->
get_value
(
2
);
if
(
id
)
{
if
(
!
ceffect_unique_id
)
{
ceffect_unique_id
=
id
;
}
else
if
(
ceffect_unique_id
!=
id
)
{
// there are more than one types, so we can't skip
ceffect_unique_id
=
0
;
break
;
}
}
}
if
(
ceffect_unique_id
)
{
// all ceffects are the same type, so skip asking
returns
.
ivalue
[
0
]
=
0
;
return
FALSE
;
}
}
core
.
select_options
.
clear
();
for
(
int32
i
=
0
;
i
<
clit
.
required_handorset_effects
.
size
();
++
i
)
{
...
...
@@ -4173,6 +4197,7 @@ int32 field::add_chain(uint16 step) {
pduel
->
write_buffer32
(
ceffect
->
description
);
}
if
(
ceffect
->
cost
)
{
pduel
->
lua
->
add_param
(
clit
.
triggering_effect
,
PARAM_TYPE_EFFECT
);
core
.
sub_solving_event
.
push_back
(
clit
.
evt
);
add_process
(
PROCESSOR_EXECUTE_COST
,
0
,
ceffect
,
0
,
clit
.
triggering_player
,
0
);
}
...
...
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