Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
YGOPRO-520DIY
ygopro
Commits
aeb28e0b
Commit
aeb28e0b
authored
Feb 21, 2015
by
salix5
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1125 from DailyShana/patch-3
fix
parents
7f8d5964
3b1a76f6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
25 deletions
+51
-25
script/c13317419.lua
script/c13317419.lua
+21
-19
script/c82044279.lua
script/c82044279.lua
+30
-6
No files found.
script/c13317419.lua
View file @
aeb28e0b
...
...
@@ -12,6 +12,19 @@ function c13317419.initial_effect(c)
e1
:
SetTarget
(
c13317419
.
target
)
e1
:
SetOperation
(
c13317419
.
operation
)
c
:
RegisterEffect
(
e1
)
--destroy
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_ATKCHANGE
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetCountLimit
(
1
,
13317419
)
e2
:
SetCondition
(
c13317419
.
descon
)
e2
:
SetCost
(
c13317419
.
descost
)
e2
:
SetTarget
(
c13317419
.
destg
)
e2
:
SetOperation
(
c13317419
.
desop
)
c
:
RegisterEffect
(
e2
)
end
function
c13317419
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetCurrentPhase
()
~=
PHASE_DAMAGE
or
not
Duel
.
IsDamageCalculated
()
...
...
@@ -40,30 +53,19 @@ function c13317419.operation(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetValue
(
800
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
c
:
RegisterEffect
(
e1
)
--
destroy
--
Equip limit
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
13317419
,
0
))
e2
:
SetCategory
(
CATEGORY_DESTROY
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCountLimit
(
1
,
13317419
)
e2
:
SetCost
(
c13317419
.
descost
)
e2
:
SetTarget
(
c13317419
.
destg
)
e2
:
SetOperation
(
c13317419
.
desop
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetValue
(
1
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
c
:
RegisterEffect
(
e2
)
--Equip limit
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetValue
(
1
)
e3
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
c
:
RegisterEffect
(
e3
)
end
end
function
c13317419
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetEquipTarget
()
end
function
c13317419
.
descost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToGraveAsCost
()
end
e
:
SetLabelObject
(
e
:
GetHandler
():
GetEquipTarget
())
...
...
script/c82044279.lua
View file @
aeb28e0b
...
...
@@ -20,6 +20,14 @@ function c82044279.initial_effect(c)
e2
:
SetDescription
(
aux
.
Stringid
(
82044279
,
1
))
e2
:
SetCondition
(
c82044279
.
condition2
)
c
:
RegisterEffect
(
e2
)
--atk
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
EVENT_DESTROYED
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCondition
(
c82044279
.
atkcon
)
e3
:
SetOperation
(
c82044279
.
atkop
)
c
:
RegisterEffect
(
e3
)
end
function
c82044279
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
...
...
@@ -39,24 +47,40 @@ function c82044279.condition2(e,tp,eg,ep,ev,re,r,rp)
end
function
c82044279
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
Duel
.
SetOperationInfo
(
0
,
CATEGORY_NEGATE
,
eg
,
1
,
0
,
0
)
if
re
:
GetHandler
():
IsDestructable
()
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
1
,
0
,
0
)
end
end
function
c82044279
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
Duel
.
NegateActivation
(
ev
)
local
rc
=
re
:
GetHandler
()
if
not
rc
:
IsRelateToEffect
(
re
)
then
return
end
if
Duel
.
Destroy
(
rc
,
REASON_EFFECT
)
~=
0
and
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
local
atk
=
rc
:
GetTextAttack
()
if
atk
<
0
then
atk
=
0
end
if
rc
:
IsRelateToEffect
(
re
)
then
Duel
.
Destroy
(
rc
,
REASON_EFFECT
)
end
end
function
c82044279
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
bit
.
band
(
r
,
REASON_EFFECT
)
~=
0
and
re
and
re
:
GetHandler
()
==
e
:
GetHandler
()
and
eg
:
IsExists
(
Card
.
IsType
,
1
,
nil
,
TYPE_MONSTER
)
end
function
c82044279
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
eg
:
Filter
(
Card
.
IsType
,
nil
,
TYPE_MONSTER
)
local
c
=
e
:
GetHandler
()
local
atk
=
0
local
tc
=
g
:
GetFirst
()
while
tc
do
if
tc
:
GetBaseAttack
()
>
0
then
atk
=
atk
+
tc
:
GetBaseAttack
()
end
tc
=
g
:
GetNext
()
end
if
atk
>
0
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
0x1ff0000
+
RESET_PHASE
+
PHASE_END
)
e1
:
SetValue
(
atk
)
e1
:
SetReset
(
RESET_EVENT
+
0x1ff0000
+
RESET_PHASE
+
RESET_END
)
c
:
RegisterEffect
(
e1
)
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