Commit 75e6cab6 authored by 未闻皂名's avatar 未闻皂名

2025/1/16 新增:昆虫新卡

parent 96d4f71a
Pipeline #32618 passed with stages
in 11 minutes and 3 seconds
No preview for this file type
No preview for this file type
local m=120109048
local list={120222025,120227007}
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])
--To Hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND)
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
--To Hand
function cm.exfilter(c)
return c:GetType()==TYPE_SPELL
end
function cm.filter(c)
return c:IsFacedown() and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_FUSION) and RD.IsSpecialSummonTurn(c)
end
cm.cost=RD.CostSendHandToGrave(Card.IsAbleToGraveAsCost,2,2,nil,nil,function(g)
return g:FilterCount(cm.exfilter,nil)
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_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_RTOHAND,cm.filter,tp,0,LOCATION_ONFIELD,1,2,nil,function(g)
if RD.SendToOpponentHand(g)~=0 and e:GetLabel()==2 and Duel.GetFlagEffect(tp,m)==0 then
RD.CreateCannotActivateEffect(e,aux.Stringid(m,1),cm.aclimit,tp,1,1,RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END+RESET_OPPO_TURN,0,1)
end
end)
end
function cm.aclimit(e,re,tp)
local tc=re:GetHandler()
return re:IsActiveType(TYPE_SPELL) and tc:GetType()==TYPE_SPELL
end
\ No newline at end of file
......@@ -8,6 +8,8 @@ function cm.initial_effect(c)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(cm.indes)
c:RegisterEffect(e1)
--Continuous Effect
RD.AddContinuousEffect(c,e1)
end
--Indes
function cm.indes(e,c)
......
local m=120277012
local cm=_G["c"..m]
cm.name="昆遁忍虫 念珠之空蝉"
function cm.initial_effect(c)
--Pierce
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_PIERCE)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(cm.target1)
c:RegisterEffect(e1)
--Avoid Battle Damage
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,2))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e2:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(cm.target2)
e2:SetValue(1)
c:RegisterEffect(e2)
--Continuous Effect
RD.AddContinuousEffect(c,e1,e2)
end
--Pierce
function cm.target1(e,c)
return c:IsFaceup() and RD.IsHasContinuousEffect(c)
and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_INSECT)
end
--Avoid Battle Damage
function cm.target2(e,c)
return c:IsFaceup() and c:IsRace(RACE_INSECT)
end
\ No newline at end of file
local m=120277013
local cm=_G["c"..m]
cm.name="昆遁忍虫 迷惘之蜘蛛"
function cm.initial_effect(c)
--Cannot Be Battle Target
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetValue(cm.target)
c:RegisterEffect(e1)
--Continuous Effect
RD.AddContinuousEffect(c,e1)
end
--Cannot Be Battle Target
function cm.confilter1(c)
return c:IsFaceup() and c:GetOriginalRace()==RACE_INSECT
end
function cm.confilter2(c)
return c:IsFaceup() and c:GetOriginalRace()~=RACE_INSECT
end
function cm.condition(e)
local tp=e:GetHandlerPlayer()
return not RD.IsAttacking(e)
and Duel.IsExistingMatchingCard(cm.confilter1,tp,LOCATION_MZONE,0,1,nil)
and not Duel.IsExistingMatchingCard(cm.confilter2,tp,LOCATION_MZONE,0,1,nil)
end
function cm.target(e,c)
local g=Duel.GetMatchingGroup(Card.IsFaceup,e:GetHandlerPlayer(),LOCATION_MZONE,0,nil)
local sg=g:GetMaxGroup(Card.GetAttack)
return not sg:IsContains(c) or c:IsFacedown()
end
\ No newline at end of file
local m=120277014
local cm=_G["c"..m]
cm.name="昆遁忍虫 刺又之独角仙"
function cm.initial_effect(c)
--Indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetCondition(cm.condition)
e1:SetValue(cm.indes)
c:RegisterEffect(e1)
--Continuous Effect
RD.AddContinuousEffect(c,e1)
end
--Indes
function cm.confilter(c)
return c:IsFaceup() and c:IsRace(RACE_INSECT)
end
function cm.condition(e)
return Duel.IsExistingMatchingCard(cm.confilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler())
end
function cm.indes(e,c)
return c:IsAttackAbove(2000)
end
\ No newline at end of file
local m=120277015
local cm=_G["c"..m]
cm.name="昆遁忍虫 变妖魔笛之凤蝶"
function cm.initial_effect(c)
--Change Race
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_RACE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetValue(RACE_INSECT)
c:RegisterEffect(e1)
--Continuous Effect
RD.AddContinuousEffect(c,e1)
end
\ No newline at end of file
local m=120277016
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:IsFaceup() and c:IsRace(RACE_INSECT)
end
function cm.atkval(e,c)
return Duel.GetMatchingGroupCount(cm.filter,c:GetControler(),LOCATION_GRAVE,LOCATION_GRAVE,nil)*500
end
\ No newline at end of file
local m=120277053
local cm=_G["c"..m]
cm.name="昆遁忍法-蓝隐虫"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.costfilter(c)
return (c:IsType(TYPE_NORMAL) or (c:IsLevelBelow(4) and c:IsRace(RACE_INSECT)))
and c:IsAbleToGraveAsCost()
end
function cm.spfilter(c,e,tp)
return RD.IsHasContinuousEffect(c) and c:IsLevelAbove(5) and c:IsLevelBelow(8)
and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_INSECT) and RD.IsDefense(c,400)
and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
cm.cost=RD.CostSendHandToGrave(cm.costfilter,1,1)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP)
end
\ No newline at end of file
local m=120277054
local cm=_G["c"..m]
cm.name="昆遁忍法-五翅二虫"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.costfilter(c)
return c:IsRace(RACE_INSECT) and c:IsAbleToGraveAsCost()
end
function cm.filter(c)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_INSECT) and RD.IsDefense(c,400)
and c:IsAbleToHand()
end
cm.cost=RD.CostSendHandToGrave(cm.costfilter,1,1)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<5 then return end
local sg,g=RD.RevealDeckTopAndCanSelect(tp,5,aux.Stringid(m,1),HINTMSG_ATOHAND,cm.filter,1,2)
if sg:GetCount()>0 then
Duel.DisableShuffleCheck()
RD.SendToHandAndExists(sg,1-tp)
Duel.ShuffleHand(tp)
end
local ct=g:GetCount()
if ct>0 then
Duel.SortDecktop(tp,tp,ct)
RD.SendDeckTopToBottom(tp,ct)
end
end
\ No newline at end of file
local m=120277058
local cm=_G["c"..m]
cm.name="梦翔的爱"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.costfilter(c)
return c:IsFaceup() and c:IsRace(RACE_INSECT) and c:IsAbleToGraveAsCost()
end
cm.cost=RD.CostSendMZoneToGrave(cm.costfilter,1,1,false)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
RD.TargetDraw(tp,2)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.Draw()
if Duel.GetFlagEffect(tp,m)~=0 then return end
RD.CreateRaceCannotAttackEffect(e,aux.Stringid(m,1),RACE_ALL-RACE_INSECT,tp,1,0,RESET_PHASE+PHASE_END)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
\ No newline at end of file
RD.SameCard(120282003,120257004)
\ No newline at end of file
RD.SameCard(120282004,120264047)
\ 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