Commit 003e3394 authored by 未闻皂名's avatar 未闻皂名

2024/7/15 新增:英雄新卡

parent fac9d487
Pipeline #28418 passed with stages
in 12 minutes and 40 seconds
No preview for this file type
No preview for this file type
local m=120218010
local list={120105001}
local cm=_G["c"..m]
cm.name="七星惧魔术师"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Change Code
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
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.filter(c)
return c:IsType(TYPE_MONSTER)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsCode(list[1])
end
cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
RD.ChangeCode(e,c,list[1],RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_GRAVE,0,nil)
local atk=g:GetClassCount(Card.GetAttribute)*300
if atk==0 then return end
RD.CanSelectAndDoAction(aux.Stringid(m,1),aux.Stringid(m,2),Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil,function(g)
Duel.BreakEffect()
RD.AttachAtkDef(e,g:GetFirst(),-atk,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end)
end
end
\ No newline at end of file
local m=120264000
local list={120263001,120263005}
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])
--Only Fusion Summon
RD.OnlyFusionSummon(c)
--Atk Up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(cm.atkval)
c:RegisterEffect(e1)
--Damage
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetCondition(cm.damcon)
e2:SetOperation(cm.damop)
c:RegisterEffect(e2)
--Continuous Effect
RD.AddContinuousEffect(c,e1,e2)
end
--Atk Up
function cm.filter(c)
return c:IsRace(RACE_WARRIOR)
end
function cm.atkval(e,c)
return Duel.GetMatchingGroupCount(cm.filter,c:GetControler(),LOCATION_GRAVE,0,nil)*300
end
--Damage
function cm.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER)
end
function cm.damop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetBattleTarget()
if tc then
local dam=tc:GetBaseAttack()
if dam<0 then dam=0 end
Duel.Hint(HINT_CARD,0,m)
Duel.Damage(1-tp,dam,REASON_EFFECT)
end
end
\ No newline at end of file
local m=120264017
local cm=_G["c"..m]
cm.name="新空间侠·水波海豚"
function cm.initial_effect(c)
--To Grave
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DAMAGE)
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
--To Grave
cm.cost=RD.CostSendHandToGrave(Card.IsAbleToGraveAsCost,1,1)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
if g:GetCount()>0 then
Duel.ConfirmCards(tp,g)
local mg=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
if mg:GetCount()==0 then return end
local _,atk=mg:GetMaxGroup(Card.GetAttack)
local filter=function(c)
return c:IsAttackBelow(atk) and c:IsAbleToGrave()
end
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_TOGRAVE,filter,0,LOCATION_HAND,1,1,function(sg)
if RD.SendToGraveAndExists(sg) then
Duel.Damage(1-tp,500,REASON_EFFECT)
end
end)
Duel.ShuffleHand(1-tp)
end
end
\ No newline at end of file
local m=120264018
local cm=_G["c"..m]
cm.name="新空间侠·火焰甲虫"
function cm.initial_effect(c)
--Atk Up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(cm.atkval)
c:RegisterEffect(e1)
--Continuous Effect
RD.AddContinuousEffect(c,e1)
end
--Atk Up
function cm.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function cm.atkval(e,c)
return Duel.GetMatchingGroupCount(cm.filter,c:GetControler(),0,LOCATION_ONFIELD,nil)*400
end
\ No newline at end of file
local m=120264020
local list={120263010,120264021}
local cm=_G["c"..m]
cm.name="锐进英雄 钛刀侠"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--To Hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(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
--To Hand
function cm.thfilter(c)
return c:IsCode(list[1],list[2]) and c:IsAbleToHand()
end
cm.cost=RD.CostSendHandToDeckBottom(Card.IsAbleToDeckAsCost,1,1,false)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,function(g)
RD.SendToHandAndExists(g,1-tp)
end)
end
\ No newline at end of file
local m=120264021
local cm=_G["c"..m]
cm.name="锐进英雄 钽克侠"
function cm.initial_effect(c)
--Atk Up
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(cm.cost)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Atk Up
function cm.exfilter(c)
return c:IsFaceup() and c:IsType(TYPE_FUSION) and c:IsRace(RACE_WARRIOR)
end
function cm.thfilter(c)
return c:IsFaceup() and c:IsLevelBelow(8) and c:IsAbleToHand()
end
cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
RD.AttachAtkDef(e,c,400,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
if Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_MZONE,0,1,nil) then
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_RTOHAND,cm.thfilter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
RD.SendToOpponentHand(g)
end)
end
end
end
\ No newline at end of file
local m=120264065
local list={120263004,120264017}
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])
--Contact Fusion
RD.EnableContactFusion(c,aux.Stringid(m,0))
--Destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Destroy
function cm.filter(c)
return c:IsFaceup() and c:IsLevelBelow(9)
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_DESTROY,g,1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_DESTROY,cm.filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
Duel.Destroy(g,REASON_EFFECT)
end)
end
\ No newline at end of file
local m=120264066
local list={120263004,120264018}
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])
--Contact Fusion
RD.EnableContactFusion(c,aux.Stringid(m,0))
--Atk Up
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(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
--Atk Up
cm.cost=RD.CostSendDeckTopToGrave(2)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)>0 end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local atk=Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)*200
RD.AttachAtkDef(e,c,atk,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_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