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
wyykak
ygopro
Commits
221e59a7
Commit
221e59a7
authored
Feb 15, 2013
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
0554c3f1
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
26 additions
and
13 deletions
+26
-13
ocgcore/card.cpp
ocgcore/card.cpp
+9
-1
ocgcore/operations.cpp
ocgcore/operations.cpp
+2
-2
script/c10449150.lua
script/c10449150.lua
+1
-1
script/c42548470.lua
script/c42548470.lua
+2
-2
script/c49398568.lua
script/c49398568.lua
+1
-0
script/c54974237.lua
script/c54974237.lua
+8
-4
script/c68396778.lua
script/c68396778.lua
+3
-3
No files found.
ocgcore/card.cpp
View file @
221e59a7
...
...
@@ -349,7 +349,7 @@ int32 card::get_attack(uint8 swap) {
int32
card
::
get_base_defence
(
uint8
swap
)
{
if
(
current
.
location
!=
LOCATION_MZONE
)
return
data
.
defence
;
if
(
temp
.
base_
attack
!=
-
1
)
if
(
temp
.
base_
defence
!=
-
1
)
return
temp
.
base_defence
;
if
(
!
swap
&&
is_affected_by_effect
(
EFFECT_SWAP_BASE_AD
))
return
get_base_attack
(
TRUE
);
...
...
@@ -1274,6 +1274,8 @@ int32 card::filter_summon_procedure(uint8 playerid, effect_set* peset, uint8 ign
int32
fcount
=
pduel
->
game_field
->
get_useable_count
(
current
.
controler
,
LOCATION_MZONE
,
current
.
controler
,
LOCATION_REASON_TOFIELD
);
if
(
max
<=
-
fcount
)
return
FALSE
;
if
(
min
<
-
fcount
+
1
)
min
=
-
fcount
+
1
;
if
(
min
==
0
)
return
TRUE
;
int32
m
=
pduel
->
game_field
->
get_summon_release_list
(
this
,
0
,
0
);
...
...
@@ -1309,6 +1311,8 @@ int32 card::filter_set_procedure(uint8 playerid, effect_set* peset, uint8 ignore
int32
fcount
=
pduel
->
game_field
->
get_useable_count
(
current
.
controler
,
LOCATION_MZONE
,
current
.
controler
,
LOCATION_REASON_TOFIELD
);
if
(
max
<=
-
fcount
)
return
FALSE
;
if
(
min
<
-
fcount
+
1
)
min
=
-
fcount
+
1
;
if
(
min
==
0
)
return
TRUE
;
int32
m
=
pduel
->
game_field
->
get_summon_release_list
(
this
,
0
,
0
);
...
...
@@ -1879,6 +1883,7 @@ int32 card::is_capable_cost_to_grave(uint8 playerid) {
return
FALSE
;
if
(
!
is_capable_send_to_grave
(
playerid
))
return
FALSE
;
operation_param
=
dest
<<
8
;
if
(
current
.
location
&
LOCATION_ONFIELD
)
redirect
=
leave_field_redirect
(
REASON_COST
)
&
0xffff
;
if
(
redirect
)
dest
=
redirect
;
...
...
@@ -1899,6 +1904,7 @@ int32 card::is_capable_cost_to_hand(uint8 playerid) {
return
FALSE
;
if
(
!
is_capable_send_to_hand
(
playerid
))
return
FALSE
;
operation_param
=
dest
<<
8
;
if
(
current
.
location
&
LOCATION_ONFIELD
)
redirect
=
leave_field_redirect
(
REASON_COST
)
&
0xffff
;
if
(
redirect
)
dest
=
redirect
;
...
...
@@ -1919,6 +1925,7 @@ int32 card::is_capable_cost_to_deck(uint8 playerid) {
return
FALSE
;
if
(
!
is_capable_send_to_deck
(
playerid
))
return
FALSE
;
operation_param
=
dest
<<
8
;
if
(
current
.
location
&
LOCATION_ONFIELD
)
redirect
=
leave_field_redirect
(
REASON_COST
)
&
0xffff
;
if
(
redirect
)
dest
=
redirect
;
...
...
@@ -1939,6 +1946,7 @@ int32 card::is_capable_cost_to_extra(uint8 playerid) {
return
FALSE
;
if
(
!
is_capable_send_to_deck
(
playerid
))
return
FALSE
;
operation_param
=
dest
<<
8
;
if
(
current
.
location
&
LOCATION_ONFIELD
)
redirect
=
leave_field_redirect
(
REASON_COST
)
&
0xffff
;
if
(
redirect
)
dest
=
redirect
;
...
...
ocgcore/operations.cpp
View file @
221e59a7
...
...
@@ -1178,7 +1178,7 @@ int32 field::summon(uint16 step, uint8 sumplayer, card * target, effect * proc,
}
else
{
if
(
min
<
-
fcount
+
1
)
{
min
=
-
fcount
+
1
;
required
=
min
+
(
max
>>
16
);
required
=
min
+
(
max
<<
16
);
}
add_process
(
PROCESSOR_SELECT_TRIBUTE
,
0
,
0
,
0
,
sumplayer
,
required
);
}
...
...
@@ -1706,7 +1706,7 @@ int32 field::mset(uint16 step, uint8 setplayer, card * target, effect * proc, ui
if
(
min
<
-
core
.
temp_var
[
1
]
+
1
)
{
min
=
-
core
.
temp_var
[
1
]
+
1
;
}
core
.
temp_var
[
0
]
=
min
+
(
max
>>
16
);
core
.
temp_var
[
0
]
=
min
+
(
max
<<
16
);
add_process
(
PROCESSOR_SELECT_TRIBUTE
,
0
,
0
,
0
,
setplayer
,
core
.
temp_var
[
0
]);
}
core
.
units
.
begin
()
->
step
=
2
;
...
...
script/c10449150.lua
View file @
221e59a7
...
...
@@ -39,7 +39,7 @@ end
function
c10449150
.
rmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
Remove
(
c
,
POS_FACEUP
,
REASON_EFFECT
)
~=
0
then
c
:
RegisterFlagEffect
(
10449150
,
RESET_EVENT
+
0x1fe0000
,
0
,
1
)
c
:
RegisterFlagEffect
(
10449150
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_STANDBY
+
RESET_SELF_TURN
,
0
,
1
)
end
end
function
c10449150
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c42548470.lua
View file @
221e59a7
...
...
@@ -41,7 +41,7 @@ function c42548470.activate(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CHANGE_LEVEL
)
e1
:
SetValue
(
lv1
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc2
:
RegisterEffect
(
e1
)
if
lv1
<
lv2
then
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
else
...
...
@@ -49,7 +49,7 @@ function c42548470.activate(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CHANGE_LEVEL
)
e1
:
SetValue
(
lv2
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc1
:
RegisterEffect
(
e1
)
if
lv2
<
lv1
then
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
end
...
...
script/c49398568.lua
View file @
221e59a7
...
...
@@ -18,6 +18,7 @@ function c49398568.cfilter(c)
end
function
c49398568
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
hg
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_HAND
,
0
)
hg
:
RemoveCard
(
e
:
GetHandler
())
if
chk
==
0
then
return
hg
:
GetCount
()
>
0
and
hg
:
FilterCount
(
c49398568
.
cfilter
,
nil
)
==
hg
:
GetCount
()
end
Duel
.
SendtoGrave
(
hg
,
REASON_COST
)
end
...
...
script/c54974237.lua
View file @
221e59a7
...
...
@@ -32,12 +32,16 @@ function c54974237.target(e,tp,eg,ep,ev,re,r,rp,chk)
local
g
=
Duel
.
GetMatchingGroup
(
c54974237
.
tgfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
,
ty
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
c54974237
.
cffilter
(
c
)
return
c
:
IsLocation
(
LOCATION_HAND
)
or
(
c
:
IsFacedown
()
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
))
end
function
c54974237
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ty
=
e
:
GetLabel
()
local
conf
=
Duel
.
GetFieldGroup
(
tp
,
0
,
LOCATION_ONFIELD
+
LOCATION_HAND
)
if
conf
:
GetCount
()
>
0
then
Duel
.
ConfirmCards
(
tp
,
conf
)
local
dg
=
conf
:
Filter
(
Card
.
IsType
,
nil
,
ty
)
local
g
=
Duel
.
GetFieldGroup
(
tp
,
0
,
LOCATION_ONFIELD
+
LOCATION_HAND
)
if
g
:
GetCount
()
>
0
then
local
cg
=
g
:
Filter
(
c54974237
.
cffilter
,
nil
)
Duel
.
ConfirmCards
(
tp
,
cg
)
local
dg
=
g
:
Filter
(
Card
.
IsType
,
nil
,
ty
)
Duel
.
Destroy
(
dg
,
REASON_EFFECT
)
Duel
.
ShuffleHand
(
1
-
tp
)
end
...
...
script/c68396778.lua
View file @
221e59a7
...
...
@@ -11,15 +11,15 @@ function c68396778.initial_effect(c)
c
:
RegisterEffect
(
e1
)
end
function
c68396778
.
filter
(
c
)
return
Duel
.
GetLocationCount
(
c
:
GetControler
(),
LOCATION_MZONE
)
>
0
and
bit
.
band
(
c
:
GetSummonType
(),
SUMMON_TYPE_SPECIAL
)
==
SUMMON_TYPE_SPECIAL
return
bit
.
band
(
c
:
GetSummonType
(),
SUMMON_TYPE_SPECIAL
)
==
SUMMON_TYPE_SPECIAL
end
function
c68396778
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsLevelBelow
(
4
)
and
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c68396778
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c68396778
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c68396778
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c68396778
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
c68396778
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c68396778
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
...
...
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