Commit 1565ad38 authored by Tachibana's avatar Tachibana

ndyd

parent ff3148ab
......@@ -4,8 +4,8 @@ stages:
variables:
GIT_DEPTH: "1"
LAST_UPDATE_DATE: "2021.8.9"
CURRENT_UPDATE_DATE: "2021.8.22"
LAST_UPDATE_DATE: "2021.8.23"
CURRENT_UPDATE_DATE: "2021.8.24"
redtext:
stage: prepare
......
No preview for this file type
expansions/pics/13959998.jpg

52.7 KB | W: | H:

expansions/pics/13959998.jpg

58.8 KB | W: | H:

expansions/pics/13959998.jpg
expansions/pics/13959998.jpg
expansions/pics/13959998.jpg
expansions/pics/13959998.jpg
  • 2-up
  • Swipe
  • Onion skin
--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 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)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
g:ForEach(function(c) 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 source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -240,4 +240,17 @@ function this.loadCardList(useBanList,ignoreBlackList)
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_CANNOT_NEGATE|EFFECT_FLAG_UNCOPYABLE)
else
e:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE|EFFECT_FLAG_SET_AVAILABLE|EFFECT_FLAG_CANNOT_DISABLE|EFFECT_FLAG_CANNOT_INACTIVATE|EFFECT_FLAG_CANNOT_NEGATE|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,cc)
e:SetDescription(desc)
return e
end
\ No newline at end of file
......@@ -9,6 +9,7 @@ local rerollc={76815942,17994645,55863245,44155002,68319538,7391448,75326861,344
this.maincount=40
this.extracount=20
this.useBanList=true
this.skillEnabled=false
this.CardList={}
function this.initial_effect(c)
......@@ -52,7 +53,8 @@ function this.initial_effect(c)
local es9=es7:Clone()
es9:SetCondition(this.con5)
Duel.RegisterEffect(es9,0)
Duel.RegisterFlagEffect(0,cc,0,0,1)
Duel.RegisterFlagEffect(1,cc,0,0,1)
end
end
......@@ -120,11 +122,26 @@ function this.seed3()
return result&0xffffffff
end
function this.saveDeck(tp)
if not this.deckList then
this.deckList={}
this.extraList={}
end
this.deckList[tp]={}
this.extraList[tp]={}
local dl=this.deckList[tp]
local el=this.extraList[tp]
Duel.GetMatchingGroup(function(c) return c:GetOriginalCode()~=cc end,tp,LOCATION_DECK|LOCATION_HAND,0,nil):ForEach(function(c) dl[#dl+1]=c:GetOriginalCode() end)
Duel.GetFieldGroup(tp,LOCATION_EXTRA,0):ForEach(function(c) el[#el+1]=c:GetOriginalCode() end)
end
function this.op(e,tp)
this.isPicking=true
if Duel.GetTurnCount()==1 then
math.randomseed(this.seed3())
end
this.saveDeck(0)
this.saveDeck(1)
Duel.Exile(Duel.GetFieldGroup(0,LOCATION_DECK|LOCATION_EXTRA|LOCATION_HAND,LOCATION_DECK|LOCATION_EXTRA|LOCATION_HAND),REASON_RULE)
if Duel.GetTurnCount()==1 then
this.isTag=Duel.SelectYesNo(0,aux.Stringid(cc,8))
......@@ -144,6 +161,10 @@ function this.op(e,tp)
Debug.Message("仪式强化已启用")
this.ritualEnhance(e:GetHandler())
end
if Duel.SelectYesNo(0,aux.Stringid(13959997,3)) then
this.skillEnabled=true
Debug.Message("技能已启用")
end
if Duel.SelectYesNo(0,aux.Stringid(cc,14)) then
if Duel.SelectYesNo(0,aux.Stringid(13959997,0)) then
this.maincount=Duel.AnnounceLevel(0,1,10)*10
......@@ -153,7 +174,7 @@ function this.op(e,tp)
end
this.useBanList=Duel.SelectYesNo(0,aux.Stringid(13959997,2))
end
this.option=Duel.SelectOption(0,aux.Stringid(cc,0),aux.Stringid(cc,1),aux.Stringid(cc,6),aux.Stringid(cc,7),aux.Stringid(cc,11),aux.Stringid(cc,10))
this.option=Duel.SelectOption(0,aux.Stringid(cc,0),aux.Stringid(cc,1),aux.Stringid(cc,6),aux.Stringid(cc,7),aux.Stringid(cc,11),aux.Stringid(cc,10),aux.Stringid(13959997,4),aux.Stringid(13959997,5))
local n=0
if this.option==0 then
Debug.Message("本局决斗使用2pick规则")
......@@ -181,15 +202,30 @@ function this.op(e,tp)
Duel.Hint(0,HINT_SELECTMSG,aux.Stringid(cc,3))
n=Duel.AnnounceLevel(0)
this.f=function() this.fpick(this.maincount,this.extracount,n) end
elseif this.option==6 then
Debug.Message("本局决斗使用部分随机规则")
n=Duel.AnnounceLevel(0,1,10)
this.f=function() this.partialrandom(n) end
elseif this.option==7 then
Debug.Message("本局决斗使用部分卡组交换规则")
n=Duel.AnnounceLevel(0,1,10)
this.f=function() this.swapmode(n) end
end
end
this.f()
Duel.ConfirmCards(0,Duel.GetFieldGroup(0,LOCATION_DECK,0))
Duel.ConfirmCards(1,Duel.GetFieldGroup(1,LOCATION_DECK,0))
Duel.SelectMatchingCard(0,nil,0,LOCATION_EXTRA,0,0,99,nil)
Duel.SelectMatchingCard(1,nil,1,LOCATION_EXTRA,0,0,99,nil)
if this.skillEnabled then
Duel.SendtoDeck(Duel.CreateToken(0,Duel.AnnounceCard(0,0xe39,OPCODE_ISSETCARD)),0,0,REASON_RULE)
Duel.SendtoDeck(Duel.CreateToken(1,Duel.AnnounceCard(1,0xe39,OPCODE_ISSETCARD)),1,0,REASON_RULE)
end
Duel.ShuffleDeck(0)
Duel.ShuffleDeck(1)
Duel.ShuffleExtra(0)
Duel.ShuffleExtra(1)
if not this.isTag or Duel.GetTurnCount()==5 then
this.isPicking=false
end
......@@ -206,14 +242,6 @@ function this.op(e,tp)
Duel.ResetTimeLimit(1)
end
function this.cardGen(from,count)
local g=Group.CreateGroup()
for i=1,count do
g:AddCard(Duel.CreateToken(0,CardList[from][math.random(1,#CardList[from])]))
end
return g
end
function this.ccGen(from,count)
if not this.CardList.Main then
local ml,el,mat,eat=c13959997.loadCardList(this.useBanList)
......@@ -415,6 +443,37 @@ function this.ritualEnhance(c)
Duel.RegisterEffect(reg,0)
end
function this.ccEnhance(c,n)
local ccop=function(e,tp,eg,ep,ev,re,r,rp)
local tgc=Duel.AnnounceCard(tp)
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(tgc)
e:GetHandler():RegisterEffect(ce)
Duel.BreakEffect()
if Duel.SelectYesNo(tp,aux.Stringid(13959997,5)) then
Duel.SendtoDeck(e:GetHandler(),tp,2,REASON_EFFECT)
end
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetDescription(aux.Stringid(13959997,4))
e1:SetRange(LOCATION_ONFIELD|LOCATION_HAND)
e1:SetCountLimit(n,13959998|EFFECT_COUNT_CODE_DUEL)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE|EFFECT_FLAG_UNCOPYABLE|EFFECT_FLAG_CANNOT_DISABLE)
e1:SetOperation(ccop)
local reg=Effect.CreateEffect(c)
reg:SetType(EFFECT_TYPE_FIELD|EFFECT_TYPE_GRANT)
reg:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE|EFFECT_FLAG_IGNORE_RANGE)
reg:SetTargetRange(0xff,0xff)
reg:SetTarget(aux.TRUE)
reg:SetLabelObject(e1)
Duel.RegisterEffect(reg,0)
end
function this.npick(mainc,extrac,n)
local count=0
......@@ -648,4 +707,106 @@ function this.reroll(tp)
Duel.Draw(tp,#g-1,REASON_RULE)
ct=ct-1
end
end
function this.picrandom(g)
if not this.CardList.Main then
local ml,el,mat,eat=c13959997.loadCardList(this.useBanList)
this.CardList.Main=ml
this.CardList.Extra=el
this.CardList.MainAliasTable=mat
this.CardList.ExtraAliasTable=eat
end
local rg={}
for _,v in pairs(g) do
if this.CardList.MainAliasTable[v] then
local at=this.CardList.MainAliasTable
rg[#rg+1]=at[v][math.random(1,#at[v])]
elseif this.CardList.ExtraAliasTable[v] then
local at=this.CardList.ExtraAliasTable
rg[#rg+1]=at[v][math.random(1,#at[v])]
else
rg[#rg+1]=v
end
end
return rg
end
function this.sample(g,ct)
local cct=#g
local rg={}
local remains={}
for i=1,ct do
if i>cct then
break
end
local idx=math.random(1,cct-i+1)
rg[#rg+1]=g[idx]
if idx<cct-i+1 then
g[idx]=g[cct-i+1]
end
end
for i=1,cct-ct do
remains[i]=g[i]
end
return rg,remains
end
function this.partialrandom(n)
for i=0,1 do
Duel.SelectYesNo(i,aux.Stringid(cc,15))
local mg=Group.CreateGroup()
local eg=Group.CreateGroup()
local mc=math.floor(#this.deckList[i]*n/10)
local ec=math.floor(#this.extraList[i]*n/10)
for _,v in pairs(this.picrandom(this.sample(this.deckList[i],mc))) do
mg:AddCard(Duel.CreateToken(i,v))
end
for _,v in pairs(this.ccGen("Main",#this.deckList[i]-mc)) do
mg:AddCard(Duel.CreateToken(i,v))
end
Duel.SendtoDeck(mg,i,0,REASON_RULE)
for _,v in pairs(this.picrandom(this.sample(this.extraList[i],ec))) do
eg:AddCard(Duel.CreateToken(i,v))
end
for _,v in pairs(this.ccGen("Extra",#this.extraList[i]-ec)) do
eg:AddCard(Duel.CreateToken(i,v))
end
Duel.SendtoDeck(eg,i,0,REASON_RULE)
mg:DeleteGroup()
eg:DeleteGroup()
Duel.SelectYesNo(i,aux.Stringid(cc,15))
end
end
function this.swapmode(n)
local mg={}
local eg={}
mg[0]=Group.CreateGroup()
mg[1]=Group.CreateGroup()
eg[0]=Group.CreateGroup()
eg[1]=Group.CreateGroup()
for i=0,1 do
local mcg,mcgr=this.sample(this.deckList[i],math.floor(#this.deckList[i]*n/10))
local ecg,ecgr=this.sample(this.extraList[i],math.floor(#this.extraList[i]*n/10))
for _,v in pairs(mcg) do
mg[1-i]:AddCard(Duel.CreateToken(1-i,v))
end
for _,v in pairs(mcgr) do
mg[i]:AddCard(Duel.CreateToken(i,v))
end
for _,v in pairs(ecg) do
eg[1-i]:AddCard(Duel.CreateToken(1-i,v))
end
for _,v in pairs(ecgr) do
eg[i]:AddCard(Duel.CreateToken(i,v))
end
end
for i=0,1 do
Duel.SelectYesNo(i,aux.Stringid(cc,15))
Duel.SendtoDeck(mg[i],i,0,REASON_RULE)
Duel.SendtoDeck(eg[i],i,0,REASON_RULE)
Duel.SelectYesNo(i,aux.Stringid(cc,15))
end
end
\ No newline at end of file
......@@ -13,7 +13,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e1)
end
function cm.spfilter(c,e,tp,mc)
if Duel.GetLocationCountFromEx(tp,tp,mc,c)<1 then return false end
if Duel.GetMZoneCount(tp,mc,tp)<1 then return false end
if c:IsCode(33502900) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) then
return true
elseif c:IsCode(33502908) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then
......
......@@ -323,6 +323,9 @@
!setname 0x2ec7 琴叶葵
!counter 0x1ec1 因缘指示物
#wyykak 2387062773 139 0xe30-0xe3f
!setname 0xe39 2Pick技能
#佚之鱼Justfish 576670569 140 0x400-0x40f
!setname 0x1406 影魔
#named_with_Arcalling 天之音
......
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