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
nanahira
ygopro
Commits
e265c2c4
Commit
e265c2c4
authored
Oct 21, 2013
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
85396c94
Changes
23
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
79 additions
and
41 deletions
+79
-41
ocgcore/effect.cpp
ocgcore/effect.cpp
+1
-1
ocgcore/effect.h
ocgcore/effect.h
+1
-0
ocgcore/field.cpp
ocgcore/field.cpp
+3
-1
ocgcore/field.h
ocgcore/field.h
+2
-1
ocgcore/interpreter.cpp
ocgcore/interpreter.cpp
+1
-0
ocgcore/libcard.cpp
ocgcore/libcard.cpp
+7
-0
ocgcore/libduel.cpp
ocgcore/libduel.cpp
+9
-2
ocgcore/processor.cpp
ocgcore/processor.cpp
+18
-10
ocgcore/scriptlib.h
ocgcore/scriptlib.h
+1
-0
script/c14644902.lua
script/c14644902.lua
+3
-1
script/c3027001.lua
script/c3027001.lua
+1
-1
script/c36076683.lua
script/c36076683.lua
+1
-1
script/c40607210.lua
script/c40607210.lua
+1
-0
script/c44178886.lua
script/c44178886.lua
+2
-2
script/c53656677.lua
script/c53656677.lua
+5
-2
script/c57421866.lua
script/c57421866.lua
+3
-2
script/c59019082.lua
script/c59019082.lua
+3
-3
script/c60741115.lua
script/c60741115.lua
+1
-0
script/c66235877.lua
script/c66235877.lua
+7
-0
script/c81210420.lua
script/c81210420.lua
+2
-3
script/c83438826.lua
script/c83438826.lua
+4
-4
script/c95503687.lua
script/c95503687.lua
+1
-2
script/c99469936.lua
script/c99469936.lua
+2
-5
No files found.
ocgcore/effect.cpp
View file @
e265c2c4
...
...
@@ -155,7 +155,7 @@ int32 effect::is_activateable(uint8 playerid, tevent& e, int32 neglect_cond, int
return
FALSE
;
}
else
if
(
!
(
type
&
EFFECT_TYPE_CONTINUOUS
))
{
if
((
handler
->
current
.
location
&
(
LOCATION_ONFIELD
|
LOCATION_REMOVED
))
&&
(
!
handler
->
is_position
(
POS_FACEUP
)
||
!
handler
->
is_status
(
STATUS_EFFECT_ENABLED
)))
&&
!
(
code
&
EVENT_FLIP
)
&&
(
!
handler
->
is_position
(
POS_FACEUP
)
||
!
handler
->
is_status
(
STATUS_EFFECT_ENABLED
)))
return
FALSE
;
if
(
!
(
type
&
(
EFFECT_TYPE_FLIP
|
EFFECT_TYPE_TRIGGER_F
)))
{
if
((
code
<
1132
||
code
>
1149
)
&&
pduel
->
game_field
->
infos
.
phase
==
PHASE_DAMAGE
&&
!
(
flag
&
EFFECT_FLAG_DAMAGE_STEP
))
...
...
ocgcore/effect.h
View file @
e265c2c4
...
...
@@ -413,6 +413,7 @@ public:
#define EVENT_LEVEL_UP 1200
#define EVENT_PAY_LPCOST 1201
#define EVENT_DETACH_MATERIAL 1202
#define EVENT_CONFIRM 1203
#define EVENT_TURN_END 1210
#define EVENT_PHASE 0x1000
#define EVENT_PHASE_START 0x2000
...
...
ocgcore/field.cpp
View file @
e265c2c4
...
...
@@ -53,8 +53,10 @@ field::field(duel* pduel) {
core
.
shuffle_deck_check
[
i
]
=
FALSE
;
core
.
shuffle_hand_check
[
i
]
=
FALSE
;
}
core
.
pre_field
[
0
]
=
0
;
core
.
pre_field
[
1
]
=
0
;
for
(
int
i
=
0
;
i
<
5
;
++
i
)
core
.
pre_field
[
i
]
=
0
;
core
.
opp_mzone
[
i
]
=
0
;
core
.
summoning_card
=
0
;
core
.
summon_depth
=
0
;
core
.
chain_limit
=
0
;
...
...
ocgcore/field.h
View file @
e265c2c4
...
...
@@ -214,7 +214,8 @@ struct processor {
std
::
unordered_set
<
card
*>
unique_cards
[
2
];
ptr
temp_var
[
4
];
uint32
global_flag
;
uint16
pre_field
[
5
];
uint16
pre_field
[
2
];
uint16
opp_mzone
[
5
];
int32
chain_limit
;
uint8
chain_limp
;
int32
chain_limit_p
;
...
...
ocgcore/interpreter.cpp
View file @
e265c2c4
...
...
@@ -89,6 +89,7 @@ static const struct luaL_Reg cardlib[] = {
{
"GetUnionCount"
,
scriptlib
::
card_get_union_count
},
{
"GetOverlayGroup"
,
scriptlib
::
card_get_overlay_group
},
{
"GetOverlayCount"
,
scriptlib
::
card_get_overlay_count
},
{
"GetOverlayTarget"
,
scriptlib
::
card_get_overlay_target
},
{
"CheckRemoveOverlayCard"
,
scriptlib
::
card_check_remove_overlay_card
},
{
"RemoveOverlayCard"
,
scriptlib
::
card_remove_overlay_card
},
{
"GetAttackedGroup"
,
scriptlib
::
card_get_attacked_group
},
...
...
ocgcore/libcard.cpp
View file @
e265c2c4
...
...
@@ -607,6 +607,13 @@ int32 scriptlib::card_get_overlay_count(lua_State *L) {
lua_pushinteger
(
L
,
pcard
->
xyz_materials
.
size
());
return
1
;
}
int32
scriptlib
::
card_get_overlay_target
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
interpreter
::
card2value
(
L
,
pcard
->
overlay_target
);
return
1
;
}
int32
scriptlib
::
card_check_remove_overlay_card
(
lua_State
*
L
)
{
check_param_count
(
L
,
4
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
...
...
ocgcore/libduel.cpp
View file @
e265c2c4
...
...
@@ -637,6 +637,7 @@ int32 scriptlib::duel_confirm_decktop(lua_State *L) {
}
}
}
field
::
card_set
cset
;
auto
cit
=
pduel
->
game_field
->
player
[
playerid
].
list_main
.
rbegin
();
pduel
->
write_buffer8
(
MSG_CONFIRM_DECKTOP
);
pduel
->
write_buffer8
(
playerid
);
...
...
@@ -646,8 +647,10 @@ int32 scriptlib::duel_confirm_decktop(lua_State *L) {
pduel
->
write_buffer8
((
*
cit
)
->
current
.
controler
);
pduel
->
write_buffer8
((
*
cit
)
->
current
.
location
);
pduel
->
write_buffer8
((
*
cit
)
->
current
.
sequence
);
cset
.
insert
(
*
cit
);
}
pduel
->
game_field
->
add_process
(
PROCESSOR_WAIT
,
0
,
0
,
0
,
0
,
0
);
pduel
->
game_field
->
raise_event
(
&
cset
,
EVENT_CONFIRM
,
pduel
->
game_field
->
core
.
reason_effect
,
0
,
pduel
->
game_field
->
core
.
reason_player
,
0
,
0
);
pduel
->
game_field
->
process_instant_event
();
return
lua_yield
(
L
,
0
);
}
int32
scriptlib
::
duel_confirm_cards
(
lua_State
*
L
)
{
...
...
@@ -685,7 +688,11 @@ int32 scriptlib::duel_confirm_cards(lua_State *L) {
pduel
->
write_buffer8
((
*
cit
)
->
current
.
sequence
);
}
}
pduel
->
game_field
->
add_process
(
PROCESSOR_WAIT
,
0
,
0
,
0
,
0
,
0
);
if
(
pcard
)
pduel
->
game_field
->
raise_event
(
pcard
,
EVENT_CONFIRM
,
pduel
->
game_field
->
core
.
reason_effect
,
0
,
pduel
->
game_field
->
core
.
reason_player
,
0
,
0
);
else
pduel
->
game_field
->
raise_event
(
&
pgroup
->
container
,
EVENT_CONFIRM
,
pduel
->
game_field
->
core
.
reason_effect
,
0
,
pduel
->
game_field
->
core
.
reason_player
,
0
,
0
);
pduel
->
game_field
->
process_instant_event
();
return
lua_yield
(
L
,
0
);
}
int32
scriptlib
::
duel_sort_decktop
(
lua_State
*
L
)
{
...
...
ocgcore/processor.cpp
View file @
e265c2c4
...
...
@@ -478,7 +478,7 @@ int32 field::process() {
if
(
it
->
step
==
0
)
{
card
*
attacker
=
core
.
attacker
;
if
(
!
attacker
||
(
infos
.
phase
==
PHASE_DAMAGE
&&
attacker
->
fieldid_r
!=
core
.
pre_field
[
0
]
&&
attacker
->
fieldid_r
!=
core
.
pre_field
[
1
])
||
(
attacker
->
fieldid_r
!=
core
.
pre_field
[
0
])
||
(
attacker
->
current
.
position
&
POS_FACEDOWN
)
||
attacker
->
is_affected_by_effect
(
EFFECT_ATTACK_DISABLED
)
||
!
attacker
->
is_affect_by_effect
(
core
.
reason_effect
))
{
...
...
@@ -2831,6 +2831,10 @@ int32 field::process_battle_command(uint16 step) {
core
.
attack_target
=
0
;
else
core
.
attack_target
=
core
.
select_cards
[
returns
.
bvalue
[
1
]];
if
(
core
.
attack_target
)
core
.
pre_field
[
1
]
=
core
.
attack_target
->
fieldid_r
;
else
core
.
pre_field
[
1
]
=
0
;
return
FALSE
;
}
case
7
:
{
...
...
@@ -2852,9 +2856,9 @@ int32 field::process_battle_command(uint16 step) {
}
for
(
uint32
i
=
0
;
i
<
5
;
++
i
)
{
if
(
player
[
1
-
infos
.
turn_player
].
list_mzone
[
i
])
core
.
pre_field
[
i
]
=
player
[
1
-
infos
.
turn_player
].
list_mzone
[
i
]
->
fieldid_r
;
core
.
opp_mzone
[
i
]
=
player
[
1
-
infos
.
turn_player
].
list_mzone
[
i
]
->
fieldid_r
;
else
core
.
pre_field
[
i
]
=
0
;
core
.
opp_mzone
[
i
]
=
0
;
}
//core.units.begin()->arg1 ---> is rollbacked
if
(
!
core
.
units
.
begin
()
->
arg1
)
{
...
...
@@ -2996,7 +3000,7 @@ int32 field::process_battle_command(uint16 step) {
return
FALSE
;
}
uint8
seq
=
core
.
chain_attack_target
->
current
.
sequence
;
if
(
core
.
pre_field
[
seq
]
!=
core
.
chain_attack_target
->
fieldid_r
)
{
if
(
core
.
opp_mzone
[
seq
]
!=
core
.
chain_attack_target
->
fieldid_r
)
{
core
.
units
.
begin
()
->
step
=
-
1
;
reset_phase
(
PHASE_DAMAGE
);
return
FALSE
;
...
...
@@ -3008,12 +3012,12 @@ int32 field::process_battle_command(uint16 step) {
core
.
units
.
begin
()
->
arg2
=
get_attack_target
(
core
.
attacker
,
&
core
.
select_cards
,
core
.
chain_attack
);
for
(
uint32
i
=
0
;
i
<
5
;
++
i
)
{
if
(
player
[
1
-
infos
.
turn_player
].
list_mzone
[
i
])
{
if
(
!
core
.
pre_field
[
i
]
||
core
.
pre_field
[
i
]
!=
player
[
1
-
infos
.
turn_player
].
list_mzone
[
i
]
->
fieldid_r
)
{
if
(
!
core
.
opp_mzone
[
i
]
||
core
.
opp_mzone
[
i
]
!=
player
[
1
-
infos
.
turn_player
].
list_mzone
[
i
]
->
fieldid_r
)
{
rollback
=
true
;
break
;
}
}
else
{
if
(
core
.
pre_field
[
i
])
{
if
(
core
.
opp_mzone
[
i
])
{
rollback
=
true
;
break
;
}
...
...
@@ -4407,10 +4411,14 @@ int32 field::break_effect() {
core
.
hint_timing
[
1
]
=
0
;
for
(
auto
chit
=
core
.
new_ochain
.
begin
();
chit
!=
core
.
new_ochain
.
end
();)
{
auto
rm
=
chit
++
;
if
(
!
(
rm
->
triggering_effect
->
flag
&
EFFECT_FLAG_DELAY
))
{
pduel
->
write_buffer8
(
MSG_MISSED_EFFECT
);
pduel
->
write_buffer32
(
rm
->
triggering_effect
->
handler
->
get_info_location
());
pduel
->
write_buffer32
(
rm
->
triggering_effect
->
handler
->
data
.
code
);
effect
*
peffect
=
rm
->
triggering_effect
;
if
(
!
(
peffect
->
flag
&
EFFECT_FLAG_DELAY
))
{
if
((
peffect
->
flag
&
EFFECT_FLAG_FIELD_ONLY
)
||
!
(
peffect
->
type
&
EFFECT_TYPE_FIELD
)
||
(
peffect
->
range
&
rm
->
triggering_location
))
{
pduel
->
write_buffer8
(
MSG_MISSED_EFFECT
);
pduel
->
write_buffer32
(
peffect
->
handler
->
get_info_location
());
pduel
->
write_buffer32
(
peffect
->
handler
->
data
.
code
);
}
core
.
new_ochain
.
erase
(
rm
);
}
}
...
...
ocgcore/scriptlib.h
View file @
e265c2c4
...
...
@@ -91,6 +91,7 @@ public:
static
int32
card_get_union_count
(
lua_State
*
L
);
static
int32
card_get_overlay_group
(
lua_State
*
L
);
static
int32
card_get_overlay_count
(
lua_State
*
L
);
static
int32
card_get_overlay_target
(
lua_State
*
L
);
static
int32
card_check_remove_overlay_card
(
lua_State
*
L
);
static
int32
card_remove_overlay_card
(
lua_State
*
L
);
static
int32
card_get_attacked_group
(
lua_State
*
L
);
...
...
script/c14644902.lua
View file @
e265c2c4
...
...
@@ -39,5 +39,7 @@ function c14644902.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
function
c14644902
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Destroy
(
e
:
GetHandler
(),
REASON_EFFECT
)
if
not
e
:
GetHandler
():
IsHasEffect
(
66235877
)
then
Duel
.
Destroy
(
e
:
GetHandler
(),
REASON_EFFECT
)
end
end
script/c3027001.lua
View file @
e265c2c4
...
...
@@ -13,7 +13,7 @@ function c3027001.cfilter(c,tp)
return
c
:
IsType
(
TYPE_TRAP
)
and
c
:
IsControler
(
tp
)
end
function
c3027001
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
rp
==
tp
then
return
end
if
rp
==
tp
then
return
false
end
local
ex
,
tg
,
tc
=
Duel
.
GetOperationInfo
(
ev
,
CATEGORY_DESTROY
)
return
ex
and
tg
~=
nil
and
tg
:
GetCount
()
==
tc
and
tg
:
IsExists
(
c3027001
.
cfilter
,
1
,
e
:
GetHandler
(),
tp
)
end
...
...
script/c36076683.lua
View file @
e265c2c4
...
...
@@ -39,7 +39,7 @@ function c36076683.atkop(e,tp,eg,ep,ev,re,r,rp)
e2
:
SetCode
(
EVENT_PRE_BATTLE_DAMAGE
)
e2
:
SetCondition
(
c36076683
.
rdcon
)
e2
:
SetOperation
(
c36076683
.
rdop
)
e2
:
SetReset
(
RESET_EVENT
+
0x1f
e
0000
+
RESET_PHASE
+
PHASE_END
)
e2
:
SetReset
(
RESET_EVENT
+
0x1f
f
0000
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e2
)
end
end
...
...
script/c40607210.lua
View file @
e265c2c4
...
...
@@ -30,6 +30,7 @@ end
function
c40607210
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
rc
=
re
:
GetHandler
()
return
rc
and
rc
:
IsRace
(
RACE_ZOMBIE
)
and
eg
:
IsExists
(
c40607210
.
cfilter
,
1
,
nil
,
tp
)
and
(
re
:
GetCode
()
~=
EFFECT_SPSUMMON_PROC
or
not
rc
:
IsStatus
(
STATUS_REVIVE_LIMIT
))
end
function
c40607210
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetFlagEffect
(
tp
,
40607210
)
==
0
and
Duel
.
CheckLPCost
(
tp
,
2000
)
end
...
...
script/c44178886.lua
View file @
e265c2c4
...
...
@@ -16,6 +16,7 @@ function c44178886.initial_effect(c)
e2
:
SetDescription
(
aux
.
Stringid
(
44178886
,
1
))
e2
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCondition
(
c44178886
.
discon
)
e2
:
SetTarget
(
c44178886
.
distg
)
e2
:
SetOperation
(
c44178886
.
disop
)
...
...
@@ -36,8 +37,7 @@ function c44178886.discon(e,tp,eg,ep,ev,re,r,rp)
return
tp
==
Duel
.
GetTurnPlayer
()
end
function
c44178886
.
distg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
GetFlagEffect
(
44178886
)
==
0
end
e
:
GetHandler
():
RegisterFlagEffect
(
44178886
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
RESET_END
,
EFFECT_FLAG_OATH
,
1
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DECKDES
,
nil
,
0
,
tp
,
3
)
end
function
c44178886
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c53656677.lua
View file @
e265c2c4
...
...
@@ -4,15 +4,18 @@ function c53656677.initial_effect(c)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_EQUIP
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCode
(
EVENT_BE_BATTLE_TARGET
)
e1
:
SetTarget
(
c53656677
.
target
)
e1
:
SetOperation
(
c53656677
.
operation
)
c
:
RegisterEffect
(
e1
)
end
function
c53656677
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c53656677
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
==
Duel
.
GetAttackTarget
()
end
local
a
=
Duel
.
GetAttacker
()
local
d
=
Duel
.
GetAttackTarget
()
if
chk
==
0
then
return
d
and
d
:
IsControler
(
tp
)
and
d
:
IsFaceup
()
and
d
:
GetAttack
()
<
a
:
GetAttack
()
end
if
chk
==
0
then
return
d
and
d
:
IsControler
(
tp
)
and
d
:
IsFaceup
()
and
d
:
IsCanBeEffectTarget
(
e
)
and
d
:
GetAttack
()
<
a
:
GetAttack
()
end
Duel
.
SetTargetCard
(
d
)
end
function
c53656677
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c57421866.lua
View file @
e265c2c4
...
...
@@ -33,14 +33,15 @@ function c57421866.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function
c57421866
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsFacedown
()
or
not
tc
:
IsRelateToEffect
(
e
)
or
tc
:
GetLevel
()
<
2
then
return
end
if
tc
:
IsFacedown
()
or
not
tc
:
IsRelateToEffect
(
e
)
or
tc
:
IsImmuneToEffect
(
e
)
or
tc
:
GetLevel
()
<
2
then
return
end
local
c
=
e
:
GetHandler
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetValue
(
-
1
)
if
tc
:
RegisterEffect
(
e1
)
and
c
:
IsRelateToEffect
(
e
)
then
tc
:
RegisterEffect
(
e1
)
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
script/c59019082.lua
View file @
e265c2c4
...
...
@@ -13,20 +13,20 @@ function c59019082.initial_effect(c)
c
:
RegisterEffect
(
e1
)
end
function
c59019082
.
cfilter
(
c
)
return
c
:
GetPreviousLocation
()
==
LOCATION_DECK
return
c
:
IsPreviousLocation
(
LOCATION_DECK
)
end
function
c59019082
.
condtion
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
re
then
return
false
end
local
rc
=
re
:
GetHandler
()
return
rp
==
tp
and
bit
.
band
(
r
,
REASON_EFFECT
)
~=
0
and
not
rc
:
IsCode
(
59019082
)
and
rc
:
IsSetCard
(
0x38
)
and
rc
:
IsType
(
TYPE_MONSTER
)
and
eg
:
IsExists
(
c59019082
.
cfilter
,
1
,
nil
)
and
re
:
GetActivateLocation
()
==
LOCATION_MZONE
and
eg
:
IsExists
(
c59019082
.
cfilter
,
1
,
nil
)
end
function
c59019082
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DECKDES
,
nil
,
0
,
tp
,
2
)
end
function
c59019082
.
filter
(
c
)
return
c
:
GetLocation
()
==
LOCATION_GRAVE
and
c
:
IsSetCard
(
0x38
)
and
c
:
IsType
(
TYPE_MONSTER
)
return
c
:
IsLocation
(
LOCATION_GRAVE
)
and
c
:
IsSetCard
(
0x38
)
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
c59019082
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
...
...
script/c60741115.lua
View file @
e265c2c4
...
...
@@ -12,6 +12,7 @@ function c60741115.initial_effect(c)
c
:
RegisterEffect
(
e1
)
end
function
c60741115
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
rp
==
tp
or
Duel
.
GetTurnPlayer
()
==
tp
then
return
false
end
local
ex
,
cg
,
ct
,
cp
,
cv
=
Duel
.
GetOperationInfo
(
ev
,
CATEGORY_DAMAGE
)
if
ex
then
return
true
end
ex
,
cg
,
ct
,
cp
,
cv
=
Duel
.
GetOperationInfo
(
ev
,
CATEGORY_RECOVER
)
...
...
script/c66235877.lua
View file @
e265c2c4
...
...
@@ -18,6 +18,13 @@ function c66235877.initial_effect(c)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetOperation
(
c66235877
.
disop
)
c
:
RegisterEffect
(
e2
)
--
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
66235877
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
c
:
RegisterEffect
(
e3
)
end
function
c66235877
.
distg
(
e
,
c
)
return
c
:
IsType
(
TYPE_FLIP
)
...
...
script/c81210420.lua
View file @
e265c2c4
...
...
@@ -4,7 +4,6 @@ function c81210420.initial_effect(c)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_POSITION
+
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
0
,
TIMING_BATTLE_START
+
TIMING_BATTLE_END
)
e1
:
SetCondition
(
c81210420
.
condition
)
...
...
@@ -16,7 +15,7 @@ function c81210420.condition(e,tp,eg,ep,ev,re,r,rp)
return
Duel
.
GetTurnPlayer
()
~=
tp
and
Duel
.
GetCurrentPhase
()
==
PHASE_BATTLE
end
function
c81210420
.
filter
(
c
)
return
not
c
:
IsType
(
TYPE_TOKEN
)
return
c
:
IsFacedown
()
or
c
:
IsCanTurnSet
(
)
end
function
c81210420
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
true
,
false
,
POS_FACEDOWN
)
...
...
@@ -34,7 +33,7 @@ function c81210420.activate(e,tp,eg,ep,ev,re,r,rp)
if
g
:
GetCount
()
<
2
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
c81210420
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
):
GetFirst
()
if
not
tc
then
return
end
if
not
tc
or
tc
:
IsImmuneToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
g
:
Select
(
tp
,
2
,
2
,
nil
)
if
tc
:
IsFaceup
()
then
...
...
script/c83438826.lua
View file @
e265c2c4
...
...
@@ -77,15 +77,15 @@ function c83438826.desop(e,tp,eg,ep,ev,re,r,rp)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
local
eq
=
c
:
GetEquipTarget
()
if
not
c
:
IsRelateToEffect
(
e
)
or
not
tc
:
IsRelateToEffect
(
e
)
or
tc
:
IsFaceup
()
or
not
eq
:
IsAttackAbove
(
500
)
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
or
not
tc
:
IsRelateToEffect
(
e
)
or
tc
:
IsFaceup
()
or
eq
:
IsImmuneToEffect
(
e
)
or
not
eq
:
IsAttackAbove
(
500
)
then
return
end
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
-
500
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
if
eq
:
RegisterEffect
(
e1
)
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
eq
:
RegisterEffect
(
e1
)
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
function
c83438826
.
eqcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
...
...
script/c95503687.lua
View file @
e265c2c4
...
...
@@ -41,9 +41,8 @@ function c95503687.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
end
function
c95503687
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
)
and
tc
:
IsRelateToEffect
(
e
)
then
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
...
...
script/c99469936.lua
View file @
e265c2c4
...
...
@@ -22,11 +22,10 @@ function c99469936.initial_effect(c)
--negate
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
99469936
,
2
))
e3
:
Set
Type
(
EFFECT_TYPE_QUICK_O
)
e3
:
Set
Code
(
EVENT_FREE_CHAI
N
)
e3
:
Set
Category
(
CATEGORY_DISABLE
)
e3
:
Set
Type
(
EFFECT_TYPE_IGNITIO
N
)
e3
:
SetCountLimit
(
1
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetHintTiming
(
0
,
0x1c0
)
e3
:
SetCost
(
c99469936
.
cost
)
e3
:
SetTarget
(
c99469936
.
target
)
e3
:
SetOperation
(
c99469936
.
operation
)
...
...
@@ -65,10 +64,8 @@ function c99469936.operation(e,tp,eg,ep,ev,re,r,rp)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e2
:
SetValue
(
RESET_TURN_SET
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e2
)
Duel
.
NegateRelatedChain
(
tc
,
RESET_TURN_SET
)
tc
=
g
:
GetNext
()
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