Commit 7bc7eb81 authored by 未闻皂名's avatar 未闻皂名

2022/5/14 新增:超魔辉兽 大霸道王,噩梦再临

parent 00c3ad54
Pipeline #12713 passed with stages
in 5 minutes and 46 seconds
No preview for this file type
No preview for this file type
local m=120217001
local cm=_G["c"..m]
cm.name="超魔辉兽 大霸道王[L]"
function cm.initial_effect(c)
--Atk Up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_XMATERIAL)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetCondition(RD.MaximumMode)
e1:SetValue(cm.atkval)
c:RegisterEffect(e1)
--Pierce
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_XMATERIAL)
e2:SetCode(EFFECT_PIERCE)
e2:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e2:SetCondition(cm.prccon)
c:RegisterEffect(e2)
end
--Atk Up
function cm.atkval(e,c)
return Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)*500
end
--Pierce
function cm.prccon(e)
return RD.MaximumMode(e)
and Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_GRAVE,0,10,nil,TYPE_MONSTER)
end
\ No newline at end of file
local m=120217002
local list={120217001,120217003}
local cm=_G["c"..m]
cm.name="超魔辉兽 大霸道王"
function cm.initial_effect(c)
aux.AddCodeList(c,list[1],list[2])
--Maximum Summon
RD.AddMaximumProcedure(c,3500,list[1],list[2])
--Indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(RD.MaximumMode)
e1:SetValue(cm.indval)
c:RegisterEffect(e1)
end
--Indes
cm.indval=RD.ValueEffectIndesType(0,TYPE_TRAP)
\ No newline at end of file
local m=120217003
local cm=_G["c"..m]
cm.name="超魔辉兽 大霸道王[R]"
function cm.initial_effect(c)
--Activate Limit
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,1)
e1:SetCondition(cm.actcon)
e1:SetValue(cm.actlimit)
c:RegisterEffect(e1)
--Special Summon Check
if not cm.global_check then
cm.global_check=true
local ge=Effect.CreateEffect(c)
ge:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge:SetCode(EVENT_SPSUMMON_SUCCESS)
ge:SetOperation(cm.spcheckop)
Duel.RegisterEffect(ge,0)
end
end
--Activate Limit
function cm.actcon(e)
return RD.MaximumMode(e) and Duel.GetFlagEffect(1-e:GetHandlerPlayer(),m)~=0
end
function cm.actlimit(e,re,tp)
local tc=re:GetHandler()
return tc:IsLocation(LOCATION_MZONE) and tc:IsFaceup() and tc:IsLevelBelow(10) and re:IsActiveType(TYPE_MONSTER)
end
--Special Summon Check
function cm.spfilter(c,tp)
return c:IsSummonPlayer(tp) and c:IsFaceup() and c:IsLevelAbove(5)
end
function cm.spcheckop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(0,m)==0 and eg:IsExists(cm.spfilter,1,nil,0) then
Duel.RegisterFlagEffect(0,m,RESET_PHASE+PHASE_END,0,1)
end
if Duel.GetFlagEffect(1,m)==0 and eg:IsExists(cm.spfilter,1,nil,1) then
Duel.RegisterFlagEffect(1,m,RESET_PHASE+PHASE_END,0,1)
end
end
\ No newline at end of file
local m=120217099
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 c:IsAttribute(ATTRIBUTE_DARK) and c:IsDefense(0) 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,2,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,2,2,nil,function(g)
RD.SendToHandAndExists(g,1-tp)
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