Commit 42e83f57 authored by Tachibana's avatar Tachibana 🐟

vme50

parent 30f04f8e
Pipeline #27305 passed with stages
in 27 minutes and 33 seconds
No preview for this file type
......@@ -411,11 +411,6 @@
12899006 1 --H.P.T.-
#132
13254073 1 --飞球梦工厂
#139
13959980 0 --2Pick技能-卡名变换
13959981 0 --2Pick技能-融合强化
13959982 0 --2Pick技能-同调强化
13959983 0 --2Pick技能-超量强化
#141
14140010 1 --祝祭初学
14140011 0 --呜喵呜喵·啪啪啪
......
--2Pick技能-卡名变换
--By wyykak
if not c13959997 then
c13959997={}
Duel.LoadScript("c13959997.lua")
end
local tpu=c13959997
local cc=13959980
local this=_G["c"..cc]
function this.initial_effect(c)
local e1=tpu.createSkill(c,cc,3,aux.Stringid(cc,0),false)
e1:SetTarget(this.tg1)
e1:SetOperation(this.op1)
c:RegisterEffect(e1)
local e2=tpu.createSkill(c,cc-10,1,aux.Stringid(cc,1),false)
e2:SetTarget(this.tg2)
e2:SetOperation(this.op2)
e2:SetCategory(CATEGORY_TOHAND)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE|EFFECT_FLAG_SINGLE_RANGE|EFFECT_FLAG_CANNOT_DISABLE|EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_CANNOT_CHANGE_CONTROL)
c:RegisterEffect(e3)
end
function this.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.IsExistingMatchingCard(nil,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,nil)
end
e:SetLabel(Duel.AnnounceCard(tp))
Duel.SetChainLimit(aux.FALSE)
end
function this.op1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,nil):GetFirst()
local ce=Effect.CreateEffect(e:GetHandler())
ce:SetType(EFFECT_TYPE_SINGLE)
ce:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE|EFFECT_FLAG_IGNORE_RANGE|EFFECT_FLAG_UNCOPYABLE|EFFECT_FLAG_CANNOT_DISABLE)
ce:SetCode(EFFECT_CHANGE_CODE)
ce:SetValue(e:GetLabel())
tc:RegisterEffect(ce)
Duel.BreakEffect()
if Duel.SelectYesNo(tp,aux.Stringid(cc,2)) then
Duel.SendtoDeck(tc,tp,2,REASON_EFFECT)
end
end
function this.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.IsPlayerCanSendtoHand(tp) and Duel.GetFieldGroupCount(tp,LOCATION_HAND|LOCATION_ONFIELD,0)>0
end
Duel.SetChainLimit(aux.FALSE)
end
function this.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(Duel.GetFieldGroup(tp,LOCATION_HAND|LOCATION_ONFIELD,0),REASON_EFFECT)
local g=Group.CreateGroup()
for i=1,3 do
g:Merge(Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_DECK|LOCATION_GRAVE,0,nil,Duel.AnnounceCard(tp)))
end
Duel.SendtoHand(g,tp,REASON_EFFECT)
if e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.SelectYesNo(tp,aux.Stringid(cc,3)) then
Duel.BreakEffect()
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
local ce=Effect.CreateEffect(e:GetHandler())
ce:SetType(EFFECT_TYPE_SINGLE)
ce:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE|EFFECT_FLAG_IGNORE_RANGE|EFFECT_FLAG_UNCOPYABLE|EFFECT_FLAG_CANNOT_DISABLE)
ce:SetCode(EFFECT_CHANGE_CODE)
ce:SetValue(Duel.AnnounceCard(tp))
e:GetHandler():RegisterEffect(ce)
end
end
\ No newline at end of file
--2Pick技能-融合强化
--By wyykak
if not c13959997 then
c13959997={}
Duel.LoadScript("c13959997.lua")
end
local tpu=c13959997
local cc=13959981
local this=_G["c"..cc]
function this.initial_effect(c)
local e1=tpu.createSkill(c,cc,3,aux.Stringid(cc,0),false)
e1:SetTarget(this.tg1)
e1:SetCost(this.cost1)
e1:SetOperation(this.op1)
e1:SetCategory(CATEGORY_TOHAND)
c:RegisterEffect(e1)
local e2=tpu.createSkill(c,cc-10,1,aux.Stringid(cc,1),false)
e2:SetCost(this.cost2)
e2:SetTarget(this.tg2)
e2:SetOperation(this.op2)
e2:SetCategory(CATEGORY_TOHAND)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE|EFFECT_FLAG_SINGLE_RANGE|EFFECT_FLAG_CANNOT_DISABLE|EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_CANNOT_CHANGE_CONTROL)
c:RegisterEffect(e3)
end
function this.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.GetLP(tp)>=1000 and Duel.IsExistingMatchingCard(function(c) return c:IsDiscardable() end,tp,LOCATION_HAND,0,1,nil)
end
Duel.PayLPCost(tp,1000)
Duel.SendtoGrave(Duel.SelectMatchingCard(tp,function(c) return c:IsDiscardable() end,tp,LOCATION_HAND,0,1,1,nil),REASON_COST|REASON_DISCARD)
end
function this.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.IsPlayerCanSendtoHand(tp)
end
Duel.SetChainLimit(aux.FALSE)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,0)
end
function this.op1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.CreateToken(tp,24094653)
Duel.SendtoHand(tc,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
function this.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsPosition,tp,LOCATION_EXTRA,0,nil,POS_FACEDOWN)
if chk==0 then
return not g:IsExists(function(c) return c:IsType(TYPE_FUSION) and c:IsType(TYPE_MONSTER) and not c:IsAbleToRemoveAsCost(POS_FACEDOWN) end,1,nil)
end
Duel.Remove(g:Filter(function(c) return not (c:IsType(TYPE_FUSION) and c:IsType(TYPE_MONSTER)) end,nil),POS_FACEDOWN,REASON_COST)
end
function this.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.IsPlayerCanSendtoHand(tp)
end
Duel.SetChainLimit(aux.FALSE)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,0)
end
function this.op2(e,tp,eg,ep,ev,re,r,rp)
getmetatable(e:GetHandler()).announce_filter={0x46,OPCODE_ISSETCARD}
local tc=Duel.CreateToken(tp,Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter)))
Duel.SendtoHand(tc,tp,REASON_EFFECT)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCondition(aux.exccon)
e1:SetCost(this.cost3)
e1:SetTarget(this.tg3)
e1:SetOperation(this.op3)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetDescription(aux.Stringid(cc,3))
tc:RegisterEffect(e1)
end
function this.costfilter3(c)
return c:IsType(TYPE_FUSION) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function this.cost3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.IsExistingMatchingCard(this.costfilter3,tp,LOCATION_GRAVE,0,1,nil)
end
Duel.Remove(Duel.SelectMatchingCard(tp,this.costfilter3,tp,LOCATION_GRAVE,0,1,1,nil),POS_FACEUP,REASON_COST)
end
function this.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return e:GetHandler():IsAbleToHand()
end
Duel.SetChainLimit(aux.FALSE)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,tp,LOCATION_GRAVE)
end
function this.op3(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsLocation(LOCATION_GRAVE) then
Duel.SendtoHand(e:GetHandler(),tp,REASON_EFFECT)
end
end
\ No newline at end of file
--2Pick技能-同调强化
--By wyykak
if not c13959997 then
c13959997={}
Duel.LoadScript("c13959997.lua")
end
local tpu=c13959997
local cc=13959982
local this=_G["c"..cc]
function this.initial_effect(c)
local e1=tpu.createSkill(c,cc,3,aux.Stringid(cc,0),true)
e1:SetTarget(this.tg1)
e1:SetOperation(this.op1)
c:RegisterEffect(e1)
local e2=tpu.createSkill(c,cc-10,1,aux.Stringid(cc,1),false)
e2:SetCost(this.cost2)
e2:SetTarget(this.tg2)
e2:SetOperation(this.op2)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE|EFFECT_FLAG_SINGLE_RANGE|EFFECT_FLAG_CANNOT_DISABLE|EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_CANNOT_CHANGE_CONTROL)
c:RegisterEffect(e3)
end
function this.filter1(c)
return c:IsFaceup() and c:GetLevel()>0
end
function this.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.IsExistingTarget(this.filter1,tp,LOCATION_MZONE,0,1,nil)
end
Duel.SelectTarget(tp,this.filter1,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetChainLimit(aux.FALSE)
end
function this.op1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc or not tc:IsRelateToEffect(e) or not this.filter1(tc) then
return
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE|EFFECT_FLAG_CANNOT_DISABLE|EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(Duel.AnnounceLevel(tp))
e1:SetReset(RESETS_STANDARD)
tc:RegisterEffect(e1)
if not tc:IsType(TYPE_TUNER) and Duel.SelectYesNo(tp,aux.Stringid(cc,2)) then
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE|EFFECT_FLAG_CANNOT_DISABLE|EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_TUNER)
e2:SetReset(RESETS_STANDARD)
tc:RegisterEffect(e2)
end
end
function this.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsPosition,tp,LOCATION_EXTRA,0,nil,POS_FACEDOWN)
if chk==0 then
return not g:IsExists(function(c) return c:IsType(TYPE_SYNCHRO) and c:IsType(TYPE_MONSTER) and not c:IsAbleToRemoveAsCost(POS_FACEDOWN) end,1,nil)
end
Duel.Remove(g:Filter(function(c) return not (c:IsType(TYPE_SYNCHRO) and c:IsType(TYPE_MONSTER)) end,nil),POS_FACEDOWN,REASON_COST)
end
function this.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return true
end
Duel.SetChainLimit(aux.FALSE)
end
function this.op2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,cc)>0 then
return
end
local esp=Effect.CreateEffect(e:GetHandler())
esp:SetType(EFFECT_TYPE_FIELD)
esp:SetCode(EFFECT_SPSUMMON_PROC)
esp:SetDescription(aux.Stringid(cc,3))
esp:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
esp:SetRange(LOCATION_EXTRA)
esp:SetValue(SUMMON_TYPE_SYNCHRO)
esp:SetCondition(this.syncon)
esp:SetOperation(this.synop)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD|EFFECT_TYPE_GRANT)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetTargetRange(LOCATION_EXTRA,0)
e1:SetTarget(function(_,c) return c:IsType(TYPE_SYNCHRO) and c:IsType(TYPE_MONSTER) and not c:IsFaceup() end)
e1:SetLabelObject(esp)
Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,cc,0,0,1)
end
function this.matfilter(c,sc)
return ((c:IsLocation(LOCATION_MZONE) and c:IsFaceup()) or c:IsLocation(LOCATION_HAND)) and c:GetLevel()>0 and c:IsCanBeSynchroMaterial(sc)
end
function this.syncon(e,c,smat,mg,min,max)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local tp=c:GetControler()
local minc=1
local maxc=99
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
end
local rmg=mg
if not mg then
rmg=Duel.GetMatchingGroup(this.matfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,nil,c)
end
if smat then
if this.matfilter(smat,c) and smat:GetLevel()<=c:GetLevel() then
rmg:RemoveCard(smat)
return rmg:CheckWithSumEqual(Card.GetLevel,c:GetLevel()-smat:GetLevel(),minc-1,maxc-1)
else
return false
end
else
return rmg:CheckWithSumEqual(Card.GetLevel,c:GetLevel(),minc,maxc)
end
end
function this.synop(e,tp,eg,ep,ev,re,r,rp,c,smat,mg,min,max)
local tp=c:GetControler()
local minc=1
local maxc=99
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
end
local rmg=mg
if not mg then
rmg=Duel.GetMatchingGroup(this.matfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,nil,c)
end
local mat
if smat then
rmg:RemoveCard(smat)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
mat=rmg:SelectWithSumEqual(tp,Card.GetLevel,c:GetLevel()-smat:GetLevel(),minc-1,maxc-1)
mat:AddCard(smat)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
mat=rmg:SelectWithSumEqual(tp,Card.GetLevel,c:GetLevel(),minc,maxc)
end
c:SetMaterial(mat)
Duel.SendtoGrave(mat,REASON_MATERIAL+REASON_SYNCHRO)
end
\ No newline at end of file
--2Pick技能-超量强化
--By wyykak
if not c13959997 then
c13959997={}
Duel.LoadScript("c13959997.lua")
end
local tpu=c13959997
local cc=13959983
local this=_G["c"..cc]
function this.initial_effect(c)
local e1=tpu.createSkill(c,cc,3,aux.Stringid(cc,0),true)
e1:SetTarget(this.tg1)
e1:SetOperation(this.op1)
c:RegisterEffect(e1)
local e2=tpu.createSkill(c,cc-10,1,aux.Stringid(cc,1),false)
e2:SetCost(this.cost2)
e2:SetTarget(this.tg2)
e2:SetOperation(this.op2)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE|EFFECT_FLAG_SINGLE_RANGE|EFFECT_FLAG_CANNOT_DISABLE|EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_CANNOT_CHANGE_CONTROL)
c:RegisterEffect(e3)
end
function this.filter1(c)
return c:IsFaceup() and c:GetLevel()>0
end
function this.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.IsExistingTarget(this.filter1,tp,LOCATION_MZONE,0,1,nil)
end
Duel.SelectTarget(tp,this.filter1,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetChainLimit(aux.FALSE)
end
function this.op1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc or not tc:IsRelateToEffect(e) or not this.filter1(tc) then
return
end
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
g:ForEach(function(c)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE|EFFECT_FLAG_CANNOT_DISABLE|EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(tc:GetLevel())
e1:SetReset(RESETS_STANDARD)
c:RegisterEffect(e1)
end)
end
function this.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsPosition,tp,LOCATION_EXTRA,0,nil,POS_FACEDOWN)
if chk==0 then
return not g:IsExists(function(c) return c:IsType(TYPE_XYZ) and c:IsType(TYPE_MONSTER) and not c:IsAbleToRemoveAsCost(POS_FACEDOWN) end,1,nil)
end
Duel.Remove(g:Filter(function(c) return not (c:IsType(TYPE_XYZ) and c:IsType(TYPE_MONSTER)) end,nil),POS_FACEDOWN,REASON_COST)
end
function this.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return true
end
Duel.SetChainLimit(aux.FALSE)
end
function this.op2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,cc)>0 then
return
end
local esp=Effect.CreateEffect(e:GetHandler())
esp:SetType(EFFECT_TYPE_FIELD)
esp:SetCode(EFFECT_SPSUMMON_PROC)
esp:SetDescription(aux.Stringid(cc,2))
esp:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
esp:SetRange(LOCATION_EXTRA)
esp:SetValue(SUMMON_TYPE_SYNCHRO)
esp:SetCondition(this.xyzcon)
esp:SetOperation(this.xyzop)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD|EFFECT_TYPE_GRANT)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetTargetRange(LOCATION_EXTRA,0)
e1:SetTarget(function(_,c) return c:IsType(TYPE_XYZ) and c:IsType(TYPE_MONSTER) and not c:IsFaceup() end)
e1:SetLabelObject(esp)
Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,cc,0,0,1)
end
function this.matfilter(c,sc)
return c:IsFaceup() and (c:GetLevel()>0 or c:GetRank()>0) and c:IsCanBeXyzMaterial(sc)
end
function this.matfilter2(c,rk)
return c:IsLevel(rk) or c:IsRank(rk)
end
function this.xyzcon(e,c,og,min,max)
if c==nil then return true end
if min and min>1 then return false end
if max and max<1 then return false end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
if og and not min and #og>1 then return false end
local tp=c:GetControler()
local rmg
if og then
rmg=og
else
rmg=Duel.GetMatchingGroup(this.matfilter,tp,LOCATION_MZONE,0,nil,c)
end
return rmg:IsExists(this.matfilter2,1,nil,c:GetRank())
end
function this.xyzop(e,tp,eg,ep,ev,re,r,rp,c,og,min,max)
local rmg
if og then
rmg=og
else
rmg=Duel.GetMatchingGroup(this.matfilter,tp,LOCATION_MZONE,0,nil,c)
end
local mat=rmg:FilterSelect(tp,this.matfilter2,1,1,nil,c:GetRank())
c:SetMaterial(mat)
Duel.Overlay(c,mat)
end
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
--2pick utilities
local cc=13959997
local this=_G["c"..cc]
function this.initial_effect(c)
end
function this.loadList(fname)
local result={}
local ct=1
for l in io.lines(fname) do
if l:sub(1,1)~="#" and tonumber(l) then
result[ct]=tonumber(l)
ct=ct+1
end
end
return result
end
function this.writeList(t,fname)
local f=io.open(fname,"w")
f:write(table.concat(t,"\n"))
f:flush()
f:close()
end
function this.toSet(t)
local result={}
for _,v in pairs(t) do
local cur=result
for i=1,#tostring(v) do
local c=tostring(v):sub(i,i)
if not cur[tonumber(c)] then
cur[tonumber(c)]={}
end
cur=cur[tonumber(c)]
if i==#tostring(v) then
cur[10]=true
end
end
end
return result
end
function this.toList(s)
local result={}
this.stol(s,result,"")
return result
end
function this.stol(s,t,prefix)
for i=0,9 do
if s[i] then
this.stol(s[i],t,prefix..i)
end
end
if s[10] then
t[#t+1]=tonumber(prefix)
end
end
function this.stostr(s)
local a="a"
local result=""
for i=0,9 do
if s[i] then
result=result..i
result=result..this.stostr(s[i])
result=result..")"
end
end
if s[10] then
result=result.."-"
end
return result
end
function this.dumpSet(s)
local result=this.stostr(s)
local cpr=""
local ct=0
local A="A"
for i=1,#result do
if result:sub(i,i)~=")" then
if ct~=0 then
cpr=cpr..string.char(A:byte()+ct-1)
ct=0
end
if result:sub(i,i)~="-" then
cpr=cpr..result:sub(i,i)
end
else
ct=ct+1
end
end
if ct~=0 then
cpr=cpr..string.char(A:byte()+ct-1)
end
return cpr
end
function this.loadSet(str)
local result={}
local stack={result}
local sp=1
for i=1,#str do
local c=str:sub(i,i)
local A=("A"):byte()
if c:byte()>=A then
stack[sp][10]=true
sp=sp-(c:byte()-A+1)
else
stack[sp][tonumber(c)]={}
stack[sp+1]=stack[sp][tonumber(c)]
sp=sp+1
end
end
return result
end
function this.contains(s,op)
local sop=tostring(op)
local cur=s
local found=false
for i=1,#sop do
if cur[tonumber(sop:sub(i,i))] then
cur=cur[tonumber(sop:sub(i,i))]
else
break
end
if i==#sop and cur[10] then
found=true
end
end
return found
end
function this.add(s,op)
local sop=tostring(op)
local cur=s
for i=1,#sop do
if not cur[tonumber(sop:sub(i,i))] then
cur[tonumber(sop:sub(i,i))]={}
end
cur=cur[tonumber(sop:sub(i,i))]
if i==#sop then
cur[10]=true
end
end
end
function this.del(s,op)
if not this.contains(s,op) then return end
local stack={s}
local sp=1
local sop=tostring(op)
for i=1,#sop do
stack[sp+1]=stack[sp][tonumber(sop:sub(i,i))]
sp=sp+1
end
stack[sp][10]=nil
while sp>1 do
local isEmpty=true
for i=0,10 do
if stack[sp][i] then
isEmpty=false
break
end
end
if isEmpty then
stack[sp-1][tonumber(sop:sub(sp-1,sp-1))]=nil
sp=sp-1
else
break
end
end
end
function this.initSet(s)
s.contains=this.contains
s.add=this.add
s.del=this.del
end
function this.loadCardList(useBanList,ignoreBlackList,clCode)
if not _G["c"..clCode] then
_G["c"..clCode]={}
Duel.LoadScript("c"..clCode..".lua")
if not _G["c"..clCode].Main then
require("expansions/script/c"..clCode) -- Emergency workaround
end
end
local cl=_G["c"..clCode]
local mainList=this.toList(this.loadSet(cl.Main))
local extraList=this.toList(this.loadSet(cl.Extra))
local ml={}
local el={}
local mat={}
local eat={}
for _,v in pairs(mainList) do
local ca=Duel.ReadCard(v,CARDDATA_ALIAS)
if not ca then
Debug.Message("警告!卡片"..v.."不存在,卡表可能需要更新!")
ca=0
end
local dif=ca-v
local real=0
if dif>-10 and dif<10 then
real=ca
else
real=v
end
if not mat[real] then
mat[real]={}
end
mat[real][#mat[real]+1]=v
end
for _,v in pairs(extraList) do
local ca=Duel.ReadCard(v,CARDDATA_ALIAS)
if not ca then
Debug.Message("警告!卡片"..v.."不存在,卡表可能需要更新!")
ca=0
end
local dif=ca-v
local real=0
if dif>-10 and dif<10 then
real=ca
else
real=v
end
if not eat[real] then
eat[real]={}
end
eat[real][#eat[real]+1]=v
end
local bl=this.loadSet(cl.BanList)
local bll=this.loadSet(cl.BlackList)
this.initSet(bl)
this.initSet(bll)
for k,_ in pairs(mat) do
if (ignoreBlackList or not bll:contains(k)) and (not useBanList or not bl:contains(k)) then
ml[#ml+1]=k
end
end
for k,_ in pairs(eat) do
if (ignoreBlackList or not bll:contains(k)) and (not useBanList or not bl:contains(k)) then
el[#el+1]=k
end
end
return ml,el,mat,eat
end
function this.createSkill(c,cc,n,desc,needtg)
local e=Effect.CreateEffect(c)
e:SetType(EFFECT_TYPE_IGNITION)
if not needtg then
e:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE|EFFECT_FLAG_SET_AVAILABLE|EFFECT_FLAG_CANNOT_DISABLE|EFFECT_FLAG_CANNOT_INACTIVATE|EFFECT_FLAG_UNCOPYABLE)
else
e:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE|EFFECT_FLAG_SET_AVAILABLE|EFFECT_FLAG_CANNOT_DISABLE|EFFECT_FLAG_CANNOT_INACTIVATE|EFFECT_FLAG_UNCOPYABLE|EFFECT_FLAG_CARD_TARGET)
end
e:SetRange(LOCATION_DECK|LOCATION_HAND|LOCATION_MZONE|LOCATION_SZONE|LOCATION_GRAVE|LOCATION_REMOVED)
e:SetCountLimit(n,EFFECT_COUNT_CODE_DUEL|cc)
e:SetDescription(desc)
return e
end
\ No newline at end of file
This diff is collapsed.
--青梅竹马·七草一花
local m=33585013
local m=33571011
local cm=_G["c"..m]
function cm.initial_effect(c)
--synchro summon
......
......@@ -45,7 +45,7 @@ function c67200302.setfilter(c)
end
function c67200302.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and and Duel.IsExistingMatchingCard(c67200302.setfilter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(67200302,2)) then
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and Duel.IsExistingMatchingCard(c67200302.setfilter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(67200302,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c67200302.setfilter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,2,nil)
if g:GetCount()>0 then
......
......@@ -23,7 +23,7 @@ function cm.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_DESTROYED)
e1:SetCountLimit(1,m)
e1:SetCondition(cm,thcon)
e1:SetCondition(cm.thcon)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
......
......@@ -33,7 +33,7 @@ end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and Duel.IsExistingMatchingCard(cm.dmgfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then then
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and Duel.IsExistingMatchingCard(cm.dmgfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,cm.dmgfilter,tp,0,LOCATION_MZONE,1,1,nil)
......
......@@ -395,8 +395,7 @@
!counter 0x353 护盾指示物
!counter 0x354 充能指示物
#wyykak 2387062773 139 0xe30-0xe3f
!setname 0xe39 2Pick技能
#wyykak 2387062773 139
#仲村芽衣子 2736617510 141
#named_with_hana 花舞少女
......
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