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

2024/2/18 新增:爱心返还

parent 56a1fa7d
Pipeline #25472 passed with stages
in 7 minutes and 22 seconds
No preview for this file type
No preview for this file type
......@@ -52,6 +52,7 @@ end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local atk1,atk2=e:GetLabel()
if atk1~=atk2 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,2))
atk1=Duel.AnnounceNumber(tp,atk1,atk2)
end
e:GetLabelObject():SetLabel(atk1)
......
local m=120260055
local cm=_G["c"..m]
cm.name="爱心返还"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_DRAW)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.confilter(c)
return c:IsFaceup() and not RD.IsMaximumMode(c)
and c:GetBaseAttack()==0 and c:GetBaseDefense()==0 and c:IsRace(RACE_FAIRY)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_MZONE,0,1,nil) and ep==tp and r==REASON_RULE
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local mg=g:GetMaxGroup(Card.GetBaseAttack)
if mg:GetCount()>0 then
RD.SendToOpponentHand(mg)
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