Commit 735a05ab authored by 未闻皂名's avatar 未闻皂名

2023/7/14 新增:清净之蛇姬,万华镜调整更新

parent ac690b88
Pipeline #22686 passed with stages
in 6 minutes and 19 seconds
No preview for this file type
No preview for this file type
......@@ -37,11 +37,24 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetValue(cm.atlimit)
e1:SetCondition(cm.atkcon)
e1:SetValue(cm.atklimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetOperation(cm.atkop)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
function cm.atlimit(e,c)
function cm.atkcon(e)
return Duel.GetFlagEffect(e:GetHandler(),20247014)==0
end
function cm.atklimit(e,c)
return c:IsPosition(POS_FACEUP_ATTACK) and c:IsAttackBelow(1200)
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,20247014,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE,0,1)
end
\ No newline at end of file
local m=120249042
local cm=_G["c"..m]
cm.name="清净之蛇姬"
function cm.initial_effect(c)
--Atk Down
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Atk Down
function cm.filter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT)
end
cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil)
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil)
and (Duel.GetMatchingGroupCount(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)~=3
or Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>1) end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(aux.Stringid(m,1),Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil,function(g)
local atk=Duel.GetMatchingGroupCount(cm.filter,tp,LOCATION_MZONE,0,nil)*-600
RD.AttachAtkDef(e,g:GetFirst(),atk,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
if Duel.GetMatchingGroupCount(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)==3 then
Duel.Draw(tp,1,REASON_EFFECT)
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