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
Ai
ygopro-222DIY-cards
Commits
c0cfb1d1
Commit
c0cfb1d1
authored
Aug 16, 2020
by
TanakaKotoha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
a8819f6f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
72 additions
and
59 deletions
+72
-59
expansions/script/c12008031.lua
expansions/script/c12008031.lua
+3
-1
expansions/script/c33500113.lua
expansions/script/c33500113.lua
+69
-58
No files found.
expansions/script/c12008031.lua
View file @
c0cfb1d1
...
...
@@ -6,6 +6,7 @@ function cm.initial_effect(c)
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_SINGLE
)
e0
:
SetCode
(
EFFECT_TRAP_ACT_IN_HAND
)
e0
:
SetCondition
(
cm
.
handcon
)
c
:
RegisterEffect
(
e0
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -30,7 +31,8 @@ function cm.initial_effect(c)
end
function
cm
.
handcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
Duel
.
IsChainNegatable
(
ev
)
then
return
false
end
return
local
res
,
teg
,
tep
,
tev
,
tre
,
tr
,
trp
=
Duel
.
CheckEvent
(
EVENT_CHAINING
,
true
)
return
tre
:
IsHasCategory
(
CATEGORY_DISABLE
)
or
tre
:
IsHasCategory
(
CATEGORY_NEGATE
)
end
function
cm
.
syncost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToRemoveAsCost
()
end
...
...
expansions/script/c33500113.lua
View file @
c0cfb1d1
...
...
@@ -16,13 +16,21 @@ function cm.initial_effect(c)
e1
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0xa82
))
e1
:
SetValue
(
1
)
c
:
RegisterEffect
(
e1
)
Duel
.
EnableGlobalFlag
(
GLOBALFLAG_BRAINWASHING_CHECK
)
--
Duel.EnableGlobalFlag(GLOBALFLAG_BRAINWASHING_CHECK)
--e2
-- local e2=Effect.CreateEffect(c)
-- e2:SetCategory(CATEGORY_CONTROL)
-- e2:SetType(EFFECT_TYPE_FIELD)
-- e2:SetTarget(cm.target)
-- e2:SetOperation(cm.activate)
-- c:RegisterEffect(e2)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_CONTROL
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetTarget
(
cm
.
target
)
e2
:
SetOperation
(
cm
.
activate
)
e2
:
SetCode
(
EFFECT_REMOVE_BRAINWASHING
)
e2
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e2
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0xa82
))
c
:
RegisterEffect
(
e2
)
--disable spsummon
local
e9
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -48,64 +56,67 @@ function cm.initial_effect(c)
c
:
RegisterEffect
(
e3
)
end
--e2
function
cm
.
filter
(
c
)
return
c
:
GetControler
()
~=
c
:
GetOwner
()
and
c
:
IsSetCard
(
0xa82
)
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
)
local
tg
=
Group
.
CreateGroup
()
local
tc
=
g
:
GetFirst
()
while
tc
do
if
not
tc
:
IsImmuneToEffect
(
e
)
and
tc
:
GetFlagEffect
(
m
)
==
0
then
tc
:
RegisterFlagEffect
(
m
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
)
tg
:
AddCard
(
tc
)
end
tc
=
g
:
GetNext
()
end
tg
:
KeepAlive
()
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_REMOVE_BRAINWASHING
)
e1
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e1
:
SetTarget
(
aux
.
TargetEqualFunction
(
Card
.
GetFlagEffect
,
1
,
m
))
e1
:
SetLabelObject
(
tg
)
Duel
.
RegisterEffect
(
e1
,
tp
)
--
function cm.filter(c)
--
return c:GetControler()~=c:GetOwner() and c:IsSetCard(0xa82)
--
end
--
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
--
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
--
end
--
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
--
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE)
--
local tg=Group.CreateGroup()
--
local tc=g:GetFirst()
--
while tc do
--
if not tc:IsImmuneToEffect(e) and tc:GetFlagEffect(m)==0 then
--
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1)
-- -
tg:AddCard(tc)
--
end
--
tc=g:GetNext()
--
end
--
tg:KeepAlive()
--
local e1=Effect.CreateEffect(e:GetHandler())
--
e1:SetType(EFFECT_TYPE_FIELD)
--
e1:SetCode(EFFECT_REMOVE_BRAINWASHING)
--
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
--
e1:SetTarget(aux.TargetEqualFunction(Card.GetFlagEffect,1,m))
--
e1:SetLabelObject(tg)
--
Duel.RegisterEffect(e1,tp)
--force adjust
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_CHAIN_SOLVED
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetLabelObject
(
e1
)
Duel
.
RegisterEffect
(
e2
,
tp
)
--
local e2=Effect.CreateEffect(e:GetHandler())
--
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
---
e2:SetCode(EVENT_CHAIN_SOLVED)
--
e2:SetProperty(EFFECT_FLAG_DELAY)
--
e2:SetLabelObject(e1)
--
Duel.RegisterEffect(e2,tp)
--reset
local
e3
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
EVENT_CHAIN_SOLVED
)
e3
:
SetLabelObject
(
e2
)
e3
:
SetLabel
(
Duel
.
GetChainInfo
(
0
,
CHAININFO_CHAIN_ID
))
e3
:
SetOperation
(
cm
.
reset
)
Duel
.
RegisterEffect
(
e3
,
tp
)
end
function
cm
.
reset
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetChainInfo
(
ev
,
CHAININFO_CHAIN_ID
)
==
e
:
GetLabel
()
then
local
e2
=
e
:
GetLabelObject
()
local
e1
=
e2
:
GetLabelObject
()
local
tg
=
e1
:
GetLabelObject
()
for
tc
in
aux
.
Next
(
tg
)
do
tc
:
ResetFlagEffect
(
m
)
end
tg
:
DeleteGroup
()
e1
:
Reset
()
e2
:
Reset
()
e
:
Reset
()
end
end
--
local e3=Effect.CreateEffect(e:GetHandler())
--
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
--
e3:SetCode(EVENT_CHAIN_SOLVED)
--
e3:SetLabelObject(e2)
--
e3:SetLabel(Duel.GetChainInfo(0,CHAININFO_CHAIN_ID))
--
e3:SetOperation(cm.reset)
--
Duel.RegisterEffect(e3,tp)
--
end
--
function cm.reset(e,tp,eg,ep,ev,re,r,rp)
--
if Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)==e:GetLabel() then
--
local e2=e:GetLabelObject()
--
local e1=e2:GetLabelObject()
--
local tg=e1:GetLabelObject()
--
for tc in aux.Next(tg) do
--
tc:ResetFlagEffect(m)
--
end
--
tg:DeleteGroup()
--
e1:Reset()
--
e2:Reset()
--
e:Reset()
--
end
--
end
--e9
--function cm.sumlimit(e,c,sump,sumtype,sumpos,targetp)
-- return c:GetRace()~=(RACE_FAIRY or RACE_FIEND)
--end
function
cm
.
sumlimit
(
e
,
c
,
sump
,
sumtype
,
sumpos
,
targetp
)
return
c
:
GetRace
()
~=
(
RACE_FAIRY
or
RACE_FIEND
)
return
not
(
c
:
IsRace
(
RACE_FAIRY
)
or
c
:
IsRace
(
RACE_FIEND
)
)
end
--e3
function
cm
.
cfilter
(
c
,
tp
,
rp
)
...
...
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