Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-2pick
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-2pick
Commits
704269a3
Commit
704269a3
authored
Sep 01, 2017
by
Yuzurisa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
57fa5809
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
119 additions
and
78 deletions
+119
-78
expansions/script/c22230161.lua
expansions/script/c22230161.lua
+119
-0
expansions/script/c5200024.lua.bak
expansions/script/c5200024.lua.bak
+0
-78
No files found.
expansions/script/c22230161.lua
0 → 100644
View file @
704269a3
--Darkest 先祖
function
c22230161
.
initial_effect
(
c
)
--link summon
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsLinkType
,
TYPE_FLIP
),
2
)
c
:
EnableReviveLimit
()
--Change position
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
22230161
,
0
))
e3
:
SetCategory
(
CATEGORY_DRAW
+
CATEGORY_POSITION
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
)
e3
:
SetCode
(
EVENT_CHANGE_POS
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e3
:
SetCondition
(
c22230161
.
condition
)
e3
:
SetTarget
(
c22230161
.
target
)
e3
:
SetOperation
(
c22230161
.
operation
)
c
:
RegisterEffect
(
e3
)
--disable
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
22230161
,
1
))
e3
:
SetCategory
(
CATEGORY_POSITION
+
CATEGORY_DISABLE
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetCode
(
EVENT_CHAINING
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
)
e3
:
SetCost
(
c22230161
.
discost
)
e3
:
SetCondition
(
c22230161
.
discon
)
e3
:
SetTarget
(
c22230161
.
distg
)
e3
:
SetOperation
(
c22230161
.
disop
)
c
:
RegisterEffect
(
e3
)
--spsummon
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e4
:
SetCode
(
EVENT_TO_GRAVE
)
e4
:
SetOperation
(
c22230161
.
spr
)
c
:
RegisterEffect
(
e4
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
22230161
,
1
))
e5
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e5
:
SetRange
(
LOCATION_GRAVE
)
e5
:
SetCountLimit
(
1
)
e5
:
SetCode
(
EVENT_PHASE
+
PHASE_STANDBY
)
e5
:
SetCondition
(
c22230161
.
spcon
)
e5
:
SetTarget
(
c22230161
.
sptg
)
e5
:
SetOperation
(
c22230161
.
spop
)
c
:
RegisterEffect
(
e5
)
end
c22230161
.
named_with_Darkest_D
=
1
function
c22230161
.
IsDarkest
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Darkest_D
end
function
c22230161
.
cfilter
(
c
)
local
np
=
c
:
GetPosition
()
local
pp
=
c
:
GetPreviousPosition
()
return
np
~=
pp
end
function
c22230161
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c22230161
.
cfilter
,
1
,
nil
)
end
function
c22230161
.
tgfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCanTurnSet
()
end
function
c22230161
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
and
Duel
.
IsExistingMatchingCard
(
c22230161
.
tgfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
0
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_POSITION
,
0
,
1
,
0
,
0
)
end
function
c22230161
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c22230161
.
tgfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
ChangePosition
(
g
,
POS_FACEDOWN_DEFENSE
)
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
end
function
c22230161
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
not
e
:
GetHandler
():
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
rp
~=
tp
end
function
c22230161
.
discost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
e
:
GetHandler
():
GetLinkedGroup
():
Filter
(
Card
.
IsFacedown
,
nil
)
if
chk
==
0
then
return
g
:
GetCount
()
>
0
end
local
cc
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
ChangePosition
(
cc
,
POS_FACEUP_DEFENSE
)
end
function
c22230161
.
distg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_NEGATE
,
eg
,
1
,
0
,
0
)
end
function
c22230161
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
NegateActivation
(
ev
)
end
function
c22230161
.
spr
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
bit
.
band
(
r
,
0x41
)
~=
0x41
or
not
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
then
return
end
if
c
:
GetSummonType
()
==
SUMMON_TYPE_LINK
then
if
Duel
.
GetCurrentPhase
()
==
PHASE_STANDBY
then
c
:
RegisterFlagEffect
(
22230161
,
RESET_EVENT
+
0x1ff0000
+
RESET_PHASE
+
PHASE_STANDBY
,
0
,
2
)
else
c
:
RegisterFlagEffect
(
22230161
,
RESET_EVENT
+
0x1ff0000
+
RESET_PHASE
+
PHASE_STANDBY
,
0
,
1
)
end
end
end
function
c22230161
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
GetFlagEffect
(
22230161
)
>
0
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c22230161
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c22230161
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
1
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
\ No newline at end of file
expansions/script/c5200024.lua.bak
deleted
100644 → 0
View file @
57fa5809
--精灵剑舞刻印
function c5200024.initial_effect(c)
--effect
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c5200024.target)
e1:SetOperation(c5200024.operation)
c:RegisterEffect(e1)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(c5200024.handcon)
c:RegisterEffect(e2)
end
function c5200024.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x360)
end
function c5200024.handcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_GRAVE,0,1,nil,TYPE_TRAP)
end
function c5200024.tcfilter(c)
return c:IsFaceup() and c:IsSetCard(0x360) and Duel.IsExistingMatchingCard(c5200024.eqfilter,c:GetControler(),0x12,0,1,nil,c)
end
function c5200024.eqfilter(ec,tc)
return ec:IsType(TYPE_EQUIP) and ec:CheckEquipTarget(tc)
end
function c5200024.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_MZONE and chkc:IsControler(tp) and c5200024.tcfilter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingTarget(c5200024.tcfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c5200024.tcfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c5200024.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,c5200024.eqfilter,tp,0x12,0,1,1,nil,tc)
if g:GetCount()>0 then
Duel.Equip(tp,g:GetFirst(),tc)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1:SetValue(c5200024.efilter)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_MZONE)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e2:SetOperation(c5200024.op)
e2:SetLabelObject(e:GetHandler())
tc:RegisterEffect(e2)
end
end
end
function c5200024.efilter(e,te)
return te:GetOwnerPlayer()~=e:GetHandlerPlayer()
end
function c5200024.op(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(0)
e:GetHandler():RegisterEffect(e1)
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