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

2022/3/8 新增:治愈蜥蜴,修复bug

parent d9e4ab5b
No preview for this file type
......@@ -41,10 +41,10 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.Draw(p,d,REASON_EFFECT)~=0 and Duel.DiscardDeck(p,1,REASON_EFFECT)~=0 then
local tc=Duel.GetOperatedGroup():GetFirst()
if tc:IsType(TYPE_MONSTER) and tc:IsLocation(LOCATION_GRAVE)
and Duel.IsExistingMatchingCard(cm.desfilter,tp,0,LOCATION_MZONE,1,nil,tc:GetRace())
and Duel.IsExistingMatchingCard(cm.desfilter,tp,0,LOCATION_MZONE,2,nil,tc:GetRace())
and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,cm.desfilter,tp,0,LOCATION_MZONE,1,2,nil,tc:GetRace())
local g=Duel.SelectMatchingCard(tp,cm.desfilter,tp,0,LOCATION_MZONE,2,2,nil,tc:GetRace())
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
......
......@@ -21,7 +21,7 @@ function cm.filter(c)
return c:IsFaceup() and not c:IsRace(RACE_INSECT)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,e:GetHandler())
return Duel.IsExistingMatchingCard(cm.confilter,tp,0,LOCATION_MZONE,1,e:GetHandler())
end
cm.cost=RD.CostSendDeckTopToGrave(2)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
local m=120208026
local cm=_G["c"..m]
cm.name="治愈蜥蜴"
function cm.initial_effect(c)
--Recover
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Recover
function cm.costfilter(c)
return c:IsRace(RACE_REPTILE) and c:IsAbleToDeckOrExtraAsCost()
end
cm.cost=RD.CostSendGraveToDeck(cm.costfilter,2,2)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
RD.TargetRecover(tp,500)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.Recover()
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