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
1c189fa2
Commit
1c189fa2
authored
Aug 09, 2014
by
salix5
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into patch
parents
b6a91241
81e923d9
Changes
17
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
231 additions
and
39 deletions
+231
-39
ocgcore/field.cpp
ocgcore/field.cpp
+2
-1
ocgcore/operations.cpp
ocgcore/operations.cpp
+26
-16
ocgcore/processor.cpp
ocgcore/processor.cpp
+25
-10
script/c20644748.lua
script/c20644748.lua
+4
-4
script/c23171610.lua
script/c23171610.lua
+4
-1
script/c27062594.lua
script/c27062594.lua
+1
-1
script/c32646477.lua
script/c32646477.lua
+1
-0
script/c37474917.lua
script/c37474917.lua
+1
-0
script/c39153655.lua
script/c39153655.lua
+84
-0
script/c4130270.lua
script/c4130270.lua
+1
-1
script/c50485594.lua
script/c50485594.lua
+0
-1
script/c64952266.lua
script/c64952266.lua
+2
-2
script/c66547759.lua
script/c66547759.lua
+73
-0
script/c72258771.lua
script/c72258771.lua
+1
-1
script/c77462146.lua
script/c77462146.lua
+1
-1
script/c78184733.lua
script/c78184733.lua
+1
-0
script/c79606837.lua
script/c79606837.lua
+4
-0
No files found.
ocgcore/field.cpp
View file @
1c189fa2
...
...
@@ -146,6 +146,7 @@ void field::add_card(uint8 playerid, card* pcard, uint8 location, uint8 sequence
pcard
->
operation_param
=
(
pcard
->
operation_param
&
0x00ffffff
)
|
(
POS_FACEDOWN_DEFENCE
<<
24
);
}
if
((
pcard
->
data
.
type
&
TYPE_PENDULUM
)
&&
(
location
==
LOCATION_GRAVE
)
&&
!
pcard
->
is_affected_by_effect
(
EFFECT_CANNOT_TO_DECK
)
&&
is_player_can_send_to_deck
(
playerid
,
pcard
)
&&
(((
pcard
->
previous
.
location
==
LOCATION_MZONE
)
&&
!
pcard
->
is_status
(
STATUS_SUMMON_DISABLED
))
||
((
pcard
->
previous
.
location
==
LOCATION_SZONE
)
&&
!
pcard
->
is_status
(
STATUS_ACTIVATE_DISABLED
))))
{
location
=
LOCATION_EXTRA
;
...
...
@@ -1719,7 +1720,7 @@ int32 field::check_xyz_material(card* scard, int32 findex, int32 min, int32 max,
core
.
xmaterial_lst
.
insert
(
std
::
make_pair
(
0
,
*
cit
));
}
}
else
{
pduel
->
game_field
->
get_xyz_material
(
scard
,
findex
,
max
);
get_xyz_material
(
scard
,
findex
,
max
);
}
return
core
.
xmaterial_lst
.
size
()
>=
min
;
}
...
...
ocgcore/operations.cpp
View file @
1c189fa2
...
...
@@ -742,15 +742,15 @@ int32 field::remove_overlay_card(uint16 step, uint32 reason, card* pcard, uint8
core
.
units
.
begin
()
->
step
=
3
;
return
FALSE
;
}
pduel
->
game_field
->
core
.
select_cards
.
clear
();
core
.
select_cards
.
clear
();
if
(
pcard
)
{
for
(
auto
cit
=
pcard
->
xyz_materials
.
begin
();
cit
!=
pcard
->
xyz_materials
.
end
();
++
cit
)
pduel
->
game_field
->
core
.
select_cards
.
push_back
(
*
cit
);
core
.
select_cards
.
push_back
(
*
cit
);
}
else
{
card_set
cset
;
pduel
->
game_field
->
get_overlay_group
(
rplayer
,
s
,
o
,
&
cset
);
get_overlay_group
(
rplayer
,
s
,
o
,
&
cset
);
for
(
auto
cit
=
cset
.
begin
();
cit
!=
cset
.
end
();
++
cit
)
pduel
->
game_field
->
core
.
select_cards
.
push_back
(
*
cit
);
core
.
select_cards
.
push_back
(
*
cit
);
}
pduel
->
write_buffer8
(
MSG_HINT
);
pduel
->
write_buffer8
(
HINT_SELECTMSG
);
...
...
@@ -800,14 +800,14 @@ int32 field::get_control(uint16 step, effect * reason_effect, uint8 reason_playe
return
TRUE
;
pcard
->
filter_disable_related_cards
();
if
(
pcard
->
unique_code
)
pduel
->
game_field
->
remove_unique_card
(
pcard
);
remove_unique_card
(
pcard
);
move_to_field
(
pcard
,
playerid
,
playerid
,
LOCATION_MZONE
,
pcard
->
current
.
position
);
pcard
->
set_status
(
STATUS_ATTACK_CANCELED
,
TRUE
);
return
FALSE
;
}
case
1
:
{
if
(
pcard
->
unique_code
)
pduel
->
game_field
->
add_unique_card
(
pcard
);
add_unique_card
(
pcard
);
set_control
(
pcard
,
playerid
,
reset_phase
,
reset_count
);
pcard
->
reset
(
RESET_CONTROL
,
RESET_EVENT
);
pcard
->
filter_disable_related_cards
();
...
...
@@ -848,17 +848,17 @@ int32 field::swap_control(uint16 step, effect * reason_effect, uint8 reason_play
pcard1
->
filter_disable_related_cards
();
pcard2
->
filter_disable_related_cards
();
if
(
pcard1
->
unique_code
)
pduel
->
game_field
->
remove_unique_card
(
pcard1
);
remove_unique_card
(
pcard1
);
if
(
pcard2
->
unique_code
)
pduel
->
game_field
->
remove_unique_card
(
pcard2
);
remove_unique_card
(
pcard2
);
remove_card
(
pcard1
);
remove_card
(
pcard2
);
add_card
(
p2
,
pcard1
,
l2
,
s2
);
add_card
(
p1
,
pcard2
,
l1
,
s1
);
if
(
pcard1
->
unique_code
)
pduel
->
game_field
->
add_unique_card
(
pcard1
);
add_unique_card
(
pcard1
);
if
(
pcard2
->
unique_code
)
pduel
->
game_field
->
add_unique_card
(
pcard2
);
add_unique_card
(
pcard2
);
set_control
(
pcard1
,
p2
,
reset_phase
,
reset_count
);
set_control
(
pcard2
,
p1
,
reset_phase
,
reset_count
);
pcard1
->
reset
(
RESET_CONTROL
,
RESET_EVENT
);
...
...
@@ -903,8 +903,8 @@ int32 field::control_adjust(uint16 step) {
switch
(
step
)
{
case
0
:
{
core
.
operated_set
.
clear
();
uint32
b0
=
pduel
->
game_field
->
get_useable_count
(
0
,
LOCATION_MZONE
,
PLAYER_NONE
,
0
);
uint32
b1
=
pduel
->
game_field
->
get_useable_count
(
1
,
LOCATION_MZONE
,
PLAYER_NONE
,
0
);
uint32
b0
=
get_useable_count
(
0
,
LOCATION_MZONE
,
PLAYER_NONE
,
0
);
uint32
b1
=
get_useable_count
(
1
,
LOCATION_MZONE
,
PLAYER_NONE
,
0
);
for
(
auto
cit
=
core
.
control_adjust_set
[
0
].
begin
();
cit
!=
core
.
control_adjust_set
[
0
].
end
();
++
cit
)
(
*
cit
)
->
filter_disable_related_cards
();
for
(
auto
cit
=
core
.
control_adjust_set
[
1
].
begin
();
cit
!=
core
.
control_adjust_set
[
1
].
end
();
++
cit
)
...
...
@@ -4258,11 +4258,21 @@ int32 field::select_tribute_cards(int16 step, uint8 playerid, uint8 cancelable,
rmax
+=
(
*
cit
)
->
operation_param
;
min
-=
rmax
;
max
-=
rmin
;
core
.
units
.
begin
()
->
arg2
=
(
max
<<
16
)
+
min
;
if
(
min
<=
0
)
{
core
.
units
.
begin
()
->
step
=
5
;
if
(
max
>
0
)
add_process
(
PROCESSOR_SELECT_YESNO
,
0
,
0
,
0
,
playerid
,
210
);
else
core
.
units
.
begin
()
->
step
=
6
;
}
else
returns
.
ivalue
[
0
]
=
TRUE
;
return
FALSE
;
}
case
5
:
{
if
(
!
returns
.
ivalue
[
0
])
{
core
.
units
.
begin
()
->
step
=
6
;
return
FALSE
;
}
core
.
units
.
begin
()
->
arg2
=
(
max
<<
16
)
+
min
;
core
.
select_cards
.
clear
();
for
(
auto
cit
=
core
.
release_cards
.
begin
();
cit
!=
core
.
release_cards
.
end
();
++
cit
)
core
.
select_cards
.
push_back
(
*
cit
);
...
...
@@ -4273,12 +4283,12 @@ int32 field::select_tribute_cards(int16 step, uint8 playerid, uint8 cancelable,
add_process
(
PROCESSOR_SELECT_TRIBUTE_P
,
0
,
0
,
0
,
((
uint32
)
cancelable
<<
16
)
+
playerid
,
(
max
<<
16
)
+
min
);
return
FALSE
;
}
case
5
:
{
case
6
:
{
for
(
int32
i
=
0
;
i
<
returns
.
bvalue
[
0
];
++
i
)
core
.
operated_set
.
insert
(
core
.
select_cards
[
returns
.
bvalue
[
i
+
1
]]);
return
FALSE
;
}
case
6
:
{
case
7
:
{
core
.
select_cards
.
clear
();
returns
.
bvalue
[
0
]
=
core
.
operated_set
.
size
();
int32
i
=
0
;
...
...
ocgcore/processor.cpp
View file @
1c189fa2
...
...
@@ -3429,9 +3429,12 @@ int32 field::process_battle_command(uint16 step) {
else
damp
=
pd
;
if
(
is_player_affected_by_effect
(
damp
,
EFFECT_REFLECT_BATTLE_DAMAGE
))
damp
=
1
-
damp
;
if
(
damp
==
pd
||
(
!
core
.
attacker
->
is_affected_by_effect
(
EFFECT_AVOID_BATTLE_DAMAGE
,
core
.
attack_target
)
&&
!
is_player_affected_by_effect
(
damp
,
EFFECT_AVOID_BATTLE_DAMAGE
)))
{
core
.
battle_damage
[
damp
]
=
a
-
d
;
reason_card
=
core
.
attacker
;
}
}
if
(
core
.
attack_target
->
is_destructable_by_battle
(
core
.
attacker
))
bd
[
1
]
=
TRUE
;
}
else
if
(
a
<
d
)
{
...
...
@@ -3448,9 +3451,12 @@ int32 field::process_battle_command(uint16 step) {
else
damp
=
pa
;
if
(
is_player_affected_by_effect
(
damp
,
EFFECT_REFLECT_BATTLE_DAMAGE
))
damp
=
1
-
damp
;
if
(
damp
==
pa
||
(
!
core
.
attack_target
->
is_affected_by_effect
(
EFFECT_AVOID_BATTLE_DAMAGE
,
core
.
attacker
)
&&
!
is_player_affected_by_effect
(
damp
,
EFFECT_AVOID_BATTLE_DAMAGE
)))
{
core
.
battle_damage
[
damp
]
=
d
-
a
;
reason_card
=
core
.
attack_target
;
}
}
if
(
core
.
attacker
->
is_destructable_by_battle
(
core
.
attack_target
))
bd
[
0
]
=
TRUE
;
}
else
{
...
...
@@ -3488,8 +3494,12 @@ int32 field::process_battle_command(uint16 step) {
dp
[
pd
]
=
1
;
dp
[
1
-
pd
]
=
0
;
}
if
(
dp
[
0
])
core
.
battle_damage
[
0
]
=
a
-
d
;
if
(
dp
[
1
])
core
.
battle_damage
[
1
]
=
a
-
d
;
if
(
dp
[
pd
]
&&
!
core
.
attack_target
->
is_affected_by_effect
(
EFFECT_AVOID_BATTLE_DAMAGE
,
core
.
attacker
)
&&
!
is_player_affected_by_effect
(
pd
,
EFFECT_AVOID_BATTLE_DAMAGE
))
core
.
battle_damage
[
pd
]
=
a
-
d
;
if
(
dp
[
1
-
pd
]
&&
!
core
.
attacker
->
is_affected_by_effect
(
EFFECT_AVOID_BATTLE_DAMAGE
,
core
.
attack_target
)
&&
!
is_player_affected_by_effect
(
1
-
pd
,
EFFECT_AVOID_BATTLE_DAMAGE
))
core
.
battle_damage
[
1
-
pd
]
=
a
-
d
;
reason_card
=
core
.
attacker
;
}
if
(
core
.
attack_target
->
is_destructable_by_battle
(
core
.
attacker
))
...
...
@@ -3508,11 +3518,14 @@ int32 field::process_battle_command(uint16 step) {
else
damp
=
pa
;
if
(
is_player_affected_by_effect
(
damp
,
EFFECT_REFLECT_BATTLE_DAMAGE
))
damp
=
1
-
damp
;
if
(
damp
==
pa
||
(
!
core
.
attack_target
->
is_affected_by_effect
(
EFFECT_AVOID_BATTLE_DAMAGE
,
core
.
attacker
)
&&
!
is_player_affected_by_effect
(
damp
,
EFFECT_AVOID_BATTLE_DAMAGE
)))
{
core
.
battle_damage
[
damp
]
=
d
-
a
;
reason_card
=
core
.
attack_target
;
}
}
}
}
}
else
{
damchange
=
core
.
attacker
->
is_affected_by_effect
(
EFFECT_BATTLE_DAMAGE_TO_EFFECT
);
if
(
damchange
)
{
...
...
@@ -3524,10 +3537,12 @@ int32 field::process_battle_command(uint16 step) {
damp
=
1
-
pa
;
if
(
is_player_affected_by_effect
(
damp
,
EFFECT_REFLECT_BATTLE_DAMAGE
))
damp
=
1
-
damp
;
if
(
!
is_player_affected_by_effect
(
damp
,
EFFECT_AVOID_BATTLE_DAMAGE
))
{
core
.
battle_damage
[
damp
]
=
a
;
reason_card
=
core
.
attacker
;
}
}
}
if
(
bd
[
0
])
core
.
attacker
->
set_status
(
STATUS_BATTLE_DESTROYED
,
TRUE
);
if
(
bd
[
1
])
...
...
script/c20644748.lua
View file @
1c189fa2
...
...
@@ -62,9 +62,9 @@ function c20644748.mvalue(e,fp,rp,r)
return
5
-
Duel
.
GetFieldGroupCount
(
fp
,
LOCATION_SZONE
,
0
)
end
function
c20644748
.
svalue
(
e
,
fp
,
rp
,
r
)
if
Duel
.
GetFieldCard
(
fp
,
LOCATION_SZONE
,
5
)
then
return
4
-
Duel
.
GetFieldGroupCount
(
fp
,
LOCATION_MZONE
,
0
)
else
return
5
-
Duel
.
GetFieldGroupCount
(
fp
,
LOCATION_MZONE
,
0
)
local
ct
=
5
for
i
=
5
,
7
do
if
Duel
.
GetFieldCard
(
fp
,
LOCATION_SZONE
,
i
)
then
ct
=
ct
-
1
end
end
return
ct
-
Duel
.
GetFieldGroupCount
(
fp
,
LOCATION_MZONE
,
0
)
end
script/c23171610.lua
View file @
1c189fa2
...
...
@@ -21,8 +21,11 @@ end
function
c23171610
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c23171610
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
end
function
c23171610
.
filter2
(
c
,
e
)
return
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_MACHINE
)
and
not
c
:
IsImmuneToEffect
(
e
)
end
function
c23171610
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
sg
=
Duel
.
GetMatchingGroup
(
c23171610
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
sg
=
Duel
.
GetMatchingGroup
(
c23171610
.
filter
2
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
e
)
local
c
=
e
:
GetHandler
()
local
tc
=
sg
:
GetFirst
()
while
tc
do
...
...
script/c27062594.lua
View file @
1c189fa2
...
...
@@ -55,7 +55,7 @@ function c27062594.damcost(e,tp,eg,ep,ev,re,r,rp,chk)
repeat
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
g
:
Remove
(
Card
.
IsCode
,
nil
,
sg
:
GetFirst
())
g
:
Remove
(
Card
.
IsCode
,
nil
,
sg
:
GetFirst
()
:
GetCode
()
)
rg
:
Merge
(
sg
)
until
g
:
GetCount
()
==
0
or
not
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
27062594
,
1
))
local
ct
=
Duel
.
Remove
(
rg
,
POS_FACEUP
,
REASON_COST
)
...
...
script/c32646477.lua
View file @
1c189fa2
...
...
@@ -2,6 +2,7 @@
function
c32646477
.
initial_effect
(
c
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
nil
),
1
)
c
:
EnableReviveLimit
()
--damage
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
32646477
,
0
))
...
...
script/c37474917.lua
View file @
1c189fa2
...
...
@@ -2,6 +2,7 @@
function
c37474917
.
initial_effect
(
c
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
nil
),
1
)
c
:
EnableReviveLimit
()
--damage
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
37474917
,
0
))
...
...
script/c39153655.lua
0 → 100644
View file @
1c189fa2
--DDケルベロス
function
c39153655
.
initial_effect
(
c
)
--pendulum summon
aux
.
AddPendulumProcedure
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
--atk/def
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
39153655
,
0
))
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetRange
(
LOCATION_PZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetTarget
(
c39153655
.
atktg
)
e2
:
SetOperation
(
c39153655
.
atkop
)
c
:
RegisterEffect
(
e2
)
--tohand
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_TOHAND
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetCondition
(
c39153655
.
thcon
)
e3
:
SetTarget
(
c39153655
.
thtg
)
e3
:
SetOperation
(
c39153655
.
thop
)
c
:
RegisterEffect
(
e3
)
end
function
c39153655
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xaf
)
end
function
c39153655
.
atktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c39153655
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c39153655
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
c39153655
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
end
function
c39153655
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetCode
(
EFFECT_CHANGE_LEVEL
)
e1
:
SetValue
(
4
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2
:
SetValue
(
400
)
tc
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EFFECT_UPDATE_DEFENCE
)
tc
:
RegisterEffect
(
e3
)
end
end
function
c39153655
.
cfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xaf
)
and
not
c
:
IsCode
(
39153655
)
end
function
c39153655
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
GetSummonType
()
==
SUMMON_TYPE_PENDULUM
and
c
:
IsPreviousLocation
(
LOCATION_HAND
)
and
Duel
.
IsExistingMatchingCard
(
c39153655
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
c39153655
.
thfilter
(
c
)
return
c
:
GetType
()
==
TYPE_SPELL
+
TYPE_CONTINUOUS
and
c
:
IsAbleToHand
()
end
function
c39153655
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c39153655
.
thfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c39153655
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c39153655
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
0
,
0
)
end
function
c39153655
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
end
end
script/c4130270.lua
View file @
1c189fa2
...
...
@@ -6,7 +6,7 @@ function c4130270.initial_effect(c)
e1
:
SetCode
(
EFFECT_CANNOT_TO_DECK
)
e1
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetTargetRange
(
LOCATION_
MZONE
,
LOCATION_MZONE
)
e1
:
SetTargetRange
(
LOCATION_
ONFIELD
,
LOCATION_ONFIELD
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_CANNOT_TO_HAND
)
...
...
script/c50485594.lua
View file @
1c189fa2
...
...
@@ -54,7 +54,6 @@ function c50485594.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
2
,
tp
,
LOCATION_EXTRA
)
end
function
c50485594
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
local
g
=
Duel
.
GetMatchingGroup
(
c50485594
.
filter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
)
local
sg
=
g
:
Filter
(
c50485594
.
filter2
,
nil
,
g
)
if
sg
:
GetCount
()
==
0
then
return
end
...
...
script/c64952266.lua
View file @
1c189fa2
...
...
@@ -23,8 +23,8 @@ function c64952266.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function
c64952266
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
and
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
>
0
then
if
tc
and
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
Damage
(
tp
,
tc
:
GetAttack
(),
REASON_EFFECT
)
~=
0
then
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
Duel
.
Damage
(
tp
,
tc
:
GetAttack
(),
REASON_EFFECT
)
end
end
script/c66547759.lua
0 → 100644
View file @
1c189fa2
--No.23 冥界の霊騎士ランスロット
function
c66547759
.
initial_effect
(
c
)
--xyz summon
aux
.
AddXyzProcedure
(
c
,
aux
.
XyzFilterFunction
(
c
,
8
),
2
)
c
:
EnableReviveLimit
()
--direct attack
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DIRECT_ATTACK
)
e1
:
SetCondition
(
c66547759
.
dacon
)
c
:
RegisterEffect
(
e1
)
--destroy
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_DESTROY
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetCode
(
EVENT_BATTLE_DAMAGE
)
e2
:
SetCondition
(
c66547759
.
descon
)
e2
:
SetTarget
(
c66547759
.
destg
)
e2
:
SetOperation
(
c66547759
.
desop
)
c
:
RegisterEffect
(
e2
)
--negate
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_NEGATE
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_QUICK_F
)
e3
:
SetCode
(
EVENT_CHAINING
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
)
e3
:
SetCondition
(
c66547759
.
discon
)
e3
:
SetCost
(
c66547759
.
discost
)
e3
:
SetTarget
(
c66547759
.
distg
)
e3
:
SetOperation
(
c66547759
.
disop
)
c
:
RegisterEffect
(
e3
)
end
c66547759
.
xyz_number
=
23
function
c66547759
.
dacon
(
e
)
return
e
:
GetHandler
():
GetOverlayCount
()
>
0
end
function
c66547759
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
ep
~=
tp
end
function
c66547759
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsDestructable
()
end
function
c66547759
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
1
-
tp
)
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c66547759
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c66547759
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c66547759
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
end
function
c66547759
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
end
function
c66547759
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
(
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
or
re
:
IsActiveType
(
TYPE_MONSTER
))
and
re
:
GetHandler
()
~=
e
:
GetHandler
()
end
function
c66547759
.
discost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
end
function
c66547759
.
distg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_NEGATE
,
eg
,
1
,
0
,
0
)
end
function
c66547759
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
NegateActivation
(
ev
)
end
script/c72258771.lua
View file @
1c189fa2
...
...
@@ -54,7 +54,7 @@ function c72258771.ccost(e,tp)
end
end
function
c72258771
.
otfilter
(
c
,
tp
)
return
c
:
IsSetCard
(
0x1
b
)
and
(
c
:
IsControler
(
tp
)
or
c
:
IsFaceup
())
return
c
:
IsSetCard
(
0x1
d
)
and
(
c
:
IsControler
(
tp
)
or
c
:
IsFaceup
())
end
function
c72258771
.
otcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
...
...
script/c77462146.lua
View file @
1c189fa2
...
...
@@ -38,7 +38,7 @@ function c77462146.activate(e,tp,eg,ep,ev,re,r,rp)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
RESET_END
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetValue
(
300
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
...
...
script/c78184733.lua
View file @
1c189fa2
...
...
@@ -36,6 +36,7 @@ function c78184733.activate(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetCode
(
EFFECT_CANNOT_CHANGE_POSITION
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
2
)
tc
:
RegisterEffect
(
e1
)
tc
=
g
:
GetNext
()
end
end
end
script/c79606837.lua
View file @
1c189fa2
...
...
@@ -9,6 +9,7 @@ function c79606837.initial_effect(c)
e1
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
)
e1
:
SetCode
(
EFFECT_TO_GRAVE_REDIRECT
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetTarget
(
c79606837
.
rmtarget
)
e1
:
SetTargetRange
(
LOCATION_HAND
+
LOCATION_DECK
,
LOCATION_HAND
+
LOCATION_DECK
)
e1
:
SetValue
(
LOCATION_REMOVED
)
c
:
RegisterEffect
(
e1
)
...
...
@@ -36,6 +37,9 @@ function c79606837.initial_effect(c)
e3
:
SetOperation
(
c79606837
.
thop
)
c
:
RegisterEffect
(
e3
)
end
function
c79606837
.
rmtarget
(
e
,
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
end
function
c79606837
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
ep
==
tp
or
c
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
then
return
false
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