Commit 6b3c6485 authored by 未闻皂名's avatar 未闻皂名

2025/1/20 新增:魔力动物新卡

parent 09e239aa
Pipeline #32690 passed with stages
in 9 minutes and 37 seconds
No preview for this file type
local m=120277026
local list={120277056,120277057}
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+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
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
function cm.exfilter(c)
return c:IsLocation(LOCATION_HAND)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return RD.IsSummonTurn(c) or RD.IsSpecialSummonTurn(c)
end
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
local g=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_GRAVE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectGroupAndDoAction(HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),aux.dncheck,tp,LOCATION_GRAVE,0,1,2,nil,function(g)
if RD.SendToHandAndExists(g,1-tp,cm.exfilter,2,nil) then
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsControler(tp) then
Duel.SendtoGrave(c,REASON_EFFECT)
end
end
end)
end
\ No newline at end of file
local m=120277027
local cm=_G["c"..m]
cm.name="魔力动物守卫"
function cm.initial_effect(c)
--Discard Deck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DECKDES+CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Discard Deck
function cm.thfilter(c)
return c:IsLevel(7,8) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_BEAST)
and RD.IsDefenseAbove(c,1500) and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return RD.IsSummonTurn(c) or RD.IsSpecialSummonTurn(c)
end
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.IsPlayerCanDiscardDeck(tp,3) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if RD.SendDeckTopToGraveAndExists(tp,3) then
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,function(g)
Duel.BreakEffect()
RD.SendToHandAndExists(g,1-tp)
end)
end
end
\ No newline at end of file
local m=120277028
local cm=_G["c"..m]
cm.name="魔力动物巫师"
function cm.initial_effect(c)
--Atk & Def Up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(cm.target1)
e1:SetValue(400)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
--Pierce
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_PIERCE)
e3:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(cm.target1)
c:RegisterEffect(e3)
--Level Up
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_UPDATE_LEVEL)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetTarget(cm.target2)
e4:SetValue(2)
c:RegisterEffect(e4)
--Continuous Effect
RD.AddContinuousEffect(c,e1,e2,e3,e4)
end
--Atk & Def Up
function cm.target1(e,c)
return c:IsFaceup() and c:IsRace(RACE_BEAST)
end
--Level Up
function cm.target2(e,c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_BEAST)
end
\ No newline at end of file
local m=120277029
local cm=_G["c"..m]
cm.name="魔力动物骑士"
function cm.initial_effect(c)
--Indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(cm.target1)
e1:SetValue(cm.indval)
c:RegisterEffect(e1)
--Level Up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_LEVEL)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(cm.target2)
e2:SetValue(2)
c:RegisterEffect(e2)
--Continuous Effect
RD.AddContinuousEffect(c,e1,e2)
end
--Indes
cm.indval=RD.ValueEffectIndesType(0,TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP,true)
function cm.target1(e,c)
return c:IsFaceup() and c:IsRace(RACE_BEAST)
end
--Level Up
function cm.target2(e,c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_BEAST)
end
\ No newline at end of file
local m=120277030
local cm=_G["c"..m]
cm.name="魔力动物双剑士"
function cm.initial_effect(c)
--Cannot Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.limcon)
e1:SetOperation(cm.limop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--Level Up
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_UPDATE_LEVEL)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(cm.target)
e3:SetValue(2)
c:RegisterEffect(e3)
--Continuous Effect
RD.AddContinuousEffect(c,e1,e2,e3)
end
--Cannot Activate
function cm.limfilter(c,tp)
return c:IsFaceup() and c:IsSummonPlayer(tp) and c:IsRace(RACE_BEAST)
end
function cm.limcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.limfilter,1,nil,tp)
end
function cm.limop(e,tp,eg,ep,ev,re,r,rp)
Duel.SetChainLimitTillChainEnd(cm.chainlm)
end
function cm.chainlm(e,ep,tp)
return ep~=tp and e:GetHandler():IsType(TYPE_TRAP) and e:IsHasType(EFFECT_TYPE_ACTIVATE)
end
--Level Up
function cm.target(e,c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_BEAST)
end
\ No newline at end of file
local m=120277031
local cm=_G["c"..m]
cm.name="魔力动物鞭策"
function cm.initial_effect(c)
--Summon Procedure
RD.AddSummonProcedureOne(c,aux.Stringid(m,0),nil,cm.sumfilter)
--Atk Down
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
--Summon Procedure
function cm.sumfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_LIGHT)
end
--Atk Down
function cm.costfilter(c)
return c:IsRace(RACE_BEAST) and c:IsAbleToDeckOrExtraAsCost()
end
function cm.filter(c,lv)
return c:IsFaceup() and c:IsLevelBelow(lv-1)
end
cm.cost=RD.CostSendGraveToDeckBottom(cm.costfilter,1,1)
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,e:GetHandler():GetLevel()) 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 filter=RD.Filter(cm.filter,c:GetLevel())
RD.SelectAndDoAction(aux.Stringid(m,2),filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
RD.AttachAtkDef(e,g:GetFirst(),-2000,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end)
end
end
\ No newline at end of file
local m=120277032
local cm=_G["c"..m]
cm.name="魔力动物射手"
function cm.initial_effect(c)
--Summon Procedure
RD.AddSummonProcedureOne(c,aux.Stringid(m,0),nil,cm.sumfilter)
--Position
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_POSITION+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Summon Procedure
function cm.sumfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_LIGHT)
end
--Position
function cm.filter(c,lv)
return c:IsFaceup() and c:IsLevelBelow(lv-1)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return RD.IsSummonTurn(c) or RD.IsSpecialSummonTurn(c)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(RD.IsCanChangePosition,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(RD.IsCanChangePosition,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,RD.IsCanChangePosition,tp,0,LOCATION_MZONE,1,1,nil,function(g)
local c=e:GetHandler()
if RD.ChangePosition(g)~=0 and c:IsFaceup() and c:IsRelateToEffect(e) then
local filter=RD.Filter(cm.filter,c:GetLevel())
RD.CanSelectAndDoAction(aux.Stringid(m,2),HINTMSG_DESTROY,filter,tp,0,LOCATION_MZONE,1,1,nil,function(sg)
Duel.BreakEffect()
Duel.Destroy(sg,REASON_EFFECT)
end)
end
end)
end
\ No newline at end of file
local m=120277056
local cm=_G["c"..m]
cm.name="魔力动物硬币"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+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.thfilter(c)
return c:IsLevel(7,8) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_BEAST)
and RD.IsDefenseAbove(c,1500) and c:IsAbleToHand()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_MZONE,0,1,nil) end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_TOGRAVE,Card.IsAbleToGrave,tp,LOCATION_MZONE,0,1,1,nil,function(g)
if Duel.SendtoGrave(g,REASON_EFFECT)~=0 then
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,function(sg)
Duel.BreakEffect()
RD.SendToHandAndExists(sg,1-tp)
end)
end
end)
if Duel.GetFlagEffect(tp,m)~=0 then return end
RD.CreateCannotActivateEffect(e,aux.Stringid(m,2),cm.aclimit,tp,1,0,RESET_PHASE+PHASE_END)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
function cm.aclimit(e,re,tp)
local tc=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and tc:GetOriginalLevel()<=6
end
\ No newline at end of file
local m=120277057
local cm=_G["c"..m]
cm.name="魔力动物护盾"
function cm.initial_effect(c)
--Activate
RD.RegisterEquipEffect(c,nil,nil,cm.target)
--Level Up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(3)
c:RegisterEffect(e1)
--Atk & Def Up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(600)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
end
--Activate
function cm.target(c,e,tp)
return c:IsControler(tp) and c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_BEAST)
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