Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-scripts
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-scripts
Commits
ca101e2b
Commit
ca101e2b
authored
Jun 26, 2016
by
mercury233
Committed by
DailyShana
Jun 26, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new card AGMM (#467)
parent
3fff7b63
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
123 additions
and
0 deletions
+123
-0
c82103466.lua
c82103466.lua
+123
-0
No files found.
c82103466.lua
0 → 100644
View file @
ca101e2b
--蛇神ゲー
function
c82103466
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--connot special summon
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_SINGLE
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e0
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
c
:
RegisterEffect
(
e0
)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
82103466
,
0
))
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_CHAIN_UNIQUE
)
e1
:
SetCode
(
EVENT_DESTROYED
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCondition
(
c82103466
.
spcon
)
e1
:
SetCost
(
c82103466
.
spcost
)
e1
:
SetTarget
(
c82103466
.
sptg
)
e1
:
SetOperation
(
c82103466
.
spop
)
c
:
RegisterEffect
(
e1
)
--cannot be target
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetValue
(
aux
.
tgval
)
c
:
RegisterEffect
(
e2
)
--disable and atk down
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EFFECT_DISABLE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetTargetRange
(
0
,
LOCATION_MZONE
)
e3
:
SetCondition
(
c82103466
.
adcon
)
e3
:
SetTarget
(
c82103466
.
adtg
)
c
:
RegisterEffect
(
e3
)
local
e4
=
e3
:
Clone
()
e4
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
c
:
RegisterEffect
(
e4
)
local
e5
=
e3
:
Clone
()
e5
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e5
:
SetValue
(
c82103466
.
atkval
)
c
:
RegisterEffect
(
e5
)
--atk up
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e6
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e6
:
SetRange
(
LOCATION_MZONE
)
e6
:
SetCode
(
EVENT_PRE_DAMAGE_CALCULATE
)
e6
:
SetCondition
(
c82103466
.
atkcon
)
e6
:
SetTarget
(
c82103466
.
atktg
)
e6
:
SetOperation
(
c82103466
.
atkop
)
c
:
RegisterEffect
(
e6
)
end
function
c82103466
.
cfilter
(
c
,
tp
)
return
c
:
GetPreviousControler
()
==
tp
and
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
((
c
:
IsReason
(
REASON_BATTLE
)
and
Duel
.
GetAttacker
():
IsControler
(
1
-
tp
))
or
(
c
:
IsReason
(
REASON_EFFECT
)
and
c
:
GetReasonPlayer
()
==
1
-
tp
))
end
function
c82103466
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c82103466
.
cfilter
,
1
,
nil
,
tp
)
end
function
c82103466
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
PayLPCost
(
tp
,
math.floor
(
Duel
.
GetLP
(
tp
)
/
2
))
end
function
c82103466
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
true
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c82103466
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
true
,
false
,
POS_FACEUP
)
~=
0
then
c
:
CompleteProcedure
()
elseif
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
true
,
false
)
then
Duel
.
SendtoGrave
(
c
,
REASON_RULE
)
end
end
function
c82103466
.
adcon
(
e
)
local
c
=
e
:
GetHandler
()
return
Duel
.
GetAttacker
()
==
c
and
c
:
GetBattleTarget
()
and
(
Duel
.
GetCurrentPhase
()
==
PHASE_DAMAGE
or
Duel
.
GetCurrentPhase
()
==
PHASE_DAMAGE_CAL
)
end
function
c82103466
.
adtg
(
e
,
c
)
return
c
==
e
:
GetHandler
():
GetBattleTarget
()
end
function
c82103466
.
atkval
(
e
,
c
)
return
math.ceil
(
c
:
GetBaseAttack
()
/
2
)
end
function
c82103466
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
==
Duel
.
GetAttacker
()
or
c
==
Duel
.
GetAttackTarget
()
end
function
c82103466
.
atktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
c
)
if
g
:
GetCount
()
==
0
then
return
false
end
local
g1
,
atk
=
g
:
GetMaxGroup
(
Card
.
GetBaseAttack
)
return
c
:
GetAttack
()
~=
atk
and
c
:
GetFlagEffect
(
82103466
)
==
0
end
c
:
RegisterFlagEffect
(
82103466
,
RESET_CHAIN
,
0
,
1
)
end
function
c82103466
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
c
)
if
g
:
GetCount
()
==
0
then
return
end
local
g1
,
atk
=
g
:
GetMaxGroup
(
Card
.
GetBaseAttack
)
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
and
atk
>
0
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetValue
(
atk
)
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