Commit c0cf03b2 authored by 未闻皂名's avatar 未闻皂名

2023/12/1 新增:名蔷薇新卡

parent b1f96ae6
Pipeline #24218 passed with stages
in 25 minutes and 16 seconds
No preview for this file type
local m=120254022
local cm=_G["c"..m]
cm.name="名流释放"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.confilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_SPELLCASTER)
end
function cm.costfilter1(c)
return c:IsFaceup() and c:IsType(TYPE_EQUIP) and c:IsAbleToDeckOrExtraAsCost()
end
function cm.costfilter2(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToDeckOrExtraAsCost()
end
function cm.filter(c)
return c:IsAttackPos() and c:IsAbleToHand()
end
function cm.costcheck(g)
return RD.GroupAllCount(g,Card.IsLocation,1,LOCATION_ONFIELD)
or RD.GroupAllCount(g,Card.IsLocation,4,LOCATION_GRAVE)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp)
and Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local g1=Duel.GetMatchingGroup(cm.costfilter1,tp,LOCATION_ONFIELD,0,nil)
local g2=Duel.GetMatchingGroup(cm.costfilter2,tp,LOCATION_GRAVE,0,nil)
if chk==0 then return g1:GetCount()>0 or g2:GetCount()>3 end
local sg
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
if g1:GetCount()<1 then
sg=g2:Select(tp,4,4,nil)
elseif g2:GetCount()<4 then
sg=g1:Select(tp,1,1,nil)
else
g1:Merge(g2)
sg=g1:SelectSubGroup(tp,cm.costcheck,false,1,4)
end
Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_RTOHAND,cm.filter,tp,0,LOCATION_MZONE,1,3,nil,function(g)
RD.SendToOpponentHand(g)
end)
end
\ No newline at end of file
local m=120254050
local list={120196050}
local cm=_G["c"..m]
cm.name="名蔷薇附魔师"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Special Summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON+CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Special Summon
function cm.spfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_SPELLCASTER)
and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP_DEFENSE)
end
function cm.exfilter(c)
return c:IsLevelAbove(5)
end
function cm.thfilter(c)
return c:IsCode(list[1]) and c:IsAbleToHand()
end
cm.cost=RD.CostSendHandToDeckBottom(Card.IsAbleToDeckAsCost,2,2,false)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP_DEFENSE)~=0
and RD.IsOperatedGroupExists(cm.exfilter,1,nil) then
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,function(sg)
RD.SendToHandAndExists(sg,1-tp)
end)
end
end
\ No newline at end of file
local m=120254086
local list={120218008}
local cm=_G["c"..m]
cm.name="名战刃死狂"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Activate
RD.RegisterEquipEffect(c,nil,nil,cm.target)
--Atk Up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(400)
c:RegisterEffect(e1)
--Pierce
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_PIERCE)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetTarget(cm.prctg)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
--Fusion Code
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_ADD_FUSION_CODE)
e4:SetCondition(cm.fuscon)
e4:SetValue(list[1])
c:RegisterEffect(e4)
end
--Activate
function cm.target(c,e,tp)
return c:IsControler(tp) and c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_SPELLCASTER)
end
--Pierce
function cm.prctg(e,c)
return c==e:GetHandler():GetEquipTarget()
end
--Fusion Code
function cm.fusfilter(c)
return c:IsCode(list[1])
end
function cm.fuscon(e)
return Duel.IsExistingMatchingCard(cm.fusfilter,e:GetHandlerPlayer(),LOCATION_GRAVE,0,1,nil)
end
\ No newline at end of file
local m=120254087
local list={120218007}
local cm=_G["c"..m]
cm.name="名战袍死风"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Activate
RD.RegisterEquipEffect(c,nil,nil,cm.target)
--Atk Up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(400)
c:RegisterEffect(e1)
--Indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetValue(cm.indval)
c:RegisterEffect(e2)
--Fusion Code
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_ADD_FUSION_CODE)
e3:SetCondition(cm.fuscon)
e3:SetValue(list[1])
c:RegisterEffect(e3)
end
--Activate
function cm.target(c,e,tp)
return c:IsControler(tp) and c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_SPELLCASTER)
end
--Indes
cm.indval=RD.ValueEffectIndesType(0,TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP,true)
--Fusion Code
function cm.fusfilter(c)
return c:IsCode(list[1])
end
function cm.fuscon(e)
return Duel.IsExistingMatchingCard(cm.fusfilter,e:GetHandlerPlayer(),LOCATION_GRAVE,0,1,nil)
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