Commit fe436636 authored by 未闻皂名's avatar 未闻皂名

2022/12/18 新增:二咒葬之龙,龙之二咒葬

parent 875e3964
No preview for this file type
local m=120235011
local list={120235060}
local cm=_G["c"..m]
cm.name="二咒葬之龙"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Recover
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Recover
function cm.setfilter(c)
return c:IsCode(list[1]) and c:IsSSetable()
end
cm.cost=RD.CostSendDeckTopToGrave(2)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
RD.TargetRecover(tp,200)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if RD.Recover()~=0 then
RD.CanSelectAndSet(aux.Stringid(m,1),aux.NecroValleyFilter(cm.setfilter),tp,LOCATION_GRAVE,0,1,1,nil,e)
end
end
\ No newline at end of file
...@@ -15,13 +15,13 @@ function cm.initial_effect(c) ...@@ -15,13 +15,13 @@ function cm.initial_effect(c)
end end
--Multi-Choose Effect --Multi-Choose Effect
function cm.confilter1(c,tp) function cm.confilter1(c,tp)
return c:IsType(TYPE_NORMAL) and Duel.IsExistingMatchingCard(cm.confilter2,tp,LOCATION_GRAVE,0,1,c,c:GetCode()) return c:IsType(TYPE_NORMAL) and Duel.IsExistingMatchingCard(cm.confilter2,tp,LOCATION_GRAVE,0,1,c,c)
end end
function cm.confilter2(c,code) function cm.confilter2(c,tc)
return c:IsType(TYPE_NORMAL) and c:IsCode(code) return c:IsType(TYPE_NORMAL) and RD.IsSameCode(c,tc)
end end
function cm.check(g) function cm.check(g)
return g:GetClassCount(Card.GetCode)==1 return g:GetCount()==2 and RD.IsSameCode(g:GetFirst(),g:GetNext())
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.confilter1,tp,LOCATION_GRAVE,0,1,nil,tp) return Duel.IsExistingMatchingCard(cm.confilter1,tp,LOCATION_GRAVE,0,1,nil,tp)
......
...@@ -18,10 +18,10 @@ function cm.confilter(c) ...@@ -18,10 +18,10 @@ function cm.confilter(c)
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsType(TYPE_NORMAL) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP) return c:IsType(TYPE_NORMAL) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil,c:GetCode()) and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil,c)
end end
function cm.filter(c,code) function cm.filter(c,tc)
return c:IsFaceup() and c:IsCode(code) return c:IsFaceup() and RD.IsSameCode(c,tc)
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.confilter,tp,0,LOCATION_MZONE,1,nil) return Duel.IsExistingMatchingCard(cm.confilter,tp,0,LOCATION_MZONE,1,nil)
......
...@@ -17,12 +17,12 @@ function cm.initial_effect(c) ...@@ -17,12 +17,12 @@ function cm.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
--Activate --Activate
function cm.filter(c,code) function cm.filter(c,tc)
return c:IsFaceup() and c:IsType(TYPE_NORMAL) and c:IsRace(RACE_DRAGON) and c:IsCode(code) return c:IsFaceup() and c:IsType(TYPE_NORMAL) and c:IsRace(RACE_DRAGON) and RD.IsSameCode(c,tc)
end end
function cm.target(c,e,tp) function cm.target(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_NORMAL) and c:IsRace(RACE_DRAGON) return c:IsFaceup() and c:IsType(TYPE_NORMAL) and c:IsRace(RACE_DRAGON)
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,c,c:GetCode()) and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,c,c)
end end
--Atk Up --Atk Up
function cm.upval(e,c) function cm.upval(e,c)
......
local m=120235060
local cm=_G["c"..m]
cm.name="龙之二咒葬"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.confilter(c)
return c:IsFaceup() and c:IsRace(RACE_HYDRAGON+RACE_DRAGON)
end
function cm.check(g)
return g:GetCount()==2 and RD.IsSameCode(g:GetFirst(),g:GetNext())
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetAttacker():IsControler(1-tp)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local ag=Duel.GetAttacker():GetAttackableTarget()
local at=Duel.GetAttackTarget()
return ag:IsExists(aux.TRUE,1,at)
end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local ag=Duel.GetAttacker():GetAttackableTarget()
local at=Duel.GetAttackTarget()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTACKTARGET)
local g=ag:Select(tp,1,1,at)
local tc=g:GetFirst()
if tc and Duel.ChangeAttackTarget(tc) then
local mg=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
if mg:CheckSubGroup(cm.check,2,2) then
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_DESTROY,nil,tp,0,LOCATION_MZONE,1,1,nil,function(sg)
Duel.Destroy(sg,REASON_EFFECT)
end)
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