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
REIKAI
ygopro
Commits
dc8993f4
Commit
dc8993f4
authored
Jan 04, 2013
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
33f25c73
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
92 additions
and
40 deletions
+92
-40
gframe/data_manager.cpp
gframe/data_manager.cpp
+6
-0
gframe/deck_con.cpp
gframe/deck_con.cpp
+8
-6
gframe/deck_manager.cpp
gframe/deck_manager.cpp
+3
-2
gframe/deck_manager.h
gframe/deck_manager.h
+1
-1
gframe/game.cpp
gframe/game.cpp
+6
-3
ocgcore/card.cpp
ocgcore/card.cpp
+1
-1
script/c102380.lua
script/c102380.lua
+4
-1
script/c1281505.lua
script/c1281505.lua
+11
-3
script/c12958919.lua
script/c12958919.lua
+38
-8
script/c16111820.lua
script/c16111820.lua
+1
-1
script/c21843307.lua
script/c21843307.lua
+1
-1
script/c45985838.lua
script/c45985838.lua
+1
-1
script/c46668237.lua
script/c46668237.lua
+1
-1
script/c62279055.lua
script/c62279055.lua
+2
-4
script/c64335804.lua
script/c64335804.lua
+2
-1
script/c65303664.lua
script/c65303664.lua
+1
-1
script/c68450517.lua
script/c68450517.lua
+3
-2
script/c7165085.lua
script/c7165085.lua
+1
-1
script/c97170107.lua
script/c97170107.lua
+1
-2
No files found.
gframe/data_manager.cpp
View file @
dc8993f4
...
@@ -205,6 +205,8 @@ const wchar_t* DataManager::FormatAttribute(int attribute) {
...
@@ -205,6 +205,8 @@ const wchar_t* DataManager::FormatAttribute(int attribute) {
}
}
if
(
p
!=
attBuffer
)
if
(
p
!=
attBuffer
)
*
(
p
-
1
)
=
0
;
*
(
p
-
1
)
=
0
;
else
return
unknown_string
;
return
attBuffer
;
return
attBuffer
;
}
}
const
wchar_t
*
DataManager
::
FormatRace
(
int
race
)
{
const
wchar_t
*
DataManager
::
FormatRace
(
int
race
)
{
...
@@ -219,6 +221,8 @@ const wchar_t* DataManager::FormatRace(int race) {
...
@@ -219,6 +221,8 @@ const wchar_t* DataManager::FormatRace(int race) {
}
}
if
(
p
!=
racBuffer
)
if
(
p
!=
racBuffer
)
*
(
p
-
1
)
=
0
;
*
(
p
-
1
)
=
0
;
else
return
unknown_string
;
return
racBuffer
;
return
racBuffer
;
}
}
const
wchar_t
*
DataManager
::
FormatType
(
int
type
)
{
const
wchar_t
*
DataManager
::
FormatType
(
int
type
)
{
...
@@ -233,6 +237,8 @@ const wchar_t* DataManager::FormatType(int type) {
...
@@ -233,6 +237,8 @@ const wchar_t* DataManager::FormatType(int type) {
}
}
if
(
p
!=
tpBuffer
)
if
(
p
!=
tpBuffer
)
*
(
p
-
1
)
=
0
;
*
(
p
-
1
)
=
0
;
else
return
unknown_string
;
return
tpBuffer
;
return
tpBuffer
;
}
}
int
DataManager
::
CardReader
(
int
code
,
void
*
pData
)
{
int
DataManager
::
CardReader
(
int
code
,
void
*
pData
)
{
...
...
gframe/deck_con.cpp
View file @
dc8993f4
...
@@ -34,9 +34,10 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
...
@@ -34,9 +34,10 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
break
;
break
;
}
}
case
BUTTON_SAVE_DECK
:
{
case
BUTTON_SAVE_DECK
:
{
deckManager
.
SaveDeck
(
deckManager
.
current_deck
,
mainGame
->
cbDBDecks
->
getItem
(
mainGame
->
cbDBDecks
->
getSelected
()));
if
(
deckManager
.
SaveDeck
(
deckManager
.
current_deck
,
mainGame
->
cbDBDecks
->
getItem
(
mainGame
->
cbDBDecks
->
getSelected
())))
{
mainGame
->
stACMessage
->
setText
(
dataManager
.
GetSysString
(
1335
));
mainGame
->
stACMessage
->
setText
(
dataManager
.
GetSysString
(
1335
));
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
}
break
;
break
;
}
}
case
BUTTON_SAVE_DECK_AS
:
{
case
BUTTON_SAVE_DECK_AS
:
{
...
@@ -56,9 +57,10 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
...
@@ -56,9 +57,10 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
mainGame
->
cbDBDecks
->
addItem
(
dname
);
mainGame
->
cbDBDecks
->
addItem
(
dname
);
mainGame
->
cbDBDecks
->
setSelected
(
mainGame
->
cbDBDecks
->
getItemCount
()
-
1
);
mainGame
->
cbDBDecks
->
setSelected
(
mainGame
->
cbDBDecks
->
getItemCount
()
-
1
);
}
}
deckManager
.
SaveDeck
(
deckManager
.
current_deck
,
dname
);
if
(
deckManager
.
SaveDeck
(
deckManager
.
current_deck
,
dname
))
{
mainGame
->
stACMessage
->
setText
(
dataManager
.
GetSysString
(
1335
));
mainGame
->
stACMessage
->
setText
(
dataManager
.
GetSysString
(
1335
));
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
}
break
;
break
;
}
}
case
BUTTON_DBEXIT
:
{
case
BUTTON_DBEXIT
:
{
...
...
gframe/deck_manager.cpp
View file @
dc8993f4
...
@@ -206,7 +206,7 @@ bool DeckManager::LoadDeck(const wchar_t* file) {
...
@@ -206,7 +206,7 @@ bool DeckManager::LoadDeck(const wchar_t* file) {
LoadDeck
(
current_deck
,
cardlist
,
mainc
,
sidec
);
LoadDeck
(
current_deck
,
cardlist
,
mainc
,
sidec
);
return
true
;
return
true
;
}
}
void
DeckManager
::
SaveDeck
(
Deck
&
deck
,
const
wchar_t
*
name
)
{
bool
DeckManager
::
SaveDeck
(
Deck
&
deck
,
const
wchar_t
*
name
)
{
wchar_t
file
[
64
];
wchar_t
file
[
64
];
myswprintf
(
file
,
L"./deck/%ls.ydk"
,
name
);
myswprintf
(
file
,
L"./deck/%ls.ydk"
,
name
);
#ifdef WIN32
#ifdef WIN32
...
@@ -217,7 +217,7 @@ void DeckManager::SaveDeck(Deck& deck, const wchar_t* name) {
...
@@ -217,7 +217,7 @@ void DeckManager::SaveDeck(Deck& deck, const wchar_t* name) {
FILE
*
fp
=
fopen
(
filefn
,
"w"
);
FILE
*
fp
=
fopen
(
filefn
,
"w"
);
#endif
#endif
if
(
!
fp
)
if
(
!
fp
)
return
;
return
false
;
fprintf
(
fp
,
"#created by ...
\n
#main
\n
"
);
fprintf
(
fp
,
"#created by ...
\n
#main
\n
"
);
for
(
int
i
=
0
;
i
<
deck
.
main
.
size
();
++
i
)
for
(
int
i
=
0
;
i
<
deck
.
main
.
size
();
++
i
)
fprintf
(
fp
,
"%d
\n
"
,
deck
.
main
[
i
]
->
first
);
fprintf
(
fp
,
"%d
\n
"
,
deck
.
main
[
i
]
->
first
);
...
@@ -228,5 +228,6 @@ void DeckManager::SaveDeck(Deck& deck, const wchar_t* name) {
...
@@ -228,5 +228,6 @@ void DeckManager::SaveDeck(Deck& deck, const wchar_t* name) {
for
(
int
i
=
0
;
i
<
deck
.
side
.
size
();
++
i
)
for
(
int
i
=
0
;
i
<
deck
.
side
.
size
();
++
i
)
fprintf
(
fp
,
"%d
\n
"
,
deck
.
side
[
i
]
->
first
);
fprintf
(
fp
,
"%d
\n
"
,
deck
.
side
[
i
]
->
first
);
fclose
(
fp
);
fclose
(
fp
);
return
true
;
}
}
}
}
gframe/deck_manager.h
View file @
dc8993f4
...
@@ -41,7 +41,7 @@ public:
...
@@ -41,7 +41,7 @@ public:
void
LoadDeck
(
Deck
&
deck
,
int
*
dbuf
,
int
mainc
,
int
sidec
);
void
LoadDeck
(
Deck
&
deck
,
int
*
dbuf
,
int
mainc
,
int
sidec
);
bool
LoadSide
(
Deck
&
deck
,
int
*
dbuf
,
int
mainc
,
int
sidec
);
bool
LoadSide
(
Deck
&
deck
,
int
*
dbuf
,
int
mainc
,
int
sidec
);
bool
LoadDeck
(
const
wchar_t
*
file
);
bool
LoadDeck
(
const
wchar_t
*
file
);
void
SaveDeck
(
Deck
&
deck
,
const
wchar_t
*
name
);
bool
SaveDeck
(
Deck
&
deck
,
const
wchar_t
*
name
);
};
};
extern
DeckManager
deckManager
;
extern
DeckManager
deckManager
;
...
...
gframe/game.cpp
View file @
dc8993f4
...
@@ -735,12 +735,14 @@ void Game::LoadConfig() {
...
@@ -735,12 +735,14 @@ void Game::LoadConfig() {
BufferIO
::
CopyWStr
(
wstr
,
gameConf
.
lastdeck
,
64
);
BufferIO
::
CopyWStr
(
wstr
,
gameConf
.
lastdeck
,
64
);
}
else
if
(
!
strcmp
(
strbuf
,
"textfont"
))
{
}
else
if
(
!
strcmp
(
strbuf
,
"textfont"
))
{
BufferIO
::
DecodeUTF8
(
valbuf
,
wstr
);
BufferIO
::
DecodeUTF8
(
valbuf
,
wstr
);
sscanf
(
linebuf
,
"%s = %s %d"
,
strbuf
,
valbuf
,
&
gameConf
.
textfontsize
);
int
textfontsize
;
sscanf
(
linebuf
,
"%s = %s %d"
,
strbuf
,
valbuf
,
&
textfontsize
);
gameConf
.
textfontsize
=
textfontsize
;
BufferIO
::
CopyWStr
(
wstr
,
gameConf
.
textfont
,
256
);
BufferIO
::
CopyWStr
(
wstr
,
gameConf
.
textfont
,
256
);
}
else
if
(
!
strcmp
(
strbuf
,
"numfont"
))
{
}
else
if
(
!
strcmp
(
strbuf
,
"numfont"
))
{
BufferIO
::
DecodeUTF8
(
valbuf
,
wstr
);
BufferIO
::
DecodeUTF8
(
valbuf
,
wstr
);
BufferIO
::
CopyWStr
(
wstr
,
gameConf
.
numfont
,
256
);
BufferIO
::
CopyWStr
(
wstr
,
gameConf
.
numfont
,
256
);
}
else
if
(
!
strcmp
(
strbuf
,
"servport"
))
{
}
else
if
(
!
strcmp
(
strbuf
,
"serv
er
port"
))
{
gameConf
.
serverport
=
atoi
(
valbuf
);
gameConf
.
serverport
=
atoi
(
valbuf
);
}
else
if
(
!
strcmp
(
strbuf
,
"lastip"
))
{
}
else
if
(
!
strcmp
(
strbuf
,
"lastip"
))
{
BufferIO
::
DecodeUTF8
(
valbuf
,
wstr
);
BufferIO
::
DecodeUTF8
(
valbuf
,
wstr
);
...
@@ -783,7 +785,8 @@ void Game::SaveConfig() {
...
@@ -783,7 +785,8 @@ void Game::SaveConfig() {
void
Game
::
ShowCardInfo
(
int
code
)
{
void
Game
::
ShowCardInfo
(
int
code
)
{
CardData
cd
;
CardData
cd
;
wchar_t
formatBuffer
[
256
];
wchar_t
formatBuffer
[
256
];
dataManager
.
GetData
(
code
,
&
cd
);
if
(
!
dataManager
.
GetData
(
code
,
&
cd
))
memset
(
&
cd
,
0
,
sizeof
(
CardData
));
imgCard
->
setImage
(
imageManager
.
GetTexture
(
code
));
imgCard
->
setImage
(
imageManager
.
GetTexture
(
code
));
imgCard
->
setScaleImage
(
true
);
imgCard
->
setScaleImage
(
true
);
if
(
cd
.
alias
!=
0
&&
(
cd
.
alias
-
code
<
10
||
code
-
cd
.
alias
<
10
))
if
(
cd
.
alias
!=
0
&&
(
cd
.
alias
-
code
<
10
||
code
-
cd
.
alias
<
10
))
...
...
ocgcore/card.cpp
View file @
dc8993f4
...
@@ -1032,7 +1032,7 @@ void card::release_relation(card* target) {
...
@@ -1032,7 +1032,7 @@ void card::release_relation(card* target) {
relations
.
erase
(
target
);
relations
.
erase
(
target
);
}
}
void
card
::
release_relation
(
effect
*
peffect
)
{
void
card
::
release_relation
(
effect
*
peffect
)
{
if
(
relate_effect
.
find
(
peffect
)
!
=
relate_effect
.
end
())
if
(
relate_effect
.
find
(
peffect
)
=
=
relate_effect
.
end
())
return
;
return
;
relate_effect
.
erase
(
peffect
);
relate_effect
.
erase
(
peffect
);
}
}
...
...
script/c102380.lua
View file @
dc8993f4
...
@@ -49,10 +49,13 @@ function c102380.damcon(e,tp,eg,ep,ev,re,r,rp)
...
@@ -49,10 +49,13 @@ function c102380.damcon(e,tp,eg,ep,ev,re,r,rp)
end
end
function
c102380
.
damtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c102380
.
damtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
1000
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
0
,
0
,
tp
,
1000
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
0
,
0
,
tp
,
1000
)
end
end
function
c102380
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c102380
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Damage
(
e
:
GetHandler
():
GetControler
(),
1000
,
REASON_EFFECT
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Damage
(
p
,
d
,
REASON_EFFECT
)
end
end
function
c102380
.
spcost
(
e
,
c
,
tp
)
function
c102380
.
spcost
(
e
,
c
,
tp
)
return
not
Duel
.
CheckNormalSummonActivity
(
tp
)
return
not
Duel
.
CheckNormalSummonActivity
(
tp
)
...
...
script/c1281505.lua
View file @
dc8993f4
...
@@ -21,10 +21,11 @@ function c1281505.initial_effect(c)
...
@@ -21,10 +21,11 @@ function c1281505.initial_effect(c)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--destroy sub
--destroy sub
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_EQUIP
)
e3
:
SetType
(
EFFECT_TYPE_EQUIP
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e3
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e3
:
SetCode
(
EFFECT_DESTROY_SUBSTITUTE
)
e3
:
SetCode
(
EFFECT_DESTROY_REPLACE
)
e3
:
SetValue
(
1
)
e3
:
SetTarget
(
c1281505
.
reptg
)
e3
:
SetOperation
(
c1281505
.
repop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
function
c1281505
.
eqcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c1281505
.
eqcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
@@ -52,3 +53,10 @@ end
...
@@ -52,3 +53,10 @@ end
function
c1281505
.
eqlimit
(
e
,
c
)
function
c1281505
.
eqlimit
(
e
,
c
)
return
c
:
GetControler
()
==
e
:
GetHandler
():
GetControler
()
return
c
:
GetControler
()
==
e
:
GetHandler
():
GetControler
()
end
end
function
c1281505
.
reptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
return
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
1281505
,
1
))
end
function
c1281505
.
repop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Destroy
(
e
:
GetHandler
(),
REASON_EFFECT
+
REASON_REPLACE
)
end
script/c12958919.lua
View file @
dc8993f4
...
@@ -22,9 +22,35 @@ function c12958919.initial_effect(c)
...
@@ -22,9 +22,35 @@ function c12958919.initial_effect(c)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCondition
(
c12958919
.
damcon
)
e2
:
SetCondition
(
c12958919
.
damcon
)
e2
:
SetCost
(
c12958919
.
damcost
)
e2
:
SetTarget
(
c12958919
.
damtg
)
e2
:
SetTarget
(
c12958919
.
damtg
)
e2
:
SetOperation
(
c12958919
.
damop
)
e2
:
SetOperation
(
c12958919
.
damop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
if
not
c12958919
.
global_check
then
c12958919
.
global_check
=
true
c12958919
[
0
]
=
true
c12958919
[
1
]
=
true
local
ge1
=
Effect
.
CreateEffect
(
c
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
ge1
:
SetOperation
(
c12958919
.
checkop
)
Duel
.
RegisterEffect
(
ge1
,
0
)
local
ge2
=
Effect
.
CreateEffect
(
c
)
ge2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge2
:
SetCode
(
EVENT_PHASE_START
+
PHASE_DRAW
)
ge2
:
SetOperation
(
c12958919
.
clear
)
Duel
.
RegisterEffect
(
ge2
,
0
)
end
end
function
c12958919
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
eg
:
GetFirst
()
if
tc
:
IsSetCard
(
0x49
)
then
c12958919
[
tc
:
GetControler
()]
=
false
end
end
function
c12958919
.
clear
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
c12958919
[
0
]
=
true
c12958919
[
1
]
=
true
end
end
function
c12958919
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c12958919
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
...
@@ -50,6 +76,17 @@ end
...
@@ -50,6 +76,17 @@ end
function
c12958919
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c12958919
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
tp
==
Duel
.
GetTurnPlayer
()
return
tp
==
Duel
.
GetTurnPlayer
()
end
end
function
c12958919
.
damcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
c12958919
[
tp
]
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_ATTACK_ANNOUNCE
)
e1
:
SetProperty
(
EFFECT_FLAG_OATH
)
e1
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x49
))
e1
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e1
:
SetReset
(
RESET_PHASE
+
RESET_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
c12958919
.
damfilter
(
c
)
function
c12958919
.
damfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x49
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x49
)
end
end
...
@@ -57,14 +94,7 @@ function c12958919.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -57,14 +94,7 @@ function c12958919.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
local
ct
=
Duel
.
GetMatchingGroupCount
(
c12958919
.
damfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
ct
=
Duel
.
GetMatchingGroupCount
(
c12958919
.
damfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
Duel
.
SetTargetPlayer
(
1
-
tp
)
Duel
.
SetTargetPlayer
(
1
-
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
tp
,
ct
*
300
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
ct
*
300
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_ATTACK
)
e1
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x49
))
e1
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
function
c12958919
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c12958919
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
)
local
p
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
)
...
...
script/c16111820.lua
View file @
dc8993f4
...
@@ -22,7 +22,7 @@ end
...
@@ -22,7 +22,7 @@ end
function
c16111820
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c16111820
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
0
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
end
function
c16111820
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c16111820
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
...
...
script/c21843307.lua
View file @
dc8993f4
...
@@ -28,7 +28,7 @@ function c21843307.activate(e,tp,eg,ep,ev,re,r,rp)
...
@@ -28,7 +28,7 @@ function c21843307.activate(e,tp,eg,ep,ev,re,r,rp)
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
or
not
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
ec
:
GetCode
(),
0
,
0x11
,
0
,
0
,
ec
:
GetLevel
(),
RACE_WARRIOR
,
ATTRIBUTE_LIGHT
)
then
return
end
or
not
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
ec
:
GetCode
(),
0
,
0x11
,
0
,
0
,
ec
:
GetLevel
(),
RACE_WARRIOR
,
ATTRIBUTE_LIGHT
)
then
return
end
c
:
AddTrapMonsterAttribute
(
tru
e
,
ATTRIBUTE_LIGHT
,
RACE_WARRIOR
,
ec
:
GetLevel
(),
0
,
0
)
c
:
AddTrapMonsterAttribute
(
fals
e
,
ATTRIBUTE_LIGHT
,
RACE_WARRIOR
,
ec
:
GetLevel
(),
0
,
0
)
Duel
.
SpecialSummonStep
(
c
,
0
,
tp
,
tp
,
true
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummonStep
(
c
,
0
,
tp
,
tp
,
true
,
false
,
POS_FACEUP
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
...
...
script/c45985838.lua
View file @
dc8993f4
...
@@ -37,7 +37,7 @@ function c45985838.target(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -37,7 +37,7 @@ function c45985838.target(e,tp,eg,ep,ev,re,r,rp,chk)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
Duel
.
SetTargetPlayer
(
1
-
tp
)
Duel
.
SetTargetPlayer
(
1
-
tp
)
Duel
.
SetTargetParam
(
500
)
Duel
.
SetTargetParam
(
500
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
tp
,
500
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
500
)
end
end
function
c45985838
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c45985838
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
...
...
script/c46668237.lua
View file @
dc8993f4
...
@@ -50,7 +50,7 @@ end
...
@@ -50,7 +50,7 @@ end
function
c46668237
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c46668237
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
0
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
end
function
c46668237
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c46668237
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
...
...
script/c62279055.lua
View file @
dc8993f4
...
@@ -20,15 +20,13 @@ function c62279055.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
...
@@ -20,15 +20,13 @@ function c62279055.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if
chk
==
0
then
return
tg
:
IsOnField
()
and
tg
:
IsCanBeEffectTarget
(
e
)
end
if
chk
==
0
then
return
tg
:
IsOnField
()
and
tg
:
IsCanBeEffectTarget
(
e
)
end
Duel
.
SetTargetCard
(
tg
)
Duel
.
SetTargetCard
(
tg
)
local
dam
=
tg
:
GetAttack
()
local
dam
=
tg
:
GetAttack
()
Duel
.
SetTargetParam
(
dam
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
dam
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
dam
)
end
end
function
c62279055
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c62279055
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tg
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
,
CHAININFO_TARGET_PARAM
)
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
tg
:
GetFirst
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
and
tc
:
IsAttackable
()
then
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
and
tc
:
IsAttackable
()
then
if
Duel
.
NegateAttack
(
tc
)
then
if
Duel
.
NegateAttack
(
tc
)
then
Duel
.
Damage
(
1
-
tp
,
d
,
REASON_EFFECT
)
Duel
.
Damage
(
1
-
tp
,
tc
:
GetAttack
()
,
REASON_EFFECT
)
end
end
end
end
end
end
script/c64335804.lua
View file @
dc8993f4
--レッドアイズ·ブラックメタルドラゴン
--レッドアイズ·ブラックメタルドラゴン
function
c64335804
.
initial_effect
(
c
)
function
c64335804
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--spsummon proc
--spsummon proc
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_
HAND
+
LOCATION_
DECK
)
e1
:
SetRange
(
LOCATION_DECK
)
e1
:
SetCondition
(
c64335804
.
spcon
)
e1
:
SetCondition
(
c64335804
.
spcon
)
e1
:
SetOperation
(
c64335804
.
spop
)
e1
:
SetOperation
(
c64335804
.
spop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
...
...
script/c65303664.lua
View file @
dc8993f4
...
@@ -54,7 +54,7 @@ end
...
@@ -54,7 +54,7 @@ end
function
c65303664
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c65303664
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
0
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
end
function
c65303664
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c65303664
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
...
...
script/c68450517.lua
View file @
dc8993f4
...
@@ -23,7 +23,7 @@ function c68450517.descost(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -23,7 +23,7 @@ function c68450517.descost(e,tp,eg,ep,ev,re,r,rp,chk)
e
:
GetHandler
():
RegisterEffect
(
e1
)
e
:
GetHandler
():
RegisterEffect
(
e1
)
end
end
function
c68450517
.
filter
(
c
,
att
)
function
c68450517
.
filter
(
c
,
att
)
return
c
:
Is
Faceup
(
)
and
c
:
IsAttribute
(
att
)
and
c
:
IsDestructable
()
return
c
:
Is
Position
(
POS_FACEUP_ATTACK
)
and
c
:
IsAttribute
(
att
)
and
c
:
IsDestructable
()
end
end
function
c68450517
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c68450517
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
1
-
tp
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
1
-
tp
)
...
@@ -34,8 +34,9 @@ function c68450517.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
...
@@ -34,8 +34,9 @@ function c68450517.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
end
end
function
c68450517
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c68450517
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
and
tc
:
IsAttribute
(
e
:
GetHandler
()
:
GetAttribute
())
then
if
c
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsControler
(
1
-
tp
)
and
c68450517
.
filter
(
tc
,
c
:
GetAttribute
())
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
end
end
end
script/c7165085.lua
View file @
dc8993f4
...
@@ -60,7 +60,7 @@ function c7165085.activate(e,tp,eg,ep,ev,re,r,rp)
...
@@ -60,7 +60,7 @@ function c7165085.activate(e,tp,eg,ep,ev,re,r,rp)
tg
:
CreateEffectRelation
(
te
)
tg
:
CreateEffectRelation
(
te
)
tg
=
g
:
GetNext
()
tg
=
g
:
GetNext
()
end
end
operation
(
te
,
tep
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
operation
then
operation
(
te
,
tep
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
tc
:
ReleaseEffectRelation
(
te
)
tc
:
ReleaseEffectRelation
(
te
)
tg
=
g
:
GetFirst
()
tg
=
g
:
GetFirst
()
while
tg
do
while
tg
do
...
...
script/c97170107.lua
View file @
dc8993f4
...
@@ -19,7 +19,7 @@ function c97170107.initial_effect(c)
...
@@ -19,7 +19,7 @@ function c97170107.initial_effect(c)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c97170107
.
filter
(
c
,
e
,
tp
)
function
c97170107
.
filter
(
c
,
e
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsControler
(
1
-
tp
)
and
(
not
e
or
c
:
IsRelateToEffect
(
e
))
return
c
:
IsFaceup
()
and
c
:
IsControler
(
1
-
tp
)
and
c
:
GetAttack
()
>
0
and
(
not
e
or
c
:
IsRelateToEffect
(
e
))
end
end
function
c97170107
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c97170107
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
...
@@ -28,7 +28,6 @@ end
...
@@ -28,7 +28,6 @@ end
function
c97170107
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c97170107
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
eg
:
IsExists
(
c97170107
.
filter
,
1
,
nil
,
nil
,
tp
)
end
if
chk
==
0
then
return
eg
:
IsExists
(
c97170107
.
filter
,
1
,
nil
,
nil
,
tp
)
end
Duel
.
SetTargetCard
(
eg
)
Duel
.
SetTargetCard
(
eg
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_POSITION
,
eg
,
eg
:
GetCount
(),
0
,
0
)
end
end
function
c97170107
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c97170107
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
eg
:
Filter
(
c97170107
.
filter
,
nil
,
e
,
tp
)
local
g
=
eg
:
Filter
(
c97170107
.
filter
,
nil
,
e
,
tp
)
...
...
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