Commit e84f810c authored by VanillaSalt's avatar VanillaSalt

fix

parent 0caf396c
......@@ -54,7 +54,7 @@ function c16494704.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,c16494704.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp,mg,ft)
local tc=tg:GetFirst()
if tc then
if tc and not tc:IsHasEffect(EFFECT_NECRO_VALLEY) then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,nil)
......
......@@ -36,8 +36,9 @@ function c16691074.spfilter1(c,e,tp)
end
function c16691074.atkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateAttack() then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return
local g1=Duel.GetMatchingGroup(c16691074.spfilter1,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp)
if g1:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(16691074,2)) then
if g1:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(16691074,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g2=g1:Select(tp,1,1,nil)
......
......@@ -81,7 +81,7 @@ function c22638495.spop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c22638495.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
if tc and not tc:IsHasEffect(EFFECT_NECRO_VALLEY) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -23,7 +23,7 @@ function c24425055.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c24425055.filter2,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
if tc and not tc:IsHasEffect(EFFECT_NECRO_VALLEY) then
Duel.SSet(tp,tc)
Duel.ConfirmCards(1-tp,tc)
local e1=Effect.CreateEffect(e:GetHandler())
......
......@@ -26,7 +26,7 @@ function c25280974.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c25280974.filter(c)
return c:IsType(TYPE_NORMAL) and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToHand() and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
return c:IsType(TYPE_NORMAL) and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToHand()
end
function c25280974.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c25280974.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
......@@ -35,7 +35,7 @@ end
function c25280974.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c25280974.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
if g:GetCount()>0 and not g:GetFirst():IsHasEffect(EFFECT_NECRO_VALLEY) then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
......
......@@ -37,7 +37,7 @@ function c33460840.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,c33460840.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,c)
local tc=g:GetFirst()
if not (tc and Duel.Equip(tp,tc,c,true)) then return end
if not (tc and not tc:IsHasEffect(EFFECT_NECRO_VALLEY) and Duel.Equip(tp,tc,c,true)) then return end
local atk=tc:GetTextAttack()/2
local def=tc:GetTextDefense()/2
if atk<0 then atk=0 end
......
......@@ -25,7 +25,6 @@ function c36318200.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c36318200.filter(c,e,tp)
return not c:IsCode(36318200) and c:IsRace(RACE_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
end
function c36318200.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
......@@ -37,7 +36,7 @@ function c36318200.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c36318200.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
if tc and not tc:IsHasEffect(EFFECT_NECRO_VALLEY) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
......
......@@ -14,7 +14,7 @@ function c53257892.initial_effect(c)
c:RegisterEffect(e1)
end
function c53257892.filter(c,e,tp)
return c:IsRace(RACE_INSECT+RACE_PLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
return c:IsRace(RACE_INSECT+RACE_PLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c53257892.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......@@ -25,7 +25,7 @@ function c53257892.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c53257892.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
if g:GetCount()>0 and not g:GetFirst():IsHasEffect(EFFECT_NECRO_VALLEY) then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
......@@ -54,5 +54,6 @@ function c8785161.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g2=Duel.SelectMatchingCard(tp,c8785161.spfilter2,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,tc1,e,tp,6-tc1:GetLevel())
g1:Merge(g2)
if g1:IsExists(Card.IsHasEffect,1,nil,EFFECT_NECRO_VALLEY) then return end
Duel.SpecialSummon(g1,0,tp,tp,false,false,POS_FACEUP)
end
......@@ -23,7 +23,7 @@ function c89801755.target(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(att)
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(rc)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_HAND+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_HAND+LOCATION_DECK)
end
function c89801755.filter(c,rc,att)
return c:IsRace(rc) and c:IsAttribute(att) and c:IsAbleToGrave()
......
......@@ -33,14 +33,16 @@ function c99423156.sumop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c99423156.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then
local tc=g:GetFirst()
if tc and not tc:IsHasEffect(EFFECT_NECRO_VALLEY) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x47e0000)
e1:SetValue(LOCATION_REMOVED)
g:GetFirst():RegisterEffect(e1,true)
tc:RegisterEffect(e1,true)
Duel.SpecialSummonComplete()
end
end
function c99423156.filter(c)
......
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