Commit 12fc201c authored by 未闻皂名's avatar 未闻皂名

2024/8/1 新增:暗物质新卡

parent e1f50e28
Pipeline #28824 passed with stages
in 7 minutes and 24 seconds
No preview for this file type
local m=120264004
local cm=_G["c"..m]
cm.name="暗物质人偶·深獾"
function cm.initial_effect(c)
--Special Summon Procedure
RD.AddHandSpecialSummonProcedure(c,aux.Stringid(m,0),cm.spcon)
--Indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetValue(cm.indes)
c:RegisterEffect(e1)
--Atk Up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetCondition(cm.condition)
e2:SetTarget(cm.target)
e2:SetValue(cm.value)
c:RegisterEffect(e2)
--Continuous Effect
RD.AddContinuousEffect(c,e1,e2)
end
--Special Summon Procedure
function cm.spconfilter(c)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_GALAXY)
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spconfilter,tp,LOCATION_GRAVE,0,5,nil)
end
--Indes
function cm.condition(e)
return Duel.IsExistingMatchingCard(Card.IsFacedown,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function cm.target(e,c)
return c:IsPosition(POS_FACEUP_ATTACK) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_GALAXY)
end
function cm.indes(e,c)
return Duel.GetAttackTarget()==c
end
--Atk Up
function cm.value(e,c)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_HAND,0)*300
end
\ No newline at end of file
local m=120264041
local list={120264004,120264005,120261048}
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])
--Change Code
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Change Code
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsAttackPos() and not c:IsCode(list[3])
end
cm.cost=RD.CostSendHandToGrave(Card.IsAbleToGraveAsCost,1,1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local reset=RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN
RD.ChangeCode(e,c,list[3],reset)
local e1=RD.AttachBattleIndes(e,c,1,aux.Stringid(m,1),reset)
e1:SetCondition(cm.indcon)
if Duel.GetMatchingGroupCount(Card.IsFacedown,tp,LOCATION_MZONE,0,nil)==2 then
RD.AttachExtraAttack(e,c,1,aux.Stringid(m,2),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end
end
end
function cm.indcon(e)
return e:GetHandler():IsAttackPos()
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