Commit 2b737e6d authored by POLYMER's avatar POLYMER

fix

parent 4efd0aa7
...@@ -31,16 +31,18 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -31,16 +31,18 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end end
end end
function cm.actcfilter(c,e) function cm.actcfilter(c)
return c:IsFaceup() and c:IsSetCard(0x412) and c:IsType(TYPE_XYZ) and not c:IsImmuneToEffect(e) return c:IsFaceup() and c:IsSetCard(0x412) and c:IsType(TYPE_XYZ)
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)>0 if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)>0
and Duel.IsExistingMatchingCard(cm.actcfilter,tp,LOCATION_MZONE,0,1,nil,e) and c:IsLocation(LOCATION_ONFIELD) and Duel.IsExistingMatchingCard(cm.actcfilter,tp,LOCATION_MZONE,0,1,nil,e) and c:IsLocation(LOCATION_ONFIELD)
and c:IsRelateToEffect(e) and c:IsCanOverlay() and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then and c:IsRelateToEffect(e) and c:IsCanOverlay() and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
local g2=Duel.SelectMatchingCard(tp,cm.actcfilter,tp,LOCATION_MZONE,0,1,1,nil,e) local g2=Duel.SelectMatchingCard(tp,cm.actcfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.HintSelection(g2)
local sc=g2:GetFirst() local sc=g2:GetFirst()
if sc:IsImmuneToEffect(e) then return end
c:CancelToGrave() c:CancelToGrave()
Duel.Overlay(sc,Group.FromCards(c)) Duel.Overlay(sc,Group.FromCards(c))
end end
......
...@@ -21,16 +21,16 @@ function s.initial_effect(c) ...@@ -21,16 +21,16 @@ function s.initial_effect(c)
e1:SetOperation(s.datop) e1:SetOperation(s.datop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--spsummon --spsummon
local e1=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,2)) e2:SetDescription(aux.Stringid(id,2))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id) e2:SetCountLimit(1,id)
e1:SetCost(s.cost) e2:SetCost(s.cost)
e1:SetTarget(s.sptg) e2:SetTarget(s.sptg)
e1:SetOperation(s.spop) e2:SetOperation(s.spop)
c:RegisterEffect(e1) c:RegisterEffect(e2)
end end
function s.cfilter(c) function s.cfilter(c)
return c:IsType(TYPE_EQUIP) and c:IsFaceup() return c:IsType(TYPE_EQUIP) and c:IsFaceup()
...@@ -43,14 +43,13 @@ end ...@@ -43,14 +43,13 @@ end
function s.atkcon(e,tp,eg,ep,ev,re,r,rp) function s.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP() return Duel.IsAbleToEnterBP()
end end
function s.refilter(c,g) function s.cfilter(c)
return c:IsLevel(10) return c:IsLevel(10)
and g:IsContains(c) and not c:IsStatus(STATUS_BATTLE_DESTROYED)
end end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local lg=e:GetHandler():GetLinkedGroup() local lg=e:GetHandler():GetLinkedGroup()
if chk==0 then return Duel.CheckReleaseGroup(tp,s.refilter,1,nil,lg) end if chk==0 then return Duel.CheckReleaseGroup(tp,s.cfilter,1,nil,lg) end
local g=Duel.SelectReleaseGroup(tp,s.refilter,1,1,nil,lg) local g=Duel.SelectReleaseGroup(tp,s.cfilter,1,1,nil,lg)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function s.datop(e,tp,eg,ep,ev,re,r,rp) function s.datop(e,tp,eg,ep,ev,re,r,rp)
...@@ -63,31 +62,31 @@ function s.datop(e,tp,eg,ep,ev,re,r,rp) ...@@ -63,31 +62,31 @@ function s.datop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
end end
function s.filter(c,e,tp,mc)
function s.filter(c,e,tp) return c:IsSetCard(0x412) and c:IsType(TYPE_XYZ) and mc:IsCanBeXyzMaterial(c) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
return c:IsSetCard(0x412) and e:GetHandler():IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp,tp,e:GetHandler())>-1 local c=e:GetHandler()
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end if chk==0 then return aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.GetLocationCountFromEx(tp,tp,c)<=0 then return end if not aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsControler(1-tp) or c:IsImmuneToEffect(e) then return end if c:IsFaceup() and c:IsRelateToEffect(e) and c:IsControler(tp) and not c:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c)
local sc=g:GetFirst() local sc=g:GetFirst()
if sc then if sc then
local mg=c:GetOverlayGroup() local mg=c:GetOverlayGroup()
if mg:GetCount()~=0 then if mg:GetCount()~=0 then
Duel.Overlay(sc,mg) Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(c))
Duel.Overlay(sc,Group.FromCards(c))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end end
sc:SetMaterial(Group.FromCards(c))
Duel.Overlay(sc,Group.FromCards(c))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end end
end end
\ No newline at end of file
...@@ -73,8 +73,8 @@ function c98940044.cfilter(c) ...@@ -73,8 +73,8 @@ function c98940044.cfilter(c)
return c:IsSetCard(0x69) and c:IsType(TYPE_MONSTER) return c:IsSetCard(0x69) and c:IsType(TYPE_MONSTER)
end end
function c98940044.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function c98940044.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroupEx(tp,c98940044.cfilter,1,e:GetHandler()) end if chk==0 then return Duel.CheckReleaseGroupEx(tp,Card.IsSetCard,1,REASON_COST,true,e:GetHandler(),0x69) end
local g=Duel.SelectReleaseGroupEx(tp,c98940044.cfilter,1,1,e:GetHandler()) local g=Duel.SelectReleaseGroupEx(tp,Card.IsSetCard,1,1,REASON_COST,true,e:GetHandler(),0x69)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c98940044.filter(c) function c98940044.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