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
6245a9f7
Commit
6245a9f7
authored
Apr 12, 2014
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
1069ea5b
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
130 additions
and
60 deletions
+130
-60
gframe/event_handler.cpp
gframe/event_handler.cpp
+4
-0
ocgcore/effect.cpp
ocgcore/effect.cpp
+1
-1
script/c19327348.lua
script/c19327348.lua
+9
-5
script/c28565527.lua
script/c28565527.lua
+3
-3
script/c37744402.lua
script/c37744402.lua
+9
-5
script/c37970940.lua
script/c37970940.lua
+9
-5
script/c69155991.lua
script/c69155991.lua
+42
-18
script/c73318863.lua
script/c73318863.lua
+9
-5
script/c74364659.lua
script/c74364659.lua
+9
-5
script/c759393.lua
script/c759393.lua
+9
-5
script/c79229522.lua
script/c79229522.lua
+26
-8
No files found.
gframe/event_handler.cpp
View file @
6245a9f7
...
...
@@ -1270,6 +1270,10 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
}
else
{
mainGame
->
PopupElement
(
mainGame
->
wQuery
);
}
if
(
mainGame
->
wOptions
->
isVisible
())
{
DuelClient
::
SetResponseI
(
-
1
);
mainGame
->
HideElement
(
mainGame
->
wOptions
);
}
break
;
}
case
MSG_SORT_CHAIN
:
...
...
ocgcore/effect.cpp
View file @
6245a9f7
...
...
@@ -177,7 +177,7 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con
if
((
handler
->
current
.
location
&
(
LOCATION_ONFIELD
|
LOCATION_REMOVED
))
&&
(
code
!=
EVENT_FLIP
)
&&
(
!
handler
->
is_position
(
POS_FACEUP
)
||
!
handler
->
is_status
(
STATUS_EFFECT_ENABLED
)))
return
FALSE
;
if
(
!
(
type
&
EFFECT_TYPE_TRIGGER_F
))
{
if
(
!
(
type
&
(
EFFECT_TYPE_FLIP
|
EFFECT_TYPE_TRIGGER_F
)
))
{
if
((
code
<
1132
||
code
>
1149
)
&&
pduel
->
game_field
->
infos
.
phase
==
PHASE_DAMAGE
&&
!
(
flag
&
EFFECT_FLAG_DAMAGE_STEP
))
return
FALSE
;
if
((
code
<
1134
||
code
>
1136
)
&&
pduel
->
game_field
->
infos
.
phase
==
PHASE_DAMAGE_CAL
&&
!
(
flag
&
EFFECT_FLAG_DAMAGE_CAL
))
...
...
script/c19327348.lua
View file @
6245a9f7
...
...
@@ -26,7 +26,7 @@ function c19327348.operation(e,tp,eg,ep,ev,re,r,rp)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
and
tc
and
tc
:
IsRelateToEffect
(
e
)
and
c19327348
.
filter
(
tc
)
then
c
:
CreateRelation
(
tc
,
RESET_EVENT
+
0x
1
fe0000
)
c
:
CreateRelation
(
tc
,
RESET_EVENT
+
0x
5
fe0000
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
...
...
@@ -48,16 +48,20 @@ function c19327348.operation(e,tp,eg,ep,ev,re,r,rp)
end
function
c19327348
.
ctcon
(
e
)
if
e
:
GetLabel
()
==
1
then
return
true
end
if
e
:
GetLabel
()
==
2
then
return
false
end
local
c
=
e
:
GetOwner
()
local
h
=
e
:
GetHandler
()
return
h
:
IsAttribute
(
ATTRIBUTE_DARK
)
and
not
c
:
IsDisabled
()
and
c
:
IsRelateToCard
(
h
)
if
h
:
IsAttribute
(
ATTRIBUTE_DARK
)
and
not
c
:
IsDisabled
()
and
c
:
IsRelateToCard
(
h
)
then
return
true
else
e
:
SetLabel
(
2
)
return
false
end
end
function
c19327348
.
posop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetLabelObject
():
GetLabel
()
~=
0
then
return
end
local
c
=
e
:
GetOwner
()
local
h
=
e
:
GetHandler
()
if
h
:
IsAttribute
(
ATTRIBUTE_DARK
)
and
not
c
:
IsDisabled
()
and
c
:
IsRelateToCard
(
h
)
and
h
:
IsPreviousPosition
(
POS_FACEUP
)
and
h
:
IsFacedown
()
then
if
h
:
IsPreviousPosition
(
POS_FACEUP
)
and
h
:
IsFacedown
()
then
e
:
GetLabelObject
():
SetLabel
(
1
)
end
end
script/c28565527.lua
View file @
6245a9f7
...
...
@@ -14,7 +14,7 @@ function c28565527.initial_effect(c)
c
:
RegisterEffect
(
e1
)
end
function
c28565527
.
cfilter
(
c
)
return
Duel
.
IsExistingTarget
(
Card
.
IsAbleToHand
,
0
,
LOCATION_
ONFIELD
,
LOCATION_ONFIELD
,
1
,
c
)
return
Duel
.
IsExistingTarget
(
Card
.
IsAbleToHand
,
0
,
LOCATION_
MZONE
,
LOCATION_MZONE
,
1
,
c
)
end
function
c28565527
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckReleaseGroup
(
tp
,
c28565527
.
cfilter
,
1
,
nil
)
end
...
...
@@ -22,10 +22,10 @@ function c28565527.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
Release
(
g
,
REASON_COST
)
end
function
c28565527
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
Is
OnField
(
)
and
chkc
:
IsAbleToHand
()
end
if
chkc
then
return
chkc
:
Is
Location
(
LOCATION_MZONE
)
and
chkc
:
IsAbleToHand
()
end
if
chk
==
0
then
return
true
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsAbleToHand
,
tp
,
LOCATION_
ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsAbleToHand
,
tp
,
LOCATION_
MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
0
,
0
)
end
function
c28565527
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c37744402.lua
View file @
6245a9f7
...
...
@@ -26,7 +26,7 @@ function c37744402.operation(e,tp,eg,ep,ev,re,r,rp)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
and
tc
and
tc
:
IsRelateToEffect
(
e
)
and
c37744402
.
filter
(
tc
)
then
c
:
CreateRelation
(
tc
,
RESET_EVENT
+
0x
1
fe0000
)
c
:
CreateRelation
(
tc
,
RESET_EVENT
+
0x
5
fe0000
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
...
...
@@ -48,16 +48,20 @@ function c37744402.operation(e,tp,eg,ep,ev,re,r,rp)
end
function
c37744402
.
ctcon
(
e
)
if
e
:
GetLabel
()
==
1
then
return
true
end
if
e
:
GetLabel
()
==
2
then
return
false
end
local
c
=
e
:
GetOwner
()
local
h
=
e
:
GetHandler
()
return
h
:
IsAttribute
(
ATTRIBUTE_WIND
)
and
not
c
:
IsDisabled
()
and
c
:
IsRelateToCard
(
h
)
if
h
:
IsAttribute
(
ATTRIBUTE_WIND
)
and
not
c
:
IsDisabled
()
and
c
:
IsRelateToCard
(
h
)
then
return
true
else
e
:
SetLabel
(
2
)
return
false
end
end
function
c37744402
.
posop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetLabelObject
():
GetLabel
()
~=
0
then
return
end
local
c
=
e
:
GetOwner
()
local
h
=
e
:
GetHandler
()
if
h
:
IsAttribute
(
ATTRIBUTE_WIND
)
and
not
c
:
IsDisabled
()
and
c
:
IsRelateToCard
(
h
)
and
h
:
IsPreviousPosition
(
POS_FACEUP
)
and
h
:
IsFacedown
()
then
if
h
:
IsPreviousPosition
(
POS_FACEUP
)
and
h
:
IsFacedown
()
then
e
:
GetLabelObject
():
SetLabel
(
1
)
end
end
script/c37970940.lua
View file @
6245a9f7
...
...
@@ -26,7 +26,7 @@ function c37970940.operation(e,tp,eg,ep,ev,re,r,rp)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
and
tc
and
tc
:
IsRelateToEffect
(
e
)
and
c37970940
.
filter
(
tc
)
then
c
:
CreateRelation
(
tc
,
RESET_EVENT
+
0x
1
fe0000
)
c
:
CreateRelation
(
tc
,
RESET_EVENT
+
0x
5
fe0000
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
...
...
@@ -48,16 +48,20 @@ function c37970940.operation(e,tp,eg,ep,ev,re,r,rp)
end
function
c37970940
.
ctcon
(
e
)
if
e
:
GetLabel
()
==
1
then
return
true
end
if
e
:
GetLabel
()
==
2
then
return
false
end
local
c
=
e
:
GetOwner
()
local
h
=
e
:
GetHandler
()
return
h
:
IsAttribute
(
ATTRIBUTE_EARTH
)
and
not
c
:
IsDisabled
()
and
c
:
IsRelateToCard
(
h
)
if
h
:
IsAttribute
(
ATTRIBUTE_EARTH
)
and
not
c
:
IsDisabled
()
and
c
:
IsRelateToCard
(
h
)
then
return
true
else
e
:
SetLabel
(
2
)
return
false
end
end
function
c37970940
.
posop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetLabelObject
():
GetLabel
()
~=
0
then
return
end
local
c
=
e
:
GetOwner
()
local
h
=
e
:
GetHandler
()
if
h
:
IsAttribute
(
ATTRIBUTE_EARTH
)
and
not
c
:
IsDisabled
()
and
c
:
IsRelateToCard
(
h
)
and
h
:
IsPreviousPosition
(
POS_FACEUP
)
and
h
:
IsFacedown
()
then
if
h
:
IsPreviousPosition
(
POS_FACEUP
)
and
h
:
IsFacedown
()
then
e
:
GetLabelObject
():
SetLabel
(
1
)
end
end
script/c69155991.lua
View file @
6245a9f7
...
...
@@ -3,29 +3,53 @@ function c69155991.initial_effect(c)
--destroy
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EVENT_CHAIN_SOLVING
)
e1
:
SetCondition
(
c69155991
.
descon
)
e1
:
SetOperation
(
c69155991
.
desop
)
e1
:
SetOperation
(
c69155991
.
chop
)
c
:
RegisterEffect
(
e1
)
--to grave
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
69155991
,
0
))
e2
:
SetCategory
(
CATEGORY_TOGRAVE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetCondition
(
c69155991
.
tgcon
)
e2
:
SetTarget
(
c69155991
.
tgtg
)
e2
:
SetOperation
(
c69155991
.
tgop
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCode
(
EVENT_CHAIN_SOLVED
)
e2
:
SetOperation
(
c69155991
.
desop1
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCode
(
EVENT_BATTLED
)
e3
:
SetProperty
(
EFFECT_FLAG_AVAILABLE_BD
)
e3
:
SetOperation
(
c69155991
.
desop2
)
e3
:
SetLabelObject
(
e2
)
c
:
RegisterEffect
(
e3
)
--to grave
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
69155991
,
0
))
e4
:
SetCategory
(
CATEGORY_TOGRAVE
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetCode
(
EVENT_TO_GRAVE
)
e4
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e4
:
SetCondition
(
c69155991
.
tgcon
)
e4
:
SetTarget
(
c69155991
.
tgtg
)
e4
:
SetOperation
(
c69155991
.
tgop
)
c
:
RegisterEffect
(
e4
)
end
function
c69155991
.
chop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
or
re
:
GetHandler
():
IsType
(
TYPE_MONSTER
)
then
e
:
GetHandler
():
RegisterFlagEffect
(
69155991
,
RESET_EVENT
+
0x1fe0000
+
RESET_CHAIN
,
0
,
1
)
end
end
function
c69155991
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
or
re
:
GetHandler
():
IsType
(
TYPE_MONSTER
)
function
c69155991
.
desop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
ev
>
1
or
e
:
GetHandler
():
GetFlagEffect
(
69155991
)
==
0
then
return
end
local
ph
=
Duel
.
GetCurrentPhase
()
if
(
ph
==
PHASE_DAMAGE
or
ph
==
PHASE_DAMAGE_CAL
)
and
not
Duel
.
IsDamageCalculated
()
then
e
:
GetHandler
():
RegisterFlagEffect
(
69155992
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
RESET_DAMAGE
,
0
,
1
)
else
Duel
.
Destroy
(
e
:
GetHandler
(),
REASON_EFFECT
)
end
end
function
c69155991
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
IsLocation
(
LOCATION_MZONE
)
and
e
:
GetHandler
():
IsFaceup
()
then
function
c69155991
.
desop
2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
GetFlagEffect
(
69155992
)
~=
0
then
Duel
.
Destroy
(
e
:
GetHandler
(),
REASON_EFFECT
)
end
end
...
...
@@ -36,7 +60,7 @@ end
function
c69155991
.
filter
(
c
)
return
c
:
IsSetCard
(
0x24
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToGrave
()
end
function
c69155991
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c69155991
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c69155991
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
...
...
script/c73318863.lua
View file @
6245a9f7
...
...
@@ -26,7 +26,7 @@ function c73318863.operation(e,tp,eg,ep,ev,re,r,rp)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
and
tc
and
tc
:
IsRelateToEffect
(
e
)
and
c73318863
.
filter
(
tc
)
then
c
:
CreateRelation
(
tc
,
RESET_EVENT
+
0x
1
fe0000
)
c
:
CreateRelation
(
tc
,
RESET_EVENT
+
0x
5
fe0000
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
...
...
@@ -48,16 +48,20 @@ function c73318863.operation(e,tp,eg,ep,ev,re,r,rp)
end
function
c73318863
.
ctcon
(
e
)
if
e
:
GetLabel
()
==
1
then
return
true
end
if
e
:
GetLabel
()
==
2
then
return
false
end
local
c
=
e
:
GetOwner
()
local
h
=
e
:
GetHandler
()
return
h
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
and
not
c
:
IsDisabled
()
and
c
:
IsRelateToCard
(
h
)
if
h
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
and
not
c
:
IsDisabled
()
and
c
:
IsRelateToCard
(
h
)
then
return
true
else
e
:
SetLabel
(
2
)
return
false
end
end
function
c73318863
.
posop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetLabelObject
():
GetLabel
()
~=
0
then
return
end
local
c
=
e
:
GetOwner
()
local
h
=
e
:
GetHandler
()
if
h
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
and
not
c
:
IsDisabled
()
and
c
:
IsRelateToCard
(
h
)
and
h
:
IsPreviousPosition
(
POS_FACEUP
)
and
h
:
IsFacedown
()
then
if
h
:
IsPreviousPosition
(
POS_FACEUP
)
and
h
:
IsFacedown
()
then
e
:
GetLabelObject
():
SetLabel
(
1
)
end
end
script/c74364659.lua
View file @
6245a9f7
...
...
@@ -26,7 +26,7 @@ function c74364659.operation(e,tp,eg,ep,ev,re,r,rp)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
and
tc
and
tc
:
IsRelateToEffect
(
e
)
and
c74364659
.
filter
(
tc
)
then
c
:
CreateRelation
(
tc
,
RESET_EVENT
+
0x
1
fe0000
)
c
:
CreateRelation
(
tc
,
RESET_EVENT
+
0x
5
fe0000
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
...
...
@@ -48,16 +48,20 @@ function c74364659.operation(e,tp,eg,ep,ev,re,r,rp)
end
function
c74364659
.
ctcon
(
e
)
if
e
:
GetLabel
()
==
1
then
return
true
end
if
e
:
GetLabel
()
==
2
then
return
false
end
local
c
=
e
:
GetOwner
()
local
h
=
e
:
GetHandler
()
return
h
:
IsAttribute
(
ATTRIBUTE_WATER
)
and
not
c
:
IsDisabled
()
and
c
:
IsRelateToCard
(
h
)
if
h
:
IsAttribute
(
ATTRIBUTE_WATER
)
and
not
c
:
IsDisabled
()
and
c
:
IsRelateToCard
(
h
)
then
return
true
else
e
:
SetLabel
(
2
)
return
false
end
end
function
c74364659
.
posop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetLabelObject
():
GetLabel
()
~=
0
then
return
end
local
c
=
e
:
GetOwner
()
local
h
=
e
:
GetHandler
()
if
h
:
IsAttribute
(
ATTRIBUTE_WATER
)
and
not
c
:
IsDisabled
()
and
c
:
IsRelateToCard
(
h
)
and
h
:
IsPreviousPosition
(
POS_FACEUP
)
and
h
:
IsFacedown
()
then
if
h
:
IsPreviousPosition
(
POS_FACEUP
)
and
h
:
IsFacedown
()
then
e
:
GetLabelObject
():
SetLabel
(
1
)
end
end
script/c759393.lua
View file @
6245a9f7
...
...
@@ -26,7 +26,7 @@ function c759393.operation(e,tp,eg,ep,ev,re,r,rp)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
and
tc
and
tc
:
IsRelateToEffect
(
e
)
and
c759393
.
filter
(
tc
)
then
c
:
CreateRelation
(
tc
,
RESET_EVENT
+
0x
1
fe0000
)
c
:
CreateRelation
(
tc
,
RESET_EVENT
+
0x
5
fe0000
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
...
...
@@ -48,16 +48,20 @@ function c759393.operation(e,tp,eg,ep,ev,re,r,rp)
end
function
c759393
.
ctcon
(
e
)
if
e
:
GetLabel
()
==
1
then
return
true
end
if
e
:
GetLabel
()
==
2
then
return
false
end
local
c
=
e
:
GetOwner
()
local
h
=
e
:
GetHandler
()
return
h
:
IsAttribute
(
ATTRIBUTE_FIRE
)
and
not
c
:
IsDisabled
()
and
c
:
IsRelateToCard
(
h
)
if
h
:
IsAttribute
(
ATTRIBUTE_FIRE
)
and
not
c
:
IsDisabled
()
and
c
:
IsRelateToCard
(
h
)
then
return
true
else
e
:
SetLabel
(
2
)
return
false
end
end
function
c759393
.
posop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetLabelObject
():
GetLabel
()
~=
0
then
return
end
local
c
=
e
:
GetOwner
()
local
h
=
e
:
GetHandler
()
if
h
:
IsAttribute
(
ATTRIBUTE_FIRE
)
and
not
c
:
IsDisabled
()
and
c
:
IsRelateToCard
(
h
)
and
h
:
IsPreviousPosition
(
POS_FACEUP
)
and
h
:
IsFacedown
()
then
if
h
:
IsPreviousPosition
(
POS_FACEUP
)
and
h
:
IsFacedown
()
then
e
:
GetLabelObject
():
SetLabel
(
1
)
end
end
script/c79229522.lua
View file @
6245a9f7
...
...
@@ -30,24 +30,42 @@ end
function
c79229522
.
splimit
(
e
,
se
,
sp
,
st
)
return
e
:
GetHandler
():
GetLocation
()
~=
LOCATION_EXTRA
end
function
c79229522
.
spfilter1
(
c
,
tp
)
return
c
:
IsCode
(
70095154
)
and
c
:
IsAbleToGraveAsCost
()
and
(
c
:
IsControler
(
tp
)
or
c
:
IsFaceup
())
and
Duel
.
IsExistingMatchingCard
(
c79229522
.
spfilter2
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
c
,
tp
)
function
c79229522
.
spfilter1
(
c
,
tp
,
ft
)
if
c
:
IsCode
(
70095154
)
and
c
:
IsAbleToGraveAsCost
()
and
c
:
IsCanBeFusionMaterial
(
true
)
and
(
c
:
IsControler
(
tp
)
or
c
:
IsFaceup
())
then
if
ft
>
0
or
(
c
:
IsControler
(
tp
)
and
c
:
IsLocation
(
LOCATION_MZONE
))
then
return
Duel
.
IsExistingMatchingCard
(
c79229522
.
spfilter2
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
c
,
tp
)
else
return
Duel
.
IsExistingMatchingCard
(
c79229522
.
spfilter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
c
,
tp
)
end
else
return
false
end
end
function
c79229522
.
spfilter2
(
c
,
tp
)
return
c
:
IsRace
(
RACE_MACHINE
)
and
c
:
IsAbleToGraveAsCost
()
and
c
:
IsCanBeFusionMaterial
()
and
(
c
:
IsControler
(
tp
)
or
c
:
IsFaceup
())
end
function
c79229522
.
sprcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>-
1
and
Duel
.
IsExistingMatchingCard
(
c79229522
.
spfilter1
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
,
tp
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
return
ft
>-
1
and
Duel
.
IsExistingMatchingCard
(
c79229522
.
spfilter1
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
,
tp
,
ft
)
end
function
c79229522
.
sprop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
79229522
,
0
))
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c79229522
.
spfilter1
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
,
tp
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c79229522
.
spfilter1
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
,
tp
,
ft
)
local
tc
=
g1
:
GetFirst
()
local
g
=
Duel
.
GetMatchingGroup
(
c79229522
.
spfilter2
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
tc
,
tp
)
local
g2
=
nil
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
79229522
,
1
))
local
g2
=
Duel
.
SelectMatchingCard
(
tp
,
c79229522
.
spfilter2
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
10
,
g1
:
GetFirst
(),
tp
)
if
ft
>
0
or
(
tc
:
IsControler
(
tp
)
and
tc
:
IsLocation
(
LOCATION_MZONE
))
then
g2
=
g
:
Select
(
tp
,
1
,
10
,
nil
)
else
g2
=
g
:
FilterSelect
(
tp
,
Card
.
IsControler
,
1
,
1
,
nil
,
tp
)
if
g
:
GetCount
()
>
1
and
Duel
.
SelectYesNo
(
tp
,
210
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
79229522
,
1
))
local
g3
=
g
:
Select
(
tp
,
1
,
9
,
g2
:
GetFirst
())
g2
:
Merge
(
g3
)
end
end
g1
:
Merge
(
g2
)
Duel
.
SendtoGrave
(
g1
,
REASON_COST
)
--spsummon condition
...
...
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