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
wyykak
ygopro
Commits
3d92e441
Commit
3d92e441
authored
Jun 23, 2012
by
argon.sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
bafb8e1a
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
279 additions
and
37 deletions
+279
-37
gframe/game.cpp
gframe/game.cpp
+1
-1
ocgcore/effect.cpp
ocgcore/effect.cpp
+1
-1
ocgcore/field.h
ocgcore/field.h
+2
-0
ocgcore/interpreter.cpp
ocgcore/interpreter.cpp
+1
-0
ocgcore/libduel.cpp
ocgcore/libduel.cpp
+12
-0
ocgcore/libgroup.cpp
ocgcore/libgroup.cpp
+21
-0
ocgcore/processor.cpp
ocgcore/processor.cpp
+1
-0
ocgcore/scriptlib.h
ocgcore/scriptlib.h
+1
-0
script/c10759529.lua
script/c10759529.lua
+12
-12
script/c1801154.lua
script/c1801154.lua
+43
-0
script/c20951752.lua
script/c20951752.lua
+1
-1
script/c32919136.lua
script/c32919136.lua
+1
-1
script/c3370104.lua
script/c3370104.lua
+2
-2
script/c37534148.lua
script/c37534148.lua
+18
-16
script/c57270476.lua
script/c57270476.lua
+35
-0
script/c61411502.lua
script/c61411502.lua
+67
-0
script/c67045174.lua
script/c67045174.lua
+1
-1
script/c6733059.lua
script/c6733059.lua
+2
-2
script/c73578229.lua
script/c73578229.lua
+57
-0
No files found.
gframe/game.cpp
View file @
3d92e441
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
#include <dirent.h>
#include <dirent.h>
#endif
#endif
const
unsigned
short
PRO_VERSION
=
0x12
9
0
;
const
unsigned
short
PRO_VERSION
=
0x12
a
0
;
namespace
ygo
{
namespace
ygo
{
...
...
ocgcore/effect.cpp
View file @
3d92e441
...
@@ -85,7 +85,7 @@ int32 effect::is_available() {
...
@@ -85,7 +85,7 @@ int32 effect::is_available() {
}
}
if
(
type
&
EFFECT_TYPE_FIELD
)
{
if
(
type
&
EFFECT_TYPE_FIELD
)
{
if
(
!
(
flag
&
EFFECT_FLAG_FIELD_ONLY
))
{
if
(
!
(
flag
&
EFFECT_FLAG_FIELD_ONLY
))
{
if
(
handler
->
current
.
controler
==
PLAYER_NONE
)
if
(
handler
->
is_position
(
POS_FACEDOWN
)
||
handler
->
current
.
controler
==
PLAYER_NONE
)
return
FALSE
;
return
FALSE
;
if
((
flag
&
EFFECT_FLAG_OWNER_RELATE
)
&&
!
(
flag
&
EFFECT_FLAG_CANNOT_DISABLE
)
&&
owner
->
is_status
(
STATUS_DISABLED
))
if
((
flag
&
EFFECT_FLAG_OWNER_RELATE
)
&&
!
(
flag
&
EFFECT_FLAG_CANNOT_DISABLE
)
&&
owner
->
is_status
(
STATUS_DISABLED
))
return
FALSE
;
return
FALSE
;
...
...
ocgcore/field.h
View file @
3d92e441
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
#include <map>
#include <map>
#include <list>
#include <list>
#include <array>
#include <array>
#include <unordered_map>
class
card
;
class
card
;
struct
card_data
;
struct
card_data
;
...
@@ -200,6 +201,7 @@ struct processor {
...
@@ -200,6 +201,7 @@ struct processor {
effect_vector
delayed_ntp
;
effect_vector
delayed_ntp
;
event_list
delayed_tev
;
event_list
delayed_tev
;
event_list
delayed_ntev
;
event_list
delayed_ntev
;
std
::
unordered_map
<
card
*
,
uint32
>
readjust_map
;
ptr
temp_var
[
4
];
ptr
temp_var
[
4
];
uint16
pre_field
[
5
];
uint16
pre_field
[
5
];
int32
chain_limit
;
int32
chain_limit
;
...
...
ocgcore/interpreter.cpp
View file @
3d92e441
...
@@ -267,6 +267,7 @@ static const struct luaL_Reg grouplib[] = {
...
@@ -267,6 +267,7 @@ static const struct luaL_Reg grouplib[] = {
{
"Remove"
,
scriptlib
::
group_remove
},
{
"Remove"
,
scriptlib
::
group_remove
},
{
"Merge"
,
scriptlib
::
group_merge
},
{
"Merge"
,
scriptlib
::
group_merge
},
{
"Sub"
,
scriptlib
::
group_sub
},
{
"Sub"
,
scriptlib
::
group_sub
},
{
"Equal"
,
scriptlib
::
group_equal
},
{
"IsContains"
,
scriptlib
::
group_is_contains
},
{
"IsContains"
,
scriptlib
::
group_is_contains
},
{
"SearchCard"
,
scriptlib
::
group_search_card
},
{
"SearchCard"
,
scriptlib
::
group_search_card
},
{
NULL
,
NULL
}
{
NULL
,
NULL
}
...
...
ocgcore/libduel.cpp
View file @
3d92e441
...
@@ -1367,11 +1367,23 @@ int32 scriptlib::duel_chain_attack(lua_State *L) {
...
@@ -1367,11 +1367,23 @@ int32 scriptlib::duel_chain_attack(lua_State *L) {
}
}
int32
scriptlib
::
duel_readjust
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_readjust
(
lua_State
*
L
)
{
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
card
*
adjcard
=
pduel
->
game_field
->
core
.
reason_effect
->
handler
;
pduel
->
game_field
->
core
.
readjust_map
[
adjcard
]
++
;
if
(
pduel
->
game_field
->
core
.
readjust_map
[
adjcard
]
>
3
)
{
pduel
->
game_field
->
send_to
(
adjcard
,
0
,
REASON_RULE
,
pduel
->
game_field
->
core
.
reason_player
,
PLAYER_NONE
,
LOCATION_GRAVE
,
0
,
POS_FACEUP
);
pduel
->
game_field
->
core
.
subunits
.
begin
()
->
type
=
PROCESSOR_SENDTO_S
;
return
lua_yield
(
L
,
0
);
}
pduel
->
game_field
->
core
.
re_adjust
=
TRUE
;
pduel
->
game_field
->
core
.
re_adjust
=
TRUE
;
return
0
;
return
0
;
}
}
int32
scriptlib
::
duel_adjust_instantly
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_adjust_instantly
(
lua_State
*
L
)
{
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
if
(
lua_gettop
(
L
)
>
0
)
{
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
pcard
->
filter_disable_related_cards
();
}
pduel
->
game_field
->
adjust_instant
();
pduel
->
game_field
->
adjust_instant
();
return
0
;
return
0
;
}
}
...
...
ocgcore/libgroup.cpp
View file @
3d92e441
...
@@ -512,6 +512,27 @@ int32 scriptlib::group_sub(lua_State *L) {
...
@@ -512,6 +512,27 @@ int32 scriptlib::group_sub(lua_State *L) {
}
}
return
0
;
return
0
;
}
}
int32
scriptlib
::
group_equal
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_GROUP
,
1
);
check_param
(
L
,
PARAM_TYPE_GROUP
,
2
);
group
*
pgroup
=
*
(
group
**
)
lua_touserdata
(
L
,
1
);
group
*
sgroup
=
*
(
group
**
)
lua_touserdata
(
L
,
2
);
if
(
pgroup
->
container
.
size
()
!=
sgroup
->
container
.
size
())
{
lua_pushboolean
(
L
,
0
);
return
1
;
}
auto
pit
=
pgroup
->
container
.
begin
();
auto
sit
=
sgroup
->
container
.
begin
();
for
(;
pit
!=
pgroup
->
container
.
end
();
++
pit
,
++
sit
)
{
if
((
*
pit
)
!=
(
*
sit
))
{
lua_pushboolean
(
L
,
0
);
return
1
;
}
}
lua_pushboolean
(
L
,
1
);
return
1
;
}
int32
scriptlib
::
group_is_contains
(
lua_State
*
L
)
{
int32
scriptlib
::
group_is_contains
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_GROUP
,
1
);
check_param
(
L
,
PARAM_TYPE_GROUP
,
1
);
...
...
ocgcore/processor.cpp
View file @
3d92e441
...
@@ -4167,6 +4167,7 @@ void field::adjust_instant() {
...
@@ -4167,6 +4167,7 @@ void field::adjust_instant() {
adjust_disable_check_list
();
adjust_disable_check_list
();
}
}
void
field
::
adjust_all
()
{
void
field
::
adjust_all
()
{
core
.
readjust_map
.
clear
();
add_process
(
PROCESSOR_ADJUST
,
0
,
0
,
0
,
0
,
0
);
add_process
(
PROCESSOR_ADJUST
,
0
,
0
,
0
,
0
,
0
);
}
}
void
field
::
refresh_location_info_instant
()
{
void
field
::
refresh_location_info_instant
()
{
...
...
ocgcore/scriptlib.h
View file @
3d92e441
...
@@ -264,6 +264,7 @@ public:
...
@@ -264,6 +264,7 @@ public:
static
int32
group_remove
(
lua_State
*
L
);
static
int32
group_remove
(
lua_State
*
L
);
static
int32
group_merge
(
lua_State
*
L
);
static
int32
group_merge
(
lua_State
*
L
);
static
int32
group_sub
(
lua_State
*
L
);
static
int32
group_sub
(
lua_State
*
L
);
static
int32
group_equal
(
lua_State
*
L
);
static
int32
group_is_contains
(
lua_State
*
L
);
static
int32
group_is_contains
(
lua_State
*
L
);
static
int32
group_search_card
(
lua_State
*
L
);
static
int32
group_search_card
(
lua_State
*
L
);
...
...
script/c
2
0759529.lua
→
script/c
1
0759529.lua
View file @
3d92e441
--キッズ·ガード
--キッズ·ガード
function
c
2
0759529
.
initial_effect
(
c
)
function
c
1
0759529
.
initial_effect
(
c
)
--Activate
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e1
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e1
:
SetCondition
(
c
2
0759529
.
condition
)
e1
:
SetCondition
(
c
1
0759529
.
condition
)
e1
:
SetCost
(
c
2
0759529
.
cost
)
e1
:
SetCost
(
c
1
0759529
.
cost
)
e1
:
SetTarget
(
c
2
0759529
.
target
)
e1
:
SetTarget
(
c
1
0759529
.
target
)
e1
:
SetOperation
(
c
2
0759529
.
activate
)
e1
:
SetOperation
(
c
1
0759529
.
activate
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
c
2
0759529
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
1
0759529
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
tp
~=
Duel
.
GetTurnPlayer
()
return
tp
~=
Duel
.
GetTurnPlayer
()
end
end
function
c
2
0759529
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c
1
0759529
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckReleaseGroup
(
tp
,
Card
.
IsCode
,
1
,
nil
,
32679370
)
end
if
chk
==
0
then
return
Duel
.
CheckReleaseGroup
(
tp
,
Card
.
IsCode
,
1
,
nil
,
32679370
)
end
local
g
=
Duel
.
SelectReleaseGroup
(
tp
,
Card
.
IsCode
,
1
,
1
,
nil
,
32679370
)
local
g
=
Duel
.
SelectReleaseGroup
(
tp
,
Card
.
IsCode
,
1
,
1
,
nil
,
32679370
)
Duel
.
Release
(
g
,
REASON_COST
)
Duel
.
Release
(
g
,
REASON_COST
)
end
end
function
c
2
0759529
.
filter
(
c
)
function
c
1
0759529
.
filter
(
c
)
return
c
:
IsSetCard
(
0x3008
)
and
c
:
IsAbleToHand
()
return
c
:
IsSetCard
(
0x3008
)
and
c
:
IsAbleToHand
()
end
end
function
c
2
0759529
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c
1
0759529
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c
2
0759529
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c
1
0759529
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
c
2
0759529
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
1
0759529
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
NegateAttack
()
Duel
.
NegateAttack
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c
2
0759529
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c
1
0759529
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
...
...
script/c1801154.lua
0 → 100644
View file @
3d92e441
--遠心分離フィールド
function
c1801154
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
--spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
1801154
,
0
))
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetTarget
(
c1801154
.
sptg
)
e2
:
SetOperation
(
c1801154
.
spop
)
c
:
RegisterEffect
(
e2
)
end
function
c1801154
.
filter2
(
c
,
code
)
if
not
c
.
material_count
or
not
c
:
IsReason
(
REASON_DESTROY
)
then
return
false
end
for
i
=
1
,
c
.
material_count
do
if
code
==
c
.
material
[
i
]
then
return
true
end
end
return
false
end
function
c1801154
.
filter1
(
c
,
e
,
tp
,
eg
)
if
not
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
then
return
false
end
return
eg
:
IsExists
(
c1801154
.
filter2
,
1
,
nil
,
c
:
GetCode
())
end
function
c1801154
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsRelateToEffect
(
e
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c1801154
.
filter1
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
,
eg
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c1801154
.
filter1
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
,
eg
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
end
function
c1801154
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
script/c20951752.lua
View file @
3d92e441
...
@@ -49,7 +49,7 @@ function c20951752.sumcon(e,tp,eg,ep,ev,re,r,rp)
...
@@ -49,7 +49,7 @@ function c20951752.sumcon(e,tp,eg,ep,ev,re,r,rp)
return
e
:
GetLabel
()
==
1
return
e
:
GetLabel
()
==
1
end
end
function
c20951752
.
sumcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c20951752
.
sumcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckReleaseGroup
(
tp
,
Card
.
IsRace
,
1
,
nil
,
RACE_FAIRY
)
end
if
chk
==
0
then
return
Duel
.
CheckReleaseGroup
(
tp
,
nil
,
1
,
nil
)
end
local
g
=
Duel
.
GetReleaseGroup
(
tp
)
local
g
=
Duel
.
GetReleaseGroup
(
tp
)
local
rg
=
g
:
Filter
(
Card
.
IsRace
,
nil
,
RACE_FAIRY
)
local
rg
=
g
:
Filter
(
Card
.
IsRace
,
nil
,
RACE_FAIRY
)
Duel
.
Release
(
rg
,
REASON_COST
)
Duel
.
Release
(
rg
,
REASON_COST
)
...
...
script/c32919136.lua
View file @
3d92e441
...
@@ -78,7 +78,7 @@ end
...
@@ -78,7 +78,7 @@ end
function
c32919136
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c32919136
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Recover
(
p
,
d
,
REASON_EFFECT
)
Duel
.
Damage
(
p
,
d
,
REASON_EFFECT
)
end
end
function
c32919136
.
desfilter
(
c
)
function
c32919136
.
desfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x45
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x45
)
...
...
script/c3370104.lua
View file @
3d92e441
...
@@ -28,12 +28,12 @@ function c3370104.initial_effect(c)
...
@@ -28,12 +28,12 @@ function c3370104.initial_effect(c)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
function
c3370104
.
distg
(
e
,
c
)
function
c3370104
.
distg
(
e
,
c
)
if
c
:
GetCardTargetCount
()
~=
1
then
return
false
end
if
not
e
:
GetHandler
():
IsAttackPos
()
or
c
:
GetCardTargetCount
()
~=
1
then
return
false
end
local
tc
=
c
:
GetFirstCardTarget
()
local
tc
=
c
:
GetFirstCardTarget
()
return
tc
:
IsControler
(
e
:
GetHandlerPlayer
())
and
tc
:
IsRace
(
RACE_MACHINE
)
return
tc
:
IsControler
(
e
:
GetHandlerPlayer
())
and
tc
:
IsRace
(
RACE_MACHINE
)
end
end
function
c3370104
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c3370104
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
re
:
IsActiveType
(
TYPE_MONSTER
)
then
return
end
if
not
e
:
GetHandler
():
IsAttackPos
()
or
re
:
IsActiveType
(
TYPE_MONSTER
)
then
return
end
if
not
re
:
IsHasProperty
(
EFFECT_FLAG_CARD_TARGET
)
then
return
end
if
not
re
:
IsHasProperty
(
EFFECT_FLAG_CARD_TARGET
)
then
return
end
local
g
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TARGET_CARDS
)
local
g
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TARGET_CARDS
)
if
not
g
or
g
:
GetCount
()
~=
1
then
return
end
if
not
g
or
g
:
GetCount
()
~=
1
then
return
end
...
...
script/c37534148.lua
View file @
3d92e441
...
@@ -18,10 +18,8 @@ function c37534148.initial_effect(c)
...
@@ -18,10 +18,8 @@ function c37534148.initial_effect(c)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--special summon
--special summon
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
37534148
,
0
))
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetRange
(
LOCATION_GRAVE
)
e3
:
SetCode
(
EVENT_BATTLE_DESTROYED
)
e3
:
SetCondition
(
c37534148
.
regcon
)
e3
:
SetCondition
(
c37534148
.
regcon
)
e3
:
SetOperation
(
c37534148
.
regop
)
e3
:
SetOperation
(
c37534148
.
regop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
...
@@ -47,14 +45,15 @@ function c37534148.operation(e,tp,eg,ep,ev,re,r,rp)
...
@@ -47,14 +45,15 @@ function c37534148.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
end
end
function
c37534148
.
regcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c37534148
.
regcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
eg
:
GetFirst
()
local
c
=
e
:
GetHandler
()
e
:
SetLabelObject
(
tc
)
local
ec
=
c
:
GetPreviousEquipTarget
(
)
return
e
:
GetHandler
():
GetPreviousEquipTarget
()
==
tc
and
tc
:
IsLocation
(
LOCATION_GRAVE
)
and
tc
:
IsReason
(
REASON_BATTL
E
)
return
c
:
IsReason
(
REASON_LOST_TARGET
)
and
ec
:
IsReason
(
REASON_BATTLE
)
and
ec
:
IsLocation
(
LOCATION_GRAV
E
)
end
end
function
c37534148
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c37534148
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetLabelObject
()
local
c
=
e
:
GetHandler
()
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
ec
=
c
:
GetPreviousEquipTarget
()
e1
:
SetDescription
(
aux
.
Stringid
(
37534148
,
1
))
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
37534148
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
...
@@ -62,18 +61,21 @@ function c37534148.regop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -62,18 +61,21 @@ function c37534148.regop(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetCountLimit
(
1
)
e1
:
SetCountLimit
(
1
)
e1
:
SetTarget
(
c37534148
.
sptg
)
e1
:
SetTarget
(
c37534148
.
sptg
)
e1
:
SetOperation
(
c37534148
.
spop
)
e1
:
SetOperation
(
c37534148
.
spop
)
e1
:
SetLabelObject
(
t
c
)
e1
:
SetLabelObject
(
e
c
)
e1
:
SetReset
(
RESET_EVENT
+
0x16c0000
+
RESET_PHASE
+
PHASE_END
)
e1
:
SetReset
(
RESET_EVENT
+
0x16c0000
+
RESET_PHASE
+
PHASE_END
)
e
:
GetHandler
():
RegisterEffect
(
e1
)
e
:
GetHandler
():
RegisterEffect
(
e1
)
t
c
:
RegisterFlagEffect
(
37534148
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
e
c
:
RegisterFlagEffect
(
37534148
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
function
c37534148
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c37534148
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetLabelObject
():
GetFlagEffect
(
37534148
)
~=
0
end
local
ec
=
e
:
GetHandler
():
GetPreviousEquipTarget
()
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetLabelObject
(),
1
,
0
,
0
)
if
chk
==
0
then
return
ec
:
GetFlagEffect
(
37534148
)
~=
0
end
Duel
.
SetTargetCard
(
ec
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
ec
,
1
,
0
,
0
)
end
end
function
c37534148
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c37534148
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
if
e
:
GetLabelObject
():
GetFlagEffect
(
37534148
)
~=
0
then
local
tc
=
Duel
.
GetFirstTarget
()
Duel
.
SpecialSummon
(
e
:
GetLabelObject
(),
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
script/c57270476.lua
0 → 100644
View file @
3d92e441
--墓場からの誘い
function
c57270476
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c57270476
.
target
)
e1
:
SetOperation
(
c57270476
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
c57270476
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_DECK
)
>
0
end
end
function
c57270476
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ConfirmDecktop
(
1
-
tp
,
1
)
local
g
=
Duel
.
GetDecktopGroup
(
1
-
tp
,
1
)
if
g
:
GetCount
()
>
0
then
local
tc
=
g
:
GetFirst
()
Duel
.
ShuffleDeck
(
1
-
tp
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCode
(
EVENT_TO_HAND
)
e1
:
SetOperation
(
c57270476
.
tgop
)
e1
:
SetReset
(
RESET_EVENT
+
0x1de0000
)
tc
:
RegisterEffect
(
e1
)
end
end
function
c57270476
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
IsReason
(
REASON_DRAW
)
then
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_EFFECT
)
end
end
script/c61411502.lua
0 → 100644
View file @
3d92e441
--エレメンタルバースト
function
c61411502
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
0
,
0x1c0
)
e1
:
SetCost
(
c61411502
.
cost
)
e1
:
SetTarget
(
c61411502
.
target
)
e1
:
SetOperation
(
c61411502
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
c61411502
.
cfilter1
(
c
,
rg
)
if
not
c
:
IsAttribute
(
ATTRIBUTE_WIND
)
then
return
false
end
rg
:
RemoveCard
(
c
)
local
ret
=
rg
:
IsExists
(
c61411502
.
cfilter2
,
1
,
nil
,
rg
)
rg
:
AddCard
(
c
)
return
ret
end
function
c61411502
.
cfilter2
(
c
,
rg
)
if
not
c
:
IsAttribute
(
ATTRIBUTE_WATER
)
then
return
false
end
rg
:
RemoveCard
(
c
)
local
ret
=
rg
:
IsExists
(
c61411502
.
cfilter3
,
1
,
nil
,
rg
)
rg
:
AddCard
(
c
)
return
ret
end
function
c61411502
.
cfilter3
(
c
,
rg
)
if
not
c
:
IsAttribute
(
ATTRIBUTE_FIRE
)
then
return
false
end
rg
:
RemoveCard
(
c
)
local
ret
=
rg
:
IsExists
(
Card
.
IsAttribute
,
1
,
nil
,
ATTRIBUTE_EARTH
)
rg
:
AddCard
(
c
)
return
ret
end
function
c61411502
.
rfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsHasEffect
(
EFFECT_EXTRA_RELEASE
)
and
c
:
IsReleasable
()
end
function
c61411502
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g1
=
Duel
.
GetMatchingGroup
(
Card
.
IsReleasable
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
g2
=
Duel
.
GetMatchingGroup
(
c61411502
.
rfilter
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
g1
:
Merge
(
g2
)
if
chk
==
0
then
return
g1
:
GetCount
()
>
3
and
g1
:
IsExists
(
c61411502
.
cfilter1
,
1
,
nil
,
g1
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
rg1
=
g1
:
FilterSelect
(
tp
,
c61411502
.
cfilter1
,
1
,
1
,
nil
,
g1
)
g1
:
Sub
(
rg1
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
rg2
=
g1
:
FilterSelect
(
tp
,
c61411502
.
cfilter2
,
1
,
1
,
nil
,
g1
)
g1
:
Sub
(
rg2
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
rg3
=
g1
:
FilterSelect
(
tp
,
c61411502
.
cfilter3
,
1
,
1
,
nil
,
g1
)
g1
:
Sub
(
rg3
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
rg4
=
g1
:
FilterSelect
(
tp
,
Card
.
IsAttribute
,
1
,
1
,
nil
,
ATTRIBUTE_EARTH
)
rg1
:
Merge
(
rg2
)
rg1
:
Merge
(
rg3
)
rg1
:
Merge
(
rg4
)
Duel
.
Release
(
rg1
,
REASON_COST
)
end
function
c61411502
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsDestructable
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsDestructable
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
c61411502
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsDestructable
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
script/c67045174.lua
View file @
3d92e441
...
@@ -40,6 +40,6 @@ function c67045174.target(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -40,6 +40,6 @@ function c67045174.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
sg
,
sg
:
GetCount
(),
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
sg
,
sg
:
GetCount
(),
0
,
0
)
end
end
function
c67045174
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c67045174
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
sg
=
Duel
.
GetMatchingGroup
(
Card
.
IsDestructable
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
local
sg
=
Duel
.
GetMatchingGroup
(
Card
.
IsDestructable
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
Duel
.
Destroy
(
sg
,
REASON_EFFECT
)
Duel
.
Destroy
(
sg
,
REASON_EFFECT
)
end
end
script/c6733059.lua
View file @
3d92e441
...
@@ -80,14 +80,14 @@ function c6733059.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -80,14 +80,14 @@ function c6733059.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
local
rg
=
cg
:
Select
(
tp
,
lv
,
lv
,
nil
)
local
rg
=
cg
:
Select
(
tp
,
lv
,
lv
,
nil
)
Duel
.
Remove
(
rg
,
POS_FACEUP
,
REASON_COST
)
Duel
.
Remove
(
rg
,
POS_FACEUP
,
REASON_COST
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
tg
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
tg
,
1
,
0
,
0
)
e
:
SetLabel
(
lv
)
Duel
.
SetTargetParam
(
lv
)
end
end
function
c6733059
.
dfilter
(
c
,
lv
)
function
c6733059
.
dfilter
(
c
,
lv
)
return
c
:
IsFaceup
()
and
c
:
GetLevel
()
==
lv
and
c
:
IsDestructable
()
return
c
:
IsFaceup
()
and
c
:
GetLevel
()
==
lv
and
c
:
IsDestructable
()
end
end
function
c6733059
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c6733059
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
local
lv
=
e
:
GetLabel
(
)
local
lv
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PARAM
)
if
lv
==
0
then
return
end
if
lv
==
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c6733059
.
dfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
,
lv
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c6733059
.
dfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
,
lv
)
...
...
script/c73578229.lua
0 → 100644
View file @
3d92e441
--ポールポジション
function
c73578229
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
local
g
=
Group
.
CreateGroup
()
g
:
KeepAlive
()
--adjust
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e2
:
SetCode
(
EVENT_ADJUST
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetOperation
(
c73578229
.
adjustop
)
e2
:
SetLabelObject
(
g
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e3
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e3
:
SetTarget
(
c73578229
.
etarget
)
e3
:
SetValue
(
c73578229
.
efilter
)
e3
:
SetLabelObject
(
g
)
c
:
RegisterEffect
(
e3
)
--destroy
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetCode
(
EVENT_LEAVE_FIELD
)
e4
:
SetOperation
(
c73578229
.
desop
)
c
:
RegisterEffect
(
e4
)
end
function
c73578229
.
etarget
(
e
,
c
)
return
e
:
GetLabelObject
():
IsContains
(
c
)
end
function
c73578229
.
efilter
(
e
,
te
)
return
te
:
IsActiveType
(
TYPE_SPELL
)
end
function
c73578229
.
adjustop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
local
ag
=
g
:
GetMaxGroup
(
Card
.
GetAttack
)
local
preg
=
e
:
GetLabelObject
()
if
ag
:
Equal
(
preg
)
then
return
end
preg
:
Clear
()
preg
:
Merge
(
ag
)
Duel
.
AdjustInstantly
(
e
:
GetHandler
())
Duel
.
Readjust
()
end
function
c73578229
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
IsStatus
(
STATUS_ACTIVATED
)
then
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
local
ag
=
g
:
GetMaxGroup
(
Card
.
GetAttack
)
Duel
.
Destroy
(
ag
,
REASON_EFFECT
)
end
end
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