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
This diff is collapsed.
--键★断片 - 渚正立于坂道之下 || 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
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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