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
265b6baa
Commit
265b6baa
authored
Nov 28, 2014
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
bfd953f4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
54 additions
and
26 deletions
+54
-26
ocgcore/processor.cpp
ocgcore/processor.cpp
+40
-7
script/c20426907.lua
script/c20426907.lua
+6
-9
script/c49919798.lua
script/c49919798.lua
+1
-1
script/c94432298.lua
script/c94432298.lua
+6
-9
script/constant.lua
script/constant.lua
+1
-0
No files found.
ocgcore/processor.cpp
View file @
265b6baa
...
...
@@ -5045,7 +5045,7 @@ int32 field::adjust_step(uint16 step) {
}
case
8
:
{
if
(
core
.
selfdes_disabled
)
{
core
.
units
.
begin
()
->
step
=
9
;
core
.
units
.
begin
()
->
step
=
10
;
return
FALSE
;
}
//self destroy
...
...
@@ -5081,6 +5081,39 @@ int32 field::adjust_step(uint16 step) {
return
FALSE
;
}
case
9
:
{
if
(
returns
.
ivalue
[
0
]
>
0
)
core
.
re_adjust
=
TRUE
;
//self tograve
uint8
tp
=
infos
.
turn_player
;
effect
*
peffect
;
card_set
tograve_set
;
for
(
uint8
p
=
0
;
p
<
2
;
++
p
)
{
for
(
uint8
i
=
0
;
i
<
5
;
++
i
)
{
card
*
pcard
=
player
[
tp
].
list_mzone
[
i
];
if
(
pcard
&&
pcard
->
is_position
(
POS_FACEUP
)
&&
(
peffect
=
pcard
->
is_affected_by_effect
(
EFFECT_SELF_TOGRAVE
)))
{
tograve_set
.
insert
(
pcard
);
pcard
->
current
.
reason_effect
=
peffect
;
pcard
->
current
.
reason_player
=
peffect
->
get_handler_player
();
}
}
for
(
uint8
i
=
0
;
i
<
8
;
++
i
)
{
card
*
pcard
=
player
[
tp
].
list_szone
[
i
];
if
(
pcard
&&
pcard
->
is_position
(
POS_FACEUP
)
&&
(
peffect
=
pcard
->
is_affected_by_effect
(
EFFECT_SELF_TOGRAVE
)))
{
tograve_set
.
insert
(
pcard
);
pcard
->
current
.
reason_effect
=
peffect
;
pcard
->
current
.
reason_player
=
peffect
->
get_handler_player
();
}
}
tp
=
1
-
tp
;
}
if
(
tograve_set
.
size
())
{
send_to
(
&
tograve_set
,
0
,
REASON_RULE
,
PLAYER_NONE
,
PLAYER_NONE
,
LOCATION_GRAVE
,
0
,
POS_FACEUP
);
}
else
{
returns
.
ivalue
[
0
]
=
0
;
}
return
FALSE
;
}
case
10
:
{
if
(
returns
.
ivalue
[
0
]
>
0
)
core
.
re_adjust
=
TRUE
;
//equip check
...
...
@@ -5101,7 +5134,7 @@ int32 field::adjust_step(uint16 step) {
}
return
FALSE
;
}
case
1
0
:
{
case
1
1
:
{
//position
uint32
tp
=
infos
.
turn_player
,
pos
;
card
*
pcard
;
...
...
@@ -5139,7 +5172,7 @@ int32 field::adjust_step(uint16 step) {
}
return
FALSE
;
}
case
1
1
:
{
case
1
2
:
{
//shuffle check
for
(
uint32
i
=
0
;
i
<
player
[
0
].
list_hand
.
size
();
++
i
)
{
card
*
pcard
=
player
[
0
].
list_hand
[
i
];
...
...
@@ -5161,7 +5194,7 @@ int32 field::adjust_step(uint16 step) {
shuffle
(
1
-
infos
.
turn_player
,
LOCATION_HAND
);
return
FALSE
;
}
case
1
2
:
{
case
1
3
:
{
//reverse_deck && remove brainwashing
effect_set
eset
;
uint32
res
=
0
;
...
...
@@ -5218,19 +5251,19 @@ int32 field::adjust_step(uint16 step) {
}
return
FALSE
;
}
case
1
3
:
{
case
1
4
:
{
//attack cancel
card
*
attacker
=
core
.
attacker
;
if
(
attacker
&&
attacker
->
is_affected_by_effect
(
EFFECT_CANNOT_ATTACK
))
attacker
->
set_status
(
STATUS_ATTACK_CANCELED
,
TRUE
);
return
FALSE
;
}
case
1
4
:
{
case
1
5
:
{
raise_event
((
card
*
)
0
,
EVENT_ADJUST
,
0
,
0
,
PLAYER_NONE
,
PLAYER_NONE
,
0
);
process_instant_event
();
return
FALSE
;
}
case
1
5
:
{
case
1
6
:
{
if
(
core
.
re_adjust
)
{
core
.
units
.
begin
()
->
step
=
-
1
;
return
FALSE
;
...
...
script/c20426907.lua
View file @
265b6baa
...
...
@@ -32,11 +32,11 @@ function c20426907.initial_effect(c)
c
:
RegisterEffect
(
e4
)
--tograve
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_
FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e5
:
Set
Code
(
EVENT_ADJUST
)
e5
:
SetType
(
EFFECT_TYPE_
SINGLE
)
e5
:
Set
Property
(
EFFECT_FLAG_SINGLE_RANGE
)
e5
:
SetRange
(
LOCATION_SZONE
)
e5
:
SetCode
(
EFFECT_SELF_TOGRAVE
)
e5
:
SetCondition
(
c20426907
.
sdcon
)
e5
:
SetOperation
(
c20426907
.
sdop
)
c
:
RegisterEffect
(
e5
)
end
function
c20426907
.
filter
(
c
)
...
...
@@ -84,7 +84,7 @@ function c20426907.distg3(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
c20426907
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
c20426907
.
sdcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
then
return
end
if
c20426907
.
sdcon
(
e
)
then
return
end
if
e
:
GetLabel
()
==
0
or
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
):
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
local
tc
=
g
:
GetFirst
()
...
...
@@ -116,9 +116,6 @@ end
function
c20426907
.
sdfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xaa
)
and
not
c
:
IsCode
(
20426907
)
end
function
c20426907
.
sdcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
not
Duel
.
IsExistingMatchingCard
(
c20426907
.
sdfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
function
c20426907
.
sdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_EFFECT
)
function
c20426907
.
sdcon
(
e
)
return
not
Duel
.
IsExistingMatchingCard
(
c20426907
.
sdfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
script/c49919798.lua
View file @
265b6baa
...
...
@@ -44,7 +44,7 @@ function c49919798.thop(e,tp,eg,ep,ev,re,r,rp)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
function
c49919798
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c49919798
.
c
pc
ost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
GetFlagEffect
(
49919798
)
==
0
end
e
:
GetHandler
():
RegisterFlagEffect
(
49919798
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
...
...
script/c94432298.lua
View file @
265b6baa
...
...
@@ -22,11 +22,11 @@ function c94432298.initial_effect(c)
c
:
RegisterEffect
(
e2
)
--tograve
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_
FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
Set
Code
(
EVENT_ADJUST
)
e3
:
SetType
(
EFFECT_TYPE_
SINGLE
)
e3
:
Set
Property
(
EFFECT_FLAG_SINGLE_RANGE
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetCode
(
EFFECT_SELF_TOGRAVE
)
e3
:
SetCondition
(
c94432298
.
sdcon
)
e3
:
SetOperation
(
c94432298
.
sdop
)
c
:
RegisterEffect
(
e3
)
end
function
c94432298
.
tgtg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
...
...
@@ -56,7 +56,7 @@ function c94432298.tgtg2(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c94432298
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
c94432298
.
sdcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
then
return
end
if
c94432298
.
sdcon
(
e
)
then
return
end
if
e
:
GetHandler
():
GetFlagEffect
(
94432298
)
==
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c94432298
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
2
,
nil
)
...
...
@@ -67,9 +67,6 @@ end
function
c94432298
.
sdfilter
(
c
)
return
c
:
IsFacedown
()
or
not
c
:
IsSetCard
(
0xbb
)
end
function
c94432298
.
sdcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
c94432298
.
sdfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
c94432298
.
sdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_EFFECT
)
function
c94432298
.
sdcon
(
e
)
return
Duel
.
IsExistingMatchingCard
(
c94432298
.
sdfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_MZONE
,
0
,
1
,
nil
)
end
script/constant.lua
View file @
265b6baa
...
...
@@ -380,6 +380,7 @@ EFFECT_UPDATE_RSCALE =136 --改变右刻度
EFFECT_CHANGE_RSCALE
=
137
--设置右刻度
EFFECT_SET_POSITION
=
140
--改变表示形式
EFFECT_SELF_DESTROY
=
141
--自灭(罪系列等)
EFFECT_SELF_TOGRAVE
=
142
--
EFFECT_DOUBLE_TRIBUTE
=
150
--可以作为2个祭品
EFFECT_DECREASE_TRIBUTE
=
151
--减少祭品
EFFECT_DECREASE_TRIBUTE_SET
=
152
--减少放置怪兽的祭品
...
...
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