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
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
Commits
a3274347
Commit
a3274347
authored
Aug 12, 2014
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
d70fa6e2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
5 deletions
+18
-5
ocgcore/card.cpp
ocgcore/card.cpp
+12
-2
ocgcore/card.h
ocgcore/card.h
+1
-1
ocgcore/operations.cpp
ocgcore/operations.cpp
+4
-2
script/c41440148.lua
script/c41440148.lua
+1
-0
No files found.
ocgcore/card.cpp
View file @
a3274347
...
...
@@ -1444,7 +1444,7 @@ int32 card::filter_summon_procedure(uint8 playerid, effect_set* peset, uint8 ign
peset
->
add_item
(
eset
[
i
]);
if
(
!
pduel
->
game_field
->
is_player_can_summon
(
SUMMON_TYPE_NORMAL
,
playerid
,
this
))
return
FALSE
;
int32
rcount
=
get_summon_tribute_count
();
int32
rcount
=
get_summon_tribute_count
(
ignore_count
);
int32
min
=
rcount
&
0xffff
,
max
=
(
rcount
>>
16
)
&
0xffff
;
if
(
min
>
0
&&
!
pduel
->
game_field
->
is_player_can_summon
(
SUMMON_TYPE_ADVANCE
,
playerid
,
this
))
return
FALSE
;
...
...
@@ -1713,7 +1713,7 @@ int32 card::is_can_be_summoned(uint8 playerid, uint8 ignore_count, effect* peffe
pduel
->
game_field
->
restore_lp_cost
();
return
TRUE
;
}
int32
card
::
get_summon_tribute_count
()
{
int32
card
::
get_summon_tribute_count
(
uint8
ignore_count
)
{
int32
min
=
0
,
max
=
0
;
int32
minul
=
0
,
maxul
=
0
;
int32
level
=
get_level
();
...
...
@@ -1739,6 +1739,16 @@ int32 card::get_summon_tribute_count() {
}
min
-=
minul
;
max
-=
maxul
;
int32
playerid
=
current
.
controler
;
if
(
!
ignore_count
&&
!
pduel
->
game_field
->
core
.
extra_summon
[
playerid
]
&&
pduel
->
game_field
->
core
.
summon_count
[
playerid
]
>=
pduel
->
game_field
->
get_summon_count_limit
(
playerid
))
{
effect
*
pextra
=
is_affected_by_effect
(
EFFECT_EXTRA_SUMMON_COUNT
);
if
(
pextra
&&
!
(
pextra
->
flag
&
EFFECT_FLAG_FUNC_VALUE
))
{
int32
count
=
pextra
->
get_value
();
if
(
min
<
count
)
min
=
count
;
}
}
if
(
min
<
0
)
min
=
0
;
if
(
max
<
min
)
max
=
min
;
return
min
+
(
max
<<
16
);
...
...
ocgcore/card.h
View file @
a3274347
...
...
@@ -212,7 +212,7 @@ public:
int32
is_summonable
();
int32
is_summonable
(
effect
*
peffect
);
int32
is_can_be_summoned
(
uint8
playerid
,
uint8
ingore_count
,
effect
*
peffect
);
int32
get_summon_tribute_count
();
int32
get_summon_tribute_count
(
uint8
ignore_count
=
0
);
int32
get_set_tribute_count
();
int32
is_can_be_flip_summoned
(
uint8
playerid
);
int32
is_special_summonable
(
uint8
playerid
);
...
...
ocgcore/operations.cpp
View file @
a3274347
...
...
@@ -1304,8 +1304,10 @@ int32 field::summon(uint16 step, uint8 sumplayer, card * target, effect * proc,
effect
*
pextra
=
core
.
extra_summon
[
sumplayer
]
?
0
:
target
->
is_affected_by_effect
(
EFFECT_EXTRA_SUMMON_COUNT
);
if
(
pextra
)
{
core
.
temp_var
[
0
]
=
(
ptr
)
pextra
;
if(
pextra->value
&& (core.summon_count[sumplayer] < get_summon_count_limit(sumplayer)))
if
(
(
pextra
->
flag
&
EFFECT_FLAG_FUNC_VALUE
)
&&
(
core
.
summon_count
[
sumplayer
]
<
get_summon_count_limit
(
sumplayer
)))
add_process
(
PROCESSOR_SELECT_YESNO
,
0
,
0
,
0
,
sumplayer
,
91
);
else
if
(
!
(
pextra
->
flag
&
EFFECT_FLAG_FUNC_VALUE
)
&&
target
->
material_cards
.
size
()
<
pextra
->
get_value
())
core
.
temp_var
[
0
]
=
0
;
else
returns
.
ivalue
[
0
]
=
TRUE
;
}
...
...
@@ -1356,7 +1358,7 @@ int32 field::summon(uint16 step, uint8 sumplayer, card * target, effect * proc,
effect
*
pextra
=
core
.
extra_summon
[
sumplayer
]
?
0
:
target
->
is_affected_by_effect
(
EFFECT_EXTRA_SUMMON_COUNT
);
if
(
pextra
)
{
core
.
temp_var
[
0
]
=
(
ptr
)
pextra
;
if(
pextra->value
&& (core.summon_count[sumplayer] < get_summon_count_limit(sumplayer)))
if
(
(
pextra
->
flag
&
EFFECT_FLAG_FUNC_VALUE
)
&&
(
core
.
summon_count
[
sumplayer
]
<
get_summon_count_limit
(
sumplayer
)))
add_process
(
PROCESSOR_SELECT_YESNO
,
0
,
0
,
0
,
sumplayer
,
91
);
else
returns
.
ivalue
[
0
]
=
TRUE
;
...
...
script/c41440148.lua
View file @
a3274347
...
...
@@ -14,6 +14,7 @@ function c41440148.sumop(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetTargetRange
(
LOCATION_HAND
,
0
)
e1
:
SetCode
(
EFFECT_EXTRA_SUMMON_COUNT
)
e1
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsLevelAbove
,
7
))
e1
:
SetValue
(
0x1
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterFlagEffect
(
tp
,
41440148
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
...
...
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