Commit bcb98c8f authored by wind2009's avatar wind2009

Fix

parent da2bb4b5
Pipeline #27758 passed with stages
in 1 minute and 8 seconds
......@@ -60,8 +60,7 @@ end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil)
and c:IsAbleToDeck() end
and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -38,8 +38,7 @@ end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil)
and c:IsAbleToDeck() end
and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -58,17 +57,18 @@ function s.lvcon(e,tp,eg,ep,ev,re,r,rp)
end
function s.racetg(e,tp,eg,ep,ev,re,r,rp,chk)
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())
e:SetLabel(race)
end
function s.raceop(e,tp,eg,ep,ev,re,r,rp)
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)
e1:SetType(EFFECT_TYPE_SINGLE)
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)
c:RegisterEffect(e1)
end
......
......@@ -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())
end
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)
or c.Metallization_material and c.Metallization_material(ft,lv,race,att) and c:IsCanBeSpecialSummoned(e,0,tp,true,true,POS_FACEUP))
end
......@@ -44,10 +44,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
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
tc:CompleteProcedure()
if c:IsOnField() and c:IsRelateToEffect(e) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
c:CancelToGrave(true)
if Duel.Equip(tp,c,tc)~=0 then
local e1=Effect.CreateEffect(tc)
......@@ -87,7 +88,7 @@ function s.eqlimit(e,c)
return e:GetOwner()==c
end
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
function s.efilter(e,re)
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