Commit 7d9d8424 authored by 未闻皂名's avatar 未闻皂名

2022/10/9 新增:至大论者Ⅺ - 水瓶座

parent 39de9e6f
No preview for this file type
local m=120231057
local cm=_G["c"..m]
cm.name="至大论者Ⅺ - 水瓶座"
function cm.initial_effect(c)
--Destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DESTROY)
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
--Destroy
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,2,nil)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>3 end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<4 then return end
Duel.ConfirmDecktop(tp,4)
local g=Duel.GetDecktopGroup(tp,4)
if g:GetSum(Card.GetLevel)>=11 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
Duel.ShuffleDeck(tp)
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