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

2025/5/17 新增:摩门

parent 704e4550
Pipeline #36446 passed with stages
in 10 minutes and 53 seconds
No preview for this file type
local cm,m=GetID()
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:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Destroy
function cm.filter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_EARTH)
end
function cm.exfilter(c,atk)
return c:IsFaceup() and RD.IsDefenseBelow(c,atk)
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) end
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_MZONE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_DESTROY,cm.filter,tp,LOCATION_MZONE,0,1,1,nil,function(g)
local tc=g:GetFirst()
local mg=Duel.GetMatchingGroup(cm.exfilter,tp,LOCATION_MZONE,LOCATION_MZONE,tc,tc:GetAttack())
mg:AddCard(tc)
Duel.Destroy(mg,REASON_EFFECT)
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