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
赤子奈落
ygopro
Commits
5f68c7aa
Commit
5f68c7aa
authored
May 31, 2015
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
f8d30af4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
13 deletions
+23
-13
ocgcore/libcard.cpp
ocgcore/libcard.cpp
+19
-7
script/c12247206.lua
script/c12247206.lua
+2
-3
script/c75141056.lua
script/c75141056.lua
+2
-3
No files found.
ocgcore/libcard.cpp
View file @
5f68c7aa
...
@@ -18,8 +18,12 @@ int32 scriptlib::card_get_code(lua_State *L) {
...
@@ -18,8 +18,12 @@ int32 scriptlib::card_get_code(lua_State *L) {
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
lua_pushinteger
(
L
,
pcard
->
get_code
());
lua_pushinteger
(
L
,
pcard
->
get_code
());
lua_pushinteger
(
L
,
pcard
->
get_another_code
());
uint32
otcode
=
pcard
->
get_another_code
();
return
2
;
if
(
otcode
)
{
lua_pushinteger
(
L
,
otcode
);
return
2
;
}
return
1
;
}
}
int32
scriptlib
::
card_get_origin_code
(
lua_State
*
L
)
{
int32
scriptlib
::
card_get_origin_code
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param_count
(
L
,
1
);
...
@@ -444,12 +448,20 @@ int32 scriptlib::card_is_code(lua_State *L) {
...
@@ -444,12 +448,20 @@ int32 scriptlib::card_is_code(lua_State *L) {
check_param_count
(
L
,
2
);
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
uint32
tcode
=
lua_tointeger
(
L
,
2
);
uint32
code1
=
pcard
->
get_code
(
);
uint32
code2
=
pcard
->
get_another_code
();
uint32
code2
=
pcard
->
get_another_code
();
if
(
pcard
->
get_code
()
==
tcode
||
(
code2
&&
code2
==
tcode
))
uint32
count
=
lua_gettop
(
L
)
-
1
;
lua_pushboolean
(
L
,
1
);
uint32
result
=
FALSE
;
else
for
(
uint32
i
=
0
;
i
<
count
;
++
i
)
{
lua_pushboolean
(
L
,
0
);
if
(
lua_isnil
(
L
,
i
+
2
))
continue
;
uint32
tcode
=
lua_tointeger
(
L
,
i
+
2
);
if
(
code1
==
tcode
||
(
code2
&&
code2
==
tcode
))
{
result
=
TRUE
;
break
;
}
}
lua_pushboolean
(
L
,
result
);
return
1
;
return
1
;
}
}
int32
scriptlib
::
card_is_type
(
lua_State
*
L
)
{
int32
scriptlib
::
card_is_type
(
lua_State
*
L
)
{
...
...
script/c12247206.lua
View file @
5f68c7aa
...
@@ -11,12 +11,11 @@ function c12247206.initial_effect(c)
...
@@ -11,12 +11,11 @@ function c12247206.initial_effect(c)
end
end
function
c12247206
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c12247206
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
eg
:
GetFirst
()
local
tc
=
eg
:
GetFirst
()
return
eg
:
GetCount
()
==
1
and
tc
:
IsLocation
(
LOCATION_MZONE
)
and
tc
:
IsControler
(
tp
)
and
tc
:
IsAttackBelow
(
1500
)
return
eg
:
GetCount
()
==
1
and
tc
:
IsLocation
(
LOCATION_MZONE
)
and
tc
:
IsControler
(
tp
)
and
tc
:
IsAttackBelow
(
1500
)
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
end
function
c12247206
.
nfilter
(
c
,
tc
)
function
c12247206
.
nfilter
(
c
,
tc
)
local
code1
,
code2
=
tc
:
GetCode
()
return
c
:
IsCode
(
tc
:
GetCode
())
return
c
:
IsCode
(
code1
)
or
c
:
IsCode
(
code2
)
end
end
function
c12247206
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c12247206
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
tc
=
eg
:
GetFirst
()
local
tc
=
eg
:
GetFirst
()
...
...
script/c75141056.lua
View file @
5f68c7aa
...
@@ -13,8 +13,7 @@ function c75141056.tgfilter(c)
...
@@ -13,8 +13,7 @@ function c75141056.tgfilter(c)
return
c
:
IsFaceup
()
and
Duel
.
IsExistingMatchingCard
(
c75141056
.
cfilter
,
c
:
GetControler
(),
LOCATION_DECK
,
0
,
1
,
nil
,
c
)
return
c
:
IsFaceup
()
and
Duel
.
IsExistingMatchingCard
(
c75141056
.
cfilter
,
c
:
GetControler
(),
LOCATION_DECK
,
0
,
1
,
nil
,
c
)
end
end
function
c75141056
.
cfilter
(
c
,
tc
)
function
c75141056
.
cfilter
(
c
,
tc
)
local
code1
,
code2
=
tc
:
GetCode
()
return
c
:
IsSetCard
(
0x3008
)
and
not
c
:
IsCode
(
tc
:
GetCode
())
and
c
:
IsAbleToGrave
()
return
c
:
IsSetCard
(
0x3008
)
and
not
c
:
IsCode
(
code1
)
and
not
c
:
IsCode
(
code2
)
and
c
:
IsAbleToGrave
()
end
end
function
c75141056
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c75141056
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c75141056
.
tgfilter
(
chkc
)
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c75141056
.
tgfilter
(
chkc
)
end
...
@@ -36,7 +35,7 @@ function c75141056.activate(e,tp,eg,ep,ev,re,r,rp)
...
@@ -36,7 +35,7 @@ function c75141056.activate(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetValue
(
gc
:
GetCode
())
e1
:
SetValue
(
gc
:
GetCode
())
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterEffect
(
e1
)
end
end
elseif
IsPlayerCanDiscardDeck
(
tp
,
1
)
then
elseif
Duel
.
IsPlayerCanDiscardDeck
(
tp
,
1
)
then
local
cg
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_DECK
,
0
)
local
cg
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_DECK
,
0
)
Duel
.
ConfirmCards
(
1
-
tp
,
cg
)
Duel
.
ConfirmCards
(
1
-
tp
,
cg
)
Duel
.
ConfirmCards
(
tp
,
cg
)
Duel
.
ConfirmCards
(
tp
,
cg
)
...
...
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