Commit 697536a3 authored by 未闻皂名's avatar 未闻皂名

2023/9/28 新增:使魔新卡

parent 962031de
Pipeline #23615 passed with stages
in 6 minutes and 56 seconds
No preview for this file type
local m=120246016
local list={120105010}
local cm=_G["c"..m]
cm.name="侥幸使魔"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Discard Deck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DECKDES+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Discard Deck
cm.trival=RD.ValueDoubleTributeAll()
function cm.spfilter(c,e,tp)
return c:IsCode(list[1]) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,2) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,2)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if RD.SendDeckTopToGraveAndExists(tp,2)
and RD.CanSelectAndSpecialSummon(aux.Stringid(m,1),aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,2,2,nil,e,POS_FACEUP,true)~=0 then
local og=Duel.GetOperatedGroup()
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
og:AddCard(c)
end
og:ForEach(function(tc)
RD.AttachDoubleTribute(e,tc,cm.trival,aux.Stringid(m,2),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end)
end
end
\ No newline at end of file
local m=120246019
local list={120105010,120246016}
local cm=_G["c"..m]
cm.name="落单集会"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--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)
if not (c:IsRace(RACE_SPELLCASTER) and c:IsAbleToGraveAsCost()) then return false end
local ct=Duel.GetMatchingGroupCount(cm.exfilter,tp,LOCATION_GRAVE,0,nil)
if ct==1 then return Duel.IsPlayerCanDraw(tp,2) or not cm.exfilter(c) end
if ct>=2 then return Duel.IsPlayerCanDraw(tp,2) end
return true
end
function cm.exfilter(c)
return c:IsCode(list[1],list[2])
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.IsPlayerCanDraw(tp,1) end
RD.TargetDraw(tp,1)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if RD.Draw()~=0 and Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_GRAVE,0,2,nil) then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
\ No newline at end of file
local m=120246020
local list={120120038}
local cm=_G["c"..m]
cm.name="落单使魔信号"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
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:IsFaceup() and c:GetBaseAttack()==0 and c:IsRace(RACE_SPELLCASTER)
end
function cm.setfilter(c)
return c:IsCode(list[1]) and c:IsSSetable()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local atk=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)*1400
RD.SelectAndDoAction(aux.Stringid(m,1),cm.filter,tp,LOCATION_MZONE,0,1,3,nil,function(g)
g:ForEach(function(tc)
RD.AttachAtkDef(e,tc,atk,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end)
RD.CanSelectAndSet(aux.Stringid(m,2),aux.NecroValleyFilter(cm.setfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,true)
end)
end
\ No newline at end of file
local m=120246024
local list={120105010,120246016}
local cm=_G["c"..m]
cm.name="落单猫嫉妒"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCondition(cm.condition)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.confilter(c)
return c:IsCode(list[1],list[2])
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttackTarget()
return Duel.GetAttacker():IsControler(1-tp)
and (Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_GRAVE,0,1,nil)
or (tc and tc:IsFaceup() and tc:IsAttack(0)))
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if not Duel.NegateAttack() then return end
local tc=Duel.GetAttackTarget()
if tc and RD.IsCanChangePosition(tc) and Duel.SelectEffectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect()
if RD.ChangePosition(tc)~=0 then
local dam=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)*200
Duel.Damage(1-tp,dam,REASON_EFFECT)
end
end
end
\ No newline at end of file
......@@ -12,6 +12,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_DAMAGE+CATEGORY_ATKCHANGE+CATEGORY_TODECK+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)
......
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