Commit cdade43f authored by wind2009's avatar wind2009

Fix ゴゴゴゴブリンドバーグ

parent 70f1f9b5
No preview for this file type
...@@ -16,7 +16,7 @@ function s.initial_effect(c) ...@@ -16,7 +16,7 @@ function s.initial_effect(c)
e2:SetDescription(aux.Stringid(id,1)) e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE) e2:SetCode(EVENT_MOVE)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id+o) e2:SetCountLimit(1,id+o)
e2:SetCondition(s.thcon) e2:SetCondition(s.thcon)
...@@ -29,19 +29,20 @@ function s.spfilter(c,e,tp) ...@@ -29,19 +29,20 @@ function s.spfilter(c,e,tp)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(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 Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local res=false
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) res=Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0
end end
end end
if c:IsRelateToEffect(e) and c:IsPosition(POS_FACEUP_ATTACK) then if res and c:IsRelateToEffect(e) and c:IsPosition(POS_FACEUP_ATTACK) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.ChangePosition(c,POS_FACEUP_DEFENSE) Duel.ChangePosition(c,POS_FACEUP_DEFENSE)
end 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