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

2020/12/3 新增:沉默习得

parent ced4a2fe
No preview for this file type
local m=120150006
local cm=_G["c"..m]
cm.name="沉默习得"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.confilter(c)
return c:IsLevelAbove(5)
end
function cm.filter(c)
return c:IsFacedown() and c:GetSequence()<5
end
function cm.tdfilter(c)
return c:IsLevelAbove(5) and c:IsAbleToDeck()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.confilter,tp,LOCATION_GRAVE,0,nil)
return g:GetClassCount(Card.GetCode)>=3
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_SZONE,1,nil) end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEDOWN)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,0,LOCATION_SZONE,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.ConfirmCards(tp,g)
if g:GetFirst():IsType(TYPE_TRAP) and Duel.IsPlayerCanDraw(tp,1) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.tdfilter),tp,LOCATION_GRAVE,0,1,1,nil)
if sg:GetCount()>0 and Duel.SendtoDeck(sg,nil,1,REASON_EFFECT)~=0 then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
end
\ No newline at end of file
local m=120150049 local m=120150049
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="收缩虾" cm.name="收缩虾"
function cm.initial_effect(c) function cm.initial_effect(c)
--Atk Down --Atk Down
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
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