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
313897fd
Commit
313897fd
authored
Apr 02, 2015
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
2cb873b4
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
27 additions
and
14 deletions
+27
-14
ocgcore/operations.cpp
ocgcore/operations.cpp
+4
-2
script/c17021204.lua
script/c17021204.lua
+4
-1
script/c36318200.lua
script/c36318200.lua
+4
-1
script/c45458027.lua
script/c45458027.lua
+4
-1
script/c64973456.lua
script/c64973456.lua
+4
-1
script/c72580321.lua
script/c72580321.lua
+4
-1
script/c76224717.lua
script/c76224717.lua
+1
-5
script/utility.lua
script/utility.lua
+2
-2
No files found.
ocgcore/operations.cpp
View file @
313897fd
...
@@ -2505,7 +2505,8 @@ int32 field::destroy(uint16 step, group * targets, effect * reason_effect, uint3
...
@@ -2505,7 +2505,8 @@ int32 field::destroy(uint16 step, group * targets, effect * reason_effect, uint3
if
(
pcard
->
is_destructable
()
&&
pcard
->
is_affect_by_effect
(
pcard
->
current
.
reason_effect
))
{
if
(
pcard
->
is_destructable
()
&&
pcard
->
is_affect_by_effect
(
pcard
->
current
.
reason_effect
))
{
effect
*
indestructable_effect
=
pcard
->
check_indestructable_by_effect
(
pcard
->
current
.
reason_effect
,
reason_player
);
effect
*
indestructable_effect
=
pcard
->
check_indestructable_by_effect
(
pcard
->
current
.
reason_effect
,
reason_player
);
if
(
indestructable_effect
)
{
if
(
indestructable_effect
)
{
indestructable_effect_set
.
insert
(
indestructable_effect
);
if
(
reason_player
!=
5
)
indestructable_effect_set
.
insert
(
indestructable_effect
);
is_destructable
=
false
;
is_destructable
=
false
;
}
}
}
else
}
else
...
@@ -2527,7 +2528,8 @@ int32 field::destroy(uint16 step, group * targets, effect * reason_effect, uint3
...
@@ -2527,7 +2528,8 @@ int32 field::destroy(uint16 step, group * targets, effect * reason_effect, uint3
pduel
->
lua
->
add_param
(
pcard
->
current
.
reason_player
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
pcard
->
current
.
reason_player
,
PARAM_TYPE_INT
);
if
(
eset
[
i
]
->
check_value_condition
(
3
))
{
if
(
eset
[
i
]
->
check_value_condition
(
3
))
{
eset
[
i
]
->
dec_count
();
eset
[
i
]
->
dec_count
();
indestructable_effect_set
.
insert
(
eset
[
i
]);
if
(
reason_player
!=
5
)
indestructable_effect_set
.
insert
(
eset
[
i
]);
is_destructable
=
false
;
is_destructable
=
false
;
break
;
break
;
}
}
...
...
script/c17021204.lua
View file @
313897fd
...
@@ -13,9 +13,12 @@ end
...
@@ -13,9 +13,12 @@ end
function
c17021204
.
spfilter
(
c
)
function
c17021204
.
spfilter
(
c
)
return
c
:
IsPosition
(
POS_FACEUP_DEFENCE
)
and
c
:
IsAbleToGraveAsCost
()
return
c
:
IsPosition
(
POS_FACEUP_DEFENCE
)
and
c
:
IsAbleToGraveAsCost
()
end
end
function
c17021204
.
cfilter
(
c
)
return
c
:
GetRace
()
~=
RACE_INSECT
end
function
c17021204
.
check
(
tp
)
function
c17021204
.
check
(
tp
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsType
,
tp
,
LOCATION_GRAVE
,
0
,
nil
,
TYPE_MONSTER
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsType
,
tp
,
LOCATION_GRAVE
,
0
,
nil
,
TYPE_MONSTER
)
return
g
:
GetCount
()
~=
0
and
not
g
:
IsExists
(
Card
.
IsRace
,
1
,
nil
,
0xfffffff
-
RACE_INSECT
)
return
g
:
GetCount
()
~=
0
and
not
g
:
IsExists
(
c17021204
.
cfilter
,
1
,
nil
)
end
end
function
c17021204
.
spcon
(
e
,
c
)
function
c17021204
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
if
c
==
nil
then
return
true
end
...
...
script/c36318200.lua
View file @
313897fd
...
@@ -12,9 +12,12 @@ function c36318200.initial_effect(c)
...
@@ -12,9 +12,12 @@ function c36318200.initial_effect(c)
e1
:
SetOperation
(
c36318200
.
spop
)
e1
:
SetOperation
(
c36318200
.
spop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
c36318200
.
cfilter
(
c
)
return
c
:
GetRace
()
~=
RACE_BEAST
end
function
c36318200
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c36318200
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsType
,
tp
,
LOCATION_GRAVE
,
0
,
nil
,
TYPE_MONSTER
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsType
,
tp
,
LOCATION_GRAVE
,
0
,
nil
,
TYPE_MONSTER
)
return
g
:
GetCount
()
>
0
and
not
g
:
IsExists
(
Card
.
IsRace
,
1
,
nil
,
0xfffffff
-
RACE_BEAST
)
return
g
:
GetCount
()
>
0
and
not
g
:
IsExists
(
c36318200
.
cfilter
,
1
,
nil
)
end
end
function
c36318200
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c36318200
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsReleasable
()
end
if
chk
==
0
then
return
e
:
GetHandler
():
IsReleasable
()
end
...
...
script/c45458027.lua
View file @
313897fd
...
@@ -21,12 +21,15 @@ function c45458027.initial_effect(c)
...
@@ -21,12 +21,15 @@ function c45458027.initial_effect(c)
e2
:
SetOperation
(
c45458027
.
operation
)
e2
:
SetOperation
(
c45458027
.
operation
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c45458027
.
cfilter
(
c
)
return
c
:
GetRace
()
~=
RACE_MACHINE
end
function
c45458027
.
spcon
(
e
,
c
)
function
c45458027
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
tp
=
c
:
GetControler
()
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
false
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
false
end
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsType
,
tp
,
LOCATION_GRAVE
,
0
,
nil
,
TYPE_MONSTER
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsType
,
tp
,
LOCATION_GRAVE
,
0
,
nil
,
TYPE_MONSTER
)
return
g
:
GetCount
()
>
0
and
not
g
:
IsExists
(
Card
.
IsRace
,
1
,
nil
,
0xffffff
-
RACE_MACHINE
)
return
g
:
GetCount
()
>
0
and
not
g
:
IsExists
(
c45458027
.
cfilter
,
1
,
nil
)
end
end
function
c45458027
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c45458027
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
1
-
tp
)
and
chkc
:
IsFaceup
()
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
end
if
chkc
then
return
chkc
:
IsControler
(
1
-
tp
)
and
chkc
:
IsFaceup
()
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
end
...
...
script/c64973456.lua
View file @
313897fd
...
@@ -11,8 +11,11 @@ function c64973456.initial_effect(c)
...
@@ -11,8 +11,11 @@ function c64973456.initial_effect(c)
e1
:
SetOperation
(
c64973456
.
activate
)
e1
:
SetOperation
(
c64973456
.
activate
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
c64973456
.
cfilter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
GetRace
()
~=
RACE_REPTILE
end
function
c64973456
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c64973456
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
not
Duel
.
IsExistingMatchingCard
(
Card
.
IsRace
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
0xf7ffff
)
return
not
Duel
.
IsExistingMatchingCard
(
c64973456
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
end
function
c64973456
.
filter
(
c
,
e
,
tp
)
function
c64973456
.
filter
(
c
,
e
,
tp
)
return
not
c
:
IsType
(
TYPE_TUNER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
not
c
:
IsType
(
TYPE_TUNER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
...
...
script/c72580321.lua
View file @
313897fd
...
@@ -13,9 +13,12 @@ function c72580321.initial_effect(c)
...
@@ -13,9 +13,12 @@ function c72580321.initial_effect(c)
e1
:
SetOperation
(
c72580321
.
spop
)
e1
:
SetOperation
(
c72580321
.
spop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
c72580321
.
cfilter
(
c
)
return
c
:
GetAttribute
()
~=
ATTRIBUTE_EARTH
end
function
c72580321
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c72580321
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsType
,
tp
,
LOCATION_GRAVE
,
0
,
nil
,
TYPE_MONSTER
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsType
,
tp
,
LOCATION_GRAVE
,
0
,
nil
,
TYPE_MONSTER
)
return
g
:
GetCount
()
>
0
and
not
g
:
IsExists
(
Card
.
IsAttribute
,
1
,
nil
,
0xffff
-
ATTRIBUTE_EARTH
)
return
g
:
GetCount
()
>
0
and
not
g
:
IsExists
(
c72580321
.
cfilter
,
1
,
nil
)
end
end
function
c72580321
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c72580321
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsReleasable
()
end
if
chk
==
0
then
return
e
:
GetHandler
():
IsReleasable
()
end
...
...
script/c76224717.lua
View file @
313897fd
...
@@ -8,6 +8,7 @@ function c76224717.initial_effect(c)
...
@@ -8,6 +8,7 @@ function c76224717.initial_effect(c)
--destroy/draw/salvage
--destroy/draw/salvage
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
76224717
,
0
))
e2
:
SetDescription
(
aux
.
Stringid
(
76224717
,
0
))
e2
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_DRAW
+
CATEGORY_TOHAND
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e2
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetRange
(
LOCATION_SZONE
)
...
@@ -57,21 +58,16 @@ function c76224717.target(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -57,21 +58,16 @@ function c76224717.target(e,tp,eg,ep,ev,re,r,rp,chk)
local
b2
=
c76224717
[
tp
]
>
1
and
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
local
b2
=
c76224717
[
tp
]
>
1
and
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
local
b3
=
c76224717
[
tp
]
>
2
and
Duel
.
IsExistingMatchingCard
(
c76224717
.
filter2
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
local
b3
=
c76224717
[
tp
]
>
2
and
Duel
.
IsExistingMatchingCard
(
c76224717
.
filter2
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
if
chk
==
0
then
return
b1
or
b2
or
b3
end
if
chk
==
0
then
return
b1
or
b2
or
b3
end
local
cat
=
0
if
b1
then
if
b1
then
cat
=
cat
+
CATEGORY_DESTROY
local
g
=
Duel
.
GetMatchingGroup
(
c76224717
.
filter1
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
c76224717
.
filter1
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
end
end
if
b2
then
if
b2
then
cat
=
cat
+
CATEGORY_DRAW
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
end
if
b3
then
if
b3
then
cat
=
cat
+
CATEGORY_TOHAND
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
end
end
e
:
SetCategory
(
cat
)
end
end
function
c76224717
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c76224717
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
...
...
script/utility.lua
View file @
313897fd
...
@@ -685,14 +685,14 @@ function Auxiliary.FOperationCodeFun(code,f,cc,sub,insf)
...
@@ -685,14 +685,14 @@ function Auxiliary.FOperationCodeFun(code,f,cc,sub,insf)
sg1
:
Sub
(
sg2
)
sg1
:
Sub
(
sg2
)
end
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
local
g1
=
sg1
:
Select
(
tp
,
1
,
1
,
nil
)
local
g1
=
sg1
:
Select
(
tp
,
1
,
1
,
gc
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
local
g2
=
sg2
:
Select
(
tp
,
cc
-
1
,
cc
-
1
,
g1
:
GetFirst
())
local
g2
=
sg2
:
Select
(
tp
,
cc
-
1
,
cc
-
1
,
g1
:
GetFirst
())
g1
:
Merge
(
g2
)
g1
:
Merge
(
g2
)
Duel
.
SetFusionMaterial
(
g1
)
Duel
.
SetFusionMaterial
(
g1
)
else
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
local
g1
=
sg1
:
Select
(
tp
,
1
,
1
,
nil
)
local
g1
=
sg1
:
Select
(
tp
,
1
,
1
,
gc
)
Duel
.
SetFusionMaterial
(
g1
)
Duel
.
SetFusionMaterial
(
g1
)
end
end
end
end
...
...
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