Commit ac581c75 authored by wind2009's avatar wind2009

Fix

parent a9b6cf98
...@@ -36,7 +36,7 @@ function s.ffilter1(c,fc,sub,mg,sg) ...@@ -36,7 +36,7 @@ function s.ffilter1(c,fc,sub,mg,sg)
return c:GetEquipGroup():IsExists(s.eqilter,1,nil) return c:GetEquipGroup():IsExists(s.eqilter,1,nil)
end end
function s.ffilter2(c,fc,sub,mg,sg) function s.ffilter2(c,fc,sub,mg,sg)
return c:GetOriginalType()&TYPE_MONSTER~=0 and c:GetOriginalRace()&RACE_FIEND>0 return c:GetOriginalType()&TYPE_MONSTER~=0 and c:GetOriginalRace()&RACE_FIEND~=0
end end
function s.tgfilter(c) function s.tgfilter(c)
return c:IsPreviousLocation(LOCATION_HAND) and c:IsType(TYPE_MONSTER) return c:IsPreviousLocation(LOCATION_HAND) and c:IsType(TYPE_MONSTER)
...@@ -44,7 +44,7 @@ end ...@@ -44,7 +44,7 @@ end
function s.tscon(e,tp,eg,ep,ev,re,r,rp) function s.tscon(e,tp,eg,ep,ev,re,r,rp)
if not re then return false end if not re then return false end
local rc=re:GetHandler() local rc=re:GetHandler()
return r&REASON_COST>0 and eg:IsExists(s.tgfilter,1,nil) return r&REASON_COST~=0 and eg:IsExists(s.tgfilter,1,nil)
end end
function s.eqfilter(c) function s.eqfilter(c)
return c:IsPreviousLocation(LOCATION_HAND) and c:IsType(TYPE_MONSTER) and not c:IsForbidden() return c:IsPreviousLocation(LOCATION_HAND) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
......
...@@ -16,13 +16,14 @@ function s.cfilter(c) ...@@ -16,13 +16,14 @@ function s.cfilter(c)
return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsLevelAbove(1) return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsLevelAbove(1)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.cfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.cfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) if chk==0 then return Duel.IsExistingTarget(s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
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()
......
...@@ -39,7 +39,7 @@ function s.filter(c) ...@@ -39,7 +39,7 @@ function s.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) return c:IsType(TYPE_SPELL+TYPE_TRAP)
end end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and s.filter(chkc) end if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and s.filter(chkc) end
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,s.filter,tp,0,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,s.filter,tp,0,LOCATION_ONFIELD,1,1,nil)
......
...@@ -22,6 +22,7 @@ function s.initial_effect(c) ...@@ -22,6 +22,7 @@ function s.initial_effect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,id+o)
e2:SetCost(s.spcost) e2:SetCost(s.spcost)
e2:SetTarget(s.sptg) e2:SetTarget(s.sptg)
e2:SetOperation(s.spop) e2:SetOperation(s.spop)
...@@ -34,7 +35,7 @@ function s.tgcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -34,7 +35,7 @@ function s.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end end
function s.tgfilter(c) function s.tgfilter(c)
return c:IsRace(RACE_FIEND) return c:IsRace(RACE_FIEND) and c:IsAbleToGrave()
end end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end
...@@ -54,7 +55,7 @@ function s.rselect(g) ...@@ -54,7 +55,7 @@ function s.rselect(g)
return g:GetClassCount(Card.GetAttributeInGrave)==1 return g:GetClassCount(Card.GetAttributeInGrave)==1
end end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(s.rfilter,tp,LOCATION_GRAVE,0,nil) local g=Duel.GetMatchingGroup(s.rfilter,tp,LOCATION_GRAVE,0,e:GetHandler())
if chk==0 then return g:CheckSubGroup(s.rselect,2,2) end if chk==0 then return g:CheckSubGroup(s.rselect,2,2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:SelectSubGroup(tp,s.rselect,false,2,2) local sg=g:SelectSubGroup(tp,s.rselect,false,2,2)
...@@ -65,9 +66,8 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -65,9 +66,8 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function s.spop(e,tp,eg,ep,ev,re,r,rp,c) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
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