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
YGOPRO-520DIY
ygopro
Commits
f48e190c
Commit
f48e190c
authored
Sep 16, 2013
by
Fluorohydride
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #612 from VanillaSalt/patch80
fix
parents
51a9000a
0126a14a
Changes
38
Show whitespace changes
Inline
Side-by-side
Showing
38 changed files
with
124 additions
and
85 deletions
+124
-85
ocgcore/effect.h
ocgcore/effect.h
+1
-0
ocgcore/processor.cpp
ocgcore/processor.cpp
+8
-6
script/c18517177.lua
script/c18517177.lua
+2
-1
script/c2137678.lua
script/c2137678.lua
+1
-1
script/c21954587.lua
script/c21954587.lua
+1
-1
script/c22888900.lua
script/c22888900.lua
+10
-2
script/c24137081.lua
script/c24137081.lua
+8
-2
script/c26285788.lua
script/c26285788.lua
+4
-2
script/c28150174.lua
script/c28150174.lua
+3
-3
script/c34815282.lua
script/c34815282.lua
+9
-5
script/c38730226.lua
script/c38730226.lua
+7
-10
script/c39402797.lua
script/c39402797.lua
+2
-2
script/c42155488.lua
script/c42155488.lua
+2
-3
script/c42421606.lua
script/c42421606.lua
+1
-1
script/c43694481.lua
script/c43694481.lua
+1
-1
script/c440556.lua
script/c440556.lua
+1
-1
script/c45462639.lua
script/c45462639.lua
+1
-1
script/c46820049.lua
script/c46820049.lua
+1
-0
script/c4941482.lua
script/c4941482.lua
+2
-2
script/c49456901.lua
script/c49456901.lua
+1
-1
script/c50527144.lua
script/c50527144.lua
+14
-16
script/c50766506.lua
script/c50766506.lua
+4
-1
script/c60930169.lua
script/c60930169.lua
+2
-2
script/c68786330.lua
script/c68786330.lua
+1
-1
script/c70908596.lua
script/c70908596.lua
+2
-2
script/c71315423.lua
script/c71315423.lua
+1
-1
script/c72302403.lua
script/c72302403.lua
+2
-1
script/c73414375.lua
script/c73414375.lua
+4
-2
script/c75733063.lua
script/c75733063.lua
+1
-1
script/c7625614.lua
script/c7625614.lua
+3
-2
script/c76419637.lua
script/c76419637.lua
+1
-1
script/c76721030.lua
script/c76721030.lua
+0
-1
script/c78009994.lua
script/c78009994.lua
+3
-0
script/c78540593.lua
script/c78540593.lua
+3
-2
script/c81907872.lua
script/c81907872.lua
+1
-1
script/c88190790.lua
script/c88190790.lua
+7
-1
script/c90810762.lua
script/c90810762.lua
+8
-2
script/c99902789.lua
script/c99902789.lua
+1
-3
No files found.
ocgcore/effect.h
View file @
f48e190c
...
...
@@ -415,6 +415,7 @@ public:
#define EVENT_TURN_END 1210
#define EVENT_PHASE 0x1000
#define EVENT_PHASE_START 0x2000
#define EVENT_PHASE_PRESTART 0x2100
#define EVENT_ADD_COUNTER 0x10000
#define EVENT_REMOVE_COUNTER 0x20000
...
...
ocgcore/processor.cpp
View file @
f48e190c
...
...
@@ -3833,17 +3833,12 @@ int32 field::process_turn(uint16 step, uint8 turn_player) {
//Standby Phase
infos
.
phase
=
PHASE_STANDBY
;
core
.
phase_action
=
FALSE
;
raise_event
((
card
*
)
0
,
EVENT_PHASE_START
+
PHASE_STANDBY
,
0
,
0
,
0
,
turn_player
,
0
);
raise_event
((
card
*
)
0
,
EVENT_PHASE_
PRE
START
+
PHASE_STANDBY
,
0
,
0
,
0
,
turn_player
,
0
);
process_instant_event
();
adjust_all
();
return
FALSE
;
}
case
4
:
{
if
(
core
.
new_fchain
.
size
()
||
core
.
new_ochain
.
size
()
||
core
.
flip_chain
.
size
())
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
0
,
0
);
return
FALSE
;
}
case
5
:
{
core
.
new_fchain
.
clear
();
core
.
new_ochain
.
clear
();
core
.
quick_f_chain
.
clear
();
...
...
@@ -3855,6 +3850,13 @@ int32 field::process_turn(uint16 step, uint8 turn_player) {
}
pduel
->
write_buffer8
(
MSG_NEW_PHASE
);
pduel
->
write_buffer8
(
infos
.
phase
);
raise_event
((
card
*
)
0
,
EVENT_PHASE_START
+
PHASE_STANDBY
,
0
,
0
,
0
,
turn_player
,
0
);
process_instant_event
();
return
FALSE
;
}
case
5
:
{
if
(
core
.
new_fchain
.
size
()
||
core
.
new_ochain
.
size
()
||
core
.
flip_chain
.
size
()
||
core
.
instant_event
.
back
().
event_code
!=
EVENT_PHASE_START
+
PHASE_STANDBY
)
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
0
,
0
);
add_process
(
PROCESSOR_PHASE_EVENT
,
0
,
0
,
0
,
PHASE_STANDBY
,
0
);
return
FALSE
;
}
...
...
script/c18517177.lua
View file @
f48e190c
...
...
@@ -22,7 +22,8 @@ function c18517177.cfilter(c)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x1d
)
end
function
c18517177
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_MZONE
,
0
)
<
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_MZONE
)
return
Duel
.
GetTurnPlayer
()
==
tp
and
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_MZONE
,
0
)
<
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_MZONE
)
and
Duel
.
IsExistingMatchingCard
(
c18517177
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
c18517177
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
...
...
script/c2137678.lua
View file @
f48e190c
...
...
@@ -23,7 +23,7 @@ function c2137678.atkfilter(c)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x13
)
end
function
c2137678
.
val
(
e
,
c
)
return
Duel
.
GetMatchingGroupCount
(
c2137678
.
atkfilter
,
c
:
GetControler
(),
LOCATION_MZONE
,
0
,
c
)
*
100
return
Duel
.
GetMatchingGroupCount
(
c2137678
.
atkfilter
,
0
,
LOCATION_MZONE
,
LOCATION_MZONE
,
c
)
*
100
end
function
c2137678
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
1
-
tp
)
and
chkc
:
IsFaceup
()
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
end
...
...
script/c21954587.lua
View file @
f48e190c
...
...
@@ -69,7 +69,7 @@ function c21954587.thop(e,tp,eg,ep,ev,re,r,rp)
end
end
function
c21954587
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
return
Duel
.
Get
TurnCount
()
~=
1
and
Duel
.
Get
CurrentPhase
()
==
PHASE_MAIN1
end
function
c21954587
.
rfilter
(
c
)
return
c
:
IsPosition
(
POS_FACEUP_ATTACK
)
and
c
:
IsAttribute
(
ATTRIBUTE_WATER
)
...
...
script/c22888900.lua
View file @
f48e190c
...
...
@@ -22,7 +22,11 @@ function c22888900.operation(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e1
:
SetTarget
(
c22888900
.
tg
)
e1
:
SetCode
(
EFFECT_DISABLE
)
if
Duel
.
GetTurnPlayer
()
~=
tp
then
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
+
RESET_OPPO_TURN
,
2
)
else
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
+
RESET_OPPO_TURN
)
end
Duel
.
RegisterEffect
(
e1
,
tp
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_CANNOT_ATTACK
)
...
...
@@ -34,7 +38,11 @@ function c22888900.operation(e,tp,eg,ep,ev,re,r,rp)
e3
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e3
:
SetTargetRange
(
1
,
1
)
e3
:
SetTarget
(
c22888900
.
splimit
)
if
Duel
.
GetTurnPlayer
()
~=
tp
then
e3
:
SetReset
(
RESET_PHASE
+
PHASE_END
+
RESET_OPPO_TURN
,
2
)
else
e3
:
SetReset
(
RESET_PHASE
+
PHASE_END
+
RESET_OPPO_TURN
)
end
Duel
.
RegisterEffect
(
e3
,
tp
)
end
function
c22888900
.
tg
(
e
,
c
)
...
...
script/c24137081.lua
View file @
f48e190c
...
...
@@ -7,14 +7,20 @@ function c24137081.initial_effect(c)
c
:
RegisterEffect
(
e1
)
--atkup
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetDescription
(
aux
.
Stringid
(
24137081
,
0
))
e2
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetCode
(
EVENT_BATTLE_DAMAGE
)
e2
:
SetCondition
(
c24137081
.
atkcon
)
e2
:
SetOperation
(
c24137081
.
atkop
)
c
:
RegisterEffect
(
e2
)
end
function
c24137081
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
ep
~=
tp
and
Duel
.
GetAttackTarget
()
==
nil
end
function
c24137081
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
ep
~=
tp
and
Duel
.
GetAttackTarget
()
==
nil
then
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
...
...
script/c26285788.lua
View file @
f48e190c
...
...
@@ -19,8 +19,10 @@ end
function
c26285788
.
addcount
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
eg
:
GetFirst
()
while
c
~=
nil
do
local
p
=
c
:
GetPreviousControler
()
if
not
c
:
IsType
(
TYPE_TOKEN
)
then
local
p
=
c
:
GetReasonPlayer
()
Duel
.
RegisterFlagEffect
(
p
,
26285789
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
c
=
eg
:
GetNext
()
end
end
...
...
script/c28150174.lua
View file @
f48e190c
...
...
@@ -21,10 +21,10 @@ function c28150174.poscost(e,tp,eg,ep,ev,re,r,rp,chk)
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
end
function
c28150174
.
postg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
Is
Position
(
POS_DEFENCE
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
Is
Position
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
,
POS_DEFENCE
)
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
Is
DefencePos
(
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
Is
DefencePos
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DEFENCE
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
Is
Position
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
,
POS_DEFENCE
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
Is
DefencePos
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_POSITION
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
c28150174
.
posop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c34815282.lua
View file @
f48e190c
...
...
@@ -2,11 +2,12 @@
function
c34815282
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_
DISABL
E
)
e1
:
SetCategory
(
CATEGORY_
ATKCHANG
E
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
0
,
0x1c0
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetHintTiming
(
TIMING_DAMAGE_STEP
,
TIMING_DAMAGE_STEP
+
0x1c0
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetCondition
(
c34815282
.
condition
)
e1
:
SetTarget
(
c34815282
.
target
)
e1
:
SetOperation
(
c34815282
.
operation
)
c
:
RegisterEffect
(
e1
)
...
...
@@ -19,8 +20,11 @@ function c34815282.initial_effect(c)
e2
:
SetOperation
(
c34815282
.
desop
)
c
:
RegisterEffect
(
e2
)
end
function
c34815282
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetCurrentPhase
()
~=
PHASE_DAMAGE
or
not
Duel
.
IsDamageCalculated
()
end
function
c34815282
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
GetBaseAttack
()
>
1000
return
c
:
IsFaceup
()
and
c
:
GetBaseAttack
()
>
1000
and
c
:
GetLevel
()
>
0
end
function
c34815282
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c34815282
.
filter
(
chkc
)
end
...
...
@@ -58,5 +62,5 @@ function c34815282.descon(e,tp,eg,ep,ev,re,r,rp)
return
tc
and
eg
:
IsContains
(
tc
)
end
function
c34815282
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Destroy
(
e
:
GetHandler
(),
REASON_EFFECT
)
Duel
.
Destroy
(
e
:
GetHandler
(),
REASON_EFFECT
)
end
script/c38730226.lua
View file @
f48e190c
...
...
@@ -4,39 +4,36 @@ function c38730226.initial_effect(c)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
38730226
,
0
))
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetProperty
(
EFFECT_FLAG_REPEAT
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetCountLimit
(
1
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCondition
(
c38730226
.
con
)
e1
:
SetTarget
(
c38730226
.
tg
)
e1
:
SetOperation
(
c38730226
.
op
)
c
:
RegisterEffect
(
e1
)
end
function
c38730226
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
return
Duel
.
GetTurnPlayer
()
~=
tp
and
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_HAND
,
0
)
==
0
end
function
c38730226
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
GetFlagEffect
(
91345518
)
==
0
end
e
:
GetHandler
():
RegisterFlagEffect
(
91345518
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
EFFECT_FLAG_OATH
,
1
)
end
function
c38730226
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetDescription
(
aux
.
Stringid
(
38730226
,
1
))
e1
:
SetCategory
(
CATEGORY_DRAW
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_DRAW
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_REPEAT
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_STANDBY
)
e1
:
SetCountLimit
(
1
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetTarget
(
c38730226
.
dtg
)
e1
:
SetOperation
(
c38730226
.
dop
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_
DRAW
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_
STANDBY
)
e
:
GetHandler
():
RegisterEffect
(
e1
)
end
function
c38730226
.
dtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
GetFlagEffect
(
91345518
)
==
0
end
if
chk
==
0
then
return
true
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
e
:
GetHandler
():
RegisterFlagEffect
(
91345518
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
EFFECT_FLAG_OATH
,
1
)
end
function
c38730226
.
dop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
...
...
script/c39402797.lua
View file @
f48e190c
...
...
@@ -26,9 +26,9 @@ function c39402797.descon(e,tp,eg,ep,ev,re,r,rp)
end
function
c39402797
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
chkc
:
IsControler
(
tp
)
and
chkc
:
IsDestructable
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsDestructable
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsDestructable
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
e
:
GetHandler
()
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsDestructable
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
2
,
nil
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsDestructable
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
2
,
e
:
GetHandler
()
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
c39402797
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c42155488.lua
View file @
f48e190c
...
...
@@ -39,8 +39,7 @@ function c42155488.ntop(e,tp,eg,ep,ev,re,r,rp,c)
c
:
RegisterEffect
(
e2
)
end
function
c42155488
.
dectg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
563
)
local
rc
=
Duel
.
AnnounceRace
(
tp
,
1
,
0xffffff
)
e
:
SetLabel
(
rc
)
...
...
script/c42421606.lua
View file @
f48e190c
...
...
@@ -36,7 +36,7 @@ function c42421606.efop(e,tp,eg,ep,ev,re,r,rp)
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
elseif
dc
==
3
then
if
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_HAND
)
>
0
then
Duel
.
DiscardHand
(
1
-
tp
,
nil
,
1
,
1
,
REASON_EFFECT
)
Duel
.
DiscardHand
(
1
-
tp
,
nil
,
1
,
1
,
REASON_EFFECT
+
REASON_DISCARD
)
end
elseif
dc
==
4
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
...
...
script/c43694481.lua
View file @
f48e190c
...
...
@@ -25,7 +25,7 @@ function c43694481.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if
chk
==
0
then
return
true
end
Duel
.
SetTargetPlayer
(
1
-
tp
)
Duel
.
SetTargetParam
(
1500
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
150
0
)
end
function
c43694481
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
...
...
script/c440556.lua
View file @
f48e190c
script/c45462639.lua
View file @
f48e190c
...
...
@@ -58,7 +58,7 @@ function c45462639.descost(e,tp,eg,ep,ev,re,r,rp,chk)
e
:
GetHandler
():
RemoveCounter
(
tp
,
0x3001
,
2
,
REASON_COST
)
end
function
c45462639
.
destarg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_HAND
)
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_HANDES
,
0
,
0
,
1
-
tp
,
1
)
end
function
c45462639
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c46820049.lua
View file @
f48e190c
...
...
@@ -25,6 +25,7 @@ function c46820049.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function
c46820049
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetFieldGroup
(
ep
,
LOCATION_HAND
,
0
,
nil
)
if
g
:
GetCount
()
==
0
then
return
end
local
sg
=
g
:
RandomSelect
(
ep
,
1
)
Duel
.
SendtoGrave
(
sg
,
REASON_DISCARD
+
REASON_EFFECT
)
end
script/c4941482.lua
View file @
f48e190c
...
...
@@ -17,7 +17,7 @@ function c4941482.condition(e,tp,eg,ep,ev,re,r,rp)
return
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
c
:
IsReason
(
REASON_EFFECT
)
end
function
c4941482
.
filter
(
c
)
return
c
:
Is
Position
(
POS_DEFENCE
)
and
c
:
IsControlerCanBeChanged
()
return
c
:
Is
DefencePos
(
)
and
c
:
IsControlerCanBeChanged
()
end
function
c4941482
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
1
-
tp
)
and
c4941482
.
filter
(
chkc
)
end
...
...
@@ -28,7 +28,7 @@ function c4941482.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function
c4941482
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
and
tc
:
Is
Position
(
POS_DEFENCE
)
and
tc
:
IsRelateToEffect
(
e
)
and
not
Duel
.
GetControl
(
tc
,
tp
)
then
if
tc
and
tc
:
Is
DefencePos
(
)
and
tc
:
IsRelateToEffect
(
e
)
and
not
Duel
.
GetControl
(
tc
,
tp
)
then
if
not
tc
:
IsImmuneToEffect
(
e
)
and
tc
:
IsAbleToChangeControler
()
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
...
...
script/c49456901.lua
View file @
f48e190c
...
...
@@ -62,7 +62,7 @@ function c49456901.operation(e,tp,eg,ep,ev,re,r,rp)
if
Duel
.
NegateActivation
(
ev
)
and
Duel
.
GetFieldGroupCount
(
1
-
tp
,
LOCATION_HAND
,
0
)
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
49456901
,
2
))
then
local
g
=
Duel
.
GetFieldGroup
(
1
-
tp
,
LOCATION_HAND
,
0
):
RandomSelect
(
1
-
tp
,
1
)
Duel
.
SendtoGrave
(
g
,
REASON_
DISCARD
+
REASON_
EFFECT
)
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
Duel
.
SetLP
(
1
-
tp
,
Duel
.
GetLP
(
1
-
tp
)
/
2
)
end
end
script/c50527144.lua
View file @
f48e190c
...
...
@@ -19,21 +19,19 @@ function c50527144.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
ShuffleHand
(
tp
)
end
function
c50527144
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c50527144
.
tgfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
nil
)
local
tc
=
g
:
GetFirst
()
while
tc
do
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
RESET_END
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
)
e1
:
SetTargetRange
(
LOCATION_ONFIELD
,
0
)
e1
:
SetTarget
(
c50527144
.
tgfilter
)
e1
:
SetValue
(
1
)
tc
:
RegisterEffect
(
e1
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
tc
:
RegisterEffect
(
e2
)
tc
=
g
:
GetNext
()
end
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
Duel
.
RegisterEffect
(
e2
,
tp
)
end
function
c50527144
.
tgfilter
(
c
)
function
c50527144
.
tgfilter
(
e
,
c
)
return
(
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x8d
))
or
(
c
:
IsFacedown
()
and
c
:
IsLocation
(
LOCATION_MZONE
))
end
script/c50766506.lua
View file @
f48e190c
--
̷ g
--
忍法 分身の術
function
c50766506
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -45,17 +45,20 @@ function c50766506.operation(e,tp,eg,ep,ev,re,r,rp)
local
sg
=
Duel
.
GetMatchingGroup
(
c50766506
.
spfilter2
,
tp
,
LOCATION_DECK
,
0
,
nil
,
e
,
tp
)
sg
:
Remove
(
Card
.
IsLevelAbove
,
nil
,
slv
+
1
)
if
sg
:
GetCount
()
==
0
then
return
end
local
cg
=
Group
.
CreateGroup
()
repeat
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tc
=
sg
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
sg
:
RemoveCard
(
tc
)
slv
=
slv
-
tc
:
GetLevel
()
Duel
.
SpecialSummonStep
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP_ATTACK
+
POS_FACEDOWN_DEFENCE
)
if
tc
:
IsFacedown
()
then
cg
:
AddCard
(
tc
)
end
c
:
SetCardTarget
(
tc
)
sg
:
Remove
(
Card
.
IsLevelAbove
,
nil
,
slv
+
1
)
ft
=
ft
-
1
until
ft
<=
0
or
sg
:
GetCount
()
==
0
or
not
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
50766506
,
0
))
Duel
.
SpecialSummonComplete
()
Duel
.
ConfirmCards
(
1
-
tp
,
cg
)
end
function
c50766506
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
e
:
GetHandler
():
GetCardTarget
():
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_MZONE
)
...
...
script/c60930169.lua
View file @
f48e190c
...
...
@@ -21,10 +21,10 @@ end
function
c60930169
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
a
=
Duel
.
GetAttacker
()
local
t
=
Duel
.
GetAttackTarget
()
if
a
and
a
:
Is
Position
(
POS_DEFENCE
)
and
a
:
GetDefence
()
>
a
:
GetAttack
()
and
a
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
then
if
a
and
a
:
Is
DefencePos
(
)
and
a
:
GetDefence
()
>
a
:
GetAttack
()
and
a
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
then
a
:
RegisterFlagEffect
(
60930169
,
RESET_PHASE
+
PHASE_DAMAGE
,
0
,
1
)
end
if
t
and
t
:
Is
Position
(
POS_DEFENCE
)
and
t
:
GetDefence
()
>
t
:
GetAttack
()
and
t
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
then
if
t
and
t
:
Is
DefencePos
(
)
and
t
:
GetDefence
()
>
t
:
GetAttack
()
and
t
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
then
t
:
RegisterFlagEffect
(
60930169
,
RESET_PHASE
+
PHASE_DAMAGE
,
0
,
1
)
end
end
...
...
script/c68786330.lua
View file @
f48e190c
...
...
@@ -19,7 +19,7 @@ end
function
c68786330
.
poscon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
a
=
Duel
.
GetAttacker
()
local
d
=
Duel
.
GetAttackTarget
()
return
a
and
d
and
a
:
IsRelateToBattle
()
and
d
:
IsRelateToBattle
()
and
a
:
IsRace
(
RACE_REPTILE
)
and
d
:
Is
Position
(
POS_DEFENCE
)
return
a
and
d
and
a
:
IsRelateToBattle
()
and
d
:
IsRelateToBattle
()
and
a
:
IsRace
(
RACE_REPTILE
)
and
d
:
Is
DefencePos
(
)
end
function
c68786330
.
posop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
...
...
script/c70908596.lua
View file @
f48e190c
...
...
@@ -22,8 +22,8 @@ function c70908596.filter(c)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x53
)
and
c
:
IsLevelAbove
(
1
)
end
function
c70908596
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c
hkc
:
IsControler
(
tp
)
and
c
70908596
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c70908596
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c70908596
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c70908596
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c70908596
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
local
tc
=
g
:
GetFirst
()
...
...
script/c71315423.lua
View file @
f48e190c
script/c72302403.lua
View file @
f48e190c
...
...
@@ -34,7 +34,6 @@ function c72302403.activate(e,tp,eg,ep,ev,re,r,rp)
Duel
.
ChangePosition
(
sg
,
POS_FACEUP_ATTACK
,
POS_FACEUP_ATTACK
,
POS_FACEUP_DEFENCE
,
POS_FACEUP_DEFENCE
)
end
local
c
=
e
:
GetHandler
()
c
:
CancelToGrave
()
--cannot attack
local
e2
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -42,11 +41,13 @@ function c72302403.activate(e,tp,eg,ep,ev,re,r,rp)
e2
:
SetCode
(
EFFECT_CANNOT_ATTACK_ANNOUNCE
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetTargetRange
(
0
,
LOCATION_MZONE
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
c
:
RegisterEffect
(
e2
)
--remain field
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_REMAIN_FIELD
)
e3
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
c
:
RegisterEffect
(
e3
)
end
function
c72302403
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c73414375.lua
View file @
f48e190c
...
...
@@ -27,6 +27,8 @@ function c73414375.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
c73414375
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
):
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_EFFECT
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
if
not
g
then
return
end
local
rg
=
g
:
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
Duel
.
Remove
(
rg
,
POS_FACEUP
,
REASON_EFFECT
)
end
script/c75733063.lua
View file @
f48e190c
...
...
@@ -23,7 +23,7 @@ function c75733063.atkfilter(c)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x13
)
end
function
c75733063
.
val
(
e
,
c
)
return
Duel
.
GetMatchingGroupCount
(
c75733063
.
atkfilter
,
c
:
GetControler
(),
LOCATION_MZONE
,
0
,
c
)
*
200
return
Duel
.
GetMatchingGroupCount
(
c75733063
.
atkfilter
,
0
,
LOCATION_MZONE
,
LOCATION_MZONE
,
c
)
*
200
end
function
c75733063
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsLocation
(
LOCATION_GRAVE
)
and
e
:
GetHandler
():
IsReason
(
REASON_BATTLE
)
...
...
script/c7625614.lua
View file @
f48e190c
...
...
@@ -41,8 +41,9 @@ function c7625614.operation(e,tp,eg,ep,ev,re,r,rp)
Duel
.
Equip
(
tp
,
e
:
GetHandler
(),
tc
)
end
end
function
c7625614
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetEquipTarget
():
GetControler
()
==
tp
function
c7625614
.
atkcon
(
e
)
local
ec
=
e
:
GetHandler
():
GetEquipTarget
()
return
ec
and
ec
:
GetControler
()
==
e
:
GetHandlerPlayer
()
end
function
c7625614
.
atktg
(
e
,
c
)
return
c
~=
e
:
GetHandler
():
GetEquipTarget
()
...
...
script/c76419637.lua
View file @
f48e190c
...
...
@@ -39,7 +39,7 @@ function c76419637.dctg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function
c76419637
.
dcop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
DiscardHand
(
1
-
tp
,
nil
,
1
,
1
,
REASON_EFFECT
)
Duel
.
DiscardHand
(
1
-
tp
,
nil
,
1
,
1
,
REASON_EFFECT
+
REASON_DISCARD
)
end
function
c76419637
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetOverlayGroup
():
IsExists
(
Card
.
IsCode
,
1
,
nil
,
40424929
)
...
...
script/c76721030.lua
View file @
f48e190c
...
...
@@ -9,7 +9,6 @@ function c76721030.initial_effect(c)
--cannot trigger
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e2
:
SetCode
(
EFFECT_CANNOT_TRIGGER
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetTargetRange
(
LOCATION_MZONE
+
LOCATION_HAND
,
LOCATION_MZONE
+
LOCATION_HAND
)
...
...
script/c78009994.lua
View file @
f48e190c
...
...
@@ -7,6 +7,9 @@ function c78009994.initial_effect(c)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetOperation
(
c78009994
.
ctop
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EVENT_MSET
)
c
:
RegisterEffect
(
e2
)
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
...
...
script/c78540593.lua
View file @
f48e190c
...
...
@@ -15,8 +15,9 @@ function c78540593.initial_effect(c)
end
function
c78540593
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
eg
:
GetFirst
()
return
eg
:
GetCount
()
==
1
and
tc
:
IsReason
(
REASON_DESTROY
)
and
tc
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
tc
:
GetPreviousControler
()
==
tp
and
bit
.
band
(
tc
:
GetPreviousRaceOnField
(),
RACE_PLANT
)
~=
0
return
eg
:
GetCount
()
==
1
and
tc
:
IsReason
(
REASON_DESTROY
)
and
tc
:
IsReason
(
REASON_BATTLE
+
REASON_EFFECT
)
and
tc
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
tc
:
GetPreviousControler
()
==
tp
and
bit
.
band
(
tc
:
GetPreviousRaceOnField
(),
RACE_PLANT
)
~=
0
end
function
c78540593
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
1
-
tp
)
and
chkc
:
IsOnField
()
and
chkc
:
IsDestructable
()
end
...
...
script/c81907872.lua
View file @
f48e190c
...
...
@@ -47,7 +47,7 @@ function c81907872.posop(e,tp,eg,ep,ev,re,r,rp)
end
end
function
c81907872
.
cfilter
(
c
,
tp
)
return
c
:
IsControler
(
tp
)
and
c
:
IsPreviousPosition
(
POS_FACEUP
)
and
c
:
IsSetCard
(
0x8d
)
and
c
:
IsReason
(
REASON_DESTROY
)
and
c
:
IsType
(
TYPE_MONSTER
)
return
c
:
IsControler
(
tp
)
and
c
:
GetPreviousControler
()
==
tp
and
c
:
IsSetCard
(
0x8d
)
and
c
:
IsReason
(
REASON_DESTROY
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
(
not
c
:
IsReason
(
REASON_BATTLE
)
or
c
==
Duel
.
GetAttackTarget
())
end
function
c81907872
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c88190790.lua
View file @
f48e190c
...
...
@@ -21,7 +21,7 @@ function c88190790.initial_effect(c)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetValue
(
1
)
e3
:
SetValue
(
c88190790
.
eqlimit
)
c
:
RegisterEffect
(
e3
)
--multi attack
local
e4
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -33,6 +33,12 @@ function c88190790.initial_effect(c)
e4
:
SetOperation
(
c88190790
.
maop
)
c
:
RegisterEffect
(
e4
)
end
function
c88190790
.
eqlimit
(
e
,
c
)
if
e
:
GetHandler
():
GetEquipTarget
()
==
c
then
return
true
end
local
g
=
Duel
.
GetFieldGroup
(
e
:
GetHandlerPlayer
(),
LOCATION_MZONE
,
0
)
local
tc
=
g
:
GetFirst
()
return
g
:
GetCount
()
==
1
and
tc
==
c
and
tc
:
IsRace
(
RACE_WARRIOR
)
end
function
c88190790
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_MZONE
,
0
)
local
tc
=
g
:
GetFirst
()
...
...
script/c90810762.lua
View file @
f48e190c
...
...
@@ -7,14 +7,20 @@ function c90810762.initial_effect(c)
c
:
RegisterEffect
(
e1
)
--atkup
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetDescription
(
aux
.
Stringid
(
90810762
,
0
))
e2
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetCode
(
EVENT_BATTLE_DAMAGE
)
e2
:
SetCondition
(
c90810762
.
atkcon
)
e2
:
SetOperation
(
c90810762
.
atkop
)
c
:
RegisterEffect
(
e2
)
end
function
c90810762
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
ep
~=
tp
and
Duel
.
GetAttackTarget
()
==
nil
end
function
c90810762
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
Duel
.
GetAttackTarget
()
==
nil
then
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
...
...
script/c99902789.lua
View file @
f48e190c
...
...
@@ -14,9 +14,7 @@ function c99902789.initial_effect(c)
c
:
RegisterEffect
(
e1
)
end
function
c99902789
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
a
=
Duel
.
GetAttacker
()
local
at
=
Duel
.
GetAttackTarget
()
return
Duel
.
CheckEvent
(
EVENT_ATTACK_ANNOUNCE
)
and
at
and
(
a
and
a
:
IsControler
(
tp
)
or
at
:
IsControler
(
tp
))
return
Duel
.
CheckEvent
(
EVENT_ATTACK_ANNOUNCE
)
and
Duel
.
GetAttacker
():
IsControler
(
tp
)
and
Duel
.
GetAttackTarget
()
~=
nil
and
ep
~=
tp
and
re
:
GetActiveType
()
==
TYPE_TRAP
and
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
Duel
.
IsChainNegatable
(
ev
)
end
function
c99902789
.
discost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
...
...
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