Commit 50f572c0 authored by Huangnan's avatar Huangnan

delete

parent 4c961645
Pipeline #33353 passed with stage
in 28 minutes and 58 seconds
No preview for this file type
--外婆菜炒肉末木桶饭
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddXyzProcedure(c,nil,4,2,s.ovfilter,aux.Stringid(id,0),2,s.xyzop)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(s.atkval)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(s.defval)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id)
e3:SetCost(s.thcost)
e3:SetTarget(s.thtg)
e3:SetOperation(s.thop)
c:RegisterEffect(e3)
end
function s.ovfilter(c)
return c:IsFaceup() and (c:IsSetCard(0xa6e6) or c:IsType(TYPE_NORMAL))
end
function s.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,id)==0 and Duel.CheckLPCost(tp,600) end
Duel.PayLPCost(tp,600)
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function s.atkval(e,c)
local g=e:GetHandler():GetOverlayGroup():Filter(Card.IsType,nil,TYPE_NORMAL)
return math.ceil(g:GetSum(Card.GetAttack)/2)
end
function s.defval(e,c)
local g=e:GetHandler():GetOverlayGroup():Filter(Card.IsType,nil,TYPE_NORMAL)
return math.ceil(g:GetSum(Card.GetDefense)/2)
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
if e:GetHandler():GetOverlayGroup():IsExists(Card.IsType,1,nil,TYPE_NORMAL) then
e:SetLabel(100)
else
e:SetLabel(0)
end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function s.thfilter(c)
return c:IsType(TYPE_NORMAL) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,g)
if Duel.IsPlayerCanDraw(tp,1) and e:GetLabel()==100
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
\ No newline at end of file
--酸豆角炒鸡胗木桶饭
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddXyzProcedure(c,nil,4,2,s.ovfilter,aux.Stringid(id,0),2,s.xyzop)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(s.atkval)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(s.defval)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id)
e3:SetCost(s.mtcost)
e3:SetTarget(s.mttg)
e3:SetOperation(s.mtop)
c:RegisterEffect(e3)
end
function s.ovfilter(c)
return c:IsFaceup() and (c:IsSetCard(0xa6e6) or c:IsType(TYPE_NORMAL))
end
function s.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,id)==0 and Duel.CheckLPCost(tp,600) end
Duel.PayLPCost(tp,600)
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function s.atkval(e,c)
local g=e:GetHandler():GetOverlayGroup():Filter(Card.IsType,nil,TYPE_NORMAL)
return math.ceil(g:GetSum(Card.GetAttack)/2)
end
function s.defval(e,c)
local g=e:GetHandler():GetOverlayGroup():Filter(Card.IsType,nil,TYPE_NORMAL)
return math.ceil(g:GetSum(Card.GetDefense)/2)
end
function s.mtcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
if e:GetHandler():GetOverlayGroup():IsExists(Card.IsType,1,nil,TYPE_NORMAL) then
e:SetLabel(100)
else
e:SetLabel(0)
end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function s.thfilter(c)
return c:IsType(TYPE_NORMAL) and c:IsAbleToHand()
end
function s.mtfilter(c,e)
return c:IsType(TYPE_NORMAL) and c:IsCanOverlay() and not (e and c:IsImmuneToEffect(e))
end
function s.mttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ)
and Duel.IsExistingMatchingCard(s.mtfilter,tp,LOCATION_DECK,0,1,nil) end
end
function s.mtop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,s.mtfilter,tp,LOCATION_DECK,0,1,1,nil,e)
if g:GetCount()>0 then
Duel.Overlay(c,g)
if Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil)
and e:GetLabel()==100 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if tg:GetCount()>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
end
end
\ No newline at end of file
--麻婆豆腐木桶饭
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddXyzProcedure(c,nil,4,2,s.ovfilter,aux.Stringid(id,0),2,s.xyzop)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(s.atkval)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(s.defval)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id)
e3:SetCost(s.setcost)
e3:SetTarget(s.settg)
e3:SetOperation(s.setop)
c:RegisterEffect(e3)
end
function s.ovfilter(c)
return c:IsFaceup() and (c:IsSetCard(0xa6e6) or c:IsType(TYPE_NORMAL))
end
function s.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,id)==0 and Duel.CheckLPCost(tp,600) end
Duel.PayLPCost(tp,600)
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function s.atkval(e,c)
local g=e:GetHandler():GetOverlayGroup():Filter(Card.IsType,nil,TYPE_NORMAL)
return math.ceil(g:GetSum(Card.GetAttack)/2)
end
function s.defval(e,c)
local g=e:GetHandler():GetOverlayGroup():Filter(Card.IsType,nil,TYPE_NORMAL)
return math.ceil(g:GetSum(Card.GetDefense)/2)
end
function s.setcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
if e:GetHandler():GetOverlayGroup():IsExists(Card.IsType,1,nil,TYPE_NORMAL) then
e:SetLabel(100)
else
e:SetLabel(0)
end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function s.filter(c)
return c:IsSetCard(0xa6e6) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SSet(tp,g:GetFirst())
if e:GetLabel()==100 then
if g:GetFirst():IsType(TYPE_QUICKPLAY) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(id,2))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
g:GetFirst():RegisterEffect(e1)
end
if g:GetFirst():IsType(TYPE_TRAP) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(id,2))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
g:GetFirst():RegisterEffect(e1)
end
end
end
end
\ No newline at end of file
--回锅肉木桶饭
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddXyzProcedure(c,nil,4,3,s.ovfilter,aux.Stringid(id,0),3,s.xyzop)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(s.atkval)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(s.defval)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id)
e3:SetCost(s.spcost)
e3:SetTarget(s.sptg)
e3:SetOperation(s.spop)
c:RegisterEffect(e3)
end
function s.ovfilter(c)
return c:IsFaceup() and (c:IsSetCard(0xa6e6) or c:IsType(TYPE_NORMAL))
end
function s.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,id)==0 and Duel.CheckLPCost(tp,800) end
Duel.PayLPCost(tp,800)
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function s.atkval(e,c)
local g=e:GetHandler():GetOverlayGroup():Filter(Card.IsType,nil,TYPE_NORMAL)
return math.ceil(g:GetSum(Card.GetAttack)/2)
end
function s.defval(e,c)
local g=e:GetHandler():GetOverlayGroup():Filter(Card.IsType,nil,TYPE_NORMAL)
return math.ceil(g:GetSum(Card.GetDefense)/2)
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
if e:GetHandler():GetOverlayGroup():IsExists(Card.IsType,1,nil,TYPE_NORMAL) then
e:SetLabel(100)
else
e:SetLabel(0)
end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function s.spfilter(c,e,tp)
return c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
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 Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function s.mtfilter(c,e)
return c:IsType(TYPE_NORMAL) and c:IsCanOverlay() and not (e and c:IsImmuneToEffect(e))
end
function s.xyzfilter(c,e)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and not c:IsImmuneToEffect(e)
end
function s.spop(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,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0
and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.mtfilter),tp,LOCATION_GRAVE,0,1,nil,e)
and Duel.IsExistingMatchingCard(s.xyzfilter,tp,LOCATION_MZONE,0,1,nil,e)
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
local tc=Duel.SelectMatchingCard(tp,s.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil,e):GetFirst()
local tg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.mtfilter),tp,LOCATION_GRAVE,0,1,1,nil,e)
Duel.Overlay(tc,tg)
end
end
\ No newline at end of file
--宫保鸡丁木桶饭
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddXyzProcedure(c,nil,4,3,s.ovfilter,aux.Stringid(id,0),3,s.xyzop)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(s.atkval)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(s.defval)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id)
e3:SetCost(s.thcost)
e3:SetTarget(s.thtg)
e3:SetOperation(s.thop)
c:RegisterEffect(e3)
end
function s.ovfilter(c)
return c:IsFaceup() and (c:IsSetCard(0xa6e6) or c:IsType(TYPE_NORMAL))
end
function s.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,id)==0 and Duel.CheckLPCost(tp,800) end
Duel.PayLPCost(tp,800)
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function s.atkval(e,c)
local g=e:GetHandler():GetOverlayGroup():Filter(Card.IsType,nil,TYPE_NORMAL)
return math.ceil(g:GetSum(Card.GetAttack)/2)
end
function s.defval(e,c)
local g=e:GetHandler():GetOverlayGroup():Filter(Card.IsType,nil,TYPE_NORMAL)
return math.ceil(g:GetSum(Card.GetDefense)/2)
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
if e:GetHandler():GetOverlayGroup():IsExists(Card.IsType,1,nil,TYPE_NORMAL) then
e:SetLabel(100)
else
e:SetLabel(0)
end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function s.thfilter(c)
return c:IsType(TYPE_NORMAL) and c:IsAbleToHand()
end
function s.thtg(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.thfilter2(c)
return c:IsSetCard(0xa6e6) and c:IsAbleToHand()
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,g)
if Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.thfilter2),tp,LOCATION_GRAVE,0,1,nil)
and e:GetLabel()==100 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter2),tp,LOCATION_GRAVE,0,1,1,nil)
if tg:GetCount()>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
end
end
\ No newline at end of file
--辣椒炒肉木桶饭
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddXyzProcedure(c,nil,4,3,s.ovfilter,aux.Stringid(id,0),3,s.xyzop)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(s.atkval)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(s.defval)
c:RegisterEffect(e2)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(2530830,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1)
e2:SetCost(s.descost)
e2:SetTarget(s.destg)
e2:SetOperation(s.desop)
c:RegisterEffect(e2)
end
function s.ovfilter(c)
return c:IsFaceup() and (c:IsSetCard(0xa6e6) or c:IsType(TYPE_NORMAL))
end
function s.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,id)==0 and Duel.CheckLPCost(tp,800) end
Duel.PayLPCost(tp,800)
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function s.atkval(e,c)
local g=e:GetHandler():GetOverlayGroup():Filter(Card.IsType,nil,TYPE_NORMAL)
return math.ceil(g:GetSum(Card.GetAttack)/2)
end
function s.defval(e,c)
local g=e:GetHandler():GetOverlayGroup():Filter(Card.IsType,nil,TYPE_NORMAL)
return math.ceil(g:GetSum(Card.GetDefense)/2)
end
function s.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
if e:GetHandler():GetOverlayGroup():IsExists(Card.IsType,1,nil,TYPE_NORMAL) then
e:SetLabel(100)
else
e:SetLabel(0)
end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if e:GetLabel()==100 then
Duel.Destroy(tc,REASON_EFFECT,LOCATION_REMOVED)
else
Duel.Destroy(tc,REASON_EFFECT)
end
end
end
\ No newline at end of file
--鱼香肉丝木桶饭
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddXyzProcedure(c,nil,4,3,s.ovfilter,aux.Stringid(id,0),3,s.xyzop)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(s.atkval)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(s.defval)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DIRECT_ATTACK)
e3:SetCondition(s.dacon)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_REMOVE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_BATTLED)
e4:SetCost(s.rmcost)
e4:SetTarget(s.rmtg)
e4:SetOperation(s.rmop)
c:RegisterEffect(e4)
end
function s.ovfilter(c)
return c:IsFaceup() and (c:IsSetCard(0xa6e6) or c:IsType(TYPE_NORMAL))
end
function s.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,id)==0 and Duel.CheckLPCost(tp,800) end
Duel.PayLPCost(tp,800)
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function s.atkval(e,c)
local g=e:GetHandler():GetOverlayGroup():Filter(Card.IsType,nil,TYPE_NORMAL)
return math.ceil(g:GetSum(Card.GetAttack)/2)
end
function s.defval(e,c)
local g=e:GetHandler():GetOverlayGroup():Filter(Card.IsType,nil,TYPE_NORMAL)
return math.ceil(g:GetSum(Card.GetDefense)/2)
end
function s.dacon(e)
return e:GetHandler():GetOverlayGroup():IsExists(Card.IsType,1,nil,TYPE_NORMAL)
end
function s.rmcost(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.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if #sg>0 then
Duel.HintSelection(sg)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
end
\ No newline at end of file
--小炒牛肉木桶饭
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddXyzProcedure(c,nil,4,4,s.ovfilter,aux.Stringid(id,0),4,s.xyzop)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(s.atkval)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(s.defval)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(s.discon)
e3:SetCost(s.discost)
e3:SetTarget(s.distg)
e3:SetOperation(s.disop)
c:RegisterEffect(e3)
end
function s.ovfilter(c)
return c:IsFaceup() and (c:IsSetCard(0xa6e6) or c:IsType(TYPE_NORMAL))
end
function s.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,id)==0 and Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000)
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function s.atkval(e,c)
local g=e:GetHandler():GetOverlayGroup():Filter(Card.IsType,nil,TYPE_NORMAL)
return math.ceil(g:GetSum(Card.GetAttack)/2)
end
function s.defval(e,c)
local g=e:GetHandler():GetOverlayGroup():Filter(Card.IsType,nil,TYPE_NORMAL)
return math.ceil(g:GetSum(Card.GetDefense)/2)
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function s.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
if e:GetHandler():GetOverlayGroup():IsExists(Card.IsType,1,nil,TYPE_NORMAL) then
e:SetLabel(100)
else
e:SetLabel(0)
end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re)
and e:GetLabel()==100 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
end
end
\ No newline at end of file
--红烧肉木桶饭
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddXyzProcedure(c,nil,4,5,s.ovfilter,aux.Stringid(id,0),5,s.xyzop)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(s.atkval)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(s.defval)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_BATTLE_DESTROY_REDIRECT)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1))
e4:SetCategory(CATEGORY_RECOVER)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(EVENT_BATTLE_DESTROYING)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCondition(s.reccon)
e4:SetTarget(s.rectg)
e4:SetOperation(s.recop)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(id,2))
e5:SetCategory(CATEGORY_DESTROY+CATEGORY_RECOVER)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e5:SetCost(s.descost)
e5:SetTarget(s.destg)
e5:SetOperation(s.desop)
c:RegisterEffect(e5)
end
function s.ovfilter(c)
return c:IsFaceup() and (c:IsSetCard(0xa6e6) or c:IsType(TYPE_NORMAL))
end
function s.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,id)==0 and Duel.CheckLPCost(tp,1200) end
Duel.PayLPCost(tp,1200)
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function s.atkval(e,c)
local g=e:GetHandler():GetOverlayGroup():Filter(Card.IsType,nil,TYPE_NORMAL)
return math.ceil(g:GetSum(Card.GetAttack)/2)
end
function s.defval(e,c)
local g=e:GetHandler():GetOverlayGroup():Filter(Card.IsType,nil,TYPE_NORMAL)
return math.ceil(g:GetSum(Card.GetDefense)/2)
end
function s.reccon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local t=Duel.GetAttackTarget()
if ev==1 then t=Duel.GetAttacker() end
if not c:IsRelateToBattle() or c:IsFacedown() then return false end
e:SetLabel(t:GetBaseAttack()+t:GetBaseDefense())
return t:IsType(TYPE_MONSTER)
end
function s.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(e:GetLabel())
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,e:GetLabel())
end
function s.recop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
function s.descost(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.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_ONFIELD)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=1
if c:IsRelateToEffect(e) then
ct=c:GetOverlayGroup():FilterCount(Card.IsType,nil,TYPE_NORMAL)+1
end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=g:Select(tp,1,ct,nil)
Duel.HintSelection(sg)
Duel.Destroy(sg,REASON_EFFECT)
local rg=Duel.GetOperatedGroup():Filter(Card.IsType,nil,TYPE_MONSTER)
local rec=0
for tc in aux.Next(rg) do
rec=rec+tc:GetBaseAttack()+tc:GetBaseDefense()
end
Duel.Recover(tp,rec,REASON_EFFECT)
end
end
\ No newline at end of file
--探店湘赣木桶饭,1人,XXOO
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_FZONE)
e3:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e3:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e3:SetTarget(aux.TargetBoolFunction(Card.IsType,TYPE_NORMAL))
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EFFECT_DESTROY_REPLACE)
e4:SetRange(LOCATION_FZONE)
e4:SetTarget(s.reptg)
e4:SetValue(s.repval)
e4:SetOperation(s.repop)
c:RegisterEffect(e4)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=3 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end
function s.thfilter(c)
return c:IsType(TYPE_NORMAL) and c:IsAbleToHand()
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
Duel.ConfirmDecktop(tp,3)
local g=Duel.GetDecktopGroup(tp,3)
if g:GetCount()>0 then
if g:IsExists(Card.IsType,1,nil,TYPE_NORMAL) then
if g:IsExists(s.thfilter,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:FilterSelect(tp,s.thfilter,1,3,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
Duel.ShuffleHand(tp)
end
end
Duel.ShuffleDeck(tp)
end
end
function s.repfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE)
and (c:IsType(TYPE_NORMAL) or c:IsSetCard(0xa6e6))
and c:IsReason(REASON_EFFECT+REASON_BATTLE)
and not c:IsReason(REASON_REPLACE)
end
function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_EFFECT)
and eg:IsExists(s.repfilter,1,nil,tp) end
if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then
local g=eg:Filter(s.repfilter,nil,tp)
e:SetLabelObject(g)
return true
else return false end
end
function s.repval(e,c)
return c==e:GetLabelObject()
end
function s.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id)
Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_EFFECT)
end
\ No newline at end of file
--老板添个饭!
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(s.target1)
e1:SetOperation(s.activate1)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetTarget(s.target2)
e2:SetOperation(s.activate2)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW+CATEGORY_RECOVER)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetTarget(s.drtg)
e3:SetOperation(s.drop)
c:RegisterEffect(e3)
end
function s.filter(c,e,tp)
return c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function s.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function s.activate1(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,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0 then
local lp=Duel.GetLP(tp)
Duel.SetLP(tp,lp-g:GetFirst():GetBaseDefense())
end
end
function s.mtfilter(c,e)
return c:IsType(TYPE_NORMAL) and c:IsCanOverlay() and not (e and c:IsImmuneToEffect(e))
end
function s.xyzfilter(c,e)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and not c:IsImmuneToEffect(e)
end
function s.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.mtfilter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil,e)
and Duel.IsExistingMatchingCard(s.xyzfilter,tp,LOCATION_MZONE,0,1,nil,e) end
end
function s.activate2(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.mtfilter),tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil,e)
and Duel.IsExistingMatchingCard(s.xyzfilter,tp,LOCATION_MZONE,0,1,nil,e) then
local tc=Duel.SelectMatchingCard(tp,s.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil,e):GetFirst()
if tc then
local tg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.mtfilter),tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil,e)
if tg:GetCount()>0 then
Duel.Overlay(tc,tg)
end
end
end
end
function s.tdfilter(c,e,tp)
return (c:IsType(TYPE_NORMAL) or c:IsSetCard(0xa6e6))
and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.tdfilter(chkc) end
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_GRAVE,0,3,e:GetHandler())
and e:GetHandler():IsAbleToDeck() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_GRAVE,0,3,3,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g+e:GetHandler(),g:GetCount()+1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function s.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if c:IsRelateToEffect(e) then
tg:AddCard(c)
end
if #tg==0 then return end
Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end
local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
if ct>0 then
Duel.BreakEffect()
local rg=g:Filter(Card.IsType,nil,TYPE_MONSTER)
local rec=0
for tc in aux.Next(rg) do
rec=rec+tc:GetBaseDefense()
end
Duel.Recover(tp,rec,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
\ No newline at end of file
--老板送个汤!
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_RECOVER+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,2))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW+CATEGORY_RECOVER)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetTarget(s.drtg)
e2:SetOperation(s.drop)
c:RegisterEffect(e2)
end
function s.cfilter(c)
return c:IsType(TYPE_NORMAL) and not c:IsPublic()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end
end
function s.xyzfilter(c,e)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and not c:IsImmuneToEffect(e)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,g)
local tc=g:GetFirst()
Duel.ShuffleHand(tp)
Duel.Recover(tp,tc:GetBaseAttack(),REASON_EFFECT)
if tc:IsCanOverlay() and not (e and tc:IsImmuneToEffect(e))
and Duel.IsExistingMatchingCard(s.xyzfilter,tp,LOCATION_MZONE,0,1,nil,e)
and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
local xc=Duel.SelectMatchingCard(tp,s.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil,e):GetFirst()
Duel.Overlay(xc,Group.FromCards(tc))
Duel.Draw(tp,1,REASON_EFFECT)
end
end
function s.tdfilter(c,e,tp)
return (c:IsType(TYPE_NORMAL) or c:IsSetCard(0xa6e6))
and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.tdfilter(chkc) end
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_GRAVE,0,3,e:GetHandler())
and e:GetHandler():IsAbleToDeck() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_GRAVE,0,3,3,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g+e:GetHandler(),g:GetCount()+1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function s.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if c:IsRelateToEffect(e) then
tg:AddCard(c)
end
if #tg==0 then return end
Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end
local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
if ct>0 then
Duel.BreakEffect()
local rg=g:Filter(Card.IsType,nil,TYPE_MONSTER)
local rec=0
for tc in aux.Next(rg) do
rec=rec+tc:GetBaseDefense()
end
Duel.Recover(tp,rec,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
\ No newline at end of file
--老板加个菜!
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,id)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,2))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW+CATEGORY_RECOVER)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetTarget(s.drtg)
e2:SetOperation(s.drop)
c:RegisterEffect(e2)
end
function s.mfilter(c)
return c:IsFaceup() and (c:IsSetCard(0xa6e6) or c:IsType(TYPE_NORMAL)) and not c:IsType(TYPE_TOKEN)
end
function s.xyzfilter(c,mg)
return c:IsXyzSummonable(mg)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local g=Duel.GetMatchingGroup(s.mfilter,tp,LOCATION_MZONE,0,nil)
return Duel.IsExistingMatchingCard(s.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,g)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.mfilter,tp,LOCATION_MZONE,0,nil)
local xyzg=Duel.GetMatchingGroup(s.xyzfilter,tp,LOCATION_EXTRA,0,nil,g)
if xyzg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local xyz=xyzg:Select(tp,1,1,nil):GetFirst()
Duel.XyzSummon(tp,xyz,g,1,6)
end
end
function s.tdfilter(c,e,tp)
return (c:IsType(TYPE_NORMAL) or c:IsSetCard(0xa6e6))
and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.tdfilter(chkc) end
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_GRAVE,0,3,e:GetHandler())
and e:GetHandler():IsAbleToDeck() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_GRAVE,0,3,3,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g+e:GetHandler(),g:GetCount()+1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function s.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if c:IsRelateToEffect(e) then
tg:AddCard(c)
end
if #tg==0 then return end
Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end
local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
if ct>0 then
Duel.BreakEffect()
local rg=g:Filter(Card.IsType,nil,TYPE_MONSTER)
local rec=0
for tc in aux.Next(rg) do
rec=rec+tc:GetBaseDefense()
end
Duel.Recover(tp,rec,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
\ No newline at end of file
--老板开个酒!
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_SZONE)
e1:SetTarget(s.mttg)
e1:SetOperation(s.mtop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,2))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW+CATEGORY_RECOVER)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetTarget(s.drtg)
e2:SetOperation(s.drop)
c:RegisterEffect(e2)
end
function s.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x137)
end
function s.mttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(Card.IsCanOverlay,tp,0,LOCATION_MZONE,1,nil)
and Duel.IsExistingTarget(s.mtfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO)
local g=Duel.SelectTarget(tp,Card.IsCanOverlay,tp,0,LOCATION_MZONE,1,1,nil)
e:SetLabelObject(g:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
Duel.SelectTarget(tp,s.mtfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function s.mtop(e,tp,eg,ep,ev,re,r,rp)
local hc=e:GetLabelObject()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tc=g:GetFirst()
if tc==hc then tc=g:GetNext() end
if hc:IsRelateToEffect(e) and hc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsType(TYPE_XYZ) then
local og=hc:GetOverlayGroup()
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
end
Duel.Overlay(tc,Group.FromCards(hc))
end
end
function s.tdfilter(c,e,tp)
return (c:IsType(TYPE_NORMAL) or c:IsSetCard(0xa6e6))
and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.tdfilter(chkc) end
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_GRAVE,0,3,e:GetHandler())
and e:GetHandler():IsAbleToDeck() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_GRAVE,0,3,3,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g+e:GetHandler(),g:GetCount()+1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function s.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if c:IsRelateToEffect(e) then
tg:AddCard(c)
end
if #tg==0 then return end
Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end
local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
if ct>0 then
Duel.BreakEffect()
local rg=g:Filter(Card.IsType,nil,TYPE_MONSTER)
local rec=0
for tc in aux.Next(rg) do
rec=rec+tc:GetBaseDefense()
end
Duel.Recover(tp,rec,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT)
end
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