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
wyykak
ygopro
Commits
6e8d48ce
Commit
6e8d48ce
authored
Mar 29, 2013
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
5c014f70
Changes
23
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
141 additions
and
99 deletions
+141
-99
ocgcore/operations.cpp
ocgcore/operations.cpp
+31
-2
script/c15458892.lua
script/c15458892.lua
+1
-1
script/c18960169.lua
script/c18960169.lua
+4
-5
script/c19974580.lua
script/c19974580.lua
+3
-4
script/c22624373.lua
script/c22624373.lua
+5
-3
script/c30585393.lua
script/c30585393.lua
+3
-2
script/c3078576.lua
script/c3078576.lua
+3
-4
script/c32391631.lua
script/c32391631.lua
+1
-1
script/c40933924.lua
script/c40933924.lua
+3
-4
script/c52575195.lua
script/c52575195.lua
+1
-1
script/c53714009.lua
script/c53714009.lua
+3
-4
script/c59627393.lua
script/c59627393.lua
+13
-11
script/c62107981.lua
script/c62107981.lua
+1
-0
script/c6214884.lua
script/c6214884.lua
+3
-5
script/c68392533.lua
script/c68392533.lua
+32
-0
script/c73398797.lua
script/c73398797.lua
+8
-34
script/c81863068.lua
script/c81863068.lua
+1
-1
script/c8483333.lua
script/c8483333.lua
+1
-1
script/c85602018.lua
script/c85602018.lua
+2
-1
script/c91711547.lua
script/c91711547.lua
+3
-4
script/c9327502.lua
script/c9327502.lua
+4
-5
script/c967928.lua
script/c967928.lua
+11
-2
script/c98162021.lua
script/c98162021.lua
+4
-4
No files found.
ocgcore/operations.cpp
View file @
6e8d48ce
...
...
@@ -1200,19 +1200,32 @@ int32 field::summon(uint16 step, uint8 sumplayer, card * target, effect * proc,
effect_set
eset
;
target
->
filter_effect
(
EFFECT_DECREASE_TRIBUTE
,
&
eset
);
int32
minul
=
0
;
effect
*
pdec
=
0
;
for
(
int32
i
=
0
;
i
<
eset
.
count
;
++
i
)
{
if
(
!
(
eset
[
i
]
->
flag
&
EFFECT_FLAG_COUNT_LIMIT
))
{
int32
dec
=
eset
[
i
]
->
get_value
(
target
);
if
(
minul
<
(
dec
&
0xffff
))
if
(
minul
<
(
dec
&
0xffff
))
{
minul
=
dec
&
0xffff
;
pdec
=
eset
[
i
];
}
}
}
min
-=
minul
;
if
(
pdec
)
{
min
-=
minul
;
pduel
->
write_buffer8
(
MSG_HINT
);
pduel
->
write_buffer8
(
HINT_CARD
);
pduel
->
write_buffer8
(
0
);
pduel
->
write_buffer32
(
pdec
->
handler
->
data
.
code
);
}
for
(
int32
i
=
0
;
i
<
eset
.
count
&&
min
>
0
;
++
i
)
{
if
((
eset
[
i
]
->
flag
&
EFFECT_FLAG_COUNT_LIMIT
)
&&
(
eset
[
i
]
->
reset_count
&
0xf00
)
>
0
&&
eset
[
i
]
->
target
)
{
int32
dec
=
eset
[
i
]
->
get_value
(
target
);
min
-=
dec
&
0xffff
;
eset
[
i
]
->
dec_count
();
pduel
->
write_buffer8
(
MSG_HINT
);
pduel
->
write_buffer8
(
HINT_CARD
);
pduel
->
write_buffer8
(
0
);
pduel
->
write_buffer32
(
eset
[
i
]
->
handler
->
data
.
code
);
}
}
for
(
int32
i
=
0
;
i
<
eset
.
count
&&
min
>
0
;
++
i
)
{
...
...
@@ -1220,6 +1233,10 @@ int32 field::summon(uint16 step, uint8 sumplayer, card * target, effect * proc,
int32
dec
=
eset
[
i
]
->
get_value
(
target
);
min
-=
dec
&
0xffff
;
eset
[
i
]
->
dec_count
();
pduel
->
write_buffer8
(
MSG_HINT
);
pduel
->
write_buffer8
(
HINT_CARD
);
pduel
->
write_buffer8
(
0
);
pduel
->
write_buffer32
(
eset
[
i
]
->
handler
->
data
.
code
);
}
}
}
...
...
@@ -1281,6 +1298,10 @@ int32 field::summon(uint16 step, uint8 sumplayer, card * target, effect * proc,
core
.
extra_summon
[
sumplayer
]
=
TRUE
;
effect
*
pextra
=
(
effect
*
)
core
.
temp_var
[
0
];
pextra
->
get_value
(
target
);
pduel
->
write_buffer8
(
MSG_HINT
);
pduel
->
write_buffer8
(
HINT_CARD
);
pduel
->
write_buffer8
(
0
);
pduel
->
write_buffer32
(
pextra
->
handler
->
data
.
code
);
}
target
->
set_status
(
STATUS_FLIP_SUMMONED
,
FALSE
);
target
->
enable_field_effect
(
FALSE
);
...
...
@@ -1329,6 +1350,10 @@ int32 field::summon(uint16 step, uint8 sumplayer, card * target, effect * proc,
core
.
extra_summon
[
sumplayer
]
=
TRUE
;
effect
*
pextra
=
(
effect
*
)
core
.
temp_var
[
0
];
pextra
->
get_value
(
target
);
pduel
->
write_buffer8
(
MSG_HINT
);
pduel
->
write_buffer8
(
HINT_CARD
);
pduel
->
write_buffer8
(
0
);
pduel
->
write_buffer32
(
pextra
->
handler
->
data
.
code
);
}
core
.
summoning_card
=
target
;
return
FALSE
;
...
...
@@ -1669,6 +1694,10 @@ int32 field::mset(uint16 step, uint8 setplayer, card * target, effect * proc, ui
core
.
extra_summon
[
setplayer
]
=
TRUE
;
effect
*
pextra
=
(
effect
*
)
core
.
temp_var
[
0
];
pextra
->
get_value
(
target
);
pduel
->
write_buffer8
(
MSG_HINT
);
pduel
->
write_buffer8
(
HINT_CARD
);
pduel
->
write_buffer8
(
0
);
pduel
->
write_buffer32
(
pextra
->
handler
->
data
.
code
);
}
target
->
enable_field_effect
(
FALSE
);
move_to_field
(
target
,
setplayer
,
setplayer
,
LOCATION_MZONE
,
POS_FACEDOWN_DEFENCE
);
...
...
script/c15458892.lua
View file @
6e8d48ce
...
...
@@ -38,7 +38,7 @@ end
function
c15458892
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
1
-
tp
)
and
chkc
:
IsOnField
()
and
c15458892
.
thfilter
(
chkc
)
end
if
chk
==
0
then
return
true
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_
R
TOHAND
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c15458892
.
thfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
g
:
GetCount
(),
0
,
0
)
end
...
...
script/c18960169.lua
View file @
6e8d48ce
...
...
@@ -4,10 +4,9 @@ function c18960169.initial_effect(c)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
18960169
,
0
))
e1
:
SetCategory
(
CATEGORY_DRAW
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EVENT_DAMAGE
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_BATTLE_DAMAGE
)
e1
:
SetCondition
(
c18960169
.
condition
)
e1
:
SetTarget
(
c18960169
.
target
)
e1
:
SetOperation
(
c18960169
.
operation
)
...
...
@@ -23,7 +22,7 @@ function c18960169.initial_effect(c)
c
:
RegisterEffect
(
e2
)
end
function
c18960169
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
ep
~=
tp
and
r
==
REASON_BATTLE
and
e
:
GetHandler
()
==
eg
:
GetFirst
()
return
ep
~=
tp
end
function
c18960169
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
...
...
script/c19974580.lua
View file @
6e8d48ce
...
...
@@ -17,9 +17,8 @@ function c19974580.initial_effect(c)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
19974580
,
1
))
e2
:
SetCategory
(
CATEGORY_DECKDES
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCode
(
EVENT_DAMAGE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetCode
(
EVENT_BATTLE_DAMAGE
)
e2
:
SetCondition
(
c19974580
.
ddcon
)
e2
:
SetTarget
(
c19974580
.
ddtg
)
e2
:
SetOperation
(
c19974580
.
ddop
)
...
...
@@ -47,7 +46,7 @@ function c19974580.atop(e,tp,eg,ep,ev,re,r,rp)
end
end
function
c19974580
.
ddcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
ep
~=
tp
and
r
==
REASON_BATTLE
and
eg
:
GetFirst
()
==
e
:
GetHandler
()
return
ep
~=
tp
end
function
c19974580
.
ddtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
...
...
script/c22624373.lua
View file @
6e8d48ce
...
...
@@ -41,14 +41,16 @@ end
function
c22624373
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsPosition
(
POS_FACEUP_ATTACK
)
and
tc
:
IsRelateToEffect
(
e
)
then
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsPosition
(
POS_FACEUP_ATTACK
)
then
Duel
.
ChangePosition
(
c
,
POS_FACEUP_DEFENCE
)
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CANNOT_CHANGE_POSITION
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_COPY_INHERIT
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
3
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
+
RESET_SELF_TURN
,
2
)
c
:
RegisterEffect
(
e1
)
end
end
...
...
script/c30585393.lua
View file @
6e8d48ce
...
...
@@ -10,12 +10,13 @@ function c30585393.initial_effect(c)
e1
:
SetOperation
(
c30585393
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
c30585393
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c30585393
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
tc
=
eg
:
GetFirst
()
if
chkc
then
return
chkc
==
tc
end
if
chk
==
0
then
return
eg
:
GetCount
()
==
1
and
tc
:
GetPreviousControler
()
==
tp
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
tc
:
IsLocation
(
LOCATION_GRAVE
+
LOCATION_REMOVED
)
and
tc
:
IsReason
(
REASON_EFFECT
)
and
tc
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
and
tc
:
IsCanBe
EffectTarget
(
e
)
and
tc
:
IsCanBe
SpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetTargetCard
(
tc
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
tc
,
1
,
0
,
0
)
end
...
...
script/c3078576.lua
View file @
6e8d48ce
...
...
@@ -21,15 +21,14 @@ function c3078576.initial_effect(c)
--skip draw
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
3078576
,
1
))
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCode
(
EVENT_DAMAGE
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e4
:
SetCode
(
EVENT_BATTLE_DAMAGE
)
e4
:
SetCondition
(
c3078576
.
skipcon
)
e4
:
SetOperation
(
c3078576
.
skipop
)
c
:
RegisterEffect
(
e4
)
end
function
c3078576
.
skipcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
ep
~=
tp
and
r
==
REASON_BATTLE
and
Duel
.
GetAttacker
()
==
e
:
GetHandler
()
return
ep
~=
tp
end
function
c3078576
.
skipop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
...
...
script/c32391631.lua
View file @
6e8d48ce
...
...
@@ -58,7 +58,7 @@ function c32391631.becon(e)
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsAttackable
,
Duel
.
GetTurnPlayer
(),
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
c32391631
.
desfilter
(
c
)
return
c
:
IsPosition
(
POS_FACEUP_ATTACK
)
and
c
:
GetAttackedCount
()
==
0
and
c
:
IsDestructable
()
return
c
:
IsPosition
(
POS_FACEUP_ATTACK
)
and
c
:
GetAttack
Announc
edCount
()
==
0
and
c
:
IsDestructable
()
end
function
c32391631
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
...
...
script/c40933924.lua
View file @
6e8d48ce
...
...
@@ -3,15 +3,14 @@ function c40933924.initial_effect(c)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
40933924
,
0
))
e1
:
SetCategory
(
CATEGORY_TOGRAVE
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EVENT_DAMAGE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetCode
(
EVENT_BATTLE_DAMAGE
)
e1
:
SetCondition
(
c40933924
.
condition
)
e1
:
SetOperation
(
c40933924
.
operation
)
c
:
RegisterEffect
(
e1
)
end
function
c40933924
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
ep
~=
tp
and
r
==
REASON_BATTLE
and
eg
:
GetFirst
()
==
e
:
GetHandler
()
return
ep
~=
tp
end
function
c40933924
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
1
-
tp
,
HINTMSG_TOGRAVE
)
...
...
script/c52575195.lua
View file @
6e8d48ce
...
...
@@ -23,7 +23,7 @@ function c52575195.initial_effect(c)
c
:
RegisterEffect
(
e2
)
end
function
c52575195
.
tgcon1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
rp
==
tp
or
not
re
:
Is
ActiveType
(
TYPE_SPELL
+
TYPE_TRAP
)
or
not
re
:
Is
HasProperty
(
EFFECT_FLAG_CARD_TARGET
)
then
return
false
end
if
rp
==
tp
or
not
re
:
IsHasProperty
(
EFFECT_FLAG_CARD_TARGET
)
then
return
false
end
local
g
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TARGET_CARDS
)
if
not
g
or
g
:
GetCount
()
~=
1
then
return
false
end
local
tc
=
g
:
GetFirst
()
...
...
script/c53714009.lua
View file @
6e8d48ce
...
...
@@ -12,15 +12,14 @@ function c53714009.initial_effect(c)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
53714009
,
0
))
e2
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetCode
(
EVENT_DAMAGE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetCode
(
EVENT_BATTLE_DAMAGE
)
e2
:
SetCondition
(
c53714009
.
atkcon
)
e2
:
SetOperation
(
c53714009
.
atkop
)
c
:
RegisterEffect
(
e2
)
end
function
c53714009
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
ep
~=
tp
and
r
==
REASON_BATTLE
and
eg
:
GetFirst
()
==
e
:
GetHandler
()
return
ep
~=
tp
end
function
c53714009
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
...
...
script/c59627393.lua
View file @
6e8d48ce
...
...
@@ -35,8 +35,8 @@ end
function
c59627393
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
a
=
Duel
.
GetAttacker
()
local
at
=
Duel
.
GetAttackTarget
()
if
a
:
IsFacedown
()
or
not
a
:
IsRelateToEffect
(
e
)
or
at
:
IsFacedown
()
or
not
at
:
IsRelateToEffect
(
e
)
then
return
end
if
at
:
IsControler
(
tp
)
then
a
,
at
=
at
,
a
end
if
a
:
IsFacedown
()
or
not
a
:
IsRelateToEffect
(
e
)
or
not
at
:
IsRelateToEffect
(
e
)
then
return
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
...
...
@@ -49,14 +49,16 @@ function c59627393.operation(e,tp,eg,ep,ev,re,r,rp)
e2
:
SetValue
(
1
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_DAMAGE
)
a
:
RegisterEffect
(
e2
,
true
)
local
e3
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_DISABLE
)
e3
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
at
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e4
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
at
:
RegisterEffect
(
e4
)
if
at
:
IsType
(
TYPE_EFFECT
)
then
local
e3
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_DISABLE
)
e3
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
at
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e4
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
at
:
RegisterEffect
(
e4
)
end
end
script/c62107981.lua
View file @
6e8d48ce
...
...
@@ -4,6 +4,7 @@ function c62107981.initial_effect(c)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DIRECT_ATTACK
)
e1
:
SetCondition
(
c62107981
.
atcon
)
c
:
RegisterEffect
(
e1
)
--atk/def
local
e2
=
Effect
.
CreateEffect
(
c
)
...
...
script/c6214884.lua
View file @
6e8d48ce
...
...
@@ -4,17 +4,15 @@ function c6214884.initial_effect(c)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
6214884
,
0
))
e1
:
SetCategory
(
CATEGORY_HANDES
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EVENT_DAMAGE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_BATTLE_DAMAGE
)
e1
:
SetCondition
(
c6214884
.
condition
)
e1
:
SetTarget
(
c6214884
.
target
)
e1
:
SetOperation
(
c6214884
.
operation
)
c
:
RegisterEffect
(
e1
)
end
function
c6214884
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
ep
~=
tp
and
r
==
REASON_BATTLE
and
eg
:
GetFirst
()
==
e
:
GetHandler
()
return
ep
~=
tp
end
function
c6214884
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_HAND
,
0
)
>
0
end
...
...
script/c68392533.lua
View file @
6e8d48ce
...
...
@@ -25,6 +25,18 @@ function c68392533.initial_effect(c)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetValue
(
c68392533
.
eqlimit
)
c
:
RegisterEffect
(
e3
)
--tohand
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
68392533
,
0
))
e4
:
SetCategory
(
CATEGORY_TOHAND
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e4
:
SetCode
(
EVENT_TO_GRAVE
)
e4
:
SetCondition
(
c68392533
.
thcon
)
e4
:
SetCost
(
c68392533
.
thcost
)
e4
:
SetTarget
(
c68392533
.
thtg
)
e4
:
SetOperation
(
c68392533
.
thop
)
c
:
RegisterEffect
(
e4
)
end
function
c68392533
.
eqlimit
(
e
,
c
)
return
c
:
IsRace
(
RACE_PSYCHO
)
...
...
@@ -51,3 +63,23 @@ function c68392533.costchange(e,re,rp,val)
return
0
else
return
val
end
end
function
c68392533
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
ec
=
c
:
GetPreviousEquipTarget
()
return
c
:
IsReason
(
REASON_LOST_TARGET
)
and
ec
and
ec
:
IsReason
(
REASON_DESTROY
)
end
function
c68392533
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckLPCost
(
tp
,
1000
)
end
Duel
.
PayLPCost
(
tp
,
1000
)
end
function
c68392533
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToHand
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c68392533
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoHand
(
c
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
c
)
end
end
script/c73398797.lua
View file @
6e8d48ce
...
...
@@ -21,31 +21,6 @@ function c73398797.initial_effect(c)
e2
:
SetTarget
(
c73398797
.
sptg
)
e2
:
SetOperation
(
c73398797
.
spop
)
c
:
RegisterEffect
(
e2
)
if
not
c73398797
.
global_check
then
c73398797
.
global_check
=
true
c73398797
[
0
]
=
true
c73398797
[
1
]
=
true
local
ge1
=
Effect
.
CreateEffect
(
c
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
ge1
:
SetOperation
(
c73398797
.
checkop
)
Duel
.
RegisterEffect
(
ge1
,
0
)
local
ge2
=
Effect
.
CreateEffect
(
c
)
ge2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge2
:
SetCode
(
EVENT_PHASE_START
+
PHASE_DRAW
)
ge2
:
SetOperation
(
c73398797
.
clear
)
Duel
.
RegisterEffect
(
ge2
,
0
)
end
end
function
c73398797
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
eg
:
GetFirst
()
if
tc
:
IsCode
(
89631139
)
then
c73398797
[
tc
:
GetControler
()]
=
false
end
end
function
c73398797
.
clear
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
c73398797
[
0
]
=
true
c73398797
[
1
]
=
true
end
function
c73398797
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
d
=
Duel
.
GetAttackTarget
()
...
...
@@ -62,15 +37,7 @@ function c73398797.desop(e,tp,eg,ep,ev,re,r,rp)
end
end
function
c73398797
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
c73398797
[
tp
]
and
e
:
GetHandler
():
IsReleasable
()
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_ATTACK_ANNOUNCE
)
e1
:
SetProperty
(
EFFECT_FLAG_OATH
)
e1
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsCode
,
89631139
))
e1
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e1
:
SetReset
(
RESET_PHASE
+
RESET_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsReleasable
()
end
Duel
.
Release
(
e
:
GetHandler
(),
REASON_COST
)
end
function
c73398797
.
spfilter
(
c
,
e
,
tp
)
...
...
@@ -86,4 +53,11 @@ function c73398797.spop(e,tp,eg,ep,ev,re,r,rp)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c73398797
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_ATTACK
)
e1
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsCode
,
89631139
))
e1
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e1
:
SetReset
(
RESET_PHASE
+
RESET_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
script/c81863068.lua
View file @
6e8d48ce
...
...
@@ -23,5 +23,5 @@ function c81863068.operation(e,tp,eg,ep,ev,re,r,rp)
Duel
.
ConfirmCards
(
1
-
p
,
g
)
local
dg
=
g
:
Filter
(
Card
.
IsType
,
nil
,
TYPE_SPELL
)
Duel
.
SendtoGrave
(
dg
,
REASON_EFFECT
+
REASON_DISCARD
)
Duel
.
ShuffleHand
(
1
-
p
)
Duel
.
ShuffleHand
(
p
)
end
script/c8483333.lua
View file @
6e8d48ce
...
...
@@ -30,7 +30,7 @@ function c8483333.spcon(e,tp,eg,ep,ev,re,r,rp)
return
Duel
.
GetTurnPlayer
()
==
tp
end
function
c8483333
.
spfilter
(
c
,
e
,
tp
,
rc
)
return
c
:
IsReason
(
REASON_SUMMON
)
and
c
:
GetReasonCard
()
==
rc
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
Is
Location
(
LOCATION_GRAVE
)
and
c
:
Is
Reason
(
REASON_SUMMON
)
and
c
:
GetReasonCard
()
==
rc
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c8483333
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
...
...
script/c85602018.lua
View file @
6e8d48ce
...
...
@@ -59,14 +59,15 @@ function c85602018.spcon2(e,tp,eg,ep,ev,re,r,rp)
return
e
:
GetLabelObject
():
GetLabel
()
==
1
and
Duel
.
GetCurrentChain
()
==
0
end
function
c85602018
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetLabelObject
():
GetLabel
()
~=
1
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c85602018
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
85602018
,
0
))
then
e
:
GetLabelObject
():
SetLabel
(
2
)
Duel
.
Hint
(
HINT_CARD
,
0
,
85602018
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c85602018
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
e
:
GetLabelObject
():
SetLabel
(
2
)
else
e
:
GetLabelObject
():
SetLabel
(
0
)
end
...
...
script/c91711547.lua
View file @
6e8d48ce
...
...
@@ -4,17 +4,16 @@ function c91711547.initial_effect(c)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
91711547
,
0
))
e1
:
SetCategory
(
CATEGORY_DAMAGE
)
e1
:
SetType
(
EFFECT_TYPE_
FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetType
(
EFFECT_TYPE_
SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCode
(
EVENT_DAMAGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EVENT_BATTLE_DAMAGE
)
e1
:
SetCondition
(
c91711547
.
damcon
)
e1
:
SetTarget
(
c91711547
.
damtg
)
e1
:
SetOperation
(
c91711547
.
damop
)
c
:
RegisterEffect
(
e1
)
end
function
c91711547
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
ep
~=
tp
and
r
==
REASON_BATTLE
and
eg
:
GetFirst
()
==
e
:
GetHandler
()
return
ep
~=
tp
end
function
c91711547
.
damtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
...
...
script/c9327502.lua
View file @
6e8d48ce
--E·HERO ボルテック
function
c9327502
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_
FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetType
(
EFFECT_TYPE_
SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EVENT_DAMAGE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCode
(
EVENT_BATTLE_DAMAGE
)
e1
:
SetCondition
(
c9327502
.
condition
)
e1
:
SetTarget
(
c9327502
.
target
)
e1
:
SetOperation
(
c9327502
.
operation
)
c
:
RegisterEffect
(
e1
)
end
function
c9327502
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
ep
~=
tp
and
r
==
REASON_BATTLE
and
eg
:
GetFirst
()
==
e
:
GetHandler
()
return
ep
~=
tp
end
function
c9327502
.
filter
(
c
,
e
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x3008
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
...
...
script/c967928.lua
View file @
6e8d48ce
...
...
@@ -28,7 +28,13 @@ function c967928.activate(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetCode
(
EFFECT_SKIP_DP
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
+
RESET_SELF_TURN
)
if
Duel
.
GetTurnPlayer
()
==
p
and
Duel
.
GetCurrentPhase
()
==
PHASE_DRAW
then
e1
:
SetReset
(
RESET_PHASE
+
PHASE_DRAW
+
RESET_SELF_TURN
,
2
)
e1
:
SetLabel
(
Duel
.
GetTurnCount
())
e1
:
SetCondition
(
c967928
.
skipcon
)
else
e1
:
SetReset
(
RESET_PHASE
+
PHASE_DRAW
+
RESET_SELF_TURN
)
end
Duel
.
RegisterEffect
(
e1
,
p
)
else
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
...
...
@@ -41,6 +47,9 @@ function c967928.activate(e,tp,eg,ep,ev,re,r,rp)
Duel
.
RegisterEffect
(
e1
,
p
)
end
end
function
c967928
.
skipcon
(
e
)
return
Duel
.
GetTurnCount
()
~=
e
:
GetLabel
()
end
function
c967928
.
aclimit
(
e
,
re
,
tp
)
return
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
re
:
IsActiveType
(
TYPE_SPELL
+
TYPE_TRAP
)
return
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
end
script/c98162021.lua
View file @
6e8d48ce
...
...
@@ -44,15 +44,15 @@ function c98162021.attackup(e,c)
return
c
:
GetCounter
(
0x3003
)
*
300
end
function
c98162021
.
addct2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
chkc
:
IsC
ontroler
(
tp
)
and
chkc
:
IsC
anAddCounter
(
0x3003
,
1
)
end
if
chkc
then
return
chkc
:
IsOnField
()
and
chkc
:
IsCanAddCounter
(
0x3003
,
1
)
end
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanRemoveCounter
(
tp
,
0x3003
,
1
,
REASON_EFFECT
)
and
Duel
.
IsExistingTarget
(
Card
.
IsCanAddCounter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
e
:
GetHandler
(),
0x3003
,
1
)
end
and
Duel
.
IsExistingTarget
(
Card
.
IsCanAddCounter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
e
:
GetHandler
(),
0x3003
,
1
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
98162021
,
1
))
Duel
.
SelectTarget
(
tp
,
Card
.
IsCanAddCounter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
e
:
GetHandler
(),
0x3003
,
1
)
Duel
.
SelectTarget
(
tp
,
Card
.
IsCanAddCounter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
e
:
GetHandler
(),
0x3003
,
1
)
end
function
c98162021
.
addc2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
GetCounter
(
0x
21
)
==
0
then
return
end
if
c
:
GetCounter
(
0x
3003
)
==
0
then
return
end
c
:
RemoveCounter
(
tp
,
0x3003
,
1
,
REASON_EFFECT
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
then
...
...
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