Commit 611a417a authored by Nemo Ma's avatar Nemo Ma

NemoCard Update

parent 3ce66003
No preview for this file type
expansions/pics/11451011.jpg

139 KB | W: | H:

expansions/pics/11451011.jpg

56.4 KB | W: | H:

expansions/pics/11451011.jpg
expansions/pics/11451011.jpg
expansions/pics/11451011.jpg
expansions/pics/11451011.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11451012.jpg

139 KB | W: | H:

expansions/pics/11451012.jpg

57 KB | W: | H:

expansions/pics/11451012.jpg
expansions/pics/11451012.jpg
expansions/pics/11451012.jpg
expansions/pics/11451012.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11451013.jpg

150 KB | W: | H:

expansions/pics/11451013.jpg

61.2 KB | W: | H:

expansions/pics/11451013.jpg
expansions/pics/11451013.jpg
expansions/pics/11451013.jpg
expansions/pics/11451013.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11451014.jpg

151 KB | W: | H:

expansions/pics/11451014.jpg

61.2 KB | W: | H:

expansions/pics/11451014.jpg
expansions/pics/11451014.jpg
expansions/pics/11451014.jpg
expansions/pics/11451014.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/15004002.jpg

43 KB | W: | H:

expansions/pics/15004002.jpg

41.3 KB | W: | H:

expansions/pics/15004002.jpg
expansions/pics/15004002.jpg
expansions/pics/15004002.jpg
expansions/pics/15004002.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/15004003.jpg

44.9 KB | W: | H:

expansions/pics/15004003.jpg

43.3 KB | W: | H:

expansions/pics/15004003.jpg
expansions/pics/15004003.jpg
expansions/pics/15004003.jpg
expansions/pics/15004003.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/20220679.jpg

1.7 MB | W: | H:

expansions/pics/20220679.jpg

489 KB | W: | H:

expansions/pics/20220679.jpg
expansions/pics/20220679.jpg
expansions/pics/20220679.jpg
expansions/pics/20220679.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33200009.jpg

26.9 KB | W: | H:

expansions/pics/33200009.jpg

107 KB | W: | H:

expansions/pics/33200009.jpg
expansions/pics/33200009.jpg
expansions/pics/33200009.jpg
expansions/pics/33200009.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40010436.jpg

58.1 KB | W: | H:

expansions/pics/40010436.jpg

14.4 KB | W: | H:

expansions/pics/40010436.jpg
expansions/pics/40010436.jpg
expansions/pics/40010436.jpg
expansions/pics/40010436.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40010438.jpg

53.9 KB | W: | H:

expansions/pics/40010438.jpg

13.8 KB | W: | H:

expansions/pics/40010438.jpg
expansions/pics/40010438.jpg
expansions/pics/40010438.jpg
expansions/pics/40010438.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40010440.jpg

53.3 KB | W: | H:

expansions/pics/40010440.jpg

14 KB | W: | H:

expansions/pics/40010440.jpg
expansions/pics/40010440.jpg
expansions/pics/40010440.jpg
expansions/pics/40010440.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40010442.jpg

58 KB | W: | H:

expansions/pics/40010442.jpg

14.9 KB | W: | H:

expansions/pics/40010442.jpg
expansions/pics/40010442.jpg
expansions/pics/40010442.jpg
expansions/pics/40010442.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40010445.jpg

57.2 KB | W: | H:

expansions/pics/40010445.jpg

14.9 KB | W: | H:

expansions/pics/40010445.jpg
expansions/pics/40010445.jpg
expansions/pics/40010445.jpg
expansions/pics/40010445.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40010448.jpg

56.6 KB | W: | H:

expansions/pics/40010448.jpg

14.9 KB | W: | H:

expansions/pics/40010448.jpg
expansions/pics/40010448.jpg
expansions/pics/40010448.jpg
expansions/pics/40010448.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40010449.jpg

58.5 KB | W: | H:

expansions/pics/40010449.jpg

15.6 KB | W: | H:

expansions/pics/40010449.jpg
expansions/pics/40010449.jpg
expansions/pics/40010449.jpg
expansions/pics/40010449.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40010450.jpg

50.9 KB | W: | H:

expansions/pics/40010450.jpg

12.4 KB | W: | H:

expansions/pics/40010450.jpg
expansions/pics/40010450.jpg
expansions/pics/40010450.jpg
expansions/pics/40010450.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40010451.jpg

59.1 KB | W: | H:

expansions/pics/40010451.jpg

15.3 KB | W: | H:

expansions/pics/40010451.jpg
expansions/pics/40010451.jpg
expansions/pics/40010451.jpg
expansions/pics/40010451.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40010454.jpg

56.2 KB | W: | H:

expansions/pics/40010454.jpg

14.4 KB | W: | H:

expansions/pics/40010454.jpg
expansions/pics/40010454.jpg
expansions/pics/40010454.jpg
expansions/pics/40010454.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40010457.jpg

57.5 KB | W: | H:

expansions/pics/40010457.jpg

15.4 KB | W: | H:

expansions/pics/40010457.jpg
expansions/pics/40010457.jpg
expansions/pics/40010457.jpg
expansions/pics/40010457.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40010458.jpg

56.7 KB | W: | H:

expansions/pics/40010458.jpg

14.6 KB | W: | H:

expansions/pics/40010458.jpg
expansions/pics/40010458.jpg
expansions/pics/40010458.jpg
expansions/pics/40010458.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40010461.jpg

55.9 KB | W: | H:

expansions/pics/40010461.jpg

14.2 KB | W: | H:

expansions/pics/40010461.jpg
expansions/pics/40010461.jpg
expansions/pics/40010461.jpg
expansions/pics/40010461.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40010464.jpg

56.3 KB | W: | H:

expansions/pics/40010464.jpg

14.5 KB | W: | H:

expansions/pics/40010464.jpg
expansions/pics/40010464.jpg
expansions/pics/40010464.jpg
expansions/pics/40010464.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40010467.jpg

59.5 KB | W: | H:

expansions/pics/40010467.jpg

15 KB | W: | H:

expansions/pics/40010467.jpg
expansions/pics/40010467.jpg
expansions/pics/40010467.jpg
expansions/pics/40010467.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40010468.jpg

52.7 KB | W: | H:

expansions/pics/40010468.jpg

13.2 KB | W: | H:

expansions/pics/40010468.jpg
expansions/pics/40010468.jpg
expansions/pics/40010468.jpg
expansions/pics/40010468.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40010469.jpg

55.9 KB | W: | H:

expansions/pics/40010469.jpg

13.9 KB | W: | H:

expansions/pics/40010469.jpg
expansions/pics/40010469.jpg
expansions/pics/40010469.jpg
expansions/pics/40010469.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40010470.jpg

56.8 KB | W: | H:

expansions/pics/40010470.jpg

14 KB | W: | H:

expansions/pics/40010470.jpg
expansions/pics/40010470.jpg
expansions/pics/40010470.jpg
expansions/pics/40010470.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40010471.jpg

55.1 KB | W: | H:

expansions/pics/40010471.jpg

14.2 KB | W: | H:

expansions/pics/40010471.jpg
expansions/pics/40010471.jpg
expansions/pics/40010471.jpg
expansions/pics/40010471.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40010474.jpg

62.8 KB | W: | H:

expansions/pics/40010474.jpg

16.4 KB | W: | H:

expansions/pics/40010474.jpg
expansions/pics/40010474.jpg
expansions/pics/40010474.jpg
expansions/pics/40010474.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40010476.jpg

53.4 KB | W: | H:

expansions/pics/40010476.jpg

12.9 KB | W: | H:

expansions/pics/40010476.jpg
expansions/pics/40010476.jpg
expansions/pics/40010476.jpg
expansions/pics/40010476.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40010477.jpg

55.5 KB | W: | H:

expansions/pics/40010477.jpg

13.7 KB | W: | H:

expansions/pics/40010477.jpg
expansions/pics/40010477.jpg
expansions/pics/40010477.jpg
expansions/pics/40010477.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40010478.jpg

58.7 KB | W: | H:

expansions/pics/40010478.jpg

14.7 KB | W: | H:

expansions/pics/40010478.jpg
expansions/pics/40010478.jpg
expansions/pics/40010478.jpg
expansions/pics/40010478.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40010479.jpg

54.9 KB | W: | H:

expansions/pics/40010479.jpg

13.3 KB | W: | H:

expansions/pics/40010479.jpg
expansions/pics/40010479.jpg
expansions/pics/40010479.jpg
expansions/pics/40010479.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40010480.jpg

58.7 KB | W: | H:

expansions/pics/40010480.jpg

15.2 KB | W: | H:

expansions/pics/40010480.jpg
expansions/pics/40010480.jpg
expansions/pics/40010480.jpg
expansions/pics/40010480.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40010483.jpg

60.5 KB | W: | H:

expansions/pics/40010483.jpg

15.5 KB | W: | H:

expansions/pics/40010483.jpg
expansions/pics/40010483.jpg
expansions/pics/40010483.jpg
expansions/pics/40010483.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/40010484.jpg

56.2 KB | W: | H:

expansions/pics/40010484.jpg

13.8 KB | W: | H:

expansions/pics/40010484.jpg
expansions/pics/40010484.jpg
expansions/pics/40010484.jpg
expansions/pics/40010484.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/50587164.jpg

150 KB | W: | H:

expansions/pics/50587164.jpg

66.9 KB | W: | H:

expansions/pics/50587164.jpg
expansions/pics/50587164.jpg
expansions/pics/50587164.jpg
expansions/pics/50587164.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/60002067.jpg

55.8 KB | W: | H:

expansions/pics/60002067.jpg

13.4 KB | W: | H:

expansions/pics/60002067.jpg
expansions/pics/60002067.jpg
expansions/pics/60002067.jpg
expansions/pics/60002067.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/60002068.jpg

56.8 KB | W: | H:

expansions/pics/60002068.jpg

13.9 KB | W: | H:

expansions/pics/60002068.jpg
expansions/pics/60002068.jpg
expansions/pics/60002068.jpg
expansions/pics/60002068.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/60002069.jpg

56.6 KB | W: | H:

expansions/pics/60002069.jpg

13.5 KB | W: | H:

expansions/pics/60002069.jpg
expansions/pics/60002069.jpg
expansions/pics/60002069.jpg
expansions/pics/60002069.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/60002070.jpg

56.6 KB | W: | H:

expansions/pics/60002070.jpg

13.8 KB | W: | H:

expansions/pics/60002070.jpg
expansions/pics/60002070.jpg
expansions/pics/60002070.jpg
expansions/pics/60002070.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/60002071.jpg

56.2 KB | W: | H:

expansions/pics/60002071.jpg

13.3 KB | W: | H:

expansions/pics/60002071.jpg
expansions/pics/60002071.jpg
expansions/pics/60002071.jpg
expansions/pics/60002071.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/60002072.jpg

54.2 KB | W: | H:

expansions/pics/60002072.jpg

13 KB | W: | H:

expansions/pics/60002072.jpg
expansions/pics/60002072.jpg
expansions/pics/60002072.jpg
expansions/pics/60002072.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/60002073.jpg

52.4 KB | W: | H:

expansions/pics/60002073.jpg

12.6 KB | W: | H:

expansions/pics/60002073.jpg
expansions/pics/60002073.jpg
expansions/pics/60002073.jpg
expansions/pics/60002073.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/60002074.jpg

48.4 KB | W: | H:

expansions/pics/60002074.jpg

11.2 KB | W: | H:

expansions/pics/60002074.jpg
expansions/pics/60002074.jpg
expansions/pics/60002074.jpg
expansions/pics/60002074.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/60002075.jpg

52.4 KB | W: | H:

expansions/pics/60002075.jpg

12.4 KB | W: | H:

expansions/pics/60002075.jpg
expansions/pics/60002075.jpg
expansions/pics/60002075.jpg
expansions/pics/60002075.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/60002076.jpg

51.5 KB | W: | H:

expansions/pics/60002076.jpg

12.1 KB | W: | H:

expansions/pics/60002076.jpg
expansions/pics/60002076.jpg
expansions/pics/60002076.jpg
expansions/pics/60002076.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/60002077.jpg

54.5 KB | W: | H:

expansions/pics/60002077.jpg

13.1 KB | W: | H:

expansions/pics/60002077.jpg
expansions/pics/60002077.jpg
expansions/pics/60002077.jpg
expansions/pics/60002077.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/60002078.jpg

55.6 KB | W: | H:

expansions/pics/60002078.jpg

12.9 KB | W: | H:

expansions/pics/60002078.jpg
expansions/pics/60002078.jpg
expansions/pics/60002078.jpg
expansions/pics/60002078.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/60002079.jpg

55.5 KB | W: | H:

expansions/pics/60002079.jpg

13.1 KB | W: | H:

expansions/pics/60002079.jpg
expansions/pics/60002079.jpg
expansions/pics/60002079.jpg
expansions/pics/60002079.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/60002080.jpg

56 KB | W: | H:

expansions/pics/60002080.jpg

13.1 KB | W: | H:

expansions/pics/60002080.jpg
expansions/pics/60002080.jpg
expansions/pics/60002080.jpg
expansions/pics/60002080.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/60002081.jpg

54.8 KB | W: | H:

expansions/pics/60002081.jpg

12.9 KB | W: | H:

expansions/pics/60002081.jpg
expansions/pics/60002081.jpg
expansions/pics/60002081.jpg
expansions/pics/60002081.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/60002082.jpg

50.5 KB | W: | H:

expansions/pics/60002082.jpg

11.4 KB | W: | H:

expansions/pics/60002082.jpg
expansions/pics/60002082.jpg
expansions/pics/60002082.jpg
expansions/pics/60002082.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/60002083.jpg

50 KB | W: | H:

expansions/pics/60002083.jpg

11.4 KB | W: | H:

expansions/pics/60002083.jpg
expansions/pics/60002083.jpg
expansions/pics/60002083.jpg
expansions/pics/60002083.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/60969917.jpg

150 KB | W: | H:

expansions/pics/60969917.jpg

66.7 KB | W: | H:

expansions/pics/60969917.jpg
expansions/pics/60969917.jpg
expansions/pics/60969917.jpg
expansions/pics/60969917.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/63288533.jpg

98.8 KB | W: | H:

expansions/pics/63288533.jpg

62.2 KB | W: | H:

expansions/pics/63288533.jpg
expansions/pics/63288533.jpg
expansions/pics/63288533.jpg
expansions/pics/63288533.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/67200706.jpg

46.3 KB | W: | H:

expansions/pics/67200706.jpg

10.7 KB | W: | H:

expansions/pics/67200706.jpg
expansions/pics/67200706.jpg
expansions/pics/67200706.jpg
expansions/pics/67200706.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/67200708.jpg

43.7 KB | W: | H:

expansions/pics/67200708.jpg

9.69 KB | W: | H:

expansions/pics/67200708.jpg
expansions/pics/67200708.jpg
expansions/pics/67200708.jpg
expansions/pics/67200708.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/67200709.jpg

42.2 KB | W: | H:

expansions/pics/67200709.jpg

9.71 KB | W: | H:

expansions/pics/67200709.jpg
expansions/pics/67200709.jpg
expansions/pics/67200709.jpg
expansions/pics/67200709.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/67200710.jpg

47 KB | W: | H:

expansions/pics/67200710.jpg

10.9 KB | W: | H:

expansions/pics/67200710.jpg
expansions/pics/67200710.jpg
expansions/pics/67200710.jpg
expansions/pics/67200710.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/99550610.jpg

93.9 KB | W: | H:

expansions/pics/99550610.jpg

60.6 KB | W: | H:

expansions/pics/99550610.jpg
expansions/pics/99550610.jpg
expansions/pics/99550610.jpg
expansions/pics/99550610.jpg
  • 2-up
  • Swipe
  • Onion skin
[LocalizedFileNames]
39528956.jpg=@39528956.jpg,0
47158779.jpg=@47158779.jpg,0
--动物朋友虚拟YouTuber 洪堡企鹅与非洲企鹅 || Anifriends VTuber Hululu & Cape
--Scripted by: XGlitchy30
local s,id = GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
aux.AddSynchroMixProcedure(c,nil,nil,nil,nil,2,2,s.gcheck(c))
--Special summon procedure
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(id,0))
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(s.sprcon)
e0:SetTarget(s.sprtg)
e0:SetOperation(s.sprop)
c:RegisterEffect(e0)
--Gain effects
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(s.condition)
e1:SetOperation(s.operation)
c:RegisterEffect(e1)
local e1x=Effect.CreateEffect(c)
e1x:SetType(EFFECT_TYPE_SINGLE)
e1x:SetCode(EFFECT_MATERIAL_CHECK)
e1x:SetValue(s.valcheck)
c:RegisterEffect(e1x)
e1:SetLabelObject(e1x)
end
function s.gcheck(c)
return function(g)
return g:GetClassCount(Card.GetCode)==#g and g:GetSum(Card.GetSynchroLevel,c)==8
end
end
function s.sprfilter(c)
return c:IsFaceup() and c:IsAbleToGraveAsCost()
end
function s.spgcheck(g,sync,tp)
return s.gcheck(sync)(g) and Duel.GetLocationCountFromEx(tp,tp,g,sync)>0
end
function s.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(s.sprfilter,tp,LOCATION_MZONE,0,nil)
return g:CheckSubGroup(s.spgcheck,2,2,c,tp)
end
function s.sprtg(e,tp,eg,ep,ev,re,r,rp,c)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(s.sprfilter,tp,LOCATION_MZONE,0,nil)
if #g<=0 then return false end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local mg=g:SelectSubGroup(tp,s.spgcheck,true,2,2,c,tp)
if #mg==2 then
mg:KeepAlive()
e:SetLabelObject(mg)
return true
end
return false
end
function s.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
if not g then return end
c:SetMaterial(g)
Duel.SendtoGrave(g,REASON_COST)
end
function s.valcheck(e,c)
local g=c:GetMaterial()
local effs=0
if g:IsExists(Card.IsType,1,nil,TYPE_TUNER) then
effs=effs|0x1
end
if g:IsExists(Card.IsSetCard,1,nil,0x442) then
effs=effs|0x2
end
e:SetLabel(effs)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetLabelObject():GetLabel()~=0
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local effs=e:GetLabelObject():GetLabel()
if effs&0x1>0 then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,2))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(s.tdtg)
e1:SetOperation(s.tdop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3))
end
if effs&0x2>0 then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,4))
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(s.tgtg)
e1:SetOperation(s.tgop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,5))
end
end
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(Card.IsAbleToDeck),tp,LOCATION_GRAVE,0,nil)
if #g<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tg=g:SelectSubGroup(tp,aux.dncheck,false,1,3)
if #tg>0 then
Duel.HintSelection(tg)
if Duel.SendtoDeck(tg,nil,SEQ_DECKTOP,REASON_EFFECT)>0 then
local og=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_DECK)
if #og==0 then return end
if #og>1 then
for p=tp,1-tp,1-2*tp do
local dg=og:Filter(Card.IsControler,nil,p)
if #dg>1 then
Duel.SortDecktop(tp,p,#dg)
for i=1,#dg do
local mg=Duel.GetDecktopGroup(p,1)
Duel.MoveSequence(mg:GetFirst(),SEQ_DECKBOTTOM)
end
end
end
end
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>1 and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil)
if #tg>0 and Duel.SendtoGrave(tg,REASON_EFFECT)>0 and tg:IsExists(Card.IsLocation,1,nil,LOCATION_GRAVE) then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
\ No newline at end of file
......@@ -2,10 +2,11 @@
--Scripted by: XGlitchy30
local s,id=GetID()
s.unique_label = 0
xpcall(function() require("expansions/script/glitchylib_vsnemo") end,function() require("script/glitchylib_vsnemo") end)
function s.initial_effect(c)
s.unique_label = s.unique_label + 1
--ss proc
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(id,0))
......@@ -59,7 +60,7 @@ function s.initial_effect(c)
e8:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e8:SetCode(EVENT_SUMMON_SUCCESS)
e8:SetTarget(s.target)
e8:SetOperation(s.operation)
e8:SetOperation(s.operation(s.unique_label))
c:RegisterEffect(e8)
local e8x=e8:Clone()
e8x:SetCode(EVENT_SPSUMMON_SUCCESS)
......@@ -147,62 +148,69 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0)
end
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=s.resolution_count
if ct>=2 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_ADJUST)
e1:SetLabel(e:GetFieldID())
e1:SetOperation(s.chkop)
Duel.RegisterEffect(e1,tp)
ct=s.resolution_count
Duel.RegisterFlagEffect(1-tp,id,0,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2))
Duel.BreakEffect()
end
if ct>=4 then
Duel.Damage(1-tp,Duel.GetLP(1-tp),REASON_EFFECT)
ct=s.resolution_count
Duel.BreakEffect()
end
if ct>=7 then
local g=Duel.GetMatchingGroup(s.df,tp,0,LOCATION_ONFIELD+LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA,nil,e)
if #g>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
function s.operation(lab)
return function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=s.resolution_count
if ct>=2 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_ADJUST)
e1:SetLabel(e:GetFieldID())
e1:SetOperation(s.chkop(lab))
Duel.RegisterEffect(e1,tp)
ct=s.resolution_count
Duel.RegisterFlagEffect(1-tp,id,0,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2))
Duel.BreakEffect()
end
if ct>=4 then
Duel.Damage(1-tp,Duel.GetLP(1-tp),REASON_EFFECT)
ct=s.resolution_count
Duel.BreakEffect()
end
if ct>=7 then
local g=Duel.GetMatchingGroup(s.df,tp,0,LOCATION_ONFIELD+LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA,nil,e)
if #g>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
end
end
function s.notflag(c,lab)
return c:IsFaceup() and (c:GetFlagEffect(id)==0 or c:GetFlagEffectLabel(id)~=lab)
function s.notflag(c,lab,fid)
return c:IsFaceup() and (c:GetFlagEffect(id+lab*100)==0 or c:GetFlagEffectLabel(id+lab*100)~=fid)
end
function s.chkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(s.notflag,tp,0,LOCATION_MZONE,nil,e:GetLabel())
if #g<=0 then return end
local dg=Group.CreateGroup()
for tc in aux.Next(g) do
local preatk,predef=tc:GetAttack(),tc:GetDefense()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-2000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2)
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,e:GetLabel())
if preatk~=0 and not tc:IsImmuneToEffect(e1) and tc:GetAttack()==0 and predef~=0 and not tc:IsImmuneToEffect(e2) and tc:GetDefense()==0 then
dg:AddCard(tc)
end
end
if #dg>0 then
for tc in aux.Next(dg) do
Duel.Negate(tc,e)
end
Duel.Readjust()
end
dg:DeleteGroup()
function s.chkop(lab)
return function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(s.notflag,tp,0,LOCATION_MZONE,nil,lab,e:GetLabel())
if #g<=0 then return end
local dg=Group.CreateGroup()
for tc in aux.Next(g) do
local preatk,predef=tc:GetAttack(),tc:GetDefense()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-2000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2)
if tc:GetFlagEffect(id+lab*100)==0 then
tc:RegisterFlagEffect(id+lab*100,RESET_EVENT+RESETS_STANDARD,0,1)
end
tc:SetFlagEffectLabel(id+lab*100,e:GetLabel())
if preatk~=0 and not tc:IsImmuneToEffect(e1) and tc:GetAttack()==0 and predef~=0 and not tc:IsImmuneToEffect(e2) and tc:GetDefense()==0 then
dg:AddCard(tc)
end
end
if #dg>0 then
for tc in aux.Next(dg) do
Duel.Negate(tc,e)
end
Duel.Readjust()
end
dg:DeleteGroup()
end
end
\ No newline at end of file
--键★等 - YURIPPE || K.E.Y Etc. Yurippe
--Scripted by: XGlitchy30
local s,id=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
--Gain all Types/Attributes
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e0:SetCode(EFFECT_CHANGE_RACE)
e0:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e0:SetValue(RACE_ALL)
c:RegisterEffect(e0)
local e0x=e0:Clone()
e0x:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e0x:SetValue(ATTRIBUTE_ALL)
c:RegisterEffect(e0x)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(s.spcon)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--atk/def up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetCondition(s.lpcon(2000))
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xc460))
e2:SetValue(1000)
c:RegisterEffect(e2)
local e2x=e2:Clone()
e2x:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2x)
--direct attack
local e3=e2:Clone()
e3:SetCode(EFFECT_DIRECT_ATTACK)
e3:SetCondition(s.lpcon(4000))
e3:SetValue(1)
c:RegisterEffect(e3)
--immune
local e4=e2:Clone()
e4:SetCode(EFFECT_IMMUNE_EFFECT)
e4:SetCondition(s.lpcon(6000))
e4:SetValue(s.efilter)
c:RegisterEffect(e4)
end
function s.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLP(1-tp)>Duel.GetLP(tp)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c)
return not c:IsSetCard(0xc460)
end
function s.lpcon(lp)
return function(e)
local tp=e:GetHandlerPlayer()
return math.abs(Duel.GetLP(tp)-Duel.GetLP(1-tp))>=lp
end
end
function s.efilter(e,te)
return te:GetOwnerPlayer()~=e:GetHandlerPlayer()
end
\ No newline at end of file
--键★等 - A·Y·U || K.E.Y Etc. A.Y.U
--Scripted by: XGlitchy30
local s,id=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
--Gain all Types/Attributes
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e0:SetCode(EFFECT_CHANGE_RACE)
e0:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e0:SetValue(RACE_ALL)
c:RegisterEffect(e0)
local e0x=e0:Clone()
e0x:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e0x:SetValue(ATTRIBUTE_ALL)
c:RegisterEffect(e0x)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(s.spcon)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_HAND)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(s.drcon1)
e2:SetOperation(s.drop1)
c:RegisterEffect(e2)
local e2x=Effect.CreateEffect(c)
e2x:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2x:SetCode(EVENT_SPSUMMON_SUCCESS)
e2x:SetRange(LOCATION_MZONE)
e2x:SetCondition(s.regcon)
e2x:SetOperation(s.regop)
c:RegisterEffect(e2x)
local e2y=Effect.CreateEffect(c)
e2y:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2y:SetCode(EVENT_CHAIN_SOLVED)
e2y:SetRange(LOCATION_MZONE)
e2y:SetCondition(s.drcon2)
e2y:SetOperation(s.drop2)
c:RegisterEffect(e2y)
--draw
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,3))
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_CUSTOM+id)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e3:SetCost(s.cost)
e3:SetTarget(s.target)
e3:SetOperation(s.operation)
c:RegisterEffect(e3)
local g=Group.CreateGroup()
g:KeepAlive()
e3:SetLabelObject(g)
local e3x=Effect.CreateEffect(c)
e3x:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3x:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3x:SetCode(EVENT_TO_HAND)
e3x:SetRange(LOCATION_MZONE)
e3x:SetLabelObject(e3)
e3x:SetOperation(s.regop_global)
c:RegisterEffect(e3x)
end
function s.cfilter(c,tp)
return c:IsSetCard(0xc460) and c:IsControler(tp) and c:IsDiscardable()
end
function s.regop_global(e,tp,eg,ep,ev,re,r,rp)
local tg=eg:Filter(s.cfilter,nil,tp)
if #tg>0 then
for tc in aux.Next(tg) do
tc:RegisterFlagEffect(id,RESET_CHAIN,0,1)
end
local g=e:GetLabelObject():GetLabelObject()
if Duel.GetCurrentChain()==0 then g:Clear() end
g:Merge(tg)
g:Remove(function(c) return c:GetFlagEffect(id)==0 end,nil)
e:GetLabelObject():SetLabelObject(g)
if Duel.GetFlagEffect(tp,id+100)==0 then
Duel.RegisterFlagEffect(tp,id+100,RESET_CHAIN,0,1)
Duel.RaiseSingleEvent(e:GetHandler(),EVENT_CUSTOM+id,e,0,tp,tp,0)
end
end
end
function s.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(1-tp,LOCATION_MZONE,0)>Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c)
return not c:IsSetCard(0xc460)
end
function s.drcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsControler,1,nil,1-tp) and (not re or re:IsHasType(EFFECT_TYPE_ACTIONS) or re:IsHasType(EFFECT_TYPE_CONTINUOUS))
end
function s.filter(c)
return c:IsSetCard(0xc460) and c:IsAbleToHand()
end
function s.drop1(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) or not Duel.SelectYesNo(tp,aux.Stringid(id,2)) then return end
Duel.Hint(HINT_CARD,tp,id)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function s.regcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsControler,1,nil,1-tp) and re and re:IsHasType(EFFECT_TYPE_ACTIONS) and not re:IsHasType(EFFECT_TYPE_CONTINUOUS)
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,id,RESET_CHAIN,0,1)
end
function s.drcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,id)>0
end
function s.drop2(e,tp,eg,ep,ev,re,r,rp)
local n=Duel.GetFlagEffect(tp,id)
Duel.ResetFlagEffect(tp,id)
for i=1,n do
if not Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) or not Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
break
end
Duel.Hint(HINT_CARD,tp,id)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=e:GetLabelObject():Filter(s.cfilter,nil)
if chk==0 then return #g>0 end
Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.GetFlagEffect(tp,id+100)==0 end
Duel.RegisterFlagEffect(tp,id+100,RESET_CHAIN,0,1)
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
\ No newline at end of file
--键★等 - YUMEMISAN || K.E.Y Etc. Yumemisan
--Scripted by: XGlitchy30
xpcall(function() require("expansions/script/glitchylib_vsnemo") end,function() require("script/glitchylib_vsnemo") end)
local s,id=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
--Gain all Types/Attributes
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e0:SetCode(EFFECT_CHANGE_RACE)
e0:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e0:SetValue(RACE_ALL)
c:RegisterEffect(e0)
local e0x=e0:Clone()
e0x:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e0x:SetValue(ATTRIBUTE_ALL)
c:RegisterEffect(e0x)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(s.spcon)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--SS
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_CUSTOM+id)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetTarget(s.target)
e3:SetOperation(s.operation)
c:RegisterEffect(e3)
local g=Group.CreateGroup()
g:KeepAlive()
e3:SetLabelObject(g)
local e3x=Effect.CreateEffect(c)
e3x:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3x:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3x:SetCode(EVENT_SPSUMMON_SUCCESS)
e3x:SetRange(LOCATION_MZONE)
e3x:SetLabelObject(e3)
e3x:SetOperation(s.regop_global)
c:RegisterEffect(e3x)
end
function s.cfilter(c,tp)
return c:IsSummonPlayer(tp)
end
function s.regop_global(e,tp,eg,ep,ev,re,r,rp)
local tg=eg:Filter(s.cfilter,nil,1-tp)
if #tg>0 then
for tc in aux.Next(tg) do
tc:RegisterFlagEffect(id,RESET_CHAIN,0,1)
end
local g=e:GetLabelObject():GetLabelObject()
if Duel.GetCurrentChain()==0 then g:Clear() end
g:Merge(tg)
g:Remove(function(c) return c:GetFlagEffect(id)==0 end,nil)
e:GetLabelObject():SetLabelObject(g)
if Duel.GetFlagEffect(tp,id)==0 then
Duel.RegisterFlagEffect(tp,id,RESET_CHAIN,0,1)
Duel.RaiseSingleEvent(e:GetHandler(),EVENT_CUSTOM+id,e,0,tp,tp,0)
end
end
end
function s.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(1-tp,LOCATION_ONFIELD,0)>Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c)
return not c:IsSetCard(0xc460)
end
function s.spfilter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xc460) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetFlagEffect(tp,id)==0 end
Duel.RegisterFlagEffect(tp,id+100,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function s.negfilter(c)
return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and (c:GetAttack()>0 or c:GetDefense()>0 or aux.NegateMonsterFilter(c))
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsChainDisablable(0) then
local g=e:GetLabelObject():Filter(s.negfilter,nil)
if #g>0 and Duel.SelectYesNo(1-tp,aux.Stringid(id,3)) then
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENSE_FINAL)
tc:RegisterEffect(e2)
if aux.NegateMonsterFilter(tc) then
Duel.Negate(tc,e)
end
end
return
end
end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--键★断片 - 渚正立于坂道之下 || K.E.Y Fragments - Nagisa, Bottom of the Hill
--Scripted by: XGlitchy30
xpcall(function() require("expansions/script/glitchylib_vsnemo") end,function() require("script/glitchylib_vsnemo") end)
local s,id=GetID()
function s.initial_effect(c)
c:SetCounterLimit(0x1460,1)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(s.eqtg)
e1:SetOperation(s.eqop)
c:RegisterEffect(e1)
local e1x=e1:Clone()
e1x:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e1x)
local e1y=e1:Clone()
e1y:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e1y)
--apply effect
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(s.applycon)
e2:SetCost(s.apply)
e2:SetTarget(s.defaulttg)
e2:SetOperation(s.defaultop)
c:RegisterEffect(e2)
--light orb
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetOperation(s.spreg)
c:RegisterEffect(e3)
local e3x=e3:Clone()
e3x:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3x)
local e3y=e3:Clone()
e3y:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e3y)
local e3z=Effect.CreateEffect(c)
e3z:SetDescription(aux.Stringid(id,2))
e3z:SetCategory(CATEGORY_COUNTER)
e3z:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3z:SetRange(LOCATION_ONFIELD)
e3z:SetCode(EVENT_PHASE+PHASE_STANDBY)
e3z:SetCountLimit(1)
e3z:SetCondition(s.ctcon)
e3z:SetTarget(s.cttg)
e3z:SetOperation(s.ctop)
c:RegisterEffect(e3z)
end
function s.eqfilter(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x460) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_SPELLCASTER+RACE_WARRIOR)
and c:CheckUniqueOnField(tp) and not c:IsForbidden()
end
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK)
end
function s.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToChain(0) or Duel.GetLocationCount(tp,LOCATION_SZONE)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local tc=Duel.SelectMatchingCard(tp,s.eqfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst()
if tc then
if not Duel.Equip(tp,tc,c) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetValue(s.eqlimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
function s.eqlimit(e,c)
return e:GetOwner()==c
end
function s.applycon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker()==e:GetHandler():GetEquipTarget()
end
function s.applyfilter(c,e,tp,chk,chain)
if not c:IsFaceup() or not c:IsSetCard(0x460) then return false end
local effs=global_card_effect_table[c]
if #effs==0 then return false end
for _,ce in ipairs(effs) do
if ce and ce.GetLabel and ce:IsHasType(EFFECT_TYPE_ACTIONS) and not ce:IsHasType(EFFECT_TYPE_CONTINUOUS) and ce:GetRange()&LOCATION_MZONE~=0 then
local _,eg,ep,ev,re,r,rp
local check=true
local event=ce:GetCode()
if event and event~=0 then
if event==EVENT_CHAINING and chk~=0 then
if not chain or chain<=0 then
check=false
else
local te2,p=Duel.GetChainInfo(chain,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
local tc=te2:GetHandler()
local g=Group.FromCards(tc)
eg,ep,ev,re,r,rp=g,p,chain,te2,REASON_EFFECT,p
end
elseif event~=EVENT_FREE_CHAIN then
check=Duel.CheckEvent(event)
if check then
_,eg,ep,ev,re,r,rp=Duel.CheckEvent(event,true)
end
end
end
if check then
local condition=ce:GetCondition()
local target=ce:GetTarget()
Debug.Message(not target or target(e,tp,eg,ep,ev,re,r,rp,0))
if (not condition or condition(e,tp,eg,ep,ev,re,r,rp)) and (not target or target(e,tp,eg,ep,ev,re,r,rp,0)) then
return true
end
end
end
end
return false
end
function s.apply(e,tp,eg,ep,ev,re,r,rp,chk)
local chain=Duel.GetCurrentChain()
if chk==0 then return Duel.IsExistingMatchingCard(s.applyfilter,tp,LOCATION_MZONE,0,1,nil,e,tp,chk,chain) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,s.applyfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp,chk,chain-1)
if #g>0 then
Duel.HintSelection(g)
local tc=g:GetFirst()
local choose_effect, choose_desc, choose_params = {}, {}, {}
local effs=global_card_effect_table[tc]
for _,ce in ipairs(effs) do
if ce and ce.GetLabel and ce:IsHasType(EFFECT_TYPE_ACTIONS) and not ce:IsHasType(EFFECT_TYPE_CONTINUOUS) and ce:GetRange()&LOCATION_MZONE~=0 then
local _,teg,tep,tev,tre,tr,trp
local check=true
local event=ce:GetCode()
if event and event~=0 then
if event==EVENT_CHAINING then
if chain<=1 then
check=false
else
local te2,p=Duel.GetChainInfo(chain,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
local tc=te2:GetHandler()
local g=Group.FromCards(tc)
teg,tep,tev,tre,tr,trp=g,p,chain,te2,REASON_EFFECT,p
end
elseif event~=EVENT_FREE_CHAIN then
check=Duel.CheckEvent(event)
if check then
_,teg,tep,tev,tre,tr,trp=Duel.CheckEvent(event,true)
end
end
end
if check then
local condition=ce:GetCondition()
local target=ce:GetTarget()
if (not condition or condition(e,tp,teg,tep,tev,tre,tr,trp)) and (not target or target(e,tp,teg,tep,tev,tre,tr,trp,0)) then
if type(teg)=="nil" then teg=false end
if type(tep)=="nil" then tep=false end
if type(tev)=="nil" then tev=false end
if type(tre)=="nil" then tre=false end
if type(tr) =="nil" then tr=false end
if type(trp)=="nil" then trp=false end
table.insert(choose_effect,ce)
table.insert(choose_desc,ce:GetDescription())
table.insert(choose_params,{teg,tep,tev,tre,tr,trp})
end
end
end
end
if #choose_effect>0 then
local opt=Duel.SelectOption(tp,table.unpack(choose_desc))+1
local ce=choose_effect[opt]
if ce and ce.GetLabel then
s[Duel.GetCurrentChain()]=ce
local params=choose_params[opt]
local teg,tep,tev,tre,tr,trp
if #params>0 then
teg,tep,tev,tre,tr,trp=params[1],params[2],params[3],params[4],params[5],params[6]
if type(teg)==false then teg=nil end
if type(tep)==false then tep=nil end
if type(tev)==false then tev=nil end
if type(tre)==false then tre=nil end
if type(tr) ==false then tr=nil end
if type(trp)==false then trp=nil end
end
e:SetProperty(ce:GetProperty())
e:SetTarget(s.targetchk(teg,tep,tev,tre,tr,trp))
e:SetOperation(s.operationchk(teg,tep,tev,tre,tr,trp))
end
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVED)
e1:SetReset(RESET_CHAIN)
e1:SetLabelObject(e)
e1:SetOperation(s.resetop)
Duel.RegisterEffect(e1,tp)
end
function s.targetchk(teg,tep,tev,tre,tr,trp)
return function(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local te=s[Duel.GetCurrentChain()]
if chkc then
local tg=te:GetTarget()
return tg and tg(e,tp,teg,tep,tev,tre,tr,trp,chk,chkc)
end
if chk==0 then return true end
if not te then return end
e:SetProperty(te:GetProperty())
local tg=te:GetTarget()
if tg then tg(e,tp,teg,tep,tev,tre,tr,trp,chk) end
end
end
function s.operationchk(teg,tep,tev,tre,tr,trp)
return function(e,tp,eg,ep,ev,re,r,rp)
local te=s[Duel.GetCurrentChain()]
if not te then return end
local op=te:GetOperation()
if op then op(e,tp,teg,tep,tev,tre,tr,trp) end
end
end
function s.resetop(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
if te then
te:SetTarget(s.defaulttg)
te:SetOperation(s.defaultop)
end
end
function s.defaulttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local te=s[Duel.GetCurrentChain()]
if chkc then
local tg=te:GetTarget()
return tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
if chk==0 then return true end
if not te then return end
e:SetProperty(te:GetProperty())
local tg=te:GetTarget()
if tg then tg(e,tp,eg,ep,ev,re,r,rp,chk) end
Duel.ClearOperationInfo(0)
end
function s.defaultop(e,tp,eg,ep,ev,re,r,rp)
local te=s[Duel.GetCurrentChain()]
if not te then return end
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
end
function s.spreg(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:SetTurnCounter(0)
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY,0,3,0)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,3))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1)
e1:SetCondition(s.upcon)
e1:SetOperation(s.update_counter)
e1:SetReset(RESET_PHASE+PHASE_STANDBY,3)
Duel.RegisterEffect(e1,tp)
end
function s.upcon(e,tp)
local c=e:GetHandler()
if c:GetFlagEffect(id)<=0 then
c:SetTurnCounter(0)
e:Reset()
return false
end
return true
end
function s.update_counter(e,tp)
local c=e:GetHandler()
c:SetTurnCounter(c:GetTurnCounter()+1)
c:SetFlagEffectLabel(id,c:GetFlagEffectLabel(id)+1)
end
function s.ctcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetFlagEffect(id)>0 and c:GetFlagEffectLabel(id)==3
end
function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
Duel.SetOperationInfo(0,CATEGORY_COUNTER,c,1,0,0x1460)
c:SetTurnCounter(0)
c:ResetFlagEffect(id)
end
function s.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() and c:IsCanAddCounter(0x1460,1,false,c:GetLocation()) then
c:AddCounter(0x1460,1)
end
end
\ No newline at end of file
--键★断片 - 渚正立于坂道之下 || K.E.Y Fragments - Kyou, Strength in Love
--Scripted by: XGlitchy30
local s,id=GetID()
function s.initial_effect(c)
c:SetCounterLimit(0x1460,1)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(s.eqtg)
e1:SetOperation(s.eqop)
c:RegisterEffect(e1)
local e1x=e1:Clone()
e1x:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e1x)
local e1y=e1:Clone()
e1y:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e1y)
--equip effects
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetCondition(s.eqcon)
e2:SetValue(1500)
c:RegisterEffect(e2)
local e2x=e2:Clone()
e2x:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2x)
local e2y=e2:Clone()
e2y:SetCode(EFFECT_PIERCE)
e2y:SetValue(1)
c:RegisterEffect(e2y)
--light orb
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_COUNTER)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetRange(LOCATION_ONFIELD)
e3:SetCode(EVENT_CUSTOM+id)
e3:SetCondition(s.ctcon)
e3:SetTarget(s.cttg)
e3:SetOperation(s.ctop)
c:RegisterEffect(e3)
if not s.global_check then
s.global_check=true
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetOperation(s.regop)
Duel.RegisterEffect(e1,0)
end
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
for p=tp,1-tp,1-2*tp do
local g=eg:Filter(Card.IsSummonPlayer,nil,p)
if #g>0 then
local ct=Duel.GetFlagEffect(p,id)>0 and Duel.GetFlagEffectLabel(p,id) or 0
if ct==0 then
Duel.RegisterFlagEffect(p,id,RESET_PHASE+PHASE_END,0,1,0)
end
Duel.SetFlagEffectLabel(p,id,Duel.GetFlagEffectLabel(p,id)+#g)
if ct<3 and Duel.GetFlagEffectLabel(p,id)>=3 then
Duel.RaiseEvent(eg,EVENT_CUSTOM+id,re,r,rp,p,ev)
end
end
end
end
function s.eqfilter(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x460) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_SPELLCASTER+RACE_WARRIOR)
and c:CheckUniqueOnField(tp) and not c:IsForbidden()
end
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK)
end
function s.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToChain(0) or Duel.GetLocationCount(tp,LOCATION_SZONE)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local tc=Duel.SelectMatchingCard(tp,s.eqfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst()
if tc then
if not Duel.Equip(tp,tc,c) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetValue(s.eqlimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
function s.eqlimit(e,c)
return e:GetOwner()==c
end
function s.eqcon(e)
return e:GetHandler():GetEquipTarget():IsSetCard(0x460)
end
function s.ctcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
end
function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
Duel.SetOperationInfo(0,CATEGORY_COUNTER,c,1,0,0x1460)
end
function s.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() and c:IsCanAddCounter(0x1460,1,false,c:GetLocation()) then
c:AddCounter(0x1460,1)
end
end
\ No newline at end of file
--键★断片 - 风子为愿望而游走 || K.E.Y Fragments - Fuuko, Hit and Run
--Scripted by: XGlitchy30
local s,id=GetID()
function s.initial_effect(c)
c:SetCounterLimit(0x1460,1)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(s.eqtg)
e1:SetOperation(s.eqop)
c:RegisterEffect(e1)
local e1x=e1:Clone()
e1x:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e1x)
local e1y=e1:Clone()
e1y:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e1y)
--equip effects
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetCondition(s.eqcon)
e2:SetValue(aux.tgoval)
c:RegisterEffect(e2)
local e2y=e2:Clone()
e2y:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e2y:SetValue(1)
c:RegisterEffect(e2y)
--light orb
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_COUNTER)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetRange(LOCATION_ONFIELD)
e3:SetCode(EVENT_CUSTOM+id)
e3:SetCondition(s.ctcon)
e3:SetTarget(s.cttg)
e3:SetOperation(s.ctop)
c:RegisterEffect(e3)
if not s.global_check then
s.global_check=true
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_EQUIP)
e1:SetOperation(s.regop)
Duel.RegisterEffect(e1,0)
end
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
for p=tp,1-tp,1-2*tp do
local g=eg:Filter(aux.FilterEqualFunction(Card.GetReasonPlayer,p),nil)
if #g>0 then
local ct=Duel.GetFlagEffect(p,id)>0 and Duel.GetFlagEffectLabel(p,id) or 0
if ct==0 then
Duel.RegisterFlagEffect(p,id,RESET_PHASE+PHASE_END,0,1,0)
end
Duel.SetFlagEffectLabel(p,id,Duel.GetFlagEffectLabel(p,id)+#g)
if ct<3 and Duel.GetFlagEffectLabel(p,id)>=3 then
Duel.RaiseEvent(eg,EVENT_CUSTOM+id,re,r,rp,p,ev)
end
end
end
end
function s.eqfilter(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x460) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_SPELLCASTER+RACE_WARRIOR)
and c:CheckUniqueOnField(tp) and not c:IsForbidden()
end
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK)
end
function s.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToChain(0) or Duel.GetLocationCount(tp,LOCATION_SZONE)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local tc=Duel.SelectMatchingCard(tp,s.eqfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst()
if tc then
if not Duel.Equip(tp,tc,c) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetValue(s.eqlimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
function s.eqlimit(e,c)
return e:GetOwner()==c
end
function s.eqcon(e)
return e:GetHandler():GetEquipTarget():IsSetCard(0x460)
end
function s.ctcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp
end
function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
Duel.SetOperationInfo(0,CATEGORY_COUNTER,c,1,0,0x1460)
end
function s.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() and c:IsCanAddCounter(0x1460,1,false,c:GetLocation()) then
c:AddCounter(0x1460,1)
end
end
\ No newline at end of file
--键★断片 - 智代为了未来而战 || K.E.Y Fragments - Tomoyo, Fight for Future
--Scripted by: XGlitchy30
local s,id=GetID()
function s.initial_effect(c)
c:SetCounterLimit(0x1460,1)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(s.eqtg)
e1:SetOperation(s.eqop)
c:RegisterEffect(e1)
local e1x=e1:Clone()
e1x:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e1x)
local e1y=e1:Clone()
e1y:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e1y)
--equip effects
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_BATTLE_START)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(s.bancon)
e2:SetTarget(s.bantg)
e2:SetOperation(s.banop)
c:RegisterEffect(e2)
--light orb
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_COUNTER)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetRange(LOCATION_ONFIELD)
e3:SetCode(EVENT_CUSTOM+id)
e3:SetTarget(s.cttg)
e3:SetOperation(s.ctop)
c:RegisterEffect(e3)
if not s.global_check then
s.global_check=true
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_LEAVE_FIELD)
e1:SetOperation(s.regop)
Duel.RegisterEffect(e1,0)
end
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFlagEffect(0,id)>0 and Duel.GetFlagEffectLabel(0,id) or 0
if ct==0 then
Duel.RegisterFlagEffect(0,id,RESET_PHASE+PHASE_END,0,1,0)
end
Duel.SetFlagEffectLabel(0,id,Duel.GetFlagEffectLabel(0,id)+#eg)
Debug.Message(Duel.GetFlagEffectLabel(0,id))
if ct<3 and Duel.GetFlagEffectLabel(0,id)>=3 then
Duel.RaiseEvent(eg,EVENT_CUSTOM+id,re,r,rp,0,ev)
end
end
function s.eqfilter(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x460) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_SPELLCASTER+RACE_WARRIOR)
and c:CheckUniqueOnField(tp) and not c:IsForbidden()
end
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK)
end
function s.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToChain(0) or Duel.GetLocationCount(tp,LOCATION_SZONE)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local tc=Duel.SelectMatchingCard(tp,s.eqfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst()
if tc then
if not Duel.Equip(tp,tc,c) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetValue(s.eqlimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
function s.eqlimit(e,c)
return e:GetOwner()==c
end
function s.bancon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler():GetEquipTarget()
local bc=c:GetBattleTarget()
return c and c:IsSetCard(0x460) and c:IsRelateToBattle() and bc and bc:IsControler(1-tp)
end
function s.bantg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler():GetEquipTarget():GetBattleTarget(),1,0,0)
end
function s.banop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToChain(0) then return end
local ec=e:GetHandler():GetEquipTarget()
local bc=ec:GetBattleTarget()
if bc and bc:IsRelateToBattle() and bc:IsControler(1-tp) and bc:IsAbleToGrave() then
Duel.SendtoGrave(bc,REASON_EFFECT)
end
end
function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
Duel.SetOperationInfo(0,CATEGORY_COUNTER,c,1,0,0x1460)
end
function s.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() and c:IsCanAddCounter(0x1460,1,false,c:GetLocation()) then
c:AddCounter(0x1460,1)
end
end
\ No newline at end of file
--键★断片 - 缭绕琴美的弦理论 || Frammenti K.E.Y - Kotomi, Teoria delle Stringhe
--Scripted by: XGlitchy30
xpcall(function() require("expansions/script/glitchylib_vsnemo") end,function() require("script/glitchylib_vsnemo") end)
local s,id=GetID()
s.unique_label = 0
function s.initial_effect(c)
s.unique_label = s.unique_label + 1
c:SetCounterLimit(0x1460,1)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(s.eqtg)
e1:SetOperation(s.eqop)
c:RegisterEffect(e1)
local e1x=e1:Clone()
e1x:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e1x)
local e1y=e1:Clone()
e1y:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e1y)
--equip effects
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetCondition(s.eqcon)
e2:SetTarget(s.stattg(s.unique_label))
e2:SetValue(s.eqval)
c:RegisterEffect(e2)
local e2x=Effect.CreateEffect(c)
e2x:SetDescription(aux.Stringid(id,1))
e2x:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2x:SetCode(EVENT_ADJUST)
e2x:SetRange(LOCATION_SZONE)
e2x:SetLabelObject(e2)
e2x:SetCondition(s.eqcon)
e2x:SetOperation(s.chkop(s.unique_label))
c:RegisterEffect(e2x)
--light orb
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_COUNTER)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetRange(LOCATION_ONFIELD)
e3:SetCode(EVENT_CUSTOM+id)
e3:SetCondition(s.ctcon)
e3:SetTarget(s.cttg)
e3:SetOperation(s.ctop)
c:RegisterEffect(e3)
if not s.global_check then
s.global_check=true
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_TO_HAND)
e1:SetOperation(s.regop)
Duel.RegisterEffect(e1,0)
end
end
function s.regfilter(c,p)
return c:IsPreviousLocation(LOCATION_ONFIELD+LOCATION_GRAVE) and c:IsLocation(LOCATION_HAND) and c:IsPreviousControler(p) and c:IsControler(p)
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
for p=tp,1-tp,1-2*tp do
local g=eg:Filter(s.regfilter,nil,p)
if #g>0 then
local ct=Duel.GetFlagEffect(p,id)>0 and Duel.GetFlagEffectLabel(p,id) or 0
if ct==0 then
Duel.RegisterFlagEffect(p,id,RESET_PHASE+PHASE_END,0,1,0)
end
Duel.SetFlagEffectLabel(p,id,Duel.GetFlagEffectLabel(p,id)+#g)
if ct<3 and Duel.GetFlagEffectLabel(p,id)>=3 then
Duel.RaiseEvent(eg,EVENT_CUSTOM+id,re,r,rp,p,ev)
end
end
end
end
function s.eqfilter(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x460) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_SPELLCASTER+RACE_WARRIOR)
and c:CheckUniqueOnField(tp) and not c:IsForbidden()
end
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK)
end
function s.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToChain(0) or Duel.GetLocationCount(tp,LOCATION_SZONE)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local tc=Duel.SelectMatchingCard(tp,s.eqfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst()
if tc then
if not Duel.Equip(tp,tc,c) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetValue(s.eqlimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
function s.eqlimit(e,c)
return e:GetOwner()==c
end
function s.eqcon(e)
local ec=e:GetHandler():GetEquipTarget()
return ec and ec:IsSetCard(0x460) and ec:HasDefense() and ec:GetDefense()>0
end
function s.stattg(lab)
return function(e,tc)
return tc:GetFlagEffect(id+lab*100)~=0 and tc:GetFlagEffectLabel(id+lab*100)==e:GetLabel()
end
end
function s.eqval(e,c)
return -e:GetHandler():GetEquipTarget():GetDefense()
end
function s.notflag(c,lab,fid)
return c:IsFaceup() and (c:GetFlagEffect(id+lab*100)==0 or c:GetFlagEffectLabel(id+lab*100)~=fid)
end
function s.chkop(lab)
return function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local fid=c:GetFieldID()
if e:GetLabelObject():GetLabel()~=fid then
e:GetLabelObject():SetLabel(fid)
end
local g=Duel.GetMatchingGroup(s.notflag,tp,0,LOCATION_MZONE,nil,lab,fid)
if #g<=0 then return end
local dg=Group.CreateGroup()
for tc in aux.Next(g) do
local preatk,predef=tc:GetAttack(),tc:GetDefense()
if tc:GetFlagEffect(id+lab*100)==0 then
tc:RegisterFlagEffect(id+lab*100,RESET_EVENT+RESETS_STANDARD,0,1)
end
tc:SetFlagEffectLabel(id+lab*100,fid)
if preatk~=0 and not tc:IsImmuneToEffect(e:GetLabelObject()) and tc:GetAttack()==0 then
dg:AddCard(tc)
end
end
if #dg>0 then
for tc in aux.Next(dg) do
Duel.Negate(tc,e)
end
Duel.Readjust()
end
dg:DeleteGroup()
end
end
function s.ctcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp
end
function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
Duel.SetOperationInfo(0,CATEGORY_COUNTER,c,1,0,0x1460)
end
function s.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() and c:IsCanAddCounter(0x1460,1,false,c:GetLocation()) then
c:AddCounter(0x1460,1)
end
end
\ No newline at end of file
--键★断片 - 渚的未来时光 || Frammenti K.E.Y - Nagisa, Momenti Dopo la Storia
--Scripted by: XGlitchy30
local s,id=GetID()
function s.initial_effect(c)
--SS
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetCost(s.spcost)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--effect gain
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(s.lptg)
e2:SetOperation(s.lpop)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetCondition(s.eqcon)
e3:SetTarget(s.eftg)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,2))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_SEND_REPLACE)
e4:SetTarget(s.reptg)
e4:SetValue(s.repval)
e4:SetOperation(s.repop)
c:RegisterEffect(e4)
end
function s.cfilter(c)
local ec=c:GetEquipTarget()
return ec and ec:IsType(TYPE_MONSTER) and c:IsFaceup() and c:IsAbleToHandAsCost() and c:IsSetCard(0x460)
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil)
if #g>0 then
Duel.HintSelection(g)
Duel.SendtoHand(g,nil,REASON_COST)
end
end
function s.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,false,false)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not c:IsRelateToChain(0) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function s.eqcon(e)
local ec=e:GetHandler():GetEquipTarget()
return ec and ec:IsSetCard(0x460)
end
function s.eftg(e,c)
local ec=e:GetHandler():GetEquipTarget()
return c==ec
end
function s.lptg(e,tp,eg,ep,ev,re,r,rp,chk)
local atk=e:GetHandler():GetAttack()
if chk==0 then return atk>0 end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(atk)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,atk)
end
function s.lpop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToChain(0) then return end
local atk=c:GetAttack()
if atk<=0 then return end
Duel.Recover(p,atk,REASON_EFFECT)
end
function s.repfilter(c,tp)
return (not c:IsLocation(LOCATION_HAND) or not c:IsControler(tp)) and c:GetDestination()==LOCATION_GRAVE and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_LIGHT)
and c:IsRace(RACE_SPELLCASTER+RACE_WARRIOR) and c:IsSetCard(0x460)
and c:IsAbleToHand(tp) and (c:IsFaceup() or not c:IsLocation(LOCATION_ONFIELD+LOCATION_REMOVED)) and not c:IsReason(REASON_REPLACE+REASON_RETURN)
end
function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(s.repfilter,1,nil,tp) end
local c=e:GetHandler()
local g=eg:Filter(s.repfilter,nil,tp)
if #g>0 then
g:KeepAlive()
e:SetLabelObject(g)
return true
else
return false
end
end
function s.repval(e,c)
local g=e:GetLabelObject()
return g and g:IsContains(c)
end
function s.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,1-tp,id)
local g=e:GetLabelObject()
if g then
if #g>0 and Duel.SendtoHand(g,tp,REASON_EFFECT+REASON_REPLACE)>0 then
local og=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_HAND):Filter(Card.IsControler,nil,tp)
if #og>0 then
Duel.ConfirmCards(1-tp,og)
end
end
g:DeleteGroup()
end
end
\ No newline at end of file
--键★断片 - 渚的未来时光 || Frammenti K.E.Y - Kyou, Doveri Dopo la Storia
--Scripted by: XGlitchy30
local s,id=GetID()
function s.initial_effect(c)
--SS
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetCost(s.spcost)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--effect gain
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(s.lpcost(LOCATION_ONFIELD))
e2:SetTarget(s.lptg)
e2:SetOperation(s.lpop)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetCondition(s.eqcon)
e3:SetTarget(s.eftg)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,2))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetCountLimit(1)
e4:SetCost(s.lpcost(LOCATION_MZONE))
e4:SetTarget(s.lptg)
e4:SetOperation(s.lpop)
c:RegisterEffect(e4)
end
function s.cfilter(c)
local ec=c:GetEquipTarget()
return ec and ec:IsType(TYPE_MONSTER) and c:IsFaceup() and c:IsAbleToHandAsCost() and c:IsSetCard(0x460)
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil)
if #g>0 then
Duel.HintSelection(g)
Duel.SendtoHand(g,nil,REASON_COST)
end
end
function s.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,false,false)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not c:IsRelateToChain(0) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function s.eqcon(e)
local ec=e:GetHandler():GetEquipTarget()
return ec and ec:IsSetCard(0x460)
end
function s.eftg(e,c)
local ec=e:GetHandler():GetEquipTarget()
return c==ec
end
function s.filter(c,tp)
return c:IsFaceup() and c:IsAbleToHandAsCost() and c:IsSetCard(0x460) and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c)
end
function s.lpcost(loc)
return function(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,loc,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,loc,0,1,1,nil,tp)
if #g>0 then
Duel.HintSelection(g)
Duel.SendtoHand(g,nil,REASON_COST)
end
end
end
function s.lptg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if chk==0 then
local res = e:GetLabel()==1 or #g>0
e:SetLabel(0)
return res
end
e:SetLabel(0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function s.lpop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if #g>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
\ No newline at end of file
--键★断片 - 风子的未来奇迹 || Frammenti K.E.Y - Fuuko, Miracoli Dopo la Storia
--Scripted by: XGlitchy30
local s,id=GetID()
function s.initial_effect(c)
--SS
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetCost(s.spcost)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--effect gain
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(s.lpcost(LOCATION_ONFIELD))
e2:SetTarget(s.lptg)
e2:SetOperation(s.lpop)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetCondition(s.eqcon)
e3:SetTarget(s.eftg)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,2))
e4:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetCountLimit(1)
e4:SetCost(s.lpcost(LOCATION_MZONE))
e4:SetTarget(s.tdtg)
e4:SetOperation(s.tdop)
c:RegisterEffect(e4)
end
function s.cfilter(c)
local ec=c:GetEquipTarget()
return ec and ec:IsType(TYPE_MONSTER) and c:IsFaceup() and c:IsAbleToHandAsCost() and c:IsSetCard(0x460)
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil)
if #g>0 then
Duel.HintSelection(g)
Duel.SendtoHand(g,nil,REASON_COST)
end
end
function s.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,false,false)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not c:IsRelateToChain(0) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function s.eqcon(e)
local ec=e:GetHandler():GetEquipTarget()
return ec and ec:IsSetCard(0x460)
end
function s.eftg(e,c)
local ec=e:GetHandler():GetEquipTarget()
return c==ec
end
function s.filter(c,tp)
return c:IsFaceup() and c:IsAbleToHandAsCost() and c:IsSetCard(0x460)
end
function s.lpcost(loc)
return function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,loc,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,loc,0,1,1,nil)
if #g>0 then
Duel.HintSelection(g)
Duel.SendtoHand(g,nil,REASON_COST)
end
end
end
function s.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_LIGHT)
and c:IsRace(RACE_SPELLCASTER+RACE_WARRIOR) and c:IsSetCard(0x460)
and c:IsAbleToHand()
end
function s.lptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function s.lpop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function s.tdfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_LIGHT)
and c:IsRace(RACE_SPELLCASTER+RACE_WARRIOR) and c:IsSetCard(0x460)
and c:IsAbleToDeck()
end
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_HAND,0,1,nil) and Duel.IsPlayerCanDraw(tp,2) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_HAND,0,1,1,nil)
if #g>0 then
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
if Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK+LOCATION_EXTRA) then
for p=tp,1-tp,1-2*tp do
if g:Filter(Card.IsControler,nil,p):IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then
Duel.ShuffleDeck(p)
end
end
Duel.Draw(tp,2,REASON_EFFECT)
end
end
end
\ No newline at end of file
--键★断片 - 智代的异色故事 || Frammenti K.E.Y - Tomoyo, Storia Alternativa
--Scripted by: XGlitchy30
local s,id=GetID()
function s.initial_effect(c)
--summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(s.spcon)
c:RegisterEffect(e1)
--tribute and SS
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetCost(s.eqcon)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
end
function s.scfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_SPELLCASTER+RACE_WARRIOR) and c:IsSetCard(0x460)
end
function s.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.scfilter,tp,LOCATION_MZONE,0,1,nil)
end
function s.cfilter(c,e,tp)
return c:IsSetCard(0x460) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_SPELLCASTER) and c:IsReleasableByEffect() and (c:IsControler(tp) or c:IsFaceup())
and Duel.GetMZoneCount(tp,c)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x460) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_WARRIOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.eqcon(e)
local ec=e:GetHandler():GetEquipTarget()
return ec and ec:IsSetCard(0x460)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,s.cfilter,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,tp,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local rg=Duel.SelectReleaseGroup(tp,s.cfilter,1,1,nil,e,tp)
if rg and Duel.Release(rg,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
\ No newline at end of file
--键★记忆 汐 || K.E.Y. Memoria - Ushio
--Scripted by: XGlitchy30
local s,id=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_SPELLCASTER),6,2)
--check xyz mats
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_MATERIAL_CHECK)
e0:SetValue(s.valcheck)
c:RegisterEffect(e0)
--special summon proc
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_EXTRA)
e1:SetValue(1)
e1:SetCondition(s.sprcon)
e1:SetOperation(s.sprop)
c:RegisterEffect(e1)
--equip
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(s.eqcon)
e2:SetTarget(s.eqtg)
e2:SetOperation(s.eqop)
c:RegisterEffect(e2)
--atkup
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(s.val)
c:RegisterEffect(e3)
--return
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,2))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_RECOVER)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCost(s.lpcost)
e4:SetTarget(s.lptg)
e4:SetOperation(s.lpop)
c:RegisterEffect(e4)
end
function s.matfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x460)
end
function s.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(s.matfilter,1,nil) then
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD,0,1)
end
end
function s.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and Duel.IsCanRemoveCounter(tp,1,1,0x1460,3,REASON_COST)
end
function s.sprop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.RemoveCounter(tp,1,1,0x1460,3,REASON_COST)
end
function s.eqcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_SPECIAL+1) or (c:IsSummonType(SUMMON_TYPE_XYZ) and c:GetFlagEffect(id)>0)
end
function s.eqval(ec,c,tp)
return ec:IsControler(tp) and ec:IsRace(RACE_FISH+RACE_AQUA+RACE_SEASERPENT)
end
function s.filter(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsSetCard(0x460) and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function s.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if ft<=0 or not c:IsRelateToChain(0) or not c:IsFaceup() then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND+LOCATION_GRAVE,0,ft,ft,nil,tp)
if #g>0 then
for tc in aux.Next(g) do
if Duel.Equip(tp,tc,c,true,true) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(s.eqlimit)
tc:RegisterEffect(e1)
end
end
Duel.EquipComplete()
end
end
function s.eqlimit(e,c)
return e:GetOwner()==c
end
function s.val(e,c)
return c:GetEquipCount()*1200
end
function s.lpcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function s.lptg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=e:GetHandler():GetEquipGroup()
if chk==0 then return g:IsExists(Card.IsAbleToHand,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,#g,0,0)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,0)
end
function s.lpop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToChain(0) then return end
local g=c:GetEquipGroup():Filter(Card.IsAbleToHand,nil)
if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 and g:IsExists(Card.IsLocation,1,nil,LOCATION_HAND+LOCATION_EXTRA) then
local og=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_HAND+LOCATION_EXTRA)
if #og>0 then
Duel.Recover(tp,#g*1200,REASON_EFFECT)
end
end
end
\ No newline at end of file
--键★记忆梗 Hurry, Starfish || K.E.Y Memoria! - Sbrigati, Stella Marina
--Scripted by: XGlitchy30
xpcall(function() require("expansions/script/glitchylib_vsnemo") end,function() require("script/glitchylib_vsnemo") end)
local s,id = GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1,1)
--Special summon procedure
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(id,0))
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_EXTRA)
e0:SetValue(1)
e0:SetCondition(s.sprcon)
e0:SetTarget(s.sprtg)
e0:SetOperation(s.sprop)
c:RegisterEffect(e0)
--Gain effects
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(s.condition)
e1:SetOperation(s.operation)
c:RegisterEffect(e1)
--Special Summon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,5))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_PHASE+PHASE_STANDBY)
e4:SetRange(LOCATION_REMOVED)
e4:SetCountLimit(1,id+100+EFFECT_COUNT_CODE_OATH)
e4:SetCondition(s.spcon)
e4:SetTarget(s.sptg)
e4:SetOperation(s.spop)
c:RegisterEffect(e4)
end
function s.sprfilter(c,tp,sc)
return c:IsFaceup() and c:IsSetCard(0x460) and c:IsAbleToGraveAsCost() and c:GetEquipGroup():IsExists(Card.IsOriginalType,1,nil,TYPE_MONSTER)
and Duel.GetLocationCountFromEx(tp,tp,c,sc)
end
function s.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and Duel.IsCanRemoveCounter(tp,1,1,0x1460,2,REASON_COST)
or Duel.IsExistingMatchingCard(s.sprfilter,tp,LOCATION_MZONE,0,1,nil,tp,c)
end
function s.sprtg(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(s.sprfilter,tp,LOCATION_MZONE,0,nil,tp,c)
local b1 = Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and Duel.IsCanRemoveCounter(tp,1,1,0x1460,2,REASON_COST)
local b2 = #g>0
if not b1 and not b2 then return false end
local opt=aux.Option(id,tp,1,b1,b2)
e:SetLabel(opt)
if opt==0 then
return true
elseif opt==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local mg=g:Select(tp,1,1,nil)
if #mg==1 then
mg:KeepAlive()
e:SetLabelObject(mg)
return true
end
return false
end
return false
end
function s.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local opt=e:GetLabel()
if opt==0 then
c:SetMaterial(nil)
Duel.RemoveCounter(tp,1,1,0x1460,2,REASON_COST)
elseif opt==1 then
local g=e:GetLabelObject()
if not g then return end
c:SetMaterial(g)
Duel.SendtoGrave(g,REASON_COST)
end
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL+1)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,3))
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,4))
end
function s.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsSetCard(0x460) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemove() and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,tp,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToChain(0) then return end
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,nil)
if Duel.Remove(c,POS_FACEUP,REASON_EFFECT)>0 and c:IsLocation(LOCATION_REMOVED) and #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local tg=g:Select(tp,1,1,nil)
if #tg>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>1 and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil)
if #tg>0 and Duel.SendtoGrave(tg,REASON_EFFECT)>0 and tg:IsExists(Card.IsLocation,1,nil,LOCATION_GRAVE) then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer()
end
function s.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,false,false) and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not c:IsRelateToChain(0) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
\ No newline at end of file
--键★记忆 小小的手心 || K.E.Y. Memoria - Piccolo Palmo
--Scripted by: XGlitchy30
xpcall(function() require("expansions/script/glitchylib_vsnemo") end,function() require("script/glitchylib_vsnemo") end)
local s,id=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
aux.AddXyzProcedure(c,nil,8,6)
--special summon proc
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_EXTRA)
e1:SetValue(1)
e1:SetCondition(s.sprcon)
e1:SetOperation(s.sprop)
c:RegisterEffect(e1)
--attach
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(s.xyzcon)
e2:SetTarget(s.xyztg)
e2:SetOperation(s.xyzop)
c:RegisterEffect(e2)
--immune
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(s.imcon)
e3:SetValue(s.efilter)
c:RegisterEffect(e3)
--detach and equip
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,2))
e4:SetCategory(CATEGORY_EQUIP)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(s.attcon)
e4:SetCost(s.attcost)
e4:SetTarget(s.atttg)
e4:SetOperation(s.attop)
c:RegisterEffect(e4)
--negate
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(id,3))
e5:SetCategory(CATEGORY_DISABLE)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_CHAINING)
e5:SetRange(LOCATION_MZONE)
e5:SetCondition(s.discon)
e5:SetCost(s.discost)
e5:SetTarget(s.distg)
e5:SetOperation(s.disop)
c:RegisterEffect(e5)
end
function s.matfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x460)
end
function s.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and Duel.IsCanRemoveCounter(tp,1,1,0x1,7,REASON_COST)
end
function s.sprop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.RemoveCounter(tp,1,1,0x1,7,REASON_COST)
end
function s.xyzcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_SPECIAL+1)
end
function s.filter(c)
return c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsSetCard(0x460) and not c:IsForbidden() and c:IsCanOverlay()
end
function s.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
if Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE,0,1,nil) then
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0)
end
end
function s.xyzop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToChain(0) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,nil)
if #g>0 then
local ct=g:GetClassCount(Card.GetCode)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,ct,ct)
if #sg>0 then
Duel.Attach(sg,c)
end
end
end
function s.imcon(e)
return e:GetHandler():GetOverlayCount()>0
end
function s.efilter(e,te)
return te:GetOwnerPlayer()~=e:GetHandlerPlayer()
end
function s.attcon(e)
local c=e:GetHandler()
return c:GetOverlayCount()>0 and not c:GetOverlayGroup():IsExists(aux.NOT(Card.IsSetCard),1,nil,0x460)
end
function s.attcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
if chk==0 then return true end
end
function Card.CheckEquipTargetWhileOverlay(c,ec)
local egroup=global_card_effect_table[c]
for _,ce in ipairs(egroup) do
if ce and aux.GetValueType(ce)=="Effect" and ce:GetCode()==EFFECT_EQUIP_LIMIT then
local val=ce:GetValue()
if not val or type(val)=="number" then
return true
elseif type(val)=="function" then
return val(ce,ec)
end
end
end
return false
end
function s.detachfilter(c,ec,tp,step)
if c:IsForbidden() or not c:CheckUniqueOnField(tp) then return false end
if not c:IsType(TYPE_EQUIP) then return true end
if tp then
return Duel.IsExistingMatchingCard(s.attfilter,tp,LOCATION_MZONE,0,1,nil,c)
else
return not step and c:CheckEquipTargetWhileOverlay(ec) or (step and c:CheckEquipTarget(ec))
end
end
function s.attfilter(c,g)
return c:IsFaceup() and c:IsSetCard(0x460) and ((aux.GetValueType(g)=="Card" and s.detachfilter(g,c)) or (aux.GetValueType(g)=="Group" and g:IsExists(s.detachfilter,1,nil,c)))
end
function s.atttg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=c:GetOverlayGroup()
if chk==0 then
if e:GetLabel()~=1 then return false end
e:SetLabel(0)
return Duel.IsExistingMatchingCard(s.attfilter,tp,LOCATION_MZONE,0,1,nil,g) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
end
e:SetLabel(0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVEXYZ)
local detached=g:FilterSelect(tp,s.detachfilter,1,1,c,nil,tp):GetFirst()
if detached and Duel.SendtoGrave(detached,REASON_COST)>0 then
Duel.SetTargetCard(detached)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,detached,1,detached:GetControler(),detached:GetLocation())
if detached:IsLocation(LOCATION_GRAVE) then
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,detached,1,tp,0)
end
end
end
function s.attop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToChain(0) or Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsForbidden() then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,s.attfilter,tp,LOCATION_MZONE,0,1,1,nil,tc,nil,true)
if #g>0 then
Duel.HintSelection(g)
if not Duel.Equip(tp,tc,g:GetFirst()) or tc:IsOriginalType(TYPE_EQUIP) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(s.eqlimit)
e1:SetLabelObject(g:GetFirst())
tc:RegisterEffect(e1)
end
end
function s.eqlimit(e,c)
return c==e:GetLabelObject()
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsChainDisablable(ev) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and s.attcon(e)
end
function s.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
\ No newline at end of file
--键★高潮 小镇、时光的流逝、人 || Città, Scorrere del Tempo, Persone
--Scripted by: XGlitchy30
local s,id=GetID()
function s.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_COUNTER)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(s.target)
e1:SetOperation(s.operation)
c:RegisterEffect(e1)
--transfer orbs
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_LEAVE_FIELD_P)
e2:SetRange(LOCATION_FZONE)
e2:SetCondition(s.trcon)
e2:SetOperation(s.trop)
c:RegisterEffect(e2)
--place orb
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_COUNTER)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1)
e3:SetCondition(s.ctcon)
e3:SetOperation(s.ctop)
c:RegisterEffect(e3)
--Replace destruction
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_DESTROY_REPLACE)
e4:SetRange(LOCATION_FZONE)
e4:SetTarget(s.desreptg)
e4:SetValue(s.desrepval)
e4:SetOperation(s.desrepop)
c:RegisterEffect(e4)
--register SS
if not s.global_check then
s.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SUMMON_SUCCESS)
ge1:SetOperation(s.checkop)
Duel.RegisterEffect(ge1,0)
local ge2=ge1:Clone()
ge2:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
Duel.RegisterEffect(ge2,0)
local ge3=ge1:Clone()
ge3:SetCode(EVENT_SPSUMMON_SUCCESS)
Duel.RegisterEffect(ge3,0)
end
end
function s.spfilter(c)
return c:IsFaceup() and c:IsSetCard(0x460) and c:IsAttribute(ATTRIBUTE_LIGHT)
end
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(s.spfilter,nil)
if #g<=0 then return end
for p=tp,1-tp,1-2*tp do
local ct=g:FilterCount(Card.IsSummonPlayer,nil,p)
if ct>0 then
if Duel.GetFlagEffect(p,id)<=0 then
Duel.RegisterFlagEffect(p,id,RESET_PHASE+PHASE_END,0,1,0)
end
Duel.SetFlagEffectLabel(p,id,Duel.GetFlagEffectLabel(p,id)+ct)
end
end
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsCanAddCounter(tp,0x1460,1,c) end
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToChain(0) and c:IsFaceup() then
c:AddCounter(0x1460,1)
end
end
function s.trfilter(c,tc)
local ct=c:GetCounter(0x1460)
return ct>0 and c:IsCanRemoveCounter(tp,0x1460,ct,REASON_EFFECT) and tc:IsCanAddCounter(0x1460,ct)
end
function s.trcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.trfilter,1,nil,e:GetHandler())
end
function s.trop(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(s.trfilter,nil,e:GetHandler())
if #g<=0 then return end
Duel.Hint(HINT_CARD,tp,id)
local exg=Group.CreateGroup()
while #g>0 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=g:Select(tp,1,1,nil):GetFirst()
if not tc then return end
local ct=tc:GetCounter(0x1460)
tc:RemoveCounter(tp,0x1460,ct,REASON_EFFECT)
local diff=math.abs(ct-tc:GetCounter(0x1460))
e:GetHandler():AddCounter(0x1460,diff)
exg:AddCard(tc)
g=eg:Filter(s.trfilter,exg,e:GetHandler())
end
end
function s.ctcon(e,tp)
return Duel.GetTurnPlayer()==tp and Duel.GetFlagEffect(tp,id)>0 and Duel.GetFlagEffectLabel(tp,id)>=3
end
function s.ctop(e,tp)
local c=e:GetHandler()
if c:IsRelateToChain(0) and c:IsFaceup() and c:IsCanAddCounter(0x1460,1) then
c:AddCounter(0x1460,1)
end
end
function s.repfilter(c,tp)
return c:IsControler(tp) and c:IsSetCard(0x460) and c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and not c:IsReason(REASON_REPLACE+REASON_RULE)
end
function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return eg:IsExists(s.repfilter,1,nil,tp) and c:IsCanRemoveCounter(tp,0x1460,1,REASON_EFFECT) end
return Duel.SelectEffectYesNo(tp,c,96)
end
function s.desrepval(e,c)
return s.repfilter(c,e:GetHandlerPlayer())
end
function s.desrepop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RemoveCounter(tp,0x1460,1,REASON_EFFECT+REASON_REPLACE)
end
\ No newline at end of file
--键★高潮 东风 || K.E.Y. Climax - Vento di Primavera
--Scripted by: XGlitchy30
local s,id=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.recfilter(c)
return c:IsFaceup() and c:IsSetCard(0x460)
end
function s.monfilter(c,tp)
return c:IsSetCard(0x460) and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_LIGHT) and not c:IsPublic() and not c:IsForbidden() and c:CheckUniqueOnField(tp)
and Duel.IsExistingMatchingCard(s.recfilter,tp,LOCATION_MZONE,0,1,nil)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if not e:GetHandler():IsLocation(LOCATION_SZONE) and e:IsHasType(EFFECT_TYPE_ACTIVATE) then
ft=ft-1
end
return ft>0 and Duel.IsExistingMatchingCard(s.monfilter,tp,LOCATION_HAND,0,1,nil,tp)
end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_HAND)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local tc=Duel.SelectMatchingCard(tp,s.monfilter,tp,LOCATION_HAND,0,1,1,nil,tp):GetFirst()
if not tc then return end
Duel.ConfirmCards(1-tp,Group.FromCards(tc))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local ec=Duel.SelectMatchingCard(tp,s.recfilter,tp,LOCATION_MZONE,0,1,1,nil):GetFirst()
if not ec then return end
Duel.HintSelection(Group.FromCards(ec))
if not Duel.Equip(tp,tc,ec,true) then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_COPY_INHERIT)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(s.eqlimit)
e1:SetLabelObject(ec)
tc:RegisterEffect(e1)
end
function s.eqlimit(e,c)
return c==e:GetLabelObject()
end
\ No newline at end of file
--键★高潮 -形影成双- || K.E.Y Climax - Due Ombre
--Scripted by: XGlitchy30
local s,id=GetID()
function s.initial_effect(c)
--SS
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.spfilter(c,e,tp)
local ec=c:GetEquipTarget()
return c:IsFaceup() and c:IsOriginalType(TYPE_MONSTER) and ec and ec:IsSetCard(0x460) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and s.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,g:GetFirst():GetControler(),LOCATION_SZONE)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToChain(0) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--键★高潮 潮鸣 || K.E.Y Climax - Maree Ruggenti
--Scripted by: XGlitchy30
local s,id=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_END_PHASE)
e1:SetCondition(s.condition)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--place orbs
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_COUNTER)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(s.descon)
e2:SetTarget(s.destg)
e2:SetOperation(s.desop)
c:RegisterEffect(e2)
--register destructions
if not s.global_check then
s.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_DESTROYED)
ge1:SetOperation(s.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function s.chkfilter(c)
if not c:IsReason(REASON_BATTLE+REASON_EFFECT) then return false end
if c:IsPreviousLocation(LOCATION_ONFIELD) then
return c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousTypeOnField()&TYPE_MONSTER>0 and c:IsPreviousSetCard(0x460) and c:GetPreviousAttributeOnField()&ATTRIBUTE_LIGHT>0
else
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x460) and c:IsAttribute(ATTRIBUTE_LIGHT)
end
end
function s.rpchk(c,tp)
return c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==tp
end
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(s.chkfilter,nil)
if #g<=0 then return end
for p=tp,1-tp,1-2*tp do
local ct1=g:FilterCount(Card.IsReason,nil,REASON_BATTLE)
local ct2=g:FilterCount(s.rpchk,nil,p)
if ct1+ct2>0 then
if Duel.GetFlagEffect(p,id)<=0 then
Duel.RegisterFlagEffect(p,id,RESET_PHASE+PHASE_END,0,1,0)
end
Duel.SetFlagEffectLabel(p,id,Duel.GetFlagEffectLabel(p,id)+ct1+ct2)
end
end
end
function s.condition(e,tp)
return Duel.GetCurrentPhase()==PHASE_END and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetFlagEffect(1-tp,id)>0 and Duel.GetFlagEffectLabel(1-tp,id)>0
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local exc=nil
if e:IsHasType(EFFECT_TYPE_ACTIVATE) and not e:GetHandler():IsType(TYPE_EQUIP+TYPE_FIELD+TYPE_CONTINUOUS) and not e:GetHandler():IsHasEffect(EFFECT_REMAIN_FIELD) then exc=e:GetHandler() end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_ONFIELD,0,exc)
local ct=Duel.GetFlagEffectLabel(1-tp,id)
if chk==0 then
if #g<=0 then return false end
local total=0
for tc in aux.Next(g) do
for i=ct-total,1,-1 do
if tc:IsCanAddCounter(0x1460,i) then
total=total+i
break
end
end
if total==ct then
return true
end
end
return false
end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,g,ct,0,0x1460)
end
function s.counterchk(c)
return c:IsCanAddCounter(0x1460,1)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0 then return end
local c=e:GetHandler()
local exc=nil
if c:IsOnField() and c:IsFaceup() and e:IsHasType(EFFECT_TYPE_ACTIVATE) and not c:IsType(TYPE_EQUIP+TYPE_FIELD+TYPE_CONTINUOUS) and not c:IsHasEffect(EFFECT_REMAIN_FIELD) then exc=c end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_ONFIELD,0,exc)
if #g<=0 then return end
local ct=Duel.GetFlagEffectLabel(1-tp,id)
local total=0
for tc in aux.Next(g) do
for chk=ct-total,1,-1 do
if tc:IsCanAddCounter(0x1460,chk) then
total=total+chk
break
end
end
if total==ct then
break
end
end
if total~=ct then return end
for i=1,ct do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER)
local tc=g:FilterSelect(tp,s.counterchk,1,1,nil):GetFirst()
if not tc then return end
tc:AddCounter(0x1460,1)
end
end
function s.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_EFFECT) and c:IsReason(REASON_DESTROY) and rp~=tp and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEDOWN)
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if #g>0 then
Duel.SetOperationInfo(0,CATEGORY_COUNTER,g,#g,0,0x1460)
end
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if #g<=0 then return end
for tc in aux.Next(g) do
if s.counterchk(tc) then
tc:AddCounter(0x1460,1,REASON_EFFECT)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e1:SetValue(s.matlimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
tc:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
tc:RegisterEffect(e3)
local e4=e1:Clone()
e4:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
tc:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_UNRELEASABLE_SUM)
e5:SetValue(1)
e5:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
tc:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetCode(EFFECT_UNRELEASABLE_NONSUM)
tc:RegisterEffect(e6)
end
end
function s.matlimit(e,c)
if not c then return false end
return c:IsLocation(LOCATION_EXTRA)
end
\ No newline at end of file
......@@ -512,6 +512,55 @@ Group.SelectWithSumGreater = function(g,p,f,acc,...)
end
--Glitchylib imports
function Auxiliary.Option(id,tp,desc,...)
local list={...}
local off=1
local ops={}
local opval={}
local truect=1
for ct,b in ipairs(list) do
local check=b
local localid=id
local localdesc=desc+truect-1
if aux.GetValueType(b)=="table" then
check=b[1]
localid=b[2]
localdesc=b[3]
else
truect=truect+1
end
if check==true then
ops[off]=aux.Stringid(localid,localdesc)
opval[off]=ct-1
off=off+1
end
end
local op=Duel.SelectOption(tp,table.unpack(ops))+1
local sel=opval[op]
Duel.Hint(HINT_OPSELECTED,1-tp,ops[op])
return sel
end
function Duel.Attach(c,xyz)
if aux.GetValueType(c)=="Card" then
local og=c:GetOverlayGroup()
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
end
Duel.Overlay(xyz,Group.FromCards(c))
return xyz:GetOverlayGroup():IsContains(c)
elseif aux.GetValueType(c)=="Group" then
for tc in aux.Next(c) do
local og=tc:GetOverlayGroup()
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
end
end
Duel.Overlay(xyz,c)
return c:FilterCount(function (card,group) return group:IsContains(card) end, nil, xyz:GetOverlayGroup())
end
end
function Duel.Negate(tc,e,reset,notfield,forced)
if not reset then reset=0 end
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
......@@ -555,6 +604,9 @@ function Card.HasLevel(c)
end
return false
end
function Card.HasDefense(c)
return not c:IsOriginalType(TYPE_LINK)
end
--EFFECT TABLES
--Global Card Effect Table
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment