Commit 8c115be2 authored by 未闻皂名's avatar 未闻皂名

2022/12/25 新增:穿越侍道·线性海牛侍,大道武器-剑破坏者,BACK TO THE☆融合术

parent e75b901e
No preview for this file type
No preview for this file type
local m=120235030
local list={120209001,120105001}
local cm=_G["c"..m]
cm.name="穿越侍道·线性海牛侍"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Fusion Material
RD.AddFusionProcedure(c,list[1],list[2])
--Special Summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON+CATEGORY_ATKCHANGE)
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:IsType(TYPE_NORMAL) and c:IsRace(RACE_GALAXY) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.filter(c)
return c:IsFaceup() and c:IsRace(RACE_GALAXY)
end
function cm.exfilter(c)
return c:IsType(TYPE_MONSTER)
end
cm.cost=RD.CostSendDeckTopToGrave(1)
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)~=0 then
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_MZONE,0,nil)
local ag=Duel.GetMatchingGroup(cm.exfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil)
local atk=ag:GetClassCount(Card.GetAttribute)*300
if g:GetCount()>0 and atk~=0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
g:ForEach(function(tc)
RD.AttachAtkDef(e,tc,atk,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end)
end
end
end
\ No newline at end of file
local m=120235045
local list={120105001}
local cm=_G["c"..m]
cm.name="大道武器-剑破坏者"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Activate
RD.RegisterEquipEffect(c,cm.condition,nil,cm.target)
--Atk Up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(cm.upval)
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)
end
--Activate
function cm.confilter(c)
return c:IsFaceup() and c:IsCode(m)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler())
end
function cm.target(c,e,tp)
return c:IsControler(tp) and c:IsFaceup() and c:IsCode(list[1])
end
--Atk Up
function cm.upfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EQUIP) and c:GetEquipTarget()~=nil
end
function cm.upval(e,c)
return Duel.GetMatchingGroupCount(cm.upfilter,0,LOCATION_SZONE,LOCATION_SZONE,nil)*1000
end
--Indes
cm.indval=RD.ValueEffectIndesType(0,TYPE_TRAP,true)
\ No newline at end of file
local m=120235047
local list={120196050}
local cm=_G["c"..m]
cm.name="BACK TO THE☆融合术"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.filter(c)
return c:IsCode(list[1]) and c:IsAbleToHand()
end
function cm.thfilter(c,tp)
return c:IsType(TYPE_NORMAL) and c:IsAbleToHand()
and Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_GRAVE,0,1,c,c)
end
function cm.exfilter(c,tc)
return c:IsType(TYPE_NORMAL) and RD.IsSameCode(c,tc)
end
function cm.check(g)
return g:GetCount()==2 and RD.IsSameCode(g:GetFirst(),g:GetNext())
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
return g:CheckSubGroup(cm.check,2,2)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.filter),tp,LOCATION_GRAVE,0,1,1,nil,function(g)
if RD.SendToHandAndExists(g,1-tp) then
local filter=aux.NecroValleyFilter(RD.Filter(cm.thfilter,tp))
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_ATOHAND,filter,tp,LOCATION_GRAVE,0,1,1,nil,function(sg)
RD.SendToHandAndExists(sg,1-tp)
end)
end
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