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
339c1aa3
Commit
339c1aa3
authored
Dec 23, 2014
by
Argon.Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
spsummon once
parent
7168f086
Changes
18
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
211 additions
and
401 deletions
+211
-401
ocgcore/card.cpp
ocgcore/card.cpp
+5
-0
ocgcore/card.h
ocgcore/card.h
+1
-0
ocgcore/field.cpp
ocgcore/field.cpp
+16
-43
ocgcore/field.h
ocgcore/field.h
+3
-2
ocgcore/interpreter.cpp
ocgcore/interpreter.cpp
+1
-0
ocgcore/libcard.cpp
ocgcore/libcard.cpp
+10
-0
ocgcore/operations.cpp
ocgcore/operations.cpp
+8
-3
ocgcore/processor.cpp
ocgcore/processor.cpp
+92
-48
ocgcore/scriptlib.h
ocgcore/scriptlib.h
+2
-1
script/c13890468.lua
script/c13890468.lua
+10
-39
script/c14513016.lua
script/c14513016.lua
+7
-36
script/c40907115.lua
script/c40907115.lua
+9
-38
script/c47611119.lua
script/c47611119.lua
+9
-38
script/c49885567.lua
script/c49885567.lua
+8
-37
script/c67556500.lua
script/c67556500.lua
+1
-0
script/c86396750.lua
script/c86396750.lua
+12
-41
script/c87118301.lua
script/c87118301.lua
+9
-38
script/c88123329.lua
script/c88123329.lua
+8
-37
No files found.
ocgcore/card.cpp
View file @
339c1aa3
...
...
@@ -63,6 +63,7 @@ card::card() {
unique_code
=
0
;
assume_type
=
0
;
assume_value
=
0
;
spsummon_code
=
0
;
current
.
controler
=
PLAYER_NONE
;
}
card
::~
card
()
{
...
...
@@ -1854,6 +1855,8 @@ int32 card::is_special_summonable(uint8 playerid) {
return
FALSE
;
if
(
pduel
->
game_field
->
check_unique_onfield
(
this
,
playerid
))
return
FALSE
;
if
(
!
pduel
->
game_field
->
check_spsummon_once
(
this
,
playerid
))
return
FALSE
;
if
(
is_affected_by_effect
(
EFFECT_CANNOT_SPECIAL_SUMMON
))
return
FALSE
;
if
(
is_affected_by_effect
(
EFFECT_FORBIDDEN
))
...
...
@@ -1889,6 +1892,8 @@ int32 card::is_can_be_special_summoned(effect * reason_effect, uint32 sumtype, u
}
if
(((
sumpos
&
POS_FACEDOWN
)
==
0
)
&&
pduel
->
game_field
->
check_unique_onfield
(
this
,
toplayer
))
return
FALSE
;
if
(
!
pduel
->
game_field
->
check_spsummon_once
(
this
,
sumplayer
))
return
FALSE
;
sumtype
|=
SUMMON_TYPE_SPECIAL
;
if
((
sumplayer
==
0
||
sumplayer
==
1
)
&&
!
pduel
->
game_field
->
is_player_can_spsummon
(
reason_effect
,
sumtype
,
sumpos
,
sumplayer
,
toplayer
,
this
))
return
FALSE
;
...
...
ocgcore/card.h
View file @
339c1aa3
...
...
@@ -108,6 +108,7 @@ public:
uint8
unique_pos
[
2
];
uint16
unique_uid
;
uint32
unique_code
;
uint32
spsummon_code
;
uint8
assume_type
;
uint32
assume_value
;
effect
*
unique_effect
;
...
...
ocgcore/field.cpp
View file @
339c1aa3
...
...
@@ -1411,13 +1411,24 @@ effect* field::check_unique_onfield(card* pcard, uint8 controler) {
return
0
;
}
int32
field
::
check_spsummon_once
(
card
*
pcard
,
uint8
playerid
)
{
if
(
pcard
->
spsummon_code
==
0
)
return
TRUE
;
auto
iter
=
core
.
spsummon_once_map
[
playerid
].
find
(
pcard
->
spsummon_code
);
return
(
iter
==
core
.
spsummon_once_map
[
playerid
].
end
())
||
(
iter
->
second
==
0
);
}
void
field
::
check_card_counter
(
card
*
pcard
,
int32
counter_type
,
int32
playerid
)
{
auto
&
counter_map
=
(
counter_type
==
1
)
?
core
.
summon_counter
:
(
counter_type
==
2
)
?
core
.
normalsummon_counter
:
(
counter_type
==
3
)
?
core
.
spsummon_counter
:
(
counter_type
==
4
)
?
core
.
flipsummon_counter
:
core
.
attack_counter
;
for
(
auto
iter
=
counter_map
.
begin
();
iter
!=
counter_map
.
end
();
++
iter
)
{
for
(
auto
iter
=
counter_map
.
begin
();
iter
!=
counter_map
.
end
();
++
iter
)
{
auto
&
info
=
iter
->
second
;
if
((
playerid
==
0
)
&&
(
info
.
second
&
0xffff
)
!=
0
)
continue
;
if
((
playerid
==
1
)
&&
(
info
.
second
&
0xffff0000
)
!=
0
)
continue
;
if
(
info
.
first
)
{
pduel
->
lua
->
add_param
(
pcard
,
PARAM_TYPE_CARD
);
if
(
!
pduel
->
lua
->
check_condition
(
info
.
first
,
1
))
{
...
...
@@ -1429,51 +1440,13 @@ void field::check_card_counter(card* pcard, int32 counter_type, int32 playerid)
}
}
}
void
field
::
check_card_counter
(
card_set
*
pcards
,
int32
counter_type
,
int32
playerid
)
{
auto
&
counter_map
=
(
counter_type
==
1
)
?
core
.
summon_counter
:
(
counter_type
==
2
)
?
core
.
normalsummon_counter
:
(
counter_type
==
3
)
?
core
.
spsummon_counter
:
(
counter_type
==
4
)
?
core
.
flipsummon_counter
:
core
.
attack_counter
;
for
(
auto
iter
=
counter_map
.
begin
();
iter
!=
counter_map
.
end
();
++
iter
)
{
auto
&
info
=
iter
->
second
;
if
(
info
.
first
)
{
for
(
auto
piter
=
pcards
->
begin
();
piter
!=
pcards
->
end
();
++
piter
)
{
pduel
->
lua
->
add_param
(
*
piter
,
PARAM_TYPE_CARD
);
if
(
!
pduel
->
lua
->
check_condition
(
info
.
first
,
1
))
{
if
(
playerid
==
0
)
info
.
second
+=
0x1
;
else
info
.
second
+=
0x10000
;
break
;
}
}
}
}
}
void
field
::
check_card_counter
(
card_vector
*
pcards
,
int32
counter_type
,
int32
playerid
)
{
auto
&
counter_map
=
(
counter_type
==
1
)
?
core
.
summon_counter
:
(
counter_type
==
2
)
?
core
.
normalsummon_counter
:
(
counter_type
==
3
)
?
core
.
spsummon_counter
:
(
counter_type
==
4
)
?
core
.
flipsummon_counter
:
core
.
attack_counter
;
for
(
auto
iter
=
counter_map
.
begin
();
iter
!=
counter_map
.
end
();
++
iter
)
{
auto
&
info
=
iter
->
second
;
if
(
info
.
first
)
{
for
(
auto
piter
=
pcards
->
begin
();
piter
!=
pcards
->
end
();
++
piter
)
{
pduel
->
lua
->
add_param
(
*
piter
,
PARAM_TYPE_CARD
);
if
(
!
pduel
->
lua
->
check_condition
(
info
.
first
,
1
))
{
if
(
playerid
==
0
)
info
.
second
+=
0x1
;
else
info
.
second
+=
0x10000
;
break
;
}
}
}
}
}
void
field
::
check_chain_counter
(
effect
*
peffect
,
int32
playerid
,
int32
chainid
)
{
for
(
auto
iter
=
core
.
chain_counter
.
begin
();
iter
!=
core
.
chain_counter
.
end
();
++
iter
)
{
auto
&
info
=
iter
->
second
;
if
((
playerid
==
0
)
&&
(
info
.
second
&
0xffff
)
!=
0
)
continue
;
if
((
playerid
==
1
)
&&
(
info
.
second
&
0xffff0000
)
!=
0
)
continue
;
if
(
info
.
first
)
{
pduel
->
lua
->
add_param
(
peffect
,
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
playerid
,
PARAM_TYPE_INT
);
...
...
ocgcore/field.h
View file @
339c1aa3
...
...
@@ -212,6 +212,7 @@ struct processor {
std
::
unordered_set
<
card
*>
unique_cards
[
2
];
std
::
unordered_map
<
uint32
,
uint32
>
effect_count_code
;
std
::
unordered_map
<
uint32
,
uint32
>
effect_count_code_duel
;
std
::
unordered_map
<
uint32
,
uint32
>
spsummon_once_map
[
2
];
std
::
multimap
<
int32
,
card
*
,
std
::
greater
<
int32
>
>
xmaterial_lst
;
ptr
temp_var
[
4
];
uint32
global_flag
;
...
...
@@ -357,9 +358,8 @@ public:
void
add_unique_card
(
card
*
pcard
);
void
remove_unique_card
(
card
*
pcard
);
effect
*
check_unique_onfield
(
card
*
pcard
,
uint8
controler
);
int32
check_spsummon_once
(
card
*
pcard
,
uint8
playerid
);
void
check_card_counter
(
card
*
pcard
,
int32
counter_type
,
int32
playerid
);
void
check_card_counter
(
card_set
*
pcards
,
int32
counter_type
,
int32
playerid
);
void
check_card_counter
(
card_vector
*
pcards
,
int32
counter_type
,
int32
playerid
);
void
check_chain_counter
(
effect
*
peffect
,
int32
playerid
,
int32
chainid
);
int32
check_lp_cost
(
uint8
playerid
,
uint32
cost
);
...
...
@@ -575,6 +575,7 @@ public:
#define GLOBALFLAG_SPSUMMON_COUNT 0x40
#define GLOBALFLAG_XMAT_COUNT_LIMIT 0x80
#define GLOBALFLAG_SELF_TOGRAVE 0x100
#define GLOBALFLAG_SPSUMMON_ONCE 0x200
//
#define PROCESSOR_NONE 0
#define PROCESSOR_WAITING 0x10000
...
...
ocgcore/interpreter.cpp
View file @
339c1aa3
...
...
@@ -208,6 +208,7 @@ static const struct luaL_Reg cardlib[] = {
{
"CheckUniqueOnField"
,
scriptlib
::
card_check_unique_onfield
},
{
"ResetNegateEffect"
,
scriptlib
::
card_reset_negate_effect
},
{
"AssumeProperty"
,
scriptlib
::
card_assume_prop
},
{
"SetSPSummonOnce"
,
scriptlib
::
card_set_spsummon_once
},
{
NULL
,
NULL
}
};
...
...
ocgcore/libcard.cpp
View file @
339c1aa3
...
...
@@ -2069,3 +2069,13 @@ int32 scriptlib::card_assume_prop(lua_State *L) {
pcard
->
pduel
->
assumes
.
insert
(
pcard
);
return
0
;
}
int32
scriptlib
::
card_set_spsummon_once
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
if
(
pcard
->
status
&
STATUS_COPYING_EFFECT
)
return
0
;
pcard
->
spsummon_code
=
lua_tointeger
(
L
,
2
);
pcard
->
pduel
->
game_field
->
core
.
global_flag
|=
GLOBALFLAG_SPSUMMON_ONCE
;
return
0
;
}
ocgcore/operations.cpp
View file @
339c1aa3
...
...
@@ -2036,6 +2036,8 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card * target) {
target
->
summon_player
=
sumplayer
;
core
.
spsummon_state_count
[
sumplayer
]
++
;
check_card_counter
(
target
,
3
,
sumplayer
);
if
(
target
->
spsummon_code
)
core
.
spsummon_once_map
[
sumplayer
][
target
->
spsummon_code
]
++
;
break_effect
();
return
FALSE
;
}
...
...
@@ -2184,7 +2186,6 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card * target) {
if
(
pgroup
->
container
.
size
()
==
0
)
return
TRUE
;
core
.
phase_action
=
TRUE
;
check_card_counter
(
&
pgroup
->
container
,
3
,
sumplayer
);
pgroup
->
it
=
pgroup
->
container
.
begin
();
return
FALSE
;
}
...
...
@@ -2197,6 +2198,9 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card * target) {
pcard
->
current
.
reason_player
=
sumplayer
;
pcard
->
summon_player
=
sumplayer
;
pcard
->
summon_info
=
(
peffect
->
get_value
(
pcard
)
&
0xff00ffff
)
|
SUMMON_TYPE_SPECIAL
|
((
uint32
)
pcard
->
current
.
location
<<
16
);
check_card_counter
(
pcard
,
3
,
sumplayer
);
if
(
pcard
->
spsummon_code
)
core
.
spsummon_once_map
[
sumplayer
][
pcard
->
spsummon_code
]
++
;
move_to_field
(
pcard
,
sumplayer
,
sumplayer
,
LOCATION_MZONE
,
POS_FACEUP
);
return
FALSE
;
}
...
...
@@ -2342,6 +2346,9 @@ int32 field::special_summon_step(uint16 step, group * targets, card * target) {
if
(
!
targets
)
core
.
special_summoning
.
insert
(
target
);
target
->
enable_field_effect
(
FALSE
);
if
(
target
->
spsummon_code
)
core
.
spsummon_once_map
[
target
->
summon_player
][
target
->
spsummon_code
]
++
;
check_card_counter
(
target
,
3
,
target
->
summon_player
);
move_to_field
(
target
,
target
->
summon_player
,
playerid
,
LOCATION_MZONE
,
positions
);
return
FALSE
;
}
...
...
@@ -2378,7 +2385,6 @@ int32 field::special_summon(uint16 step, effect * reason_effect, uint8 reason_pl
if
(
cvs
.
size
()
>
1
)
std
::
sort
(
cvs
.
begin
(),
cvs
.
end
(),
card
::
card_operation_sort
);
core
.
spsummon_state_count
[
infos
.
turn_player
]
++
;
check_card_counter
(
&
cvs
,
3
,
infos
.
turn_player
);
core
.
hint_timing
[
infos
.
turn_player
]
|=
TIMING_SPSUMMON
;
for
(
auto
cvit
=
cvs
.
begin
();
cvit
!=
cvs
.
end
();
++
cvit
)
add_process
(
PROCESSOR_SPSUMMON_STEP
,
0
,
0
,
targets
,
0
,
(
ptr
)(
*
cvit
));
...
...
@@ -2387,7 +2393,6 @@ int32 field::special_summon(uint16 step, effect * reason_effect, uint8 reason_pl
if
(
cvo
.
size
()
>
1
)
std
::
sort
(
cvo
.
begin
(),
cvo
.
end
(),
card
::
card_operation_sort
);
core
.
spsummon_state_count
[
1
-
infos
.
turn_player
]
++
;
check_card_counter
(
&
cvo
,
3
,
1
-
infos
.
turn_player
);
core
.
hint_timing
[
1
-
infos
.
turn_player
]
|=
TIMING_SPSUMMON
;
for
(
auto
cvit
=
cvo
.
begin
();
cvit
!=
cvo
.
end
();
++
cvit
)
add_process
(
PROCESSOR_SPSUMMON_STEP
,
0
,
0
,
targets
,
0
,
(
ptr
)(
*
cvit
));
...
...
ocgcore/processor.cpp
View file @
339c1aa3
This diff is collapsed.
Click to expand it.
ocgcore/scriptlib.h
View file @
339c1aa3
...
...
@@ -210,7 +210,8 @@ public:
static
int32
card_check_unique_onfield
(
lua_State
*
L
);
static
int32
card_reset_negate_effect
(
lua_State
*
L
);
static
int32
card_assume_prop
(
lua_State
*
L
);
static
int32
card_set_spsummon_once
(
lua_State
*
L
);
//Effect functions
static
int32
effect_new
(
lua_State
*
L
);
static
int32
effect_newex
(
lua_State
*
L
);
...
...
script/c13890468.lua
View file @
339c1aa3
--精霊獣 ペトルフィン
function
c13890468
.
initial_effect
(
c
)
--spsummon limit
c
:
SetSPSummonOnce
(
13890468
)
--tohand
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetCondition
(
c13890468
.
limcon
)
e1
:
SetCategory
(
CATEGORY_TOHAND
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetCountLimit
(
1
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCost
(
c13890468
.
cost
)
e1
:
SetTarget
(
c13890468
.
target
)
e1
:
SetOperation
(
c13890468
.
operation
)
c
:
RegisterEffect
(
e1
)
--tohand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TOHAND
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetCountLimit
(
1
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCost
(
c13890468
.
cost
)
e2
:
SetTarget
(
c13890468
.
target
)
e2
:
SetOperation
(
c13890468
.
operation
)
c
:
RegisterEffect
(
e2
)
if
not
c13890468
.
global_check
then
c13890468
.
global_check
=
true
local
ge1
=
Effect
.
CreateEffect
(
c
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
ge1
:
SetOperation
(
c13890468
.
checkop
)
Duel
.
RegisterEffect
(
ge1
,
0
)
end
end
function
c13890468
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
eg
:
GetFirst
()
local
p1
=
false
local
p2
=
false
while
tc
do
if
tc
:
IsCode
(
13890468
)
then
if
tc
:
GetSummonPlayer
()
==
0
then
p1
=
true
else
p2
=
true
end
end
tc
=
eg
:
GetNext
()
end
if
p1
then
Duel
.
RegisterFlagEffect
(
0
,
13890468
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
if
p2
then
Duel
.
RegisterFlagEffect
(
1
,
13890468
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
function
c13890468
.
limcon
(
e
)
return
Duel
.
GetFlagEffect
(
e
:
GetHandlerPlayer
(),
13890468
)
~=
0
end
function
c13890468
.
filter
(
c
)
return
c
:
IsSetCard
(
0xb5
)
and
c
:
IsAbleToRemoveAsCost
()
...
...
script/c14513016.lua
View file @
339c1aa3
--霊獣使いの長老
function
c14513016
.
initial_effect
(
c
)
--spsummon limit
c
:
SetSPSummonOnce
(
14513016
)
--extra summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
E
FFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
Set
Condition
(
c14513016
.
limcon
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
E
VENT_SUMMON_SUCCESS
)
e1
:
Set
Operation
(
c14513016
.
sumop
)
c
:
RegisterEffect
(
e1
)
--extra summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e2
:
SetOperation
(
c14513016
.
sumop
)
c
:
RegisterEffect
(
e2
)
if
not
c14513016
.
global_check
then
c14513016
.
global_check
=
true
local
ge1
=
Effect
.
CreateEffect
(
c
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
ge1
:
SetOperation
(
c14513016
.
checkop
)
Duel
.
RegisterEffect
(
ge1
,
0
)
end
end
function
c14513016
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
eg
:
GetFirst
()
local
p1
=
false
local
p2
=
false
while
tc
do
if
tc
:
IsCode
(
14513016
)
then
if
tc
:
GetSummonPlayer
()
==
0
then
p1
=
true
else
p2
=
true
end
end
tc
=
eg
:
GetNext
()
end
if
p1
then
Duel
.
RegisterFlagEffect
(
0
,
14513016
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
if
p2
then
Duel
.
RegisterFlagEffect
(
1
,
14513016
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
function
c14513016
.
limcon
(
e
)
return
Duel
.
GetFlagEffect
(
e
:
GetHandlerPlayer
(),
14513016
)
~=
0
end
function
c14513016
.
sumop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetFlagEffect
(
tp
,
1451301
7
)
~=
0
then
return
end
if
Duel
.
GetFlagEffect
(
tp
,
1451301
6
)
~=
0
then
return
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetTargetRange
(
LOCATION_HAND
+
LOCATION_MZONE
,
0
)
...
...
@@ -46,5 +17,5 @@ function c14513016.sumop(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0xb5
))
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterFlagEffect
(
tp
,
1451301
7
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
1451301
6
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
script/c40907115.lua
View file @
339c1aa3
--霊獣使い ウェン
function
c40907115
.
initial_effect
(
c
)
--spsummon limit
c
:
SetSPSummonOnce
(
40907115
)
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetCondition
(
c40907115
.
limcon
)
e1
:
SetDescription
(
aux
.
Stringid
(
40907115
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetTarget
(
c40907115
.
sptg
)
e1
:
SetOperation
(
c40907115
.
spop
)
c
:
RegisterEffect
(
e1
)
--spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
40907115
,
0
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetTarget
(
c40907115
.
sptg
)
e2
:
SetOperation
(
c40907115
.
spop
)
c
:
RegisterEffect
(
e2
)
if
not
c40907115
.
global_check
then
c40907115
.
global_check
=
true
local
ge1
=
Effect
.
CreateEffect
(
c
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
ge1
:
SetOperation
(
c40907115
.
checkop
)
Duel
.
RegisterEffect
(
ge1
,
0
)
end
end
function
c40907115
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
eg
:
GetFirst
()
local
p1
=
false
local
p2
=
false
while
tc
do
if
tc
:
IsCode
(
40907115
)
then
if
tc
:
GetSummonPlayer
()
==
0
then
p1
=
true
else
p2
=
true
end
end
tc
=
eg
:
GetNext
()
end
if
p1
then
Duel
.
RegisterFlagEffect
(
0
,
40907115
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
if
p2
then
Duel
.
RegisterFlagEffect
(
1
,
40907115
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
function
c40907115
.
limcon
(
e
)
return
Duel
.
GetFlagEffect
(
e
:
GetHandlerPlayer
(),
40907115
)
~=
0
end
function
c40907115
.
filter
(
c
,
e
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xb5
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
...
...
script/c47611119.lua
View file @
339c1aa3
--ジェムナイトレディ・ラピスラズリ
function
c47611119
.
initial_effect
(
c
)
c
:
SetSPSummonOnce
(
47611119
)
--fusion material
c
:
EnableReviveLimit
()
aux
.
AddFusionProcCodeFun
(
c
,
99645428
,
aux
.
FilterBoolFunction
(
Card
.
IsSetCard
,
0x1047
),
1
,
false
,
false
)
...
...
@@ -10,50 +11,20 @@ function c47611119.initial_effect(c)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetValue
(
c47611119
.
splimit
)
c
:
RegisterEffect
(
e1
)
--
spsummon limit
--
damage
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e2
:
SetCondition
(
c47611119
.
limcon
)
e2
:
SetCategory
(
CATEGORY_DAMAGE
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetTarget
(
c47611119
.
damtg
)
e2
:
SetOperation
(
c47611119
.
damop
)
c
:
RegisterEffect
(
e2
)
--damage
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_DAMAGE
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
)
e3
:
SetTarget
(
c47611119
.
damtg
)
e3
:
SetOperation
(
c47611119
.
damop
)
c
:
RegisterEffect
(
e3
)
if
not
c47611119
.
global_check
then
c47611119
.
global_check
=
true
local
ge1
=
Effect
.
CreateEffect
(
c
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
ge1
:
SetOperation
(
c47611119
.
checkop
)
Duel
.
RegisterEffect
(
ge1
,
0
)
end
end
function
c47611119
.
splimit
(
e
,
se
,
sp
,
st
)
return
not
e
:
GetHandler
():
IsLocation
(
LOCATION_EXTRA
)
or
bit
.
band
(
st
,
SUMMON_TYPE_FUSION
)
==
SUMMON_TYPE_FUSION
end
function
c47611119
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
eg
:
GetFirst
()
local
p1
=
false
local
p2
=
false
while
tc
do
if
tc
:
IsCode
(
47611119
)
then
if
tc
:
GetSummonPlayer
()
==
0
then
p1
=
true
else
p2
=
true
end
end
tc
=
eg
:
GetNext
()
end
if
p1
then
Duel
.
RegisterFlagEffect
(
0
,
47611119
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
if
p2
then
Duel
.
RegisterFlagEffect
(
1
,
47611119
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
function
c47611119
.
limcon
(
e
)
return
Duel
.
GetFlagEffect
(
e
:
GetHandlerPlayer
(),
47611119
)
~=
0
end
function
c47611119
.
filter
(
c
)
return
c
:
IsSetCard
(
0x1047
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToGrave
()
end
...
...
script/c49885567.lua
View file @
339c1aa3
--精霊獣 カンナホーク
function
c49885567
.
initial_effect
(
c
)
--spsummon limit
c
:
SetSPSummonOnce
(
49885567
)
--tohand
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetCondition
(
c49885567
.
limcon
)
e1
:
SetCategory
(
CATEGORY_REMOVE
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetCountLimit
(
1
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetTarget
(
c49885567
.
target
)
e1
:
SetOperation
(
c49885567
.
operation
)
c
:
RegisterEffect
(
e1
)
--tohand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_REMOVE
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetCountLimit
(
1
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetTarget
(
c49885567
.
target
)
e2
:
SetOperation
(
c49885567
.
operation
)
c
:
RegisterEffect
(
e2
)
if
not
c49885567
.
global_check
then
c49885567
.
global_check
=
true
local
ge1
=
Effect
.
CreateEffect
(
c
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
ge1
:
SetOperation
(
c49885567
.
checkop
)
Duel
.
RegisterEffect
(
ge1
,
0
)
end
end
function
c49885567
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
eg
:
GetFirst
()
local
p1
=
false
local
p2
=
false
while
tc
do
if
tc
:
IsCode
(
49885567
)
then
if
tc
:
GetSummonPlayer
()
==
0
then
p1
=
true
else
p2
=
true
end
end
tc
=
eg
:
GetNext
()
end
if
p1
then
Duel
.
RegisterFlagEffect
(
0
,
49885567
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
if
p2
then
Duel
.
RegisterFlagEffect
(
1
,
49885567
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
function
c49885567
.
limcon
(
e
)
return
Duel
.
GetFlagEffect
(
e
:
GetHandlerPlayer
(),
49885567
)
~=
0
end
function
c49885567
.
filter
(
c
)
return
c
:
IsSetCard
(
0xb5
)
and
c
:
IsAbleToRemove
()
...
...
script/c67556500.lua
View file @
339c1aa3
--波動竜フォノン・ドラゴン
function
c67556500
.
initial_effect
(
c
)
Duel
.
EnableGlobalFlag
(
GLOBALFLAG_MUST_BE_SMATERIAL
)
c
:
SetSPSummonOnce
(
67556500
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
nil
),
1
)
c
:
EnableReviveLimit
()
...
...
script/c86396750.lua
View file @
339c1aa3
--精霊獣 アペライオ
function
c86396750
.
initial_effect
(
c
)
--spsummon limit
c
:
SetSPSummonOnce
(
86396750
)
--atk
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetCondition
(
c86396750
.
limcon
)
e1
:
SetDescription
(
aux
.
Stringid
(
86396750
,
0
))
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetHintTiming
(
TIMING_DAMAGE_STEP
,
TIMING_DAMAGE_STEP
+
0x1c0
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCondition
(
c86396750
.
atkcon
)
e1
:
SetCost
(
c86396750
.
atkcost
)
e1
:
SetOperation
(
c86396750
.
atkop
)
c
:
RegisterEffect
(
e1
)
--atk
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
86396750
,
0
))
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e2
:
SetHintTiming
(
TIMING_DAMAGE_STEP
,
TIMING_DAMAGE_STEP
+
0x1c0
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCondition
(
c86396750
.
atkcon
)
e2
:
SetCost
(
c86396750
.
atkcost
)
e2
:
SetOperation
(
c86396750
.
atkop
)
c
:
RegisterEffect
(
e2
)
if
not
c86396750
.
global_check
then
c86396750
.
global_check
=
true
local
ge1
=
Effect
.
CreateEffect
(
c
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
ge1
:
SetOperation
(
c86396750
.
checkop
)
Duel
.
RegisterEffect
(
ge1
,
0
)
end
end
function
c86396750
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
eg
:
GetFirst
()
local
p1
=
false
local
p2
=
false
while
tc
do
if
tc
:
IsCode
(
86396750
)
then
if
tc
:
GetSummonPlayer
()
==
0
then
p1
=
true
else
p2
=
true
end
end
tc
=
eg
:
GetNext
()
end
if
p1
then
Duel
.
RegisterFlagEffect
(
0
,
86396750
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
if
p2
then
Duel
.
RegisterFlagEffect
(
1
,
86396750
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
function
c86396750
.
limcon
(
e
)
return
Duel
.
GetFlagEffect
(
e
:
GetHandlerPlayer
(),
86396750
)
~=
0
end
function
c86396750
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetCurrentPhase
()
~=
PHASE_DAMAGE
or
not
Duel
.
IsDamageCalculated
()
...
...
script/c87118301.lua
View file @
339c1aa3
--霊獣使い レラ
function
c87118301
.
initial_effect
(
c
)
--spsummon limit
c
:
SetSPSummonOnce
(
87118301
)
--spsuccess
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetCondition
(
c87118301
.
limcon
)
e1
:
SetDescription
(
aux
.
Stringid
(
87118301
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetTarget
(
c87118301
.
sptg
)
e1
:
SetOperation
(
c87118301
.
spop
)
c
:
RegisterEffect
(
e1
)
--spsuccess
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
87118301
,
0
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetTarget
(
c87118301
.
sptg
)
e2
:
SetOperation
(
c87118301
.
spop
)
c
:
RegisterEffect
(
e2
)
if
not
c87118301
.
global_check
then
c87118301
.
global_check
=
true
local
ge1
=
Effect
.
CreateEffect
(
c
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
ge1
:
SetOperation
(
c87118301
.
checkop
)
Duel
.
RegisterEffect
(
ge1
,
0
)
end
end
function
c87118301
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
eg
:
GetFirst
()
local
p1
=
false
local
p2
=
false
while
tc
do
if
tc
:
IsCode
(
87118301
)
then
if
tc
:
GetSummonPlayer
()
==
0
then
p1
=
true
else
p2
=
true
end
end
tc
=
eg
:
GetNext
()
end
if
p1
then
Duel
.
RegisterFlagEffect
(
0
,
87118301
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
if
p2
then
Duel
.
RegisterFlagEffect
(
1
,
87118301
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
function
c87118301
.
limcon
(
e
)
return
Duel
.
GetFlagEffect
(
e
:
GetHandlerPlayer
(),
87118301
)
~=
0
end
function
c87118301
.
filter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0xb5
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
...
...
script/c88123329.lua
View file @
339c1aa3
--精霊獣 ラムペンタ
function
c88123329
.
initial_effect
(
c
)
--spsummon limit
c
:
SetSPSummonOnce
(
88123329
)
--tohand
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetCondition
(
c88123329
.
limcon
)
e1
:
SetCategory
(
CATEGORY_REMOVE
+
CATEGORY_TOGRAVE
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetTarget
(
c88123329
.
target
)
e1
:
SetOperation
(
c88123329
.
operation
)
c
:
RegisterEffect
(
e1
)
--tohand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_REMOVE
+
CATEGORY_TOGRAVE
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetTarget
(
c88123329
.
target
)
e2
:
SetOperation
(
c88123329
.
operation
)
c
:
RegisterEffect
(
e2
)
if
not
c88123329
.
global_check
then
c88123329
.
global_check
=
true
local
ge1
=
Effect
.
CreateEffect
(
c
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
ge1
:
SetOperation
(
c88123329
.
checkop
)
Duel
.
RegisterEffect
(
ge1
,
0
)
end
end
function
c88123329
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
eg
:
GetFirst
()
local
p1
=
false
local
p2
=
false
while
tc
do
if
tc
:
IsCode
(
88123329
)
then
if
tc
:
GetSummonPlayer
()
==
0
then
p1
=
true
else
p2
=
true
end
end
tc
=
eg
:
GetNext
()
end
if
p1
then
Duel
.
RegisterFlagEffect
(
0
,
88123329
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
if
p2
then
Duel
.
RegisterFlagEffect
(
1
,
88123329
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
function
c88123329
.
limcon
(
e
)
return
Duel
.
GetFlagEffect
(
e
:
GetHandlerPlayer
(),
88123329
)
~=
0
end
function
c88123329
.
tgfilter
(
c
,
rac
)
return
c
:
IsSetCard
(
0xb5
)
and
c
:
IsRace
(
rac
)
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