Commit db2b5d49 authored by salix5's avatar salix5

fix

parent 6ab3a698
...@@ -18,8 +18,11 @@ function c5288597.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -18,8 +18,11 @@ function c5288597.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c5288597.cfilter(c,e,tp) function c5288597.cfilter(c,e,tp)
local lv=c:GetOriginalLevel() local lv=c:GetOriginalLevel()
local rc=nil
if Duel.IsEnvironment(4064256) then rc=RACE_ZOMBIE
else rc=c:GetOriginalRace() end
return lv>0 and c:IsFaceup() and c:IsAbleToGraveAsCost() return lv>0 and c:IsFaceup() and c:IsAbleToGraveAsCost()
and Duel.IsExistingMatchingCard(c5288597.spfilter,tp,LOCATION_DECK,0,1,nil,lv+1,c:GetOriginalRace(),c:GetOriginalAttribute(),e,tp) and Duel.IsExistingMatchingCard(c5288597.spfilter,tp,LOCATION_DECK,0,1,nil,lv+1,rc,c:GetOriginalAttribute(),e,tp)
end end
function c5288597.spfilter(c,lv,rc,att,e,tp) function c5288597.spfilter(c,lv,rc,att,e,tp)
return c:GetLevel()==lv and c:IsRace(rc) and c:IsAttribute(att) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:GetLevel()==lv and c:IsRace(rc) and c:IsAttribute(att) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -20,15 +20,19 @@ function c69270537.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -20,15 +20,19 @@ function c69270537.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.SelectTarget(tp,c69270537.tdfilter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectTarget(tp,c69270537.tdfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end end
function c69270537.spfilter(c,e,tp) function c69270537.spfilter(c,e,tp,fc)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) for i=1,fc.material_count do
if c:GetCode()==fc.material[i] then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
end
return false
end end
function c69270537.activate(e,tp,eg,ep,ev,re,r,rp) function c69270537.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and tc:IsLocation(LOCATION_EXTRA) then and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and tc:IsLocation(LOCATION_EXTRA) then
local sg=Duel.GetMatchingGroup(c69270537.spfilter,tp,LOCATION_DECK,0,nil,e,tp) local sg=Duel.GetMatchingGroup(c69270537.spfilter,tp,LOCATION_DECK,0,nil,e,tp,tc)
if tc:CheckFusionMaterial(sg,nil,PLAYER_NONE) and Duel.SelectYesNo(tp,aux.Stringid(69270537,0)) then if tc:CheckFusionMaterial(sg,nil,PLAYER_NONE) and Duel.SelectYesNo(tp,aux.Stringid(69270537,0)) then
Duel.BreakEffect()
local mats=Duel.SelectFusionMaterial(tp,tc,sg,nil,PLAYER_NONE) local mats=Duel.SelectFusionMaterial(tp,tc,sg,nil,PLAYER_NONE)
Duel.SpecialSummon(mats,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(mats,0,tp,tp,false,false,POS_FACEUP)
end end
......
...@@ -12,7 +12,7 @@ function c89312388.initial_effect(c) ...@@ -12,7 +12,7 @@ function c89312388.initial_effect(c)
end end
function c89312388.filter2(c,fc) function c89312388.filter2(c,fc)
local fd=c:GetCode() local fd=c:GetCode()
if c:IsHasEffect(EFFECT_FORBIDDEN) or not c:IsAbleToGraveAsCost() then return false end if not c:IsAbleToGraveAsCost() then return false end
for i=1,fc.material_count do for i=1,fc.material_count do
if fd==fc.material[i] then return true end if fd==fc.material[i] then return true end
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