Commit 57acc5f4 authored by TanakaKotoha's avatar TanakaKotoha

daniaozhuanzhuanzhuan

parent 2f6fa930
Pipeline #2516 passed with stage
in 7 minutes and 45 seconds
No preview for this file type
local m=119010
local cm=_G["c"..m]
cm.name="空洞骑士-空洞骑士"
function cm.initial_effect(c)
aux.EnablePendulumAttribute(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_PZONE)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
c:RegisterEffect(e1)
--when pzone
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_PZONE)
e2:SetCondition(cm.spcon)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp)
return bit.band(sumtype,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM
end
function cm.spfilter(c)
return c:IsType(TYPE_PENDULUM) and c:IsFaceup()
end
function cm.sp2filter(c)
return c:IsLocation(LOCATION_DECK) and c:IsType(TYPE_PENDULUM) and c:IsSetCard(0xca1) and not c:IsCode(m)
end
function cm.spcon(e)
local g=Duel.GetMatchingGroup(cm.spfilter,e:GetHandler():GetControler(),LOCATION_PZONE,0,e:GetHandler())
local ag=Duel.GetMatchingGroup(cm.sp2filter,e:GetHandler():GetControler(),LOCATION_DECK,0,nil)
return g:GetCount()~=0 and ag:GetCount()~=0 and (g:GetFirst():GetLeftScale()==e:GetHandler():GetLeftScale() or g:GetFirst():GetLeftScale()==e:GetHandler():GetLeftScale()+1 or g:GetFirst():GetLeftScale()==e:GetHandler():GetLeftScale()-1)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.Destroy(e:GetHandler(),REASON_EFFECT)~=0 and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,0))
local g=Duel.SelectMatchingCard(tp,cm.sp2filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()~=0 then
local tc=g:GetFirst()
Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
end
\ No newline at end of file
local m=119011
local cm=_G["c"..m]
cm.name="空洞骑士"
function cm.initial_effect(c)
aux.EnablePendulumAttribute(c)
--I can't pendulum!
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetRange(LOCATION_PZONE)
e0:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e0:SetTargetRange(1,0)
e0:SetTarget(cm.splimit)
c:RegisterEffect(e0)
--Before I leave PZONE
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_CAL)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,119011)
e1:SetCost(cm.thcost)
e1:SetCondition(cm.thcon)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
--when I can SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,019011)
e2:SetCondition(cm.sdcon)
e2:SetValue(1)
c:RegisterEffect(e2)
--after I SpecialSummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(cm.spcon)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e3)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp)
return bit.band(sumtype,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM
end
function cm.spfilter(c)
return c:IsType(TYPE_PENDULUM) and c:IsFaceup()
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
local ex,ag,x,y,z=Duel.GetOperationInfo(ev,CATEGORY_SPECIAL_SUMMON)
local g=Duel.GetMatchingGroup(cm.spfilter,e:GetHandler():GetControler(),LOCATION_PZONE,0,e:GetHandler())
return ex and ag and ag:IsContains(e:GetHandler()) and (bit.band(z,LOCATION_PZONE)==LOCATION_PZONE or e:GetHandler():IsLocation(LOCATION_PZONE)) and g:GetCount()~=0 and (g:GetFirst():GetLeftScale()==e:GetHandler():GetLeftScale() or g:GetFirst():GetLeftScale()==e:GetHandler():GetLeftScale()+1 or g:GetFirst():GetLeftScale()==e:GetHandler():GetLeftScale()-1)
end
function cm.thfilter(c)
return c:IsSetCard(0xca1) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.c3filter(c)
return c:IsType(TYPE_PENDULUM) and c:IsFaceup()
end
function cm.sdcon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.c3filter,e:GetHandler():GetControler(),LOCATION_PZONE,0,nil)
if g:GetCount()~=2 then return false end
local cc=g:GetFirst()
local lsc=cc:GetLeftScale()
local dc=g:GetNext()
local l2sc=dc:GetLeftScale()
return (lsc==l2sc or lsc==l2sc-1 or lsc==l2sc+1) and Duel.GetLocationCount(e:GetHandler():GetControler(),LOCATION_MZONE)>0
end
function cm.c2filter(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and c:IsLevelBelow(5)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 and Duel.IsExistingMatchingCard(cm.c2filter,e:GetHandler():GetControler(),LOCATION_PZONE,0,1,nil,e,e:GetHandler():GetControler())
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chkc then return chkc:IsLocation(LOCATION_PZONE) and chkc:IsControler(e:GetHandler():GetControler()) end
if chk==0 then return ft>0 and Duel.IsExistingTarget(cm.c2filter,e:GetHandler():GetControler(),LOCATION_PZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(e:GetHandler():GetControler(),cm.c2filter,e:GetHandler():GetControler(),LOCATION_PZONE,0,1,1,nil,e,e:GetHandler():GetControler())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,LOCATION_PZONE)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstTarget()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2,true)
Duel.SpecialSummonComplete()
end
end
\ No newline at end of file
local m=119012
local cm=_G["c"..m]
cm.name="空洞骑士-灵魂与肉体的相联"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,119012+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.c3filter(c)
return c:IsType(TYPE_PENDULUM) and c:IsFaceup()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.c3filter,e:GetHandler():GetControler(),LOCATION_PZONE,0,nil)
if g:GetCount()~=2 then return false end
local cc=g:GetFirst()
local lsc=cc:GetLeftScale()
local dc=g:GetNext()
local l2sc=dc:GetLeftScale()
return lsc==l2sc or lsc==l2sc-1 or lsc==l2sc+1
end
function cm.tgfilter1(c,e,tp)
return c:IsLevelBelow(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.spfilter1(c,e,tp)
return c:IsSetCard(0xca1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local b1=Duel.IsExistingTarget(cm.tgfilter1,tp,LOCATION_PZONE,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_MZONE,0,1,nil,0xca1)
local b2=Duel.IsExistingMatchingCard(cm.spfilter1,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,nil,0xca1)
if chk==0 then return (b1 or b2) and Duel.GetMZoneCount(tp)>0 end
local op=0
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(m,0),aux.Stringid(m,1))
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(m,0))
else
op=Duel.SelectOption(tp,aux.Stringid(m,1))+1
end
e:SetLabel(op)
if op==0 then
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.tgfilter1,tp,LOCATION_PZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,LOCATION_PZONE)
else
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_GRAVE+LOCATION_HAND)
end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==0 then
local tc=Duel.GetFirstTarget()
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
else
local tg=Duel.SelectMatchingCard(tp,cm.spfilter1,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp)
if tg:GetCount()>0 then
Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
--理想融合
function c12009001.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c12009001.target)
e1:SetOperation(c12009001.activate)
c:RegisterEffect(e1)
end
function c12009001.filter0(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToGrave()
end
function c12009001.filter1(c,e)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and not c:IsImmuneToEffect(e)
end
function c12009001.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and not c:IsType(TYPE_EFFECT) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c12009001.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetMatchingGroup(c12009001.filter0,tp,LOCATION_DECK,0,nil)
local res=Duel.IsExistingMatchingCard(c12009001.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c12009001.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c12009001.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local chkf=tp
local mg1=Duel.GetMatchingGroup(c12009001.filter1,tp,LOCATION_DECK,0,nil,e)
local sg1=Duel.GetMatchingGroup(c12009001.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c12009001.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.ConfirmCards(1-tp,mat1)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
Duel.ShuffleDeck(tp)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
e:GetHandler():SetCardTarget(tc)
end
end
\ No newline at end of file
Duel.LoadScript("c12000000.lua")
--对幼小的感情爆发
local m=12055000
local cm=_G["c"..m]
unleashed=unleashed or {}
--summon/spsummon cost
function unleashed.SummonCost(c,ex)
--summon/spsummon cost
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SPSUMMON_COST)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetCost(unleashed.spcost)
e2:SetOperation(unleashed.costop)
c:RegisterEffect(e2)
if not ex then
local e1=e2:Clone()
e1:SetCode(EFFECT_SUMMON_COST)
c:RegisterEffect(e1)
end
return e1 and e2
end
function unleashed.spcost(e,c,tp)
return Duel.GetFlagEffect(tp,12055023)==0 or Duel.IsExistingMatchingCard(Card.IsAbleToDeckAsCost,tp,LOCATION_HAND,0,1,c)
end
function unleashed.costop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c.unleashed_check(e,tp) and Duel.IsExistingMatchingCard(Card.IsAbleToDeckAsCost,tp,LOCATION_HAND,0,1,c) and ( Duel.GetFlagEffect(tp,12055023)~=0 or Duel.SelectYesNo(tp,aux.Stringid(m,0)) ) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local ct=Duel.SelectMatchingCard(tp,Card.IsAbleToDeckAsCost,tp,LOCATION_HAND,0,1,1,c)
if ct and ct:GetCount()>0 then
Duel.SendtoDeck(ct,nil,2,REASON_COST)
Duel.ShuffleDeck(tp)
Duel.RegisterFlagEffect(tp,12055011,RESET_PHASE+PHASE_END,0,1)
--immune
if c.unleashed_cost_operation then
c.unleashed_cost_operation(e,tp,eg,ep,ev,re,r,rp)
end
end
end
end
function unleashed.ignitioneffect(c,cate,des,limit,tg,op)
--remove
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(table.unpack(des)))
e2:SetCategory(cate)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
if limit then
e2:SetCountLimit(table.unpack(limit))
end
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(unleashed.tg)
e2:SetOperation(op)
c:RegisterEffect(e2)
return e2
end
function unleashed.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return c.tgfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c.tgfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
if c.unleashed_Info then c.unleashed_Info(e,tp,eg,ep,ev,re,r,rp,g) end
end
if not cm then return end
cm.named_with_Unleashed=true
function cm.initial_effect(c)
--spsummon
local e0=unleashed.SummonCost(c)
--toeffect
local e1=unleashed.ignitioneffect(c,CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON,{m,1},{1,m},nil,cm.inop)
end
function cm.srfilter(c)
return srre.check_set_Unleashed(c) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.unleashed_check(e,tp)
return Duel.IsExistingMatchingCard(cm.srfilter,tp,LOCATION_DECK,0,1,nil)
end
function cm.unleashed_cost_operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.srfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.tgfilter(c)
return c:IsAbleToGrave() and c:IsType(TYPE_MONSTER)
end
function cm.spfilter(c,e,tp,race,att)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsRace(race) and not c:IsAttribute(att)
end
function cm.inop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local cp=tc:GetControler()
local race=tc:GetRace()
local att=tc:GetAttribute()
if tc:IsRelateToEffect(e) then
Duel.SendtoGrave(tc,REASON_EFFECT)
if Duel.GetLocationCount(cp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.spfilter,cp,LOCATION_GRAVE,0,1,nil,e,tp,race,att) and Duel.SelectYesNo(cp,aux.Stringid(m,2)) then
Duel.Hint(HINT_SELECTMSG,cp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(cp,cm.spfilter,cp,LOCATION_GRAVE,0,1,1,nil,e,tp,race,att)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,cp,false,false,POS_FACEUP)
end
end
end
end
function unleashed_Info(e,tp,eg,ep,ev,re,r,rp,g)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_GRAVE)
end
Duel.LoadScript("c12055000.lua")
--对幼狐神的感情爆发
local m=12055001
local cm=_G["c"..m]
cm.named_with_Unleashed=true
function cm.initial_effect(c)
--spsummon
local e0=unleashed.SummonCost(c)
--toeffect
local e1=unleashed.ignitioneffect(c,CATEGORY_TOGRAVE+CATEGORY_TOHAND,{m,1},{1,m},nil,cm.inop)
end
function unleashed_Info(e,tp,eg,ep,ev,re,r,rp,g)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end
function cm.tgfilter(c)
return c:IsAbleToGrave()
end
function cm.unleashed_check(e,tp)
return e:GetHandler():IsFaceup()
end
function cm.efilter(e,re,tp)
return re:GetHandlerPlayer()~=e:GetHandlerPlayer()
end
function cm.unleashed_cost_operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
e1:SetOwnerPlayer(tp)
e1:SetValue(cm.efilter)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_CANNOT_DISABLE)
e2:SetRange(LOCATION_MZONE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
e2:SetValue(1000)
c:RegisterEffect(e2)
end
function cm.spfilter(c)
return c:IsAbleToHand()
end
function cm.inop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local cp=tc:GetControler()
if tc:IsRelateToEffect(e) then
Duel.SendtoGrave(tc,REASON_EFFECT)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>2 and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(cp,aux.Stringid(m,2)) then
Duel.Hint(HINT_SELECTMSG,cp,HINTMSG_SPSUMMON)
local g=Duel.GetDecktopGroup(tp,2)
Duel.ConfirmDecktop(tp,2)
if g:GetCount()>0 then
local tc=g:Select(cp,1,1,nil)
Duel.SendtoHand(tc,cp,REASON_EFFECT)
end
end
end
end
\ No newline at end of file
Duel.LoadScript("c12055000.lua")
--对幼水龙的感情爆发
local m=12055002
local cm=_G["c"..m]
cm.named_with_Unleashed=true
function cm.initial_effect(c)
--spsummon
local e0=unleashed.SummonCost(c)
--toeffect
local e1=unleashed.ignitioneffect(c,CATEGORY_TOHAND,{m,1},{1,m},nil,cm.inop)
end
function cm.unleashed_check(e,tp)
return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil)
end
function unleashed_Info(e,tp,eg,ep,ev,re,r,rp,g)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function cm.tgfilter(c)
return c:IsAbleToHand()
end
function cm.unleashed_cost_operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
if #g>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
function cm.spfilter(c,e,tp,race,att)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsRace(race) and not c:IsAttribute(att)
end
function cm.inop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local cp=tc:GetControler()
local race=tc:GetRace()
local att=tc:GetAttribute()
if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and Duel.GetLocationCount(cp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.spfilter,cp,LOCATION_HAND,0,1,nil,e,tp,race,att) and Duel.SelectYesNo(cp,aux.Stringid(m,2)) then
Duel.Hint(HINT_SELECTMSG,cp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(cp,cm.spfilter,cp,LOCATION_HAND,0,1,1,nil,e,tp,race,att)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,cp,false,false,POS_FACEUP)
end
end
end
\ No newline at end of file
Duel.LoadScript("c12055000.lua")
--对魔性的感情爆发
local m=12055003
local cm=_G["c"..m]
cm.named_with_Unleashed=true
function cm.initial_effect(c)
--spsummon
local e0=unleashed.SummonCost(c)
--toeffect
local e1=unleashed.ignitioneffect(c,CATEGORY_TODECK,{m,1},{1,m},nil,cm.inop)
end
function cm.unleashed_check(e,tp)
return Duel.IsPlayerCanDraw(tp,1)
end
function unleashed_Info(e,tp,eg,ep,ev,re,r,rp,g)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK)
end
function cm.tgfilter(c)
return c:IsAbleToDeck()
end
function cm.unleashed_cost_operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,1,REASON_EFFECT)
end
function cm.spfilter(c,e,tp,race,att)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and srre.check_set_Unleashed(c)
end
function cm.inop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local cp=tc:GetControler()
if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 and Duel.GetLocationCount(cp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.spfilter,cp,LOCATION_DECK,0,1,nil,e,tp) and Duel.SelectYesNo(cp,aux.Stringid(m,2)) then
Duel.RegisterFlagEffect(tp,12055011,RESET_PHASE+PHASE_END,0,1)
Duel.Hint(HINT_SELECTMSG,cp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(cp,cm.spfilter,cp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
\ No newline at end of file
Duel.LoadScript("c12055000.lua")
--对圣诞装的感情爆发
local m=12055004
local cm=_G["c"..m]
cm.named_with_Unleashed=true
function cm.initial_effect(c)
--spsummon
local e0=unleashed.SummonCost(c)
--toeffect
local e1=unleashed.ignitioneffect(c,CATEGORY_REMOVE,{m,1},{1,m},nil,cm.inop)
end
function cm.unleashed_check(e,tp)
return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,e:GetHandler())
end
function unleashed_Info(e,tp,eg,ep,ev,re,r,rp,g)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK)
end
function cm.tgfilter(c)
return c:IsAbleToRemove()
end
function cm.filter(c)
return srre.check_set_Unleashed(c) and c:IsSummonable(true,nil)
end
function cm.unleashed_cost_operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND,0,1,1,c)
local tc=g:GetFirst()
if tc then
Duel.Summon(tp,tc,true,nil)
end
end
function cm.spfilter(c)
return c:IsAbleToHand()
end
function cm.inop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local cp=tc:GetControler()
if tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_REMOVED,0,1,nil) and Duel.SelectYesNo(cp,aux.Stringid(m,2)) then
Duel.Hint(HINT_SELECTMSG,cp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(cp,cm.spfilter,tp,LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,cp,REASON_EFFECT)
end
end
end
\ No newline at end of file
Duel.LoadScript("c12055000.lua")
--对女仆的感情爆发
local m=12055005
local cm=_G["c"..m]
cm.named_with_Unleashed=true
function cm.initial_effect(c)
--spsummon
local e0=unleashed.SummonCost(c)
--toeffect
local e1=unleashed.ignitioneffect(c,CATEGORY_DISABLE,{m,1},{1,m},nil,cm.inop)
end
function cm.unleashed_check(e,tp)
return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil,e,tp)
end
function unleashed_Info(e,tp,eg,ep,ev,re,r,rp,g)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function cm.tgfilter(c)
return c:IsFaceup() and not c:IsDisabled() and (not c:IsType(TYPE_NORMAL) or c:GetOriginalType()&TYPE_EFFECT~=0)
end
function cm.filter(c,e,tp)
return srre.check_set_Unleashed(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.unleashed_cost_operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
Duel.RegisterFlagEffect(tp,12055023,RESET_PHASE+PHASE_END,0,1)
end
function cm.inop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local cp=tc:GetControler()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsImmuneToEffect(e) then
e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
if Duel.SelectYesNo(cp,aux.Stringid(m,2)) then
Duel.Recover(tp,1000,REASON_EFFECT)
end
end
end
\ No newline at end of file
Duel.LoadScript("c12055000.lua")
--对双翼邪龙的感情爆发
local m=12055006
local cm=_G["c"..m]
cm.named_with_Unleashed=true
function cm.initial_effect(c)
--spsummon
local e0=unleashed.SummonCost(c)
--toeffect
local e1=unleashed.ignitioneffect(c,CATEGORY_ATKCHANGE,{m,1},{1,m},nil,cm.inop)
end
function cm.unleashed_check(e,tp)
return Duel.IsExistingMatchingCard(cm.srfilter,tp,LOCATION_DECK,0,1,nil)
end
function unleashed_Info(e,tp,eg,ep,ev,re,r,rp,g)
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,1,0,0)
end
function cm.tgfilter(c)
return c:IsFaceup()
end
function cm.srfilter(c)
return c:IsCode(12055020)
end
function cm.unleashed_cost_operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.srfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.inop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local cp=tc:GetControler()
local c=e:GetHandler()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:GetAttack()>0 and not tc:IsImmuneToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_SELF_DESTROY)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(cm.dtg)
e2:SetValue(aux.TRUE)
Duel.RegisterEffect(e2,cp)
end
end
function cm.dtg(e,c)
return c:GetAttack()==0 and c:IsFaceup() and not c:IsImmuneToEffect(e)
end
\ No newline at end of file
Duel.LoadScript("c12055000.lua")
--对新年女神的感情爆发
local m=12055010
local cm=_G["c"..m]
cm.named_with_Unleashed=true
function cm.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,cm.mfilter,2,2)
--spsummon
local e0=unleashed.SummonCost(c,1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m)
e2:SetTarget(cm.drtg)
e2:SetOperation(cm.drop)
c:RegisterEffect(e2)
end
function cm.unleashed_check(e,tp)
return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil,e,tp)
end
function cm.mfilter(c)
return srre.check_set_Unleashed(c) and not c:IsType(TYPE_LINK)
end
function cm.filter(c,e,tp)
return srre.check_set_Unleashed(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.unleashed_cost_operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
local tt=Duel.GetFlagEffect(tp,m+1)
if chk==0 then return Duel.IsPlayerCanDraw(tp,tt) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,tt)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local tt=Duel.GetFlagEffect(tp,m+1)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Draw(tp,tt,REASON_EFFECT)
end
\ No newline at end of file
Duel.LoadScript("c12055000.lua")
--对白雪的感情爆发
local m=12055011
local cm=_G["c"..m]
cm.named_with_Unleashed=true
function cm.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,nil,2,99,cm.lcheck)
--spsummon
local e0=unleashed.SummonCost(c,1)
--toeffect
local e1=unleashed.ignitioneffect(c,CATEGORY_TOGRAVE,{m,1},{1,m},nil,cm.inop)
end
function cm.unleashed_check(e,tp)
return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,1,nil)
end
function unleashed_Info(e,tp,eg,ep,ev,re,r,rp,g)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_GRAVE)
end
function cm.mfilter(c)
return srre.check_set_Unleashed(c)
end
function cm.lcheck(g,lc)
return g:IsExists(cm.mfilter(c),1,nil)
end
function cm.unleashed_cost_operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil)
Duel.SendtoGrave(g,REASON_EFFECT)
end
function cm.tgfilter(c)
return c:IsFacedown()
end
function cm.spfilter(c)
return c:IsAbleToHand()
end
function cm.inop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local cp=tc:GetControler()
if tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) and Duel.SelectYesNo(cp,aux.Stringid(m,2)) then
Duel.Hint(HINT_SELECTMSG,cp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(cp,cm.spfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,tp,REASON_EFFECT)
end
end
end
\ No newline at end of file
Duel.LoadScript("c12055000.lua")
--相依的感情爆发
local m=12055020
local cm=_G["c"..m]
cm.named_with_Unleashed=true
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--activate cost
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_ACTIVATE_COST)
e2:SetRange(LOCATION_HAND+LOCATION_DECK+LOCATION_REMOVED+LOCATION_ONFIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetTarget(cm.actarget)
e2:SetCost(unleashed.spcost)
e2:SetOperation(unleashed.costop)
c:RegisterEffect(e2)
end
function cm.actarget(e,te,tp)
return te:GetHandler()==e:GetHandler()
end
function cm.cfilter(c)
return srre.check_set_Unleashed(c) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.unleashed_check(e,tp)
return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,2,nil)
end
function cm.filter(c)
return c:IsCode(m) and c:IsAbleToHand()
end
function cm.unleashed_cost_operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,2,2,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
\ No newline at end of file
--感情爆发的赠物
local m=12055023
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,2))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e3:SetTargetRange(LOCATION_HAND,0)
e3:SetReset(RESET_PHASE+PHASE_END)
e3:SetTarget(cm.eftg)
e3:SetLabelObject(e2)
Duel.RegisterEffect(e3,tp)
Duel.RegisterFlagEffect(tp,12055023,RESET_PHASE+PHASE_END,0,1)
end
function cm.eftg(e,c)
return srre.check_set_Unleashed(c)
end
\ No newline at end of file
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