Commit bcb98c8f authored by wind2009's avatar wind2009

Fix

parent da2bb4b5
...@@ -60,8 +60,7 @@ end ...@@ -60,8 +60,7 @@ end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end
and c:IsAbleToDeck() end
end end
function s.setop(e,tp,eg,ep,ev,re,r,rp) function s.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -38,8 +38,7 @@ end ...@@ -38,8 +38,7 @@ end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end
and c:IsAbleToDeck() end
end end
function s.setop(e,tp,eg,ep,ev,re,r,rp) function s.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -58,17 +57,18 @@ function s.lvcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,17 +57,18 @@ function s.lvcon(e,tp,eg,ep,ev,re,r,rp)
end end
function s.racetg(e,tp,eg,ep,ev,re,r,rp,chk) function s.racetg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RACE)
local race=Duel.AnnounceRace(tp,1,RACE_ALL&~e:GetHandler():GetRace()) local race=Duel.AnnounceRace(tp,1,RACE_ALL&~e:GetHandler():GetRace())
e:SetLabel(race) e:SetLabel(race)
end end
function s.raceop(e,tp,eg,ep,ev,re,r,rp) function s.raceop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then local race=e:GetLabel()
if c:IsRelateToEffect(e) and c:IsFaceup() and bit.band(c:GetRace(),race)==0 then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_RACE) e1:SetCode(EFFECT_CHANGE_RACE)
e1:SetValue(e:GetLabel()) e1:SetValue(race)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END+RESET_OPPO_TURN) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
......
...@@ -21,7 +21,7 @@ function s.filter1(c,e,tp) ...@@ -21,7 +21,7 @@ function s.filter1(c,e,tp)
and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp,1,c:GetLevel(),c:GetRace(),c:GetAttribute()) and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp,1,c:GetLevel(),c:GetRace(),c:GetAttribute())
end end
function s.filter2(c,e,tp,ft,lv,race,att) function s.filter2(c,e,tp,ft,lv,race,att)
return not c:IsSummonableCard() and aux.IsCodeListed(c,101206071) return not c:IsSummonableCard() and aux.IsCodeListed(c,101206071) and c:IsType(TYPE_MONSTER)
and (not c:IsLocation(LOCATION_DECK+LOCATION_HAND) and c:IsCanBeSpecialSummoned(e,0,tp,true,false,POS_FACEUP) and (not c:IsLocation(LOCATION_DECK+LOCATION_HAND) and c:IsCanBeSpecialSummoned(e,0,tp,true,false,POS_FACEUP)
or c.Metallization_material and c.Metallization_material(ft,lv,race,att) and c:IsCanBeSpecialSummoned(e,0,tp,true,true,POS_FACEUP)) or c.Metallization_material and c.Metallization_material(ft,lv,race,att) and c:IsCanBeSpecialSummoned(e,0,tp,true,true,POS_FACEUP))
end end
...@@ -44,10 +44,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,10 +44,11 @@ function s.activate(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 Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,s.filter2,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp,e:GetLabel()):GetFirst() local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter2),tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp,e:GetLabel()):GetFirst()
if tc and Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP)>0 then if tc and Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP)>0 then
tc:CompleteProcedure() tc:CompleteProcedure()
if c:IsOnField() and c:IsRelateToEffect(e) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then if c:IsOnField() and c:IsRelateToEffect(e) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
c:CancelToGrave(true) c:CancelToGrave(true)
if Duel.Equip(tp,c,tc)~=0 then if Duel.Equip(tp,c,tc)~=0 then
local e1=Effect.CreateEffect(tc) local e1=Effect.CreateEffect(tc)
...@@ -87,7 +88,7 @@ function s.eqlimit(e,c) ...@@ -87,7 +88,7 @@ function s.eqlimit(e,c)
return e:GetOwner()==c return e:GetOwner()==c
end end
function s.tgval(e,re,rp) function s.tgval(e,re,rp)
return re:IsActiveType(TYPE_MONSTER+TYPE_SPELL) return re:IsActiveType(TYPE_MONSTER+TYPE_SPELL) and rp==1-e:GetHandlerPlayer()
end end
function s.efilter(e,re) function s.efilter(e,re)
return re:IsActiveType(TYPE_MONSTER+TYPE_SPELL) return re:IsActiveType(TYPE_MONSTER+TYPE_SPELL)
......
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