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

2022/4/3 新增:羊界新卡

parent 7d6cccc5
No preview for this file type
......@@ -113,12 +113,15 @@ function RushDuel.CostShowHand(filter, min, max, set_label, set_object)
end)
end
-- 代价: 从卡组上面把卡送去墓地
function RushDuel.CostSendDeckTopToGrave(count)
function RushDuel.CostSendDeckTopToGrave(count, set_label, set_object)
return function(e, tp, eg, ep, ev, re, r, rp, chk)
if chk == 0 then
return Duel.IsPlayerCanDiscardDeckAsCost(tp, count)
end
Duel.DiscardDeck(tp, count, REASON_COST)
if Duel.DiscardDeck(tp, count, REASON_COST) ~= 0 and (set_label ~= nil or set_object ~= nil) then
local og = Duel.GetOperatedGroup()
RushDuel.SetLabelAndObject(e, og, set_label, set_object)
end
end
end
-- 代价: 把自己场上表侧表示的这张卡送去墓地
......
......@@ -13,7 +13,7 @@ function cm.initial_effect(c)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Direct Attack
--Attack Twice
function cm.filter(c)
return c:IsFaceup() and c:IsLevel(8) and c:IsAttribute(ATTRIBUTE_DARK)
end
......
local m=120208020
local list={120208044,120208055,120208006}
local cm=_G["c"..m]
cm.name="羊界 植物羊"
function cm.initial_effect(c)
aux.AddCodeList(c,list[1],list[2],list[3])
--Set
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
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
--Set
function cm.confilter(c)
return c:IsFaceup() and c:IsType(TYPE_NORMAL) and c:IsRace(RACE_BEAST)
end
function cm.setfilter(c)
return c:IsCode(list[1],list[2]) and c:IsSSetable()
end
function cm.exfilter(c)
return c:IsFaceup() and c:IsCode(list[3])
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_GRAVE,0,1,nil) end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if RD.SelectAndSet(aux.NecroValleyFilter(cm.setfilter),tp,LOCATION_GRAVE,0,1,1,nil,e)~=0
and Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Recover(tp,600,REASON_EFFECT)
end
end
\ No newline at end of file
local m=120208044
local list={120208006}
local cm=_G["c"..m]
cm.name="肉与欲"
function cm.initial_effect(c)
aux.AddCodeList(c,list[1])
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.filter(c)
return c:IsFaceup() and c:IsType(TYPE_NORMAL) and c:IsRace(RACE_BEAST)
end
function cm.exfilter(c)
return c:IsFaceup() and c:IsCode(list[1])
end
function cm.downfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP()
end
cm.cost=RD.CostSendHandToGrave(Card.IsAbleToGraveAsCost,2,2)
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) end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(aux.Stringid(m,1),cm.filter,tp,LOCATION_MZONE,0,1,1,nil,function(g)
RD.AttachExtraAttackMonster(e,g:GetFirst(),2,aux.Stringid(m,2),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
local sg=Duel.GetMatchingGroup(cm.downfilter,tp,0,LOCATION_MZONE,nil)
if Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_MZONE,0,1,nil)
and sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
sg:ForEach(function(tc)
RD.AttachAtkDef(e,tc,-500,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end)
end
end)
end
\ No newline at end of file
local m=120208055
local cm=_G["c"..m]
cm.name="羊界-墓地怨念"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.thfilter(c)
return c:IsLocation(LOCATION_GRAVE) and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=Duel.GetAttackTarget()
return Duel.GetAttacker():IsControler(1-tp)
and c and c:IsControler(tp) and c:IsPosition(POS_FACEUP_ATTACK) and c:IsType(TYPE_NORMAL) and c:IsRace(RACE_BEAST)
end
cm.cost=RD.CostSendDeckTopToGrave(4,nil,function(g)
local cg=g:Filter(Card.IsLocation,nil,LOCATION_GRAVE)
cg:KeepAlive()
return cg
end)
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=Duel.GetAttackTarget()
if c and c:IsRelateToBattle() and c:IsFaceup() then
RD.AttachAtkDef(e,c,-2000,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
local g=e:GetLabelObject()
if g:FilterCount(cm.thfilter,nil)>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
local sg=g:FilterSelect(tp,cm.thfilter,1,4,nil)
RD.SendToHandAndExists(sg,1-tp)
end
g:DeleteGroup()
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