Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-222DIY-cards
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
alstroemeria-silentlove
ygopro-222DIY-cards
Commits
d8a68a6b
Commit
d8a68a6b
authored
Aug 19, 2019
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixrev
parent
4fa1c535
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
3 deletions
+44
-3
expansions/script/c77709007.lua
expansions/script/c77709007.lua
+44
-3
No files found.
expansions/script/c77709007.lua
View file @
d8a68a6b
...
...
@@ -30,14 +30,26 @@ function cm.initial_effect(c)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetOperation
(
cm
.
operation
)
c
:
RegisterEffect
(
e1
)
local
e1
=
Effect
.
CreateEffect
(
c
)
--[[
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_DISCARD)
e1:SetProperty(0x14000)
e1:SetTarget(cm.target2)
e1:SetOperation(cm.activate2)
c
:
RegisterEffect
(
e1
)
c:RegisterEffect(e1)]]
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetHintTiming
(
TIMING_DAMAGE_STEP
)
e2
:
SetRange
(
LOCATION_HAND
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e2
:
SetCondition
(
cm
.
condition2
)
e2
:
SetCost
(
cm
.
cost2
)
e2
:
SetOperation
(
cm
.
operation2
)
c
:
RegisterEffect
(
e2
)
end
function
cm
.
hfilter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
Sekka
.
IsLap
(
c
)
and
c
:
IsAbleToHand
()
...
...
@@ -80,7 +92,7 @@ end
function
cm
.
retop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ReturnToField
(
e
:
GetHandler
())
end
function
cm
.
filter2
(
c
)
--[[
function cm.filter2(c)
return c:IsLevelBelow(4) and c:IsRace(RACE_WARRIOR) and c:IsAbleToHand()
end
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
...
...
@@ -93,4 +105,33 @@ function cm.activate2(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end]]
function
cm
.
condition2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
phase
=
Duel
.
GetCurrentPhase
()
if
phase
~=
PHASE_DAMAGE
or
Duel
.
IsDamageCalculated
()
then
return
false
end
local
a
=
Duel
.
GetAttacker
()
local
d
=
Duel
.
GetAttackTarget
()
return
d
~=
nil
and
d
:
IsFaceup
()
and
((
a
:
GetControler
()
==
tp
and
Sekka
.
IsLap
(
a
)
and
a
:
IsRelateToBattle
())
or
(
d
:
GetControler
()
==
tp
and
Sekka
.
IsLap
(
d
)
and
d
:
IsRelateToBattle
()))
end
function
cm
.
cost2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToGraveAsCost
()
end
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
)
end
function
cm
.
operation2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
a
=
Duel
.
GetAttacker
()
local
d
=
Duel
.
GetAttackTarget
()
if
not
a
:
IsRelateToBattle
()
or
not
d
:
IsRelateToBattle
()
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
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
if
a
:
GetControler
()
==
tp
then
e1
:
SetValue
(
d
:
GetAttack
())
a
:
RegisterEffect
(
e1
)
else
e1
:
SetValue
(
a
:
GetAttack
())
d
:
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