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
bfd953f4
Commit
bfd953f4
authored
Nov 27, 2014
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
f05ed8d8
Changes
17
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
63 additions
and
34 deletions
+63
-34
ocgcore/card.cpp
ocgcore/card.cpp
+4
-2
ocgcore/card.h
ocgcore/card.h
+1
-1
ocgcore/libcard.cpp
ocgcore/libcard.cpp
+5
-2
ocgcore/libduel.cpp
ocgcore/libduel.cpp
+18
-8
script/c12525049.lua
script/c12525049.lua
+1
-0
script/c13647631.lua
script/c13647631.lua
+1
-1
script/c13683298.lua
script/c13683298.lua
+1
-1
script/c1516510.lua
script/c1516510.lua
+5
-3
script/c25704359.lua
script/c25704359.lua
+1
-1
script/c30312361.lua
script/c30312361.lua
+6
-1
script/c49032236.lua
script/c49032236.lua
+1
-1
script/c49919798.lua
script/c49919798.lua
+5
-0
script/c51194046.lua
script/c51194046.lua
+1
-0
script/c66127916.lua
script/c66127916.lua
+6
-6
script/c81210420.lua
script/c81210420.lua
+4
-4
script/c8437145.lua
script/c8437145.lua
+1
-1
script/c94432298.lua
script/c94432298.lua
+2
-2
No files found.
ocgcore/card.cpp
View file @
bfd953f4
...
...
@@ -2308,8 +2308,10 @@ int32 card::is_can_be_synchro_material(card* scard, card* tuner) {
return
FALSE
;
return
TRUE
;
}
int32
card
::
is_can_be_xyz_material
(
card
*
scard
)
{
if
(
data
.
type
&
(
TYPE_XYZ
|
TYPE_TOKEN
))
int32
card
::
is_can_be_xyz_material
(
card
*
scard
,
uint8
ignore_xyz
)
{
if
(
data
.
type
&
TYPE_TOKEN
)
return
FALSE
;
if
(
!
ignore_xyz
&&
(
data
.
type
&
TYPE_XYZ
))
return
FALSE
;
if
(
!
(
get_type
()
&
TYPE_MONSTER
))
return
FALSE
;
...
...
ocgcore/card.h
View file @
bfd953f4
...
...
@@ -246,7 +246,7 @@ public:
int32
is_capable_be_effect_target
(
effect
*
peffect
,
uint8
playerid
);
int32
is_can_be_fusion_material
(
uint8
ignore_mon
=
FALSE
);
int32
is_can_be_synchro_material
(
card
*
scard
,
card
*
tuner
=
0
);
int32
is_can_be_xyz_material
(
card
*
scard
);
int32
is_can_be_xyz_material
(
card
*
scard
,
uint8
ignore_xyz
=
FALSE
);
};
//Locations
...
...
ocgcore/libcard.cpp
View file @
bfd953f4
...
...
@@ -1793,11 +1793,14 @@ int32 scriptlib::card_is_can_be_xyz_material(lua_State *L) {
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
card
*
scard
=
0
;
if
(
lua_gettop
(
L
)
>=
2
)
{
if
(
lua_gettop
(
L
)
>=
2
&&
!
lua_isnil
(
L
,
2
)
)
{
check_param
(
L
,
PARAM_TYPE_CARD
,
2
);
scard
=
*
(
card
**
)
lua_touserdata
(
L
,
2
);
}
lua_pushboolean
(
L
,
pcard
->
is_can_be_xyz_material
(
scard
));
uint32
ign
=
FALSE
;
if
(
lua_gettop
(
L
)
>=
3
)
ign
=
lua_toboolean
(
L
,
3
);
lua_pushboolean
(
L
,
pcard
->
is_can_be_xyz_material
(
scard
,
ign
));
return
1
;
}
int32
scriptlib
::
card_check_fusion_material
(
lua_State
*
L
)
{
...
...
ocgcore/libduel.cpp
View file @
bfd953f4
...
...
@@ -11,6 +11,7 @@
#include "card.h"
#include "effect.h"
#include "group.h"
#include "ocgapi.h"
int32
scriptlib
::
duel_enable_global_flag
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
...
...
@@ -2884,15 +2885,24 @@ int32 scriptlib::duel_is_player_can_spsummon_monster(lua_State * L) {
lua_pushboolean
(
L
,
0
);
return
1
;
}
int32
code
=
lua_tointeger
(
L
,
2
);
card_data
dat
;
dat
.
code
=
lua_tointeger
(
L
,
2
);
::
read_card
(
code
,
&
dat
);
dat
.
code
=
code
;
dat
.
alias
=
0
;
if
(
!
lua_isnil
(
L
,
3
))
dat
.
setcode
=
lua_tointeger
(
L
,
3
);
if
(
!
lua_isnil
(
L
,
4
))
dat
.
type
=
lua_tointeger
(
L
,
4
);
if
(
!
lua_isnil
(
L
,
5
))
dat
.
attack
=
lua_tointeger
(
L
,
5
);
if
(
!
lua_isnil
(
L
,
6
))
dat
.
defence
=
lua_tointeger
(
L
,
6
);
if
(
!
lua_isnil
(
L
,
7
))
dat
.
level
=
lua_tointeger
(
L
,
7
);
if
(
!
lua_isnil
(
L
,
8
))
dat
.
race
=
lua_tointeger
(
L
,
8
);
if
(
!
lua_isnil
(
L
,
9
))
dat
.
attribute
=
lua_tointeger
(
L
,
9
);
int32
pos
=
POS_FACEUP
;
int32
toplayer
=
playerid
;
...
...
script/c12525049.lua
View file @
bfd953f4
...
...
@@ -42,6 +42,7 @@ function c12525049.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c12525049
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12525049
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
...
...
script/c13647631.lua
View file @
bfd953f4
...
...
@@ -49,7 +49,7 @@ function c13647631.spop(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_BASE_ATTACK
)
e1
:
SetValue
(
atk
/
2
)
e1
:
SetReset
(
RESET_EVENT
+
0x1ff0000
+
RESET_PHASE
+
RESET_END
)
e1
:
SetReset
(
RESET_EVENT
+
0x1ff0000
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_SET_BASE_DEFENCE
)
...
...
script/c13683298.lua
View file @
bfd953f4
...
...
@@ -4,7 +4,7 @@ function c13683298.initial_effect(c)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetProperty
(
EFFECT_FLAG_D
AMAGE_STEP
+
EFFECT_FLAG_D
ELAY
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCondition
(
c13683298
.
condition
)
e1
:
SetCost
(
c13683298
.
cost
)
...
...
script/c1516510.lua
View file @
bfd953f4
...
...
@@ -19,9 +19,11 @@ 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
(
)
g1
=
Group
.
FromCards
(
gc
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
g2
=
eg
:
FilterSelect
(
tp
,
Card
.
IsRace
,
1
,
1
,
nil
,
RACE_SPELLCASTER
)
Duel
.
SetFusionMaterial
(
g2
)
g1
:
Merge
(
g2
)
else
local
sg1
=
Group
.
CreateGroup
()
local
sg2
=
Group
.
CreateGroup
()
...
...
@@ -57,9 +59,9 @@ function c1516510.fsop(e,tp,eg,ep,ev,re,r,rp,gc,chkf)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
g2
=
sg2
:
Select
(
tp
,
1
,
1
,
g1
:
GetFirst
())
end
end
g1
:
Merge
(
g2
)
Duel
.
SetFusionMaterial
(
g1
)
end
local
c
=
e
:
GetHandler
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
...
...
script/c25704359.lua
View file @
bfd953f4
...
...
@@ -64,7 +64,7 @@ function c25704359.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if
chk
==
0
then
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
false
end
local
g
=
eg
:
Filter
(
c25704359
.
cfilter
,
nil
,
tp
)
local
att
=
0
local
att
=
0
x7f
local
tc
=
g
:
GetFirst
()
while
tc
do
att
=
bit
.
band
(
att
,
tc
:
GetOriginalAttribute
())
...
...
script/c30312361.lua
View file @
bfd953f4
...
...
@@ -8,6 +8,7 @@ function c30312361.initial_effect(c)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCountLimit
(
1
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCost
(
c30312361
.
cost
)
e1
:
SetTarget
(
c30312361
.
target
)
e1
:
SetOperation
(
c30312361
.
operation
)
c
:
RegisterEffect
(
e1
)
...
...
@@ -17,8 +18,12 @@ function c30312361.initial_effect(c)
e2
:
SetCode
(
EFFECT_NO_BATTLE_DAMAGE
)
c
:
RegisterEffect
(
e2
)
end
function
c30312361
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
GetFlagEffect
(
30312361
)
==
0
end
e
:
GetHandler
():
RegisterFlagEffect
(
30312361
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
function
c30312361
.
filter
(
c
)
return
c
:
IsType
(
TYPE_EFFECT
)
and
not
c
:
Is
HasEffect
(
EFFECT_FORBIDDEN
)
and
c
:
IsAbleToRemove
()
return
c
:
IsType
(
TYPE_EFFECT
)
and
not
c
:
Is
Forbidden
(
)
and
c
:
IsAbleToRemove
()
end
function
c30312361
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c30312361
.
filter
(
chkc
)
end
...
...
script/c49032236.lua
View file @
bfd953f4
...
...
@@ -39,5 +39,5 @@ function c49032236.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
function
c49032236
.
efilter
(
e
,
re
)
return
e
:
GetHandler
()
~=
re
:
Get
Handl
er
()
return
e
:
GetHandler
()
~=
re
:
Get
Own
er
()
end
script/c49919798.lua
View file @
bfd953f4
...
...
@@ -14,6 +14,7 @@ function c49919798.initial_effect(c)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCost
(
c49919798
.
cpcost
)
e2
:
SetTarget
(
c49919798
.
cptg
)
e2
:
SetOperation
(
c49919798
.
cpop
)
c
:
RegisterEffect
(
e2
)
...
...
@@ -43,6 +44,10 @@ 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
)
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
function
c49919798
.
cpfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x66
)
and
not
c
:
IsCode
(
49919798
)
end
...
...
script/c51194046.lua
View file @
bfd953f4
...
...
@@ -78,5 +78,6 @@ function c51194046.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
c51194046
[
tp
])
end
function
c51194046
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
Duel
.
Draw
(
tp
,
c51194046
[
tp
],
REASON_EFFECT
)
end
script/c66127916.lua
View file @
bfd953f4
...
...
@@ -35,13 +35,13 @@ function c66127916.activate(e,tp,eg,ep,ev,re,r,rp)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
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
local
tg
=
Duel
.
GetMatchingGroup
(
c66127916
.
filter3
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
if
tg
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
66127916
,
0
))
then
Duel
.
BreakEffect
()
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
sg
=
tg
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
sg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
end
end
end
script/c81210420.lua
View file @
bfd953f4
...
...
@@ -17,19 +17,19 @@ end
function
c81210420
.
filter
(
c
)
return
not
c
:
IsType
(
TYPE_TOKEN
)
end
function
c81210420
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
c
:
GetCode
(),
0
,
0x11
,
0
,
0
,
0
,
0
,
0
)
function
c81210420
.
spfilter
(
c
,
tp
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
c
:
GetCode
(),
nil
,
0x11
,
0
,
0
,
0
,
0
,
0
)
end
function
c81210420
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c81210420
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
1
and
Duel
.
IsExistingMatchingCard
(
c81210420
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
2
,
nil
,
e
,
tp
)
and
Duel
.
IsExistingMatchingCard
(
c81210420
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
2
,
nil
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
2
,
tp
,
LOCATION_DECK
)
end
function
c81210420
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<
2
then
return
end
local
g
=
Duel
.
GetMatchingGroup
(
c81210420
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
,
e
,
tp
)
local
g
=
Duel
.
GetMatchingGroup
(
c81210420
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
,
tp
)
if
g
:
GetCount
()
<
2
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
c81210420
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
):
GetFirst
()
...
...
script/c8437145.lua
View file @
bfd953f4
...
...
@@ -42,7 +42,7 @@ function c8437145.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
function
c8437145
.
efilter
(
e
,
re
)
return
e
:
GetOwnerPlayer
()
~=
re
:
Get
Handl
erPlayer
()
return
e
:
GetOwnerPlayer
()
~=
re
:
Get
Own
erPlayer
()
end
function
c8437145
.
repfilter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsControler
(
tp
)
and
c
:
IsLocation
(
LOCATION_MZONE
)
...
...
script/c94432298.lua
View file @
bfd953f4
...
...
@@ -35,7 +35,7 @@ function c94432298.tgtg1(e,tp,eg,ep,ev,re,r,rp,chk)
and
Duel
.
IsExistingMatchingCard
(
c94432298
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
94432298
,
0
))
then
e
:
SetCategory
(
CATEGORY_TOGRAVE
)
e
:
GetHandler
():
RegisterFlagEffect
(
94432298
,
RESET_PHASE
+
RESET_END
,
0
,
1
)
e
:
GetHandler
():
RegisterFlagEffect
(
94432298
,
RESET_
EVENT
+
0x1fe0000
+
RESET_
PHASE
+
RESET_END
,
0
,
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_DECK
)
else
e
:
SetCategory
(
0
)
...
...
@@ -46,7 +46,7 @@ function c94432298.tgcon(e,tp,eg,ep,ev,re,r,rp)
end
function
c94432298
.
tgcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
GetFlagEffect
(
94432298
)
==
0
end
e
:
GetHandler
():
RegisterFlagEffect
(
94432298
,
RESET_PHASE
+
RESET_END
,
0
,
1
)
e
:
GetHandler
():
RegisterFlagEffect
(
94432298
,
RESET_
EVENT
+
0x1fe0000
+
RESET_
PHASE
+
RESET_END
,
0
,
1
)
end
function
c94432298
.
filter
(
c
)
return
c
:
IsSetCard
(
0xbb
)
and
c
:
IsAbleToGrave
()
...
...
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