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
2c8ce759
Commit
2c8ce759
authored
Jul 03, 2015
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
ef046e2c
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
28 additions
and
13 deletions
+28
-13
ocgcore/field.cpp
ocgcore/field.cpp
+9
-0
ocgcore/field.h
ocgcore/field.h
+1
-0
ocgcore/libduel.cpp
ocgcore/libduel.cpp
+10
-5
script/c22404675.lua
script/c22404675.lua
+3
-3
script/c23740893.lua
script/c23740893.lua
+1
-1
script/c53485634.lua
script/c53485634.lua
+1
-1
script/c9126351.lua
script/c9126351.lua
+3
-3
No files found.
ocgcore/field.cpp
View file @
2c8ce759
...
@@ -1941,6 +1941,15 @@ int32 field::is_player_can_discard_hand(uint8 playerid, card * pcard, effect * p
...
@@ -1941,6 +1941,15 @@ int32 field::is_player_can_discard_hand(uint8 playerid, card * pcard, effect * p
}
}
return
TRUE
;
return
TRUE
;
}
}
int32
field
::
is_player_can_summon
(
uint8
playerid
)
{
effect_set
eset
;
filter_player_effect
(
playerid
,
EFFECT_CANNOT_SUMMON
,
&
eset
);
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
if
(
!
eset
[
i
]
->
target
)
return
FALSE
;
}
return
TRUE
;
}
int32
field
::
is_player_can_summon
(
uint32
sumtype
,
uint8
playerid
,
card
*
pcard
)
{
int32
field
::
is_player_can_summon
(
uint32
sumtype
,
uint8
playerid
,
card
*
pcard
)
{
effect_set
eset
;
effect_set
eset
;
sumtype
|=
SUMMON_TYPE_NORMAL
;
sumtype
|=
SUMMON_TYPE_NORMAL
;
...
...
ocgcore/field.h
View file @
2c8ce759
...
@@ -390,6 +390,7 @@ public:
...
@@ -390,6 +390,7 @@ public:
int32
is_player_can_discard_deck
(
uint8
playerid
,
int32
count
);
int32
is_player_can_discard_deck
(
uint8
playerid
,
int32
count
);
int32
is_player_can_discard_deck_as_cost
(
uint8
playerid
,
int32
count
);
int32
is_player_can_discard_deck_as_cost
(
uint8
playerid
,
int32
count
);
int32
is_player_can_discard_hand
(
uint8
playerid
,
card
*
pcard
,
effect
*
peffect
,
uint32
reason
);
int32
is_player_can_discard_hand
(
uint8
playerid
,
card
*
pcard
,
effect
*
peffect
,
uint32
reason
);
int32
is_player_can_summon
(
uint8
playerid
);
int32
is_player_can_summon
(
uint32
sumtype
,
uint8
playerid
,
card
*
pcard
);
int32
is_player_can_summon
(
uint32
sumtype
,
uint8
playerid
,
card
*
pcard
);
int32
is_player_can_mset
(
uint32
sumtype
,
uint8
playerid
,
card
*
pcard
);
int32
is_player_can_mset
(
uint32
sumtype
,
uint8
playerid
,
card
*
pcard
);
int32
is_player_can_sset
(
uint8
playerid
,
card
*
pcard
);
int32
is_player_can_sset
(
uint8
playerid
,
card
*
pcard
);
...
...
ocgcore/libduel.cpp
View file @
2c8ce759
...
@@ -2833,17 +2833,22 @@ int32 scriptlib::duel_is_player_can_discard_deck_as_cost(lua_State * L) {
...
@@ -2833,17 +2833,22 @@ int32 scriptlib::duel_is_player_can_discard_deck_as_cost(lua_State * L) {
return
1
;
return
1
;
}
}
int32
scriptlib
::
duel_is_player_can_summon
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_is_player_can_summon
(
lua_State
*
L
)
{
check_param_count
(
L
,
3
);
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
3
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
3
);
int32
playerid
=
lua_tointeger
(
L
,
1
);
int32
playerid
=
lua_tointeger
(
L
,
1
);
int32
sumtype
=
lua_tointeger
(
L
,
2
);
if
(
playerid
!=
0
&&
playerid
!=
1
)
{
if
(
playerid
!=
0
&&
playerid
!=
1
)
{
lua_pushboolean
(
L
,
0
);
lua_pushboolean
(
L
,
0
);
return
1
;
return
1
;
}
}
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
lua_pushboolean
(
L
,
pduel
->
game_field
->
is_player_can_summon
(
sumtype
,
playerid
,
pcard
));
if
(
lua_gettop
(
L
)
==
1
)
lua_pushboolean
(
L
,
pduel
->
game_field
->
is_player_can_summon
(
playerid
));
else
{
check_param_count
(
L
,
3
);
check_param
(
L
,
PARAM_TYPE_CARD
,
3
);
int32
sumtype
=
lua_tointeger
(
L
,
2
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
3
);
lua_pushboolean
(
L
,
pduel
->
game_field
->
is_player_can_summon
(
sumtype
,
playerid
,
pcard
));
}
return
1
;
return
1
;
}
}
int32
scriptlib
::
duel_is_player_can_spsummon
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_is_player_can_spsummon
(
lua_State
*
L
)
{
...
...
script/c22404675.lua
View file @
2c8ce759
...
@@ -16,7 +16,7 @@ function c22404675.initial_effect(c)
...
@@ -16,7 +16,7 @@ function c22404675.initial_effect(c)
e2
:
SetCode
(
EVENT_RELEASE
)
e2
:
SetCode
(
EVENT_RELEASE
)
e2
:
SetCountLimit
(
1
,
22404676
)
e2
:
SetCountLimit
(
1
,
22404676
)
e2
:
SetCondition
(
c22404675
.
sumcon
)
e2
:
SetCondition
(
c22404675
.
sumcon
)
e2
:
SetTarget
(
c2240467
6
.
sumtg
)
e2
:
SetTarget
(
c2240467
5
.
sumtg
)
e2
:
SetOperation
(
c22404675
.
sumop
)
e2
:
SetOperation
(
c22404675
.
sumop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
...
@@ -58,8 +58,8 @@ end
...
@@ -58,8 +58,8 @@ end
function
c22404675
.
sumcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c22404675
.
sumcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsReason
(
REASON_SUMMON
)
return
e
:
GetHandler
():
IsReason
(
REASON_SUMMON
)
end
end
function
c2240467
6
.
sumtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c2240467
5
.
sumtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
not
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_CANNOT_SUMMON
)
end
if
chk
==
0
then
return
Duel
.
IsPlayerCanSummon
(
tp
)
end
end
end
function
c22404675
.
sumop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c22404675
.
sumop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetFlagEffect
(
tp
,
22404675
)
~=
0
then
return
end
if
Duel
.
GetFlagEffect
(
tp
,
22404675
)
~=
0
then
return
end
...
...
script/c23740893.lua
View file @
2c8ce759
...
@@ -45,7 +45,7 @@ function c23740893.sumcost(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -45,7 +45,7 @@ function c23740893.sumcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
REASON_COST
)
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
REASON_COST
)
end
end
function
c23740893
.
sumtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c23740893
.
sumtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
not
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_CANNOT_SUMMON
)
end
if
chk
==
0
then
return
Duel
.
IsPlayerCanSummon
(
tp
)
end
end
end
function
c23740893
.
sumop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c23740893
.
sumop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetFlagEffect
(
tp
,
23740893
)
~=
0
then
return
end
if
Duel
.
GetFlagEffect
(
tp
,
23740893
)
~=
0
then
return
end
...
...
script/c53485634.lua
View file @
2c8ce759
...
@@ -73,7 +73,7 @@ function c53485634.sumcost(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -73,7 +73,7 @@ function c53485634.sumcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
Release
(
e
:
GetHandler
(),
REASON_COST
)
Duel
.
Release
(
e
:
GetHandler
(),
REASON_COST
)
end
end
function
c53485634
.
sumtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c53485634
.
sumtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
not
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_CANNOT_SUMMON
)
end
if
chk
==
0
then
return
Duel
.
IsPlayerCanSummon
(
tp
)
end
end
end
function
c53485634
.
sumop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c53485634
.
sumop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
...
...
script/c9126351.lua
View file @
2c8ce759
...
@@ -30,7 +30,7 @@ function c9126351.initial_effect(c)
...
@@ -30,7 +30,7 @@ function c9126351.initial_effect(c)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetCountLimit
(
1
)
e5
:
SetCountLimit
(
1
)
e5
:
SetCost
(
c9126351
.
excost
)
e5
:
SetCost
(
c9126351
.
excost
)
e
2
:
SetTarget
(
c9126352
.
extg
)
e
5
:
SetTarget
(
c9126351
.
extg
)
e5
:
SetOperation
(
c9126351
.
exop
)
e5
:
SetOperation
(
c9126351
.
exop
)
c
:
RegisterEffect
(
e5
)
c
:
RegisterEffect
(
e5
)
end
end
...
@@ -69,8 +69,8 @@ function c9126351.excost(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -69,8 +69,8 @@ function c9126351.excost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_COST
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_COST
)
Duel
.
RegisterFlagEffect
(
tp
,
9126352
,
RESET_PHASE
+
PHASE_END
,
EFFECT_FLAG_OATH
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
9126352
,
RESET_PHASE
+
PHASE_END
,
EFFECT_FLAG_OATH
,
1
)
end
end
function
c912635
2
.
extg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c912635
1
.
extg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
not
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_CANNOT_SUMMON
)
end
if
chk
==
0
then
return
Duel
.
IsPlayerCanSummon
(
tp
)
end
end
end
function
c9126351
.
exop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c9126351
.
exop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
...
...
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