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
22b2334e
Commit
22b2334e
authored
Feb 18, 2015
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
a3d6af60
Changes
14
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
192 additions
and
182 deletions
+192
-182
ocgcore/field.h
ocgcore/field.h
+1
-0
ocgcore/processor.cpp
ocgcore/processor.cpp
+164
-146
script/c12644061.lua
script/c12644061.lua
+4
-2
script/c14001430.lua
script/c14001430.lua
+3
-4
script/c16674846.lua
script/c16674846.lua
+2
-1
script/c23171610.lua
script/c23171610.lua
+4
-6
script/c24268052.lua
script/c24268052.lua
+2
-1
script/c29389368.lua
script/c29389368.lua
+1
-16
script/c40640057.lua
script/c40640057.lua
+2
-1
script/c47432275.lua
script/c47432275.lua
+2
-1
script/c48868994.lua
script/c48868994.lua
+1
-1
script/c60953118.lua
script/c60953118.lua
+2
-1
script/c83682725.lua
script/c83682725.lua
+2
-1
script/c99733359.lua
script/c99733359.lua
+2
-1
No files found.
ocgcore/field.h
View file @
22b2334e
...
@@ -425,6 +425,7 @@ public:
...
@@ -425,6 +425,7 @@ public:
int32
process_idle_command
(
uint16
step
);
int32
process_idle_command
(
uint16
step
);
int32
process_battle_command
(
uint16
step
);
int32
process_battle_command
(
uint16
step
);
int32
process_damage_step
(
uint16
step
);
int32
process_damage_step
(
uint16
step
);
void
field
::
calculate_battle_damage
(
effect
**
pdamchange
,
card
**
preason_card
,
uint8
*
battle_destroyed
);
int32
process_turn
(
uint16
step
,
uint8
turn_player
);
int32
process_turn
(
uint16
step
,
uint8
turn_player
);
int32
add_chain
(
uint16
step
);
int32
add_chain
(
uint16
step
);
...
...
ocgcore/processor.cpp
View file @
22b2334e
This diff is collapsed.
Click to expand it.
script/c12644061.lua
View file @
22b2334e
...
@@ -55,7 +55,8 @@ end
...
@@ -55,7 +55,8 @@ end
function
c12644061
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c12644061
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
a
=
Duel
.
GetAttacker
()
local
a
=
Duel
.
GetAttacker
()
local
at
=
Duel
.
GetAttackTarget
()
local
at
=
Duel
.
GetAttackTarget
()
return
ep
==
tp
and
((
a
:
IsControler
(
tp
)
and
a
:
IsSetCard
(
0x1034
))
or
(
at
and
at
:
IsControler
(
tp
)
and
at
:
IsSetCard
(
0x1034
)))
return
Duel
.
GetBattleDamage
(
tp
)
>
0
and
((
a
:
IsControler
(
tp
)
and
a
:
IsSetCard
(
0x1034
))
or
(
at
and
at
:
IsControler
(
tp
)
and
at
:
IsSetCard
(
0x1034
)))
end
end
function
c12644061
.
dfilter
(
c
)
function
c12644061
.
dfilter
(
c
)
return
c
:
IsSetCard
(
0x1034
)
and
c
:
IsAbleToGraveAsCost
()
return
c
:
IsSetCard
(
0x1034
)
and
c
:
IsAbleToGraveAsCost
()
...
@@ -74,7 +75,8 @@ function c12644061.damop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -74,7 +75,8 @@ function c12644061.damop(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetCode
(
EVENT_PRE_BATTLE_DAMAGE
)
e1
:
SetCode
(
EVENT_PRE_BATTLE_DAMAGE
)
e1
:
SetRange
(
LOCATION_FZONE
)
e1
:
SetRange
(
LOCATION_FZONE
)
e1
:
SetOperation
(
c12644061
.
dop
)
e1
:
SetOperation
(
c12644061
.
dop
)
c
:
RegisterEffect
(
e1
,
tp
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_DAMAGE
)
c
:
RegisterEffect
(
e1
)
end
end
function
c12644061
.
dop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c12644061
.
dop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ChangeBattleDamage
(
tp
,
0
)
Duel
.
ChangeBattleDamage
(
tp
,
0
)
...
...
script/c14001430.lua
View file @
22b2334e
...
@@ -51,12 +51,11 @@ function c14001430.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -51,12 +51,11 @@ function c14001430.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if
chk
==
0
then
return
bit
.
band
(
r
,
REASON_EFFECT
)
~=
0
and
re
and
re
:
IsActiveType
(
TYPE_MONSTER
)
if
chk
==
0
then
return
bit
.
band
(
r
,
REASON_EFFECT
)
~=
0
and
re
and
re
:
IsActiveType
(
TYPE_MONSTER
)
and
re
:
GetHandler
():
IsSetCard
(
0x71
)
and
eg
:
IsExists
(
c14001430
.
repfilter
,
1
,
nil
,
tp
)
end
and
re
:
GetHandler
():
IsSetCard
(
0x71
)
and
eg
:
IsExists
(
c14001430
.
repfilter
,
1
,
nil
,
tp
)
end
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
14001430
,
0
))
then
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
14001430
,
0
))
then
local
ct
=
eg
:
FilterCount
(
c14001430
.
repfilter
,
nil
,
tp
)
local
g
=
eg
:
Filter
(
c14001430
.
repfilter
,
nil
,
tp
)
local
ct
=
g
:
GetCount
()
if
ct
>
1
then
if
ct
>
1
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
g
=
eg
:
FilterSelect
(
tp
,
c14001430
.
repfilter
,
1
,
ct
,
nil
,
tp
)
g
=
g
:
Select
(
tp
,
1
,
ct
,
nil
)
else
g
=
eg
:
Filter
(
c14001430
.
repfilter
,
nil
,
tp
)
end
end
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
...
...
script/c16674846.lua
View file @
22b2334e
...
@@ -9,7 +9,7 @@ function c16674846.initial_effect(c)
...
@@ -9,7 +9,7 @@ function c16674846.initial_effect(c)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
c16674846
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c16674846
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
~=
tp
return
Duel
.
GetTurnPlayer
()
~=
tp
and
Duel
.
GetBattleDamage
(
tp
)
>
0
end
end
function
c16674846
.
filter
(
c
)
function
c16674846
.
filter
(
c
)
return
c
:
IsDefenceBelow
(
1500
)
and
c
:
IsType
(
TYPE_TUNER
)
and
c
:
IsRace
(
RACE_WARRIOR
)
return
c
:
IsDefenceBelow
(
1500
)
and
c
:
IsType
(
TYPE_TUNER
)
and
c
:
IsRace
(
RACE_WARRIOR
)
...
@@ -20,6 +20,7 @@ function c16674846.operation(e,tp,eg,ep,ev,re,r,rp)
...
@@ -20,6 +20,7 @@ function c16674846.operation(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_PRE_BATTLE_DAMAGE
)
e1
:
SetCode
(
EVENT_PRE_BATTLE_DAMAGE
)
e1
:
SetOperation
(
c16674846
.
damop
)
e1
:
SetOperation
(
c16674846
.
damop
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_DAMAGE
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterEffect
(
e1
,
tp
)
local
g
=
Duel
.
GetMatchingGroup
(
c16674846
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
c16674846
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
if
g
:
GetCount
()
~=
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
16674846
,
0
))
then
if
g
:
GetCount
()
~=
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
16674846
,
0
))
then
...
...
script/c23171610.lua
View file @
22b2334e
...
@@ -21,15 +21,13 @@ end
...
@@ -21,15 +21,13 @@ end
function
c23171610
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
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
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c23171610
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
c23171610
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
c23171610
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
g
:
KeepAlive
()
Duel
.
SetTargetCard
(
g
)
e
:
SetLabelObject
(
g
)
end
end
function
c23171610
.
filter2
(
c
,
e
,
tp
)
function
c23171610
.
filter2
(
c
,
e
)
return
c
:
Is
Controler
(
tp
)
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_MACHINE
)
and
not
c
:
IsImmuneToEffect
(
e
)
return
c
:
Is
Faceup
()
and
c
:
IsRace
(
RACE_MACHINE
)
and
c
:
IsRelateToEffect
(
e
)
and
not
c
:
IsImmuneToEffect
(
e
)
end
end
function
c23171610
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c23171610
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
e
:
GetLabelObject
()
local
sg
=
Duel
.
GetMatchingGroup
(
c23171610
.
filter2
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
e
)
local
sg
=
g
:
Filter
(
c23171610
.
filter2
,
nil
,
e
,
tp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
fid
=
c
:
GetFieldID
()
local
fid
=
c
:
GetFieldID
()
local
tc
=
sg
:
GetFirst
()
local
tc
=
sg
:
GetFirst
()
...
...
script/c24268052.lua
View file @
22b2334e
...
@@ -10,7 +10,7 @@ function c24268052.initial_effect(c)
...
@@ -10,7 +10,7 @@ function c24268052.initial_effect(c)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
c24268052
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c24268052
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
~=
tp
return
Duel
.
GetTurnPlayer
()
~=
tp
and
Duel
.
GetBattleDamage
(
tp
)
>
0
end
end
function
c24268052
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c24268052
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
...
@@ -21,6 +21,7 @@ function c24268052.operation(e,tp,eg,ep,ev,re,r,rp)
...
@@ -21,6 +21,7 @@ function c24268052.operation(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_PRE_BATTLE_DAMAGE
)
e1
:
SetCode
(
EVENT_PRE_BATTLE_DAMAGE
)
e1
:
SetOperation
(
c24268052
.
damop
)
e1
:
SetOperation
(
c24268052
.
damop
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_DAMAGE
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
end
...
...
script/c29389368.lua
View file @
22b2334e
...
@@ -11,22 +11,7 @@ function c29389368.initial_effect(c)
...
@@ -11,22 +11,7 @@ function c29389368.initial_effect(c)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
c29389368
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c29389368
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ar
=
Duel
.
GetAttacker
()
return
Duel
.
GetBattleDamage
(
tp
)
>=
2000
local
at
=
Duel
.
GetAttackTarget
()
local
v1
=
0
if
ar
:
IsPosition
(
POS_DEFENCE
)
and
ar
:
IsHasEffect
(
EFFECT_DEFENCE_ATTACK
)
then
v1
=
ar
:
GetDefence
()
else
v1
=
ar
:
GetAttack
()
end
if
at
then
if
at
:
IsPosition
(
POS_ATTACK
)
then
return
v1
-
at
:
GetAttack
()
>=
2000
elseif
ar
:
IsHasEffect
(
EFFECT_PIERCE
)
return
v1
-
at
:
GetDefence
()
>=
2000
else
return
false
end
else
return
v1
>=
2000
end
end
end
function
c29389368
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c29389368
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
...
...
script/c40640057.lua
View file @
22b2334e
...
@@ -12,7 +12,7 @@ function c40640057.initial_effect(c)
...
@@ -12,7 +12,7 @@ function c40640057.initial_effect(c)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
c40640057
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c40640057
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
~=
tp
return
Duel
.
GetTurnPlayer
()
~=
tp
and
Duel
.
GetBattleDamage
(
tp
)
>
0
end
end
function
c40640057
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c40640057
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsDiscardable
()
end
if
chk
==
0
then
return
e
:
GetHandler
():
IsDiscardable
()
end
...
@@ -23,6 +23,7 @@ function c40640057.op(e,tp,eg,ep,ev,re,r,rp)
...
@@ -23,6 +23,7 @@ function c40640057.op(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_PRE_BATTLE_DAMAGE
)
e1
:
SetCode
(
EVENT_PRE_BATTLE_DAMAGE
)
e1
:
SetOperation
(
c40640057
.
damop
)
e1
:
SetOperation
(
c40640057
.
damop
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_DAMAGE
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
function
c40640057
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c40640057
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c47432275.lua
View file @
22b2334e
...
@@ -14,7 +14,7 @@ function c47432275.initial_effect(c)
...
@@ -14,7 +14,7 @@ function c47432275.initial_effect(c)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
c47432275
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c47432275
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetAttackTarget
()
==
e
:
GetHandler
()
return
Duel
.
GetAttackTarget
()
==
e
:
GetHandler
()
and
Duel
.
GetBattleDamage
(
tp
)
>
0
end
end
function
c47432275
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c47432275
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
...
@@ -29,6 +29,7 @@ function c47432275.op(e,tp,eg,ep,ev,re,r,rp)
...
@@ -29,6 +29,7 @@ function c47432275.op(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_PRE_BATTLE_DAMAGE
)
e1
:
SetCode
(
EVENT_PRE_BATTLE_DAMAGE
)
e1
:
SetOperation
(
c47432275
.
damop
)
e1
:
SetOperation
(
c47432275
.
damop
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_DAMAGE
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterEffect
(
e1
,
tp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Recover
(
p
,
d
,
REASON_EFFECT
)
Duel
.
Recover
(
p
,
d
,
REASON_EFFECT
)
...
...
script/c48868994.lua
View file @
22b2334e
...
@@ -53,7 +53,7 @@ function c48868994.filter(c)
...
@@ -53,7 +53,7 @@ function c48868994.filter(c)
return
c
:
IsFaceup
()
and
c
:
IsAttackPos
()
and
c
:
IsAbleToChangeControler
()
return
c
:
IsFaceup
()
and
c
:
IsAttackPos
()
and
c
:
IsAbleToChangeControler
()
end
end
function
c48868994
.
tgd
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c48868994
.
tgd
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c48868994
.
filter
(
chkc
)
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
1
-
tp
)
and
c48868994
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c48868994
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
and
Duel
.
IsExistingTarget
(
c48868994
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
...
...
script/c60953118.lua
View file @
22b2334e
...
@@ -27,7 +27,7 @@ function c60953118.initial_effect(c)
...
@@ -27,7 +27,7 @@ function c60953118.initial_effect(c)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
end
end
function
c60953118
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c60953118
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
true
return
Duel
.
GetBattleDamage
(
tp
)
>
0
end
end
function
c60953118
.
damcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c60953118
.
damcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToGraveAsCost
()
end
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToGraveAsCost
()
end
...
@@ -38,6 +38,7 @@ function c60953118.damop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -38,6 +38,7 @@ function c60953118.damop(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_PRE_BATTLE_DAMAGE
)
e1
:
SetCode
(
EVENT_PRE_BATTLE_DAMAGE
)
e1
:
SetOperation
(
c60953118
.
dop
)
e1
:
SetOperation
(
c60953118
.
dop
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_DAMAGE
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
function
c60953118
.
dop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c60953118
.
dop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c83682725.lua
View file @
22b2334e
...
@@ -17,7 +17,8 @@ end
...
@@ -17,7 +17,8 @@ end
function
c83682725
.
dfilter
(
c
,
lv
)
function
c83682725
.
dfilter
(
c
,
lv
)
return
(
c
:
IsFacedown
()
or
c
:
IsLevelBelow
(
lv
-
1
))
and
c
:
IsAbleToHand
()
return
(
c
:
IsFacedown
()
or
c
:
IsLevelBelow
(
lv
-
1
))
and
c
:
IsAbleToHand
()
end
end
function
c83682725
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c83682725
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c83682725
.
filter
(
chkc
,
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c83682725
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c83682725
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c83682725
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
tp
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c83682725
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
tp
)
...
...
script/c99733359.lua
View file @
22b2334e
...
@@ -15,7 +15,7 @@ function c99733359.initial_effect(c)
...
@@ -15,7 +15,7 @@ function c99733359.initial_effect(c)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
c99733359
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c99733359
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
~=
tp
return
Duel
.
GetTurnPlayer
()
~=
tp
and
Duel
.
GetBattleDamage
(
tp
)
>
0
end
end
function
c99733359
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c99733359
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckLPCost
(
tp
,
1000
)
end
if
chk
==
0
then
return
Duel
.
CheckLPCost
(
tp
,
1000
)
end
...
@@ -40,6 +40,7 @@ function c99733359.operation(e,tp,eg,ep,ev,re,r,rp)
...
@@ -40,6 +40,7 @@ function c99733359.operation(e,tp,eg,ep,ev,re,r,rp)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_PRE_BATTLE_DAMAGE
)
e2
:
SetCode
(
EVENT_PRE_BATTLE_DAMAGE
)
e2
:
SetOperation
(
c99733359
.
damop
)
e2
:
SetOperation
(
c99733359
.
damop
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_DAMAGE
)
Duel
.
RegisterEffect
(
e2
,
tp
)
Duel
.
RegisterEffect
(
e2
,
tp
)
end
end
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