Commit d465fd1d authored by Nemo Ma's avatar Nemo Ma

Update c40009776.lua

parent 5657046d
...@@ -80,25 +80,24 @@ function cm.descost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -80,25 +80,24 @@ function cm.descost(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_SZONE,0,1,1,nil):GetFirst() local tc=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_SZONE,0,1,1,nil):GetFirst()
tc:RemoveOverlayCard(tp,1,1,REASON_COST) tc:RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp,mc)
return cm.AuroraBattlePrincess(c) and c:IsType(TYPE_XYZ) return cm.AuroraBattlePrincess(c) and c:IsType(TYPE_XYZ)
and e:GetHandler():IsCanBeXyzMaterial(c) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end end
function cm.spxtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.spxtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCountFromEx(tp,tp,c)>0 if chk==0 then return aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) end
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,e:GetHandler():GetRank()) 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 cm.spxop(e,tp,eg,ep,ev,re,r,rp) function cm.spxop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsFaceup() if c:IsFaceup() and c:IsRelateToEffect(e) and c:IsControler(tp) and not c:IsImmuneToEffect(e)
and c:IsRelateToEffect(e) and c:IsControler(tp) and not c:IsImmuneToEffect(e)
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) then and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,e:GetHandler():GetRank()) local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
local mg=c:GetOverlayGroup() local mg=c:GetOverlayGroup()
......
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