Commit 37ae6264 authored by POLYMER's avatar POLYMER

fix

parent aaaf9235
......@@ -34,23 +34,9 @@ function s.pcfilter(c)
and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
end
function s.pctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))
and Duel.IsExistingMatchingCard(s.pcfilter,tp,LOCATION_DECK,0,1,nil)
if chk==0 then return Duel.IsExistingMatchingCard(s.pcfilter,tp,LOCATION_DECK,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,0)
e3:SetTarget(s.psplimit)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function s.psplimit(e,c,sump,sumtype,sumpos,targetp,se)
return not (c:IsSetCard(0xa73) or c:IsLocation(LOCATION_EXTRA))
......@@ -66,4 +52,12 @@ function s.pcop(e,tp,eg,ep,ev,re,r,rp)
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,0)
e3:SetTarget(s.psplimit)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
\ No newline at end of file
......@@ -27,7 +27,7 @@ function s.initial_effect(c)
c:RegisterEffect(e2)
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x90) and c:IsCanBeSpecialSummoned(e,0,tp,true,true)
return c:IsSetCard(0x90) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,true,true)
end
function s.thfilter(c)
return c:IsRace(RACE_PLANT) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and c:IsFaceup()
......
......@@ -50,8 +50,8 @@ function c98920590.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c98920590.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAttackPos,tp,0,LOCATION_SZONE,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAttackPos,tp,0,LOCATION_SZONE,nil)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsType,tp,0,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) end
local g=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
Duel.SetChainLimit(c98920590.chlimit)
end
......@@ -59,7 +59,7 @@ function c98920590.chlimit(e,ep,tp)
return tp==ep
end
function c98920590.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAttackPos,tp,0,LOCATION_SZONE,nil)
local g=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
......@@ -94,22 +94,27 @@ function c98920590.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c98920590.filter2(c,e,tp,mc)
if not (c:IsLevelBelow(8) and c:IsSetCard(0x1045) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return false end
if c:IsLocation(LOCATION_EXTRA) then
return Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
else
return Duel.GetMZoneCount(tp,mc)>0
end
end
function c98920590.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98920590.filter2,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,nil,e,tp) end
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c98920590.filter2,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,nil,e,tp,c) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA+LOCATION_GRAVE)
end
function c98920590.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.NegateActivation(ev) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g2=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c98920590.filter2),tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,1,nil,e,tp)
local g2=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c98920590.filter2),tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,1,nil,e,tp,nil)
if g2:GetCount()>0 then
Duel.BreakEffect()
Duel.SpecialSummon(g2,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c98920590.filter2(c,e,tp)
return c:IsLevelBelow(8) and c:IsSetCard(0x1045) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
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