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

2024/9/27 新增:古代的机械新卡

parent 45ac46f7
Pipeline #30007 passed with stages
in 10 minutes and 3 seconds
No preview for this file type
local m=120271012
local cm=_G["c"..m]
cm.name="古代的整备场"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.filter(c)
return RD.IsDefense(c,c:GetAttack()) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_MACHINE)
and c:IsAbleToHand()
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)
RD.SendToHandAndExists(g,1-tp)
end)
end
\ No newline at end of file
local m=120271013
local list={120271004,120271007}
local cm=_G["c"..m]
cm.name="古代的机械变速"
function cm.initial_effect(c)
--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(cm.upval)
c:RegisterEffect(e1)
end
--Activate
function cm.target(c,e,tp)
return c:IsControler(tp) and c:IsFaceup() and not RD.IsMaximumMode(c)
and c:GetBaseAttack()==c:GetBaseDefense()
and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_MACHINE)
end
--Atk Up
function cm.upfilter(c)
return c:IsFaceup() and c:IsType(TYPE_NORMAL)
end
function cm.upval(e,c)
local atk=400
local ec=e:GetHandler():GetEquipTarget()
if RD.IsLegendCode(ec,list[1]) and ec:IsCode(list[2]) then atk=atk+600 end
return atk
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