Commit ad630c26 authored by wind2009's avatar wind2009

Fix 月光銀狗

parent 6f571651
-- --月光金獅子
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--to hand --to hand
...@@ -74,7 +74,7 @@ function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -74,7 +74,7 @@ function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function s.thop2(e,tp,eg,ep,ev,re,r,rp) function s.thop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToChain() and tc:IsType(TYPE_MONSTER) and aux.NecroValleyFilter()(tc) then
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
end end
end end
\ No newline at end of file
-- --月光銀狗
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--special summon --special summon
...@@ -16,7 +16,7 @@ function s.initial_effect(c) ...@@ -16,7 +16,7 @@ function s.initial_effect(c)
--negate --negate
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1)) e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_DISABLE) e2:SetCategory(CATEGORY_NEGATE)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING) e2:SetCode(EVENT_CHAINING)
e2:SetCountLimit(1,id+o) e2:SetCountLimit(1,id+o)
...@@ -50,11 +50,15 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,11 +50,15 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetAbsoluteRange(tp,1,0) e1:SetAbsoluteRange(tp,1,0)
e1:SetCondition(s.splimitcon)
e1:SetTarget(s.splimit) e1:SetTarget(s.splimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true) tc:RegisterEffect(e1,true)
end end
end end
function s.splimitcon(e)
return e:GetHandler():IsControler(e:GetOwnerPlayer())
end
function s.splimit(e,c) function s.splimit(e,c)
return not c:IsSetCard(0xdf) and c:IsLocation(LOCATION_EXTRA) return not c:IsSetCard(0xdf) and c:IsLocation(LOCATION_EXTRA)
end end
...@@ -64,7 +68,7 @@ function s.negcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -64,7 +68,7 @@ function s.negcon(e,tp,eg,ep,ev,re,r,rp)
and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainNegatable(ev) and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainNegatable(ev)
end end
function s.cfilter(c) function s.cfilter(c)
return c:IsSetCard(0xdf) and c:IsType(TYPE_FUSION) and c:IsAbleToRemoveAsCost() return c:IsSetCard(0xdf) and c:IsAllTypes(TYPE_FUSION+TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end end
function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
...@@ -75,8 +79,7 @@ function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -75,8 +79,7 @@ function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return true end
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_SZONE,0,1,nil,e,tp,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end end
function s.negop(e,tp,eg,ep,ev,re,r,rp) function s.negop(e,tp,eg,ep,ev,re,r,rp)
......
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