Commit 4fb572ec authored by POLYMER's avatar POLYMER

fix

parent 58087579
...@@ -22,8 +22,9 @@ function s.cfilter(c) ...@@ -22,8 +22,9 @@ function s.cfilter(c)
return c:IsSetCard(0x838) and c:IsDiscardable() return c:IsSetCard(0x838) and c:IsDiscardable()
end end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end local c=e:GetHandler()
Duel.DiscardHand(tp,s.cfilter,1,1,REASON_DISCARD+REASON_COST,nil) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,c) end
Duel.DiscardHand(tp,s.cfilter,1,1,REASON_DISCARD+REASON_COST,c)
end end
function s.filter(c) function s.filter(c)
return c:IsSetCard(0x838) and c:IsType(TYPE_MONSTER) return c:IsSetCard(0x838) and c:IsType(TYPE_MONSTER)
...@@ -60,7 +61,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,7 +61,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local labs={e:GetLabel()} local labs={e:GetLabel()}
local count=#labs local count=#labs
if count and count>0 then if count and count>0 then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY) e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
......
...@@ -82,7 +82,7 @@ function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -82,7 +82,7 @@ function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(e:GetHandler(),REASON_COST) Duel.Release(e:GetHandler(),REASON_COST)
end end
function s.thfilter(c,att) function s.thfilter(c,att)
return c:IsAttribute(att) and c:IsAbleToHand() return c:IsAttribute(att) and c:IsFaceup() and c:IsAbleToHand()
end end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -9,7 +9,6 @@ function s.initial_effect(c) ...@@ -9,7 +9,6 @@ function s.initial_effect(c)
--reset and heal --reset and heal
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0)) e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(s.rescon) e1:SetCondition(s.rescon)
...@@ -47,7 +46,7 @@ function s.rescon(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,7 +46,7 @@ function s.rescon(e,tp,eg,ep,ev,re,r,rp)
end end
function s.resop(e,tp,eg,ep,ev,re,r,rp) function s.resop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToChain() and c:IsAbleToExtra() and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 then if Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 then
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0) local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
if #g>0 then if #g>0 then
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -55,7 +55,7 @@ function s.initial_effect(c) ...@@ -55,7 +55,7 @@ function s.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function s.spfilter(c) function s.spfilter(c)
return (c:IsSetCard(0x838) or c:IsRace(RACE_ZOMBIE)) and c:IsAbleToRemoveAsCost() return (c:IsSetCard(0x838) or c:IsRace(RACE_ZOMBIE)) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end end
function s.spcon(e,c) function s.spcon(e,c)
if c==nil then return true end if c==nil then return true end
......
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