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
157ce72d
Commit
157ce72d
authored
Mar 28, 2014
by
VanillaSalt
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #727 from salix5/patch
fix
parents
1eb362bc
b178d1e6
Changes
33
Hide whitespace changes
Inline
Side-by-side
Showing
33 changed files
with
140 additions
and
142 deletions
+140
-142
gframe/deck_con.cpp
gframe/deck_con.cpp
+2
-0
gframe/game.cpp
gframe/game.cpp
+3
-3
script/c1412158.lua
script/c1412158.lua
+9
-18
script/c2091298.lua
script/c2091298.lua
+3
-3
script/c21454943.lua
script/c21454943.lua
+26
-21
script/c23535429.lua
script/c23535429.lua
+3
-3
script/c23681456.lua
script/c23681456.lua
+1
-0
script/c24696097.lua
script/c24696097.lua
+0
-1
script/c26563200.lua
script/c26563200.lua
+3
-3
script/c27174286.lua
script/c27174286.lua
+11
-6
script/c37742478.lua
script/c37742478.lua
+3
-3
script/c3989465.lua
script/c3989465.lua
+3
-3
script/c41925941.lua
script/c41925941.lua
+9
-8
script/c4549095.lua
script/c4549095.lua
+3
-3
script/c49868263.lua
script/c49868263.lua
+0
-1
script/c51447164.lua
script/c51447164.lua
+0
-1
script/c53408006.lua
script/c53408006.lua
+3
-3
script/c5818294.lua
script/c5818294.lua
+0
-1
script/c6150044.lua
script/c6150044.lua
+0
-1
script/c67750322.lua
script/c67750322.lua
+0
-1
script/c67922702.lua
script/c67922702.lua
+3
-3
script/c72029628.lua
script/c72029628.lua
+2
-1
script/c74458486.lua
script/c74458486.lua
+3
-3
script/c74845897.lua
script/c74845897.lua
+1
-0
script/c75923050.lua
script/c75923050.lua
+9
-18
script/c80071763.lua
script/c80071763.lua
+0
-1
script/c83054225.lua
script/c83054225.lua
+1
-0
script/c84389640.lua
script/c84389640.lua
+30
-22
script/c85215458.lua
script/c85215458.lua
+3
-3
script/c87043568.lua
script/c87043568.lua
+3
-3
script/c88307361.lua
script/c88307361.lua
+0
-1
script/c900787.lua
script/c900787.lua
+3
-3
script/c92661479.lua
script/c92661479.lua
+0
-1
No files found.
gframe/deck_con.cpp
View file @
157ce72d
...
...
@@ -273,7 +273,9 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
mainGame
->
cbCardType2
->
addItem
(
dataManager
.
GetSysString
(
1056
),
TYPE_MONSTER
+
TYPE_FUSION
);
mainGame
->
cbCardType2
->
addItem
(
dataManager
.
GetSysString
(
1057
),
TYPE_MONSTER
+
TYPE_RITUAL
);
mainGame
->
cbCardType2
->
addItem
(
dataManager
.
GetSysString
(
1063
),
TYPE_MONSTER
+
TYPE_SYNCHRO
);
mainGame
->
cbCardType2
->
addItem
(
dataManager
.
GetSysString
(
1075
),
TYPE_MONSTER
+
TYPE_SYNCHRO
+
TYPE_TUNER
);
mainGame
->
cbCardType2
->
addItem
(
dataManager
.
GetSysString
(
1073
),
TYPE_MONSTER
+
TYPE_XYZ
);
mainGame
->
cbCardType2
->
addItem
(
dataManager
.
GetSysString
(
1074
),
TYPE_MONSTER
+
TYPE_PENDULUM
);
mainGame
->
cbCardType2
->
addItem
(
dataManager
.
GetSysString
(
1062
),
TYPE_MONSTER
+
TYPE_TUNER
);
mainGame
->
cbCardType2
->
addItem
(
dataManager
.
GetSysString
(
1061
),
TYPE_MONSTER
+
TYPE_DUAL
);
mainGame
->
cbCardType2
->
addItem
(
dataManager
.
GetSysString
(
1060
),
TYPE_MONSTER
+
TYPE_UNION
);
...
...
gframe/game.cpp
View file @
157ce72d
...
...
@@ -384,7 +384,7 @@ bool Game::Initialize() {
cbCardType
->
addItem
(
dataManager
.
GetSysString
(
1312
));
cbCardType
->
addItem
(
dataManager
.
GetSysString
(
1313
));
cbCardType
->
addItem
(
dataManager
.
GetSysString
(
1314
));
cbCardType2
=
env
->
addComboBox
(
rect
<
s32
>
(
1
30
,
3
,
19
0
,
23
),
wFilter
,
-
1
);
cbCardType2
=
env
->
addComboBox
(
rect
<
s32
>
(
1
25
,
3
,
20
0
,
23
),
wFilter
,
-
1
);
cbCardType2
->
addItem
(
dataManager
.
GetSysString
(
1310
),
0
);
env
->
addStaticText
(
dataManager
.
GetSysString
(
1315
),
rect
<
s32
>
(
205
,
5
,
280
,
25
),
false
,
false
,
wFilter
);
cbLimit
=
env
->
addComboBox
(
rect
<
s32
>
(
260
,
3
,
390
,
23
),
wFilter
,
-
1
);
...
...
@@ -402,7 +402,7 @@ bool Game::Initialize() {
env
->
addStaticText
(
dataManager
.
GetSysString
(
1321
),
rect
<
s32
>
(
10
,
51
,
70
,
71
),
false
,
false
,
wFilter
);
cbRace
=
env
->
addComboBox
(
rect
<
s32
>
(
60
,
49
,
190
,
69
),
wFilter
,
-
1
);
cbRace
->
addItem
(
dataManager
.
GetSysString
(
1310
),
0
);
for
(
int
filter
=
0x1
;
filter
!=
0x
4
00000
;
filter
<<=
1
)
for
(
int
filter
=
0x1
;
filter
!=
0x
8
00000
;
filter
<<=
1
)
cbRace
->
addItem
(
dataManager
.
FormatRace
(
filter
),
filter
);
env
->
addStaticText
(
dataManager
.
GetSysString
(
1322
),
rect
<
s32
>
(
205
,
28
,
280
,
48
),
false
,
false
,
wFilter
);
ebAttack
=
env
->
addEditBox
(
L""
,
rect
<
s32
>
(
260
,
26
,
340
,
46
),
true
,
wFilter
);
...
...
@@ -848,7 +848,7 @@ void Game::ShowCardInfo(int code) {
myswprintf
(
&
formatBuffer
[
cd
.
level
+
3
],
L"%d/%d"
,
cd
.
attack
,
cd
.
defence
);
if
(
cd
.
type
&
TYPE_PENDULUM
)
{
wchar_t
scaleBuffer
[
16
];
myswprintf
(
scaleBuffer
,
L" %d/%d"
,
cd
.
lscale
,
cd
.
rscale
);
myswprintf
(
scaleBuffer
,
L"
%d/%d"
,
cd
.
lscale
,
cd
.
rscale
);
wcscat
(
formatBuffer
,
scaleBuffer
);
}
stDataInfo
->
setText
(
formatBuffer
);
...
...
script/c1412158.lua
View file @
157ce72d
...
...
@@ -6,12 +6,10 @@ function c1412158.initial_effect(c)
--atk up
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
1412158
,
0
))
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EVENT_PRE_DAMAGE_CALCULATE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetCondition
(
c1412158
.
atkcon
)
e1
:
Set
Operation
(
c1412158
.
atkop
)
e1
:
Set
Value
(
1000
)
c
:
RegisterEffect
(
e1
)
--spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -24,19 +22,12 @@ function c1412158.initial_effect(c)
e2
:
SetOperation
(
c1412158
.
spop
)
c
:
RegisterEffect
(
e2
)
end
function
c1412158
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetBattleTarget
()
~=
nil
end
function
c1412158
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetReset
(
RESET_PHASE
+
RESET_DAMAGE_CAL
)
e1
:
SetValue
(
1000
)
c
:
RegisterEffect
(
e1
)
end
function
c1412158
.
atkcon
(
e
)
local
ph
=
Duel
.
GetCurrentPhase
()
if
not
(
ph
==
PHASE_DAMAGE
or
ph
==
PHASE_DAMAGE_CAL
)
then
return
false
end
local
a
=
Duel
.
GetAttacker
()
local
d
=
Duel
.
GetAttackTarget
()
return
a
==
e
:
GetHandler
()
and
d
~=
nil
end
function
c1412158
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetTurnID
()
~=
Duel
.
GetTurnCount
()
...
...
script/c2091298.lua
View file @
157ce72d
...
...
@@ -7,10 +7,10 @@ function c2091298.initial_effect(c)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
2091298
,
0
))
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
TIMING_DAMAGE_
CAL
)
e1
:
SetHintTiming
(
TIMING_DAMAGE_
STEP
)
e1
:
SetCountLimit
(
1
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCondition
(
c2091298
.
condition
)
...
...
@@ -20,7 +20,7 @@ function c2091298.initial_effect(c)
end
function
c2091298
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
phase
=
Duel
.
GetCurrentPhase
()
if
(
phase
~=
PHASE_DAMAGE
and
phase
~=
PHASE_DAMAGE_CAL
)
or
Duel
.
IsDamageCalculated
()
then
return
false
end
if
phase
~=
PHASE_DAMAGE
or
Duel
.
IsDamageCalculated
()
then
return
false
end
local
tc
=
Duel
.
GetAttacker
()
if
tc
:
IsControler
(
1
-
tp
)
then
tc
=
Duel
.
GetAttackTarget
()
end
e
:
SetLabelObject
(
tc
)
...
...
script/c21454943.lua
View file @
157ce72d
...
...
@@ -4,10 +4,10 @@ function c21454943.initial_effect(c)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetDescription
(
aux
.
Stringid
(
21454943
,
0
))
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
TIMING_DAMAGE_
CAL
)
e1
:
SetHintTiming
(
TIMING_DAMAGE_
STEP
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCondition
(
c21454943
.
condition
)
e1
:
SetCost
(
c21454943
.
cost
)
...
...
@@ -17,42 +17,47 @@ function c21454943.initial_effect(c)
end
function
c21454943
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
phase
=
Duel
.
GetCurrentPhase
()
if
(
phase
~=
PHASE_DAMAGE
and
phase
~=
PHASE_DAMAGE_CAL
)
or
Duel
.
IsDamageCalculated
()
then
return
false
end
if
phase
~=
PHASE_DAMAGE
or
Duel
.
IsDamageCalculated
()
then
return
false
end
local
a
=
Duel
.
GetAttacker
()
local
d
=
Duel
.
GetAttackTarget
()
return
(
d
~=
nil
and
a
:
GetControler
()
==
tp
and
a
:
IsRace
(
RACE_PSYCHO
)
and
a
:
IsRelateToBattle
())
or
(
d
~=
nil
and
d
:
GetControler
()
==
tp
and
d
:
IsRace
(
RACE_PSYCHO
)
and
d
:
IsRelateToBattle
())
if
a
:
IsControler
(
tp
)
then
e
:
SetLabelObject
(
d
)
return
a
:
IsFaceup
()
and
a
:
IsRace
(
RACE_PSYCHO
)
and
a
:
IsRelateToBattle
()
and
d
and
d
:
IsFaceup
()
and
d
:
IsRelateToBattle
()
else
e
:
SetLabelObject
(
a
)
return
d
:
IsFaceup
()
and
d
:
IsRace
(
RACE_PSYCHO
)
and
d
:
IsRelateToBattle
()
and
a
and
a
:
IsFaceup
()
and
a
:
IsRelateToBattle
()
end
end
function
c21454943
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckLPCost
(
tp
,
100
)
and
e
:
GetHandler
():
GetFlagEffect
(
21454943
)
==
0
end
local
bc
=
e
:
GetLabelObject
()
if
chk
==
0
then
return
Duel
.
CheckLPCost
(
tp
,
100
)
and
e
:
GetHandler
():
GetFlagEffect
(
21454943
)
==
0
and
(
bc
:
IsAttackAbove
(
100
)
or
bc
:
IsDefenceAbove
(
100
))
end
local
lp
=
Duel
.
GetLP
(
tp
)
local
alp
=
100
local
maxpay
=
bc
:
GetAttack
()
local
def
=
bc
:
GetDefence
()
if
maxpay
<
def
then
maxpay
=
def
end
if
maxpay
<
lp
then
lp
=
maxpay
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
21454943
,
1
))
if
lp
>
500
then
alp
=
Duel
.
AnnounceNumber
(
tp
,
100
,
200
,
300
,
400
,
500
)
elseif
lp
>
400
then
alp
=
Duel
.
AnnounceNumber
(
tp
,
100
,
200
,
300
,
400
)
elseif
lp
>
300
then
alp
=
Duel
.
AnnounceNumber
(
tp
,
100
,
200
,
300
)
elseif
lp
>
200
then
alp
=
Duel
.
AnnounceNumber
(
tp
,
100
,
200
)
if
lp
>
=
500
then
alp
=
Duel
.
AnnounceNumber
(
tp
,
100
,
200
,
300
,
400
,
500
)
elseif
lp
>
=
400
then
alp
=
Duel
.
AnnounceNumber
(
tp
,
100
,
200
,
300
,
400
)
elseif
lp
>
=
300
then
alp
=
Duel
.
AnnounceNumber
(
tp
,
100
,
200
,
300
)
elseif
lp
>
=
200
then
alp
=
Duel
.
AnnounceNumber
(
tp
,
100
,
200
)
end
Duel
.
PayLPCost
(
tp
,
alp
)
e
:
SetLabel
(
-
alp
)
e
:
GetHandler
():
RegisterFlagEffect
(
21454943
,
RESET_PHASE
+
RESET_DAMAGE
,
0
,
1
)
end
function
c21454943
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
a
=
Duel
.
GetAttacker
()
local
d
=
Duel
.
GetAttackTarget
()
if
chkc
then
return
(
a
:
GetControler
()
==
tp
and
chkc
==
d
)
or
(
d
:
GetControler
()
==
tp
and
chkc
==
a
)
end
if
chk
==
0
then
if
a
:
GetControler
()
==
tp
then
return
a
:
IsRace
(
RACE_PSYCHO
)
and
d
and
d
:
IsCanBeEffectTarget
(
e
)
else
return
d
:
IsRace
(
RACE_PSYCHO
)
and
a
:
IsCanBeEffectTarget
(
e
)
end
end
if
a
:
GetControler
()
==
tp
then
Duel
.
SetTargetCard
(
d
)
else
Duel
.
SetTargetCard
(
a
)
end
local
tc
=
e
:
GetLabelObject
()
if
chkc
then
return
chkc
==
tc
end
if
chk
==
0
then
return
tc
:
IsCanBeEffectTarget
(
e
)
end
Duel
.
SetTargetCard
(
tc
)
end
function
c21454943
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
tc
=
Duel
.
GetFirstTarget
()
local
c
=
e
:
GetHandler
()
if
not
tc
or
not
tc
:
IsRelateToEffect
(
e
)
or
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
not
tc
or
not
tc
:
IsRelateToEffect
(
e
)
or
not
tc
:
IsControler
(
1
-
tp
)
then
return
end
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
...
...
script/c23535429.lua
View file @
157ce72d
...
...
@@ -6,9 +6,9 @@ function c23535429.initial_effect(c)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
TIMING_DAMAGE_
CAL
)
e1
:
SetHintTiming
(
TIMING_DAMAGE_
STEP
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetCondition
(
c23535429
.
condition
)
e1
:
SetCost
(
c23535429
.
cost
)
e1
:
SetOperation
(
c23535429
.
operation
)
...
...
@@ -16,7 +16,7 @@ function c23535429.initial_effect(c)
end
function
c23535429
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
phase
=
Duel
.
GetCurrentPhase
()
if
(
phase
~=
PHASE_DAMAGE
and
phase
~=
PHASE_DAMAGE_CAL
)
or
Duel
.
IsDamageCalculated
()
then
return
false
end
if
phase
~=
PHASE_DAMAGE
or
Duel
.
IsDamageCalculated
()
then
return
false
end
local
d
=
Duel
.
GetAttackTarget
()
return
d
and
d
:
IsControler
(
tp
)
and
d
:
IsDefencePos
()
end
...
...
script/c23681456.lua
View file @
157ce72d
...
...
@@ -35,6 +35,7 @@ function c23681456.operation(e,tp,eg,ep,ev,re,r,rp)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetLabel
(
fid
)
e1
:
SetLabelObject
(
g
)
...
...
script/c24696097.lua
View file @
157ce72d
...
...
@@ -19,7 +19,6 @@ function c24696097.initial_effect(c)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetCountLimit
(
1
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCondition
(
c24696097
.
discon
)
e2
:
SetTarget
(
c24696097
.
distg
)
...
...
script/c26563200.lua
View file @
157ce72d
...
...
@@ -9,8 +9,8 @@ function c26563200.initial_effect(c)
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetHintTiming
(
TIMING_DAMAGE_
CAL
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetHintTiming
(
TIMING_DAMAGE_
STEP
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCondition
(
c26563200
.
atkcon
)
e1
:
SetCost
(
c26563200
.
atkcost
)
...
...
@@ -20,7 +20,7 @@ function c26563200.initial_effect(c)
end
function
c26563200
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ph
=
Duel
.
GetCurrentPhase
()
if
(
ph
~=
PHASE_DAMAGE
and
ph
~=
PHASE_DAMAGE_CAL
)
or
Duel
.
IsDamageCalculated
()
then
return
false
end
if
ph
~=
PHASE_DAMAGE
or
Duel
.
IsDamageCalculated
()
then
return
false
end
local
tc
=
Duel
.
GetAttacker
()
return
tc
:
IsControler
(
tp
)
and
tc
:
IsRelateToBattle
()
and
tc
:
IsSetCard
(
0x6d
)
and
tc
:
IsType
(
TYPE_XYZ
)
and
Duel
.
GetAttackTarget
()
~=
nil
end
...
...
script/c27174286.lua
View file @
157ce72d
...
...
@@ -28,10 +28,11 @@ function c27174286.op(e,tp,eg,ep,ev,re,r,rp)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c27174286
.
filter
,
tp
,
LOCATION_REMOVED
,
0
,
ft1
,
ft1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
local
fid
=
e
:
GetHandler
():
GetFieldID
()
local
tc
=
g
:
GetFirst
()
while
tc
do
Duel
.
SpecialSummonStep
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
tc
:
RegisterFlagEffect
(
27174286
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
tc
:
RegisterFlagEffect
(
27174286
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
0
,
1
,
fid
)
tc
=
g
:
GetNext
()
end
Duel
.
SpecialSummonComplete
()
...
...
@@ -39,19 +40,23 @@ function c27174286.op(e,tp,eg,ep,ev,re,r,rp)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
Set
Reset
(
RESET_PHASE
+
PHASE_END
)
e1
:
Set
Property
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetLabel
(
fid
)
e1
:
SetLabelObject
(
g
)
e1
:
SetOperation
(
c27174286
.
rmop
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
function
c27174286
.
rmfilter
(
c
)
return
c
:
GetFlagEffect
(
27174286
)
>
0
function
c27174286
.
rmfilter
(
c
,
fid
)
return
c
:
GetFlagEffect
(
27174286
)
==
fid
end
function
c27174286
.
rmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
e
:
GetLabelObject
()
local
tg
=
g
:
Filter
(
c27174286
.
rmfilter
,
nil
)
g
:
DeleteGroup
()
local
tg
=
g
:
Filter
(
c27174286
.
rmfilter
,
nil
,
e
:
GetLabel
())
Duel
.
Remove
(
tg
,
POS_FACEUP
,
REASON_EFFECT
)
if
not
g
:
IsExists
(
c27174286
.
rmfilter
,
1
,
nil
,
e
:
GetLabel
())
then
g
:
DeleteGroup
()
e
:
Reset
()
end
end
script/c37742478.lua
View file @
157ce72d
...
...
@@ -15,9 +15,9 @@ function c37742478.initial_effect(c)
e2
:
SetDescription
(
aux
.
Stringid
(
37742478
,
1
))
e2
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetHintTiming
(
TIMING_DAMAGE_
CAL
)
e2
:
SetHintTiming
(
TIMING_DAMAGE_
STEP
)
e2
:
SetRange
(
LOCATION_HAND
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e2
:
SetCondition
(
c37742478
.
condition2
)
e2
:
SetCost
(
c37742478
.
cost2
)
e2
:
SetOperation
(
c37742478
.
operation2
)
...
...
@@ -35,7 +35,7 @@ function c37742478.operation1(e,tp,eg,ep,ev,re,r,rp)
end
function
c37742478
.
condition2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
phase
=
Duel
.
GetCurrentPhase
()
if
(
phase
~=
PHASE_DAMAGE
and
phase
~=
PHASE_DAMAGE_CAL
)
or
Duel
.
IsDamageCalculated
()
then
return
false
end
if
phase
~=
PHASE_DAMAGE
or
Duel
.
IsDamageCalculated
()
then
return
false
end
local
a
=
Duel
.
GetAttacker
()
local
d
=
Duel
.
GetAttackTarget
()
return
(
d
~=
nil
and
a
:
GetControler
()
==
tp
and
a
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
and
a
:
IsRelateToBattle
())
...
...
script/c3989465.lua
View file @
157ce72d
...
...
@@ -8,9 +8,9 @@ function c3989465.initial_effect(c)
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e1
:
SetDescription
(
aux
.
Stringid
(
3989465
,
0
))
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
TIMING_DAMAGE_
CAL
)
e1
:
SetHintTiming
(
TIMING_DAMAGE_
STEP
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCondition
(
c3989465
.
condition
)
e1
:
SetCost
(
c3989465
.
cost
)
...
...
@@ -20,7 +20,7 @@ end
function
c3989465
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ph
=
Duel
.
GetCurrentPhase
()
local
c
=
e
:
GetHandler
()
return
(
ph
==
PHASE_DAMAGE
or
ph
==
PHASE_DAMAGE_CAL
)
and
(
c
==
Duel
.
GetAttacker
()
or
c
==
Duel
.
GetAttackTarget
())
return
ph
==
PHASE_DAMAGE
and
(
c
==
Duel
.
GetAttacker
()
or
c
==
Duel
.
GetAttackTarget
())
and
not
Duel
.
IsDamageCalculated
()
end
function
c3989465
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
...
...
script/c41925941.lua
View file @
157ce72d
...
...
@@ -5,8 +5,8 @@ function c41925941.initial_effect(c)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
TIMING_DAMAGE_
CAL
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetHintTiming
(
TIMING_DAMAGE_
STEP
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetCondition
(
c41925941
.
condition
)
e1
:
SetCost
(
c41925941
.
cost
)
e1
:
SetTarget
(
c41925941
.
target
)
...
...
@@ -15,26 +15,27 @@ function c41925941.initial_effect(c)
end
function
c41925941
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
phase
=
Duel
.
GetCurrentPhase
()
if
(
phase
~=
PHASE_DAMAGE
and
phase
~=
PHASE_DAMAGE_CAL
)
or
Duel
.
IsDamageCalculated
()
then
return
false
end
if
phase
~=
PHASE_DAMAGE
or
Duel
.
IsDamageCalculated
()
then
return
false
end
local
a
=
Duel
.
GetAttacker
()
local
d
=
Duel
.
GetAttackTarget
()
if
a
:
IsControler
(
tp
)
then
e
:
SetLabelObject
(
d
)
return
d
and
a
:
IsRace
(
RACE_FIEND
)
and
a
:
IsRelateToBattle
()
and
d
:
IsFaceup
()
and
d
:
IsRelateToBattle
()
return
a
:
IsFaceup
()
and
a
:
IsRace
(
RACE_FIEND
)
and
a
:
IsRelateToBattle
()
and
d
and
d
:
IsFaceup
()
and
d
:
IsRelateToBattle
()
else
e
:
SetLabelObject
(
a
)
return
d
and
d
:
IsFaceup
()
and
d
:
IsRace
(
RACE_FIEND
)
and
d
:
IsRelateToBattle
()
and
a
:
IsFaceup
()
and
a
:
IsRelateToBattle
()
return
d
:
IsFaceup
()
and
d
:
IsRace
(
RACE_FIEND
)
and
d
:
IsRelateToBattle
()
and
a
and
a
:
IsFaceup
()
and
a
:
IsRelateToBattle
()
end
end
function
c41925941
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
bc
=
e
:
GetLabelObject
()
if
chk
==
0
then
return
Duel
.
GetLP
(
tp
)
>
100
and
(
bc
:
IsAttackAbove
(
100
)
or
bc
:
IsDefenceAbove
(
100
))
end
if
chk
==
0
then
return
Duel
.
CheckLPCost
(
tp
,
100
)
and
(
bc
:
IsAttackAbove
(
100
)
or
bc
:
IsDefenceAbove
(
100
))
end
local
maxc
=
Duel
.
GetLP
(
tp
)
local
maxpay
=
bc
:
GetAttack
()
local
def
=
bc
:
GetDefence
()
if
maxpay
<
def
then
maxpay
=
def
end
if
maxpay
<
maxc
then
maxc
=
maxpay
end
if
maxc
>
5000
then
maxc
=
5000
end
maxc
=
math.floor
(
maxc
/
100
)
*
100
local
t
=
{}
for
i
=
1
,
maxc
/
100
do
t
[
i
]
=
i
*
100
...
...
@@ -50,9 +51,9 @@ function c41925941.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel
.
SetTargetCard
(
tc
)
end
function
c41925941
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
bc
=
e
:
GetLabelObjec
t
()
local
bc
=
Duel
.
GetFirstTarge
t
()
local
val
=
e
:
GetLabel
()
if
not
bc
:
IsRelateToBattle
(
)
then
return
end
if
not
bc
or
not
bc
:
IsRelateToEffect
(
e
)
or
not
bc
:
IsControler
(
1
-
tp
)
then
return
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
...
...
script/c4549095.lua
View file @
157ce72d
...
...
@@ -6,9 +6,9 @@ function c4549095.initial_effect(c)
e1
:
SetDescription
(
aux
.
Stringid
(
4549095
,
0
))
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
TIMING_DAMAGE_
CAL
)
e1
:
SetHintTiming
(
TIMING_DAMAGE_
STEP
)
e1
:
SetRange
(
LOCATION_HAND
+
LOCATION_GRAVE
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetCondition
(
c4549095
.
condition
)
e1
:
SetCost
(
c4549095
.
cost
)
e1
:
SetOperation
(
c4549095
.
operation
)
...
...
@@ -16,7 +16,7 @@ function c4549095.initial_effect(c)
end
function
c4549095
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
phase
=
Duel
.
GetCurrentPhase
()
if
(
phase
~=
PHASE_DAMAGE
and
phase
~=
PHASE_DAMAGE_CAL
)
or
Duel
.
IsDamageCalculated
()
then
return
false
end
if
phase
~=
PHASE_DAMAGE
or
Duel
.
IsDamageCalculated
()
then
return
false
end
local
a
=
Duel
.
GetAttacker
()
local
d
=
Duel
.
GetAttackTarget
()
return
(
a
:
GetControler
()
==
tp
and
a
:
IsSetCard
(
0x84
)
and
a
:
IsRelateToBattle
())
...
...
script/c49868263.lua
View file @
157ce72d
...
...
@@ -9,7 +9,6 @@ function c49868263.initial_effect(c)
e1
:
SetCategory
(
CATEGORY_DISABLE
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCondition
(
c49868263
.
discon
)
e1
:
SetCost
(
c49868263
.
discost
)
...
...
script/c51447164.lua
View file @
157ce72d
...
...
@@ -9,7 +9,6 @@ function c51447164.initial_effect(c)
e1
:
SetCategory
(
CATEGORY_DISABLE
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCondition
(
c51447164
.
discon
)
e1
:
SetCost
(
c51447164
.
discost
)
...
...
script/c53408006.lua
View file @
157ce72d
...
...
@@ -6,9 +6,9 @@ function c53408006.initial_effect(c)
e1
:
SetDescription
(
aux
.
Stringid
(
53408006
,
0
))
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
+
CATEGORY_DEFCHANGE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
TIMING_DAMAGE_
CAL
)
e1
:
SetHintTiming
(
TIMING_DAMAGE_
STEP
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetCondition
(
c53408006
.
condition
)
e1
:
SetCost
(
c53408006
.
cost
)
e1
:
SetOperation
(
c53408006
.
operation
)
...
...
@@ -19,7 +19,7 @@ function c53408006.filter(c)
end
function
c53408006
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
phase
=
Duel
.
GetCurrentPhase
()
if
(
phase
~=
PHASE_DAMAGE
and
phase
~=
PHASE_DAMAGE_CAL
)
or
Duel
.
IsDamageCalculated
()
then
return
false
end
if
phase
~=
PHASE_DAMAGE
or
Duel
.
IsDamageCalculated
()
then
return
false
end
local
a
=
Duel
.
GetAttacker
()
local
d
=
Duel
.
GetAttackTarget
()
return
(
a
:
GetControler
()
==
tp
and
c53408006
.
filter
(
a
)
and
a
:
IsRelateToBattle
())
...
...
script/c5818294.lua
View file @
157ce72d
...
...
@@ -6,7 +6,6 @@ function c5818294.initial_effect(c)
e1
:
SetCategory
(
CATEGORY_DISABLE
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetRange
(
LOCATION_GRAVE
)
e1
:
SetCondition
(
c5818294
.
negcon
)
e1
:
SetCost
(
c5818294
.
negcost
)
...
...
script/c6150044.lua
View file @
157ce72d
...
...
@@ -9,7 +9,6 @@ function c6150044.initial_effect(c)
e1
:
SetCategory
(
CATEGORY_DISABLE
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCondition
(
c6150044
.
discon
)
...
...
script/c67750322.lua
View file @
157ce72d
...
...
@@ -6,7 +6,6 @@ function c67750322.initial_effect(c)
e1
:
SetCategory
(
CATEGORY_DISABLE
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCondition
(
c67750322
.
discon
)
e1
:
SetCost
(
c67750322
.
discost
)
...
...
script/c67922702.lua
View file @
157ce72d
...
...
@@ -36,8 +36,8 @@ function c67922702.initial_effect(c)
e5
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetCode
(
EVENT_FREE_CHAIN
)
e5
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e5
:
SetHintTiming
(
TIMING_DAMAGE_
CAL
)
e5
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e5
:
SetHintTiming
(
TIMING_DAMAGE_
STEP
)
e5
:
SetCondition
(
c67922702
.
atkcon
)
e5
:
SetCost
(
c67922702
.
atkcost
)
e5
:
SetOperation
(
c67922702
.
atkop
)
...
...
@@ -69,7 +69,7 @@ function c67922702.spop(e,tp,eg,ep,ev,re,r,rp)
end
function
c67922702
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
phase
=
Duel
.
GetCurrentPhase
()
return
e
:
GetHandler
():
GetBattleTarget
()
~=
nil
and
(
phase
==
PHASE_DAMAGE
or
phase
==
PHASE_DAMAGE_CAL
)
and
not
Duel
.
IsDamageCalculated
()
return
e
:
GetHandler
():
GetBattleTarget
()
~=
nil
and
phase
==
PHASE_DAMAGE
and
not
Duel
.
IsDamageCalculated
()
end
function
c67922702
.
atkcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
GetFlagEffect
(
67922702
)
==
0
...
...
script/c72029628.lua
View file @
157ce72d
...
...
@@ -69,10 +69,11 @@ function c72029628.activate(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetOperation
(
c72029628
.
desop
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetCountLimit
(
1
)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterEffect
(
e1
,
true
)
end
end
function
c72029628
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c74458486.lua
View file @
157ce72d
...
...
@@ -4,9 +4,9 @@ function c74458486.initial_effect(c)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
TIMING_DAMAGE_
CAL
)
e1
:
SetHintTiming
(
TIMING_DAMAGE_
STEP
)
e1
:
SetCondition
(
c74458486
.
condition
)
e1
:
SetTarget
(
c74458486
.
target
)
e1
:
SetOperation
(
c74458486
.
activate
)
...
...
@@ -14,7 +14,7 @@ function c74458486.initial_effect(c)
end
function
c74458486
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
phase
=
Duel
.
GetCurrentPhase
()
return
(
phase
==
PHASE_DAMAGE
or
phase
==
PHASE_DAMAGE_CAL
)
and
not
Duel
.
IsDamageCalculated
()
return
phase
==
PHASE_DAMAGE
and
not
Duel
.
IsDamageCalculated
()
and
Duel
.
GetAttacker
():
IsControler
(
1
-
tp
)
and
Duel
.
GetAttackTarget
()
end
function
c74458486
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
...
...
script/c74845897.lua
View file @
157ce72d
...
...
@@ -35,6 +35,7 @@ function c74845897.op(e,tp,eg,ep,ev,re,r,rp)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetCountLimit
(
1
)
e1
:
SetLabel
(
fid
)
...
...
script/c75923050.lua
View file @
157ce72d
...
...
@@ -6,12 +6,10 @@ function c75923050.initial_effect(c)
--atk up
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
75923050
,
0
))
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EVENT_PRE_DAMAGE_CALCULATE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetCondition
(
c75923050
.
atkcon
)
e1
:
Set
Operation
(
c75923050
.
atkop
)
e1
:
Set
Value
(
1000
)
c
:
RegisterEffect
(
e1
)
--spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -24,19 +22,12 @@ function c75923050.initial_effect(c)
e2
:
SetOperation
(
c75923050
.
spop
)
c
:
RegisterEffect
(
e2
)
end
function
c75923050
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetBattleTarget
()
==
nil
end
function
c75923050
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetReset
(
RESET_PHASE
+
RESET_DAMAGE_CAL
)
e1
:
SetValue
(
1000
)
c
:
RegisterEffect
(
e1
)
end
function
c75923050
.
atkcon
(
e
)
local
ph
=
Duel
.
GetCurrentPhase
()
if
not
(
ph
==
PHASE_DAMAGE
or
ph
==
PHASE_DAMAGE_CAL
)
then
return
false
end
local
a
=
Duel
.
GetAttacker
()
local
d
=
Duel
.
GetAttackTarget
()
return
a
==
e
:
GetHandler
()
and
d
==
nil
end
function
c75923050
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetTurnID
()
~=
Duel
.
GetTurnCount
()
...
...
script/c80071763.lua
View file @
157ce72d
...
...
@@ -9,7 +9,6 @@ function c80071763.initial_effect(c)
e1
:
SetCategory
(
CATEGORY_DISABLE
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCondition
(
c80071763
.
discon
)
e1
:
SetCost
(
c80071763
.
discost
)
...
...
script/c83054225.lua
View file @
157ce72d
...
...
@@ -51,6 +51,7 @@ function c83054225.spop(e,tp,eg,ep,ev,re,r,rp)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetLabel
(
fid
)
e1
:
SetLabelObject
(
sg
)
...
...
script/c84389640.lua
View file @
157ce72d
...
...
@@ -11,25 +11,29 @@ function c84389640.initial_effect(c)
e2
:
SetDescription
(
aux
.
Stringid
(
84389640
,
0
))
e2
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetHintTiming
(
TIMING_DAMAGE_
CAL
)
e2
:
SetHintTiming
(
TIMING_DAMAGE_
STEP
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetProperty
(
EFFECT_FLAG_
DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e2
:
SetProperty
(
EFFECT_FLAG_
CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
)
e2
:
SetCondition
(
c84389640
.
condition
)
e2
:
SetCost
(
c84389640
.
cost
)
e2
:
SetTarget
(
c84389640
.
target
)
e2
:
SetOperation
(
c84389640
.
operation
)
c
:
RegisterEffect
(
e2
)
end
function
c84389640
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
phase
=
Duel
.
GetCurrentPhase
()
if
(
phase
~=
PHASE_DAMAGE
and
phase
~=
PHASE_DAMAGE_CAL
)
or
Duel
.
IsDamageCalculated
()
then
return
false
end
local
tc
=
Duel
.
GetAttacker
()
local
bc
=
Duel
.
GetAttackTarget
()
if
tc
:
IsControler
(
1
-
tp
)
then
tc
=
Duel
.
GetAttackTarget
()
bc
=
Duel
.
GetAttacker
()
if
phase
~=
PHASE_DAMAGE
or
Duel
.
IsDamageCalculated
()
then
return
false
end
local
a
=
Duel
.
GetAttacker
()
local
d
=
Duel
.
GetAttackTarget
()
if
a
:
IsControler
(
tp
)
then
e
:
SetLabelObject
(
d
)
return
a
:
IsFaceup
()
and
a
:
IsLevelBelow
(
3
)
and
a
:
IsType
(
TYPE_NORMAL
)
and
a
:
IsRelateToBattle
()
and
d
and
d
:
IsFaceup
()
and
d
:
IsRelateToBattle
()
else
e
:
SetLabelObject
(
a
)
return
d
:
IsFaceup
()
and
d
:
IsLevelBelow
(
3
)
and
d
:
IsType
(
TYPE_NORMAL
)
and
d
:
IsRelateToBattle
()
and
a
and
a
:
IsFaceup
()
and
a
:
IsRelateToBattle
()
end
e
:
SetLabelObject
(
bc
)
return
tc
and
bc
and
tc
:
IsFaceup
()
and
bc
:
IsFaceup
()
and
tc
:
IsLevelBelow
(
3
)
and
tc
:
IsType
(
TYPE_NORMAL
)
and
tc
:
IsRelateToBattle
()
end
function
c84389640
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
GetFlagEffect
(
84389640
)
==
0
and
Duel
.
CheckLPCost
(
tp
,
100
)
...
...
@@ -47,18 +51,22 @@ function c84389640.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local
pay
=
Duel
.
AnnounceNumber
(
tp
,
table.unpack
(
t
))
Duel
.
PayLPCost
(
tp
,
pay
)
e
:
SetLabel
(
-
pay
)
e
:
GetHandler
():
RegisterFlagEffect
(
84389640
,
RESET_PHASE
+
RESET_DAMAGE_CAL
,
0
,
1
)
e
:
GetHandler
():
RegisterFlagEffect
(
84389640
,
RESET_PHASE
+
RESET_DAMAGE
,
0
,
1
)
end
function
c84389640
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
tc
=
e
:
GetLabelObject
()
if
chkc
then
return
chkc
==
tc
end
if
chk
==
0
then
return
tc
:
IsCanBeEffectTarget
(
e
)
end
Duel
.
SetTargetCard
(
tc
)
end
function
c84389640
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
local
bc
=
e
:
GetLabelObject
()
if
bc
:
IsRelateToBattle
()
and
bc
:
IsFaceup
()
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetOwnerPlayer
(
tp
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
e1
:
SetValue
(
e
:
GetLabel
())
bc
:
RegisterEffect
(
e1
)
end
local
bc
=
Duel
.
GetFirstTarget
()
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
or
not
bc
or
not
bc
:
IsRelateToEffect
(
e
)
or
not
bc
:
IsControler
(
1
-
tp
)
then
return
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetOwnerPlayer
(
tp
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
e1
:
SetValue
(
e
:
GetLabel
())
bc
:
RegisterEffect
(
e1
)
end
script/c85215458.lua
View file @
157ce72d
...
...
@@ -6,9 +6,9 @@ function c85215458.initial_effect(c)
e1
:
SetDescription
(
aux
.
Stringid
(
85215458
,
0
))
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
TIMING_DAMAGE_
CAL
)
e1
:
SetHintTiming
(
TIMING_DAMAGE_
STEP
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetCondition
(
c85215458
.
condition
)
e1
:
SetCost
(
c85215458
.
cost
)
e1
:
SetOperation
(
c85215458
.
operation
)
...
...
@@ -16,7 +16,7 @@ function c85215458.initial_effect(c)
end
function
c85215458
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
phase
=
Duel
.
GetCurrentPhase
()
if
(
phase
~=
PHASE_DAMAGE
and
phase
~=
PHASE_DAMAGE_CAL
)
or
Duel
.
IsDamageCalculated
()
then
return
false
end
if
phase
~=
PHASE_DAMAGE
or
Duel
.
IsDamageCalculated
()
then
return
false
end
local
a
=
Duel
.
GetAttacker
()
local
d
=
Duel
.
GetAttackTarget
()
return
(
a
:
GetControler
()
==
tp
and
a
:
IsSetCard
(
0x33
)
and
a
:
IsRelateToBattle
())
...
...
script/c87043568.lua
View file @
157ce72d
...
...
@@ -30,10 +30,10 @@ function c87043568.operation(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
TIMING_DAMAGE_
CAL
)
e1
:
SetHintTiming
(
TIMING_DAMAGE_
STEP
)
e1
:
SetRange
(
LOCATION_SZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetCondition
(
c87043568
.
atkcon
)
e1
:
SetCost
(
c87043568
.
atkcost
)
e1
:
SetOperation
(
c87043568
.
atkop
)
...
...
@@ -57,7 +57,7 @@ function c87043568.atkcon(e,tp,eg,ep,ev,re,r,rp)
local
a
=
Duel
.
GetAttacker
()
local
ph
=
Duel
.
GetCurrentPhase
()
return
a
==
e
:
GetHandler
():
GetEquipTarget
()
and
(
ph
==
PHASE_DAMAGE
or
ph
==
PHASE_DAMAGE_CAL
)
and
not
Duel
.
IsDamageCalculated
()
and
ph
==
PHASE_DAMAGE
and
not
Duel
.
IsDamageCalculated
()
end
function
c87043568
.
cfilter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAttackBelow
(
1000
)
and
c
:
IsAbleToGraveAsCost
()
...
...
script/c88307361.lua
View file @
157ce72d
...
...
@@ -17,7 +17,6 @@ function c88307361.initial_effect(c)
e2
:
SetCategory
(
CATEGORY_DISABLE
+
CATEGORY_DESTROY
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCondition
(
c88307361
.
discon
)
e2
:
SetCost
(
c88307361
.
discost
)
...
...
script/c900787.lua
View file @
157ce72d
...
...
@@ -9,8 +9,8 @@ function c900787.initial_effect(c)
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
TIMING_DAMAGE_
CAL
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetHintTiming
(
TIMING_DAMAGE_
STEP
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCondition
(
c900787
.
condition
)
e1
:
SetCost
(
c900787
.
cost
)
...
...
@@ -20,7 +20,7 @@ end
function
c900787
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
ph
=
Duel
.
GetCurrentPhase
()
return
(
ph
==
PHASE_DAMAGE
or
ph
==
PHASE_DAMAGE_CAL
)
and
(
c
==
Duel
.
GetAttacker
()
or
c
==
Duel
.
GetAttackTarget
())
return
ph
==
PHASE_DAMAGE
and
(
c
==
Duel
.
GetAttacker
()
or
c
==
Duel
.
GetAttackTarget
())
and
not
Duel
.
IsDamageCalculated
()
end
function
c900787
.
cfilter
(
c
)
...
...
script/c92661479.lua
View file @
157ce72d
...
...
@@ -7,7 +7,6 @@ function c92661479.initial_effect(c)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
92661479
,
0
))
e1
:
SetCategory
(
CATEGORY_DISABLE
+
CATEGORY_DAMAGE
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
...
...
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