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
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
Commits
e628a914
Commit
e628a914
authored
Nov 21, 2014
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
cee83257
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
72 additions
and
25 deletions
+72
-25
ocgcore/libcard.cpp
ocgcore/libcard.cpp
+8
-4
script/c12338068.lua
script/c12338068.lua
+3
-2
script/c1516510.lua
script/c1516510.lua
+46
-4
script/c21698716.lua
script/c21698716.lua
+1
-1
script/c32710364.lua
script/c32710364.lua
+1
-1
script/c32933942.lua
script/c32933942.lua
+1
-1
script/c34822850.lua
script/c34822850.lua
+1
-1
script/c36776089.lua
script/c36776089.lua
+2
-2
script/c4130270.lua
script/c4130270.lua
+1
-1
script/c60004971.lua
script/c60004971.lua
+2
-2
script/c66127916.lua
script/c66127916.lua
+1
-1
script/c68215963.lua
script/c68215963.lua
+1
-1
script/c69937550.lua
script/c69937550.lua
+1
-1
script/c7093411.lua
script/c7093411.lua
+1
-1
script/c81210420.lua
script/c81210420.lua
+1
-1
script/c95600067.lua
script/c95600067.lua
+1
-1
No files found.
ocgcore/libcard.cpp
View file @
e628a914
...
...
@@ -1521,7 +1521,8 @@ int32 scriptlib::card_is_level_below(lua_State *L) {
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
uint32
lvl
=
lua_tointeger
(
L
,
2
);
if
((
pcard
->
data
.
type
&
TYPE_XYZ
)
||
(
pcard
->
status
&
STATUS_NO_LEVEL
))
if
((
pcard
->
data
.
type
&
TYPE_XYZ
)
||
(
pcard
->
status
&
STATUS_NO_LEVEL
)
||
(
!
(
pcard
->
data
.
type
&
TYPE_MONSTER
)
&&
!
(
pcard
->
current
.
location
&
LOCATION_MZONE
)))
lua_pushboolean
(
L
,
0
);
else
lua_pushboolean
(
L
,
pcard
->
get_level
()
<=
lvl
);
...
...
@@ -1532,7 +1533,8 @@ int32 scriptlib::card_is_level_above(lua_State *L) {
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
uint32
lvl
=
lua_tointeger
(
L
,
2
);
if
((
pcard
->
data
.
type
&
TYPE_XYZ
)
||
(
pcard
->
status
&
STATUS_NO_LEVEL
))
if
((
pcard
->
data
.
type
&
TYPE_XYZ
)
||
(
pcard
->
status
&
STATUS_NO_LEVEL
)
||
(
!
(
pcard
->
data
.
type
&
TYPE_MONSTER
)
&&
!
(
pcard
->
current
.
location
&
LOCATION_MZONE
)))
lua_pushboolean
(
L
,
0
);
else
lua_pushboolean
(
L
,
pcard
->
get_level
()
>=
lvl
);
...
...
@@ -1543,7 +1545,8 @@ int32 scriptlib::card_is_rank_below(lua_State *L) {
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
uint32
rnk
=
lua_tointeger
(
L
,
2
);
if
(
!
(
pcard
->
data
.
type
&
TYPE_XYZ
)
||
(
pcard
->
status
&
STATUS_NO_LEVEL
))
if
(
!
(
pcard
->
data
.
type
&
TYPE_XYZ
)
||
(
pcard
->
status
&
STATUS_NO_LEVEL
)
||
(
!
(
pcard
->
data
.
type
&
TYPE_MONSTER
)
&&
!
(
pcard
->
current
.
location
&
LOCATION_MZONE
)))
lua_pushboolean
(
L
,
0
);
else
lua_pushboolean
(
L
,
pcard
->
get_rank
()
<=
rnk
);
...
...
@@ -1554,7 +1557,8 @@ int32 scriptlib::card_is_rank_above(lua_State *L) {
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
uint32
rnk
=
lua_tointeger
(
L
,
2
);
if
(
!
(
pcard
->
data
.
type
&
TYPE_XYZ
)
||
(
pcard
->
status
&
STATUS_NO_LEVEL
))
if
(
!
(
pcard
->
data
.
type
&
TYPE_XYZ
)
||
(
pcard
->
status
&
STATUS_NO_LEVEL
)
||
(
!
(
pcard
->
data
.
type
&
TYPE_MONSTER
)
&&
!
(
pcard
->
current
.
location
&
LOCATION_MZONE
)))
lua_pushboolean
(
L
,
0
);
else
lua_pushboolean
(
L
,
pcard
->
get_rank
()
>=
rnk
);
...
...
script/c12338068.lua
View file @
e628a914
...
...
@@ -35,8 +35,9 @@ function c12338068.spop(e,tp,eg,ep,ev,re,r,rp,c)
local
atk
=
0
local
tc
=
g
:
GetFirst
()
while
tc
do
if
atk
>
0
then
atk
=
atk
+
tc
:
GetBaseAttack
()
local
batk
=
tc
:
GetBaseAttack
()
if
batk
>
0
then
atk
=
atk
+
batk
end
tc
=
g
:
GetNext
()
end
...
...
script/c1516510.lua
View file @
e628a914
...
...
@@ -7,17 +7,59 @@ function c1516510.initial_effect(c)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_FUSION_MATERIAL
)
e1
:
SetCondition
(
aux
.
FConditionCodeFun
(
16178681
,
aux
.
FilterBoolFunction
(
Card
.
IsRace
,
RACE_SPELLCASTER
),
1
,
true
,
false
))
e1
:
SetOperation
(
c1516510
.
fsop
2
)
e1
:
SetOperation
(
c1516510
.
fsop
)
c
:
RegisterEffect
(
e1
)
end
c1516510
.
material_count
=
1
c1516510
.
material
=
{
16178681
}
c1516510
.
fsop1
=
aux
.
FOperationCodeFun
(
16178681
,
aux
.
FilterBoolFunction
(
Card
.
IsRace
,
RACE_SPELLCASTER
),
1
,
true
,
false
)
function
c1516510
.
imfilter
(
c
)
return
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
GetSummonType
()
==
SUMMON_TYPE_PENDULUM
end
function
c1516510
.
fsop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
gc
,
chkf
)
c1516510
.
fsop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
gc
,
chkf
)
function
c1516510
.
fsop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
gc
,
chkf
)
local
g1
=
nil
local
g2
=
nil
if
gc
then
g1
=
Group
.
CreateGroup
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
g2
=
eg
:
FilterSelect
(
tp
,
Card
.
IsRace
,
1
,
1
,
nil
,
RACE_SPELLCASTER
)
else
local
sg1
=
Group
.
CreateGroup
()
local
sg2
=
Group
.
CreateGroup
()
local
fs
=
false
local
tc
=
eg
:
GetFirst
()
while
tc
do
if
tc
:
IsCode
(
16178681
)
or
tc
:
IsHasEffect
(
EFFECT_FUSION_SUBSTITUTE
)
then
sg1
:
AddCard
(
tc
)
end
if
tc
:
IsRace
(
RACE_SPELLCASTER
)
then
sg2
:
AddCard
(
tc
)
if
aux
.
FConditionCheckF
(
tc
,
chkf
)
then
fs
=
true
end
end
tc
=
eg
:
GetNext
()
end
if
sg2
:
GetCount
()
==
1
then
sg1
:
Sub
(
sg2
)
end
if
chkf
~=
PLAYER_NONE
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
if
fs
then
g1
=
sg1
:
Select
(
tp
,
1
,
1
,
nil
)
else
g1
=
sg1
:
FilterSelect
(
tp
,
aux
.
FConditionCheckF
,
1
,
1
,
nil
,
chkf
)
end
local
tc1
=
g1
:
GetFirst
()
sg2
:
RemoveCard
(
tc1
)
if
aux
.
FConditionCheckF
(
tc1
,
chkf
)
or
sg2
:
GetCount
()
==
1
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
g2
=
sg2
:
Select
(
tp
,
1
,
1
,
tc1
)
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
g2
=
sg2
:
FilterSelect
(
tp
,
aux
.
FConditionCheckF
,
1
,
1
,
tc1
,
chkf
)
end
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
g1
=
sg1
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
g2
=
sg2
:
Select
(
tp
,
1
,
1
,
g1
:
GetFirst
())
end
end
g1
:
Merge
(
g2
)
Duel
.
SetFusionMaterial
(
g1
)
local
c
=
e
:
GetHandler
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
...
...
script/c21698716.lua
View file @
e628a914
...
...
@@ -33,7 +33,7 @@ function c21698716.repop(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1
f
c0000
)
e1
:
SetReset
(
RESET_EVENT
+
0x1
7
c0000
)
e1
:
SetValue
(
TYPE_SPELL
+
TYPE_CONTINUOUS
)
c
:
RegisterEffect
(
e1
)
Duel
.
RaiseEvent
(
c
,
47408488
,
e
,
0
,
tp
,
0
,
0
)
...
...
script/c32710364.lua
View file @
e628a914
...
...
@@ -32,7 +32,7 @@ function c32710364.repop(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1
f
c0000
)
e1
:
SetReset
(
RESET_EVENT
+
0x1
7
c0000
)
e1
:
SetValue
(
TYPE_SPELL
+
TYPE_CONTINUOUS
)
c
:
RegisterEffect
(
e1
)
Duel
.
RaiseEvent
(
c
,
47408488
,
e
,
0
,
tp
,
0
,
0
)
...
...
script/c32933942.lua
View file @
e628a914
...
...
@@ -35,7 +35,7 @@ function c32933942.repop(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1
f
c0000
)
e1
:
SetReset
(
RESET_EVENT
+
0x1
7
c0000
)
e1
:
SetValue
(
TYPE_SPELL
+
TYPE_CONTINUOUS
)
c
:
RegisterEffect
(
e1
)
Duel
.
RaiseEvent
(
c
,
47408488
,
e
,
0
,
tp
,
0
,
0
)
...
...
script/c34822850.lua
View file @
e628a914
...
...
@@ -20,7 +20,7 @@ function c34822850.initial_effect(c)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetRange
(
LOCATION_FZONE
)
e3
:
SetTargetRange
(
LOCATION_HAND
,
0
)
e3
:
SetTargetRange
(
LOCATION_HAND
+
LOCATION_GRAVE
,
0
)
e3
:
SetTarget
(
c34822850
.
efftg
)
e3
:
SetCode
(
34822850
)
c
:
RegisterEffect
(
e3
)
...
...
script/c36776089.lua
View file @
e628a914
...
...
@@ -37,10 +37,10 @@ function c36776089.retcost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function
c36776089
.
rettg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
e
:
Get
LabelObjec
t
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
e
:
Get
Handler
():
GetBattleTarge
t
(),
1
,
0
,
0
)
end
function
c36776089
.
retop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
bc
=
e
:
Get
LabelObjec
t
()
local
bc
=
e
:
Get
Handler
():
GetBattleTarge
t
()
if
bc
:
IsRelateToBattle
()
then
Duel
.
SendtoHand
(
bc
,
nil
,
REASON_EFFECT
)
end
...
...
script/c4130270.lua
View file @
e628a914
...
...
@@ -4,7 +4,7 @@ function c4130270.initial_effect(c)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_TO_DECK
)
e1
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_
IGNORE_IMMUNE
+
EFFECT_FLAG_
SET_AVAILABLE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetTargetRange
(
LOCATION_ONFIELD
,
LOCATION_ONFIELD
)
c
:
RegisterEffect
(
e1
)
...
...
script/c60004971.lua
View file @
e628a914
...
...
@@ -80,13 +80,13 @@ function c60004971.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60004971
.
eqfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
tc
=
g
:
GetFirst
()
if
not
tc
or
not
Duel
.
Equip
(
tp
,
tc
,
ec
)
then
return
end
if
not
tc
or
not
Duel
.
Equip
(
tp
,
tc
,
ec
,
true
)
then
return
end
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetValue
(
c60004971
.
eqlimit2
)
e1
:
SetLabelObject
(
t
c
)
e1
:
SetLabelObject
(
e
c
)
tc
:
RegisterEffect
(
e1
)
end
end
...
...
script/c66127916.lua
View file @
e628a914
...
...
@@ -36,7 +36,7 @@ function c66127916.activate(e,tp,eg,ep,ev,re,r,rp)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
tg
=
Duel
.
SelectMatchingCard
(
c66127916
.
filter3
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
c66127916
.
filter3
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
local
tc
=
tg
:
GetFirst
()
if
tc
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
66127916
,
0
))
then
Duel
.
BreakEffect
()
...
...
script/c68215963.lua
View file @
e628a914
...
...
@@ -33,7 +33,7 @@ function c68215963.repop(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1
f
c0000
)
e1
:
SetReset
(
RESET_EVENT
+
0x1
7
c0000
)
e1
:
SetValue
(
TYPE_SPELL
+
TYPE_CONTINUOUS
)
c
:
RegisterEffect
(
e1
)
Duel
.
RaiseEvent
(
c
,
47408488
,
e
,
0
,
tp
,
0
,
0
)
...
...
script/c69937550.lua
View file @
e628a914
...
...
@@ -31,7 +31,7 @@ function c69937550.repop(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1
f
c0000
)
e1
:
SetReset
(
RESET_EVENT
+
0x1
7
c0000
)
e1
:
SetValue
(
TYPE_SPELL
+
TYPE_CONTINUOUS
)
c
:
RegisterEffect
(
e1
)
Duel
.
RaiseEvent
(
c
,
47408488
,
e
,
0
,
tp
,
0
,
0
)
...
...
script/c7093411.lua
View file @
e628a914
...
...
@@ -37,7 +37,7 @@ function c7093411.repop(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1
f
c0000
)
e1
:
SetReset
(
RESET_EVENT
+
0x1
7
c0000
)
e1
:
SetValue
(
TYPE_SPELL
+
TYPE_CONTINUOUS
)
c
:
RegisterEffect
(
e1
)
Duel
.
RaiseEvent
(
c
,
47408488
,
e
,
0
,
tp
,
0
,
0
)
...
...
script/c81210420.lua
View file @
e628a914
...
...
@@ -68,7 +68,7 @@ function c81210420.activate(e,tp,eg,ep,ev,re,r,rp)
e5
:
SetCode
(
EFFECT_SET_BASE_DEFENCE
)
e5
:
SetValue
(
0
)
tg
:
RegisterEffect
(
e5
,
true
)
tg
:
SetStatus
(
STATUS_NO_LEVEL
)
tg
:
SetStatus
(
STATUS_NO_LEVEL
,
true
)
tg
=
sg
:
GetNext
()
end
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
true
,
false
,
POS_FACEDOWN_DEFENCE
)
...
...
script/c95600067.lua
View file @
e628a914
...
...
@@ -31,7 +31,7 @@ function c95600067.repop(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1
f
c0000
)
e1
:
SetReset
(
RESET_EVENT
+
0x1
7
c0000
)
e1
:
SetValue
(
TYPE_SPELL
+
TYPE_CONTINUOUS
)
c
:
RegisterEffect
(
e1
)
Duel
.
RaiseEvent
(
c
,
47408488
,
e
,
0
,
tp
,
0
,
0
)
...
...
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