--苍之战士 装甲宙蓝 local m=40006828 local cm=_G["c"..m] cm.named_with_blaucavalier=1 function cm.initial_effect(c) --special summon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(m,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1,m) e1:SetRange(LOCATION_MZONE+LOCATION_HAND) e1:SetCost(cm.spcost1) e1:SetTarget(cm.sptg1) e1:SetOperation(cm.spop1) c:RegisterEffect(e1) --special summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(m,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,m+1) e2:SetCost(cm.spcost2) e2:SetTarget(cm.sptg2) e2:SetOperation(cm.spop2) c:RegisterEffect(e2) end function cm.blaucavalier(c) local m=_G["c"..c:GetCode()] return m and m.named_with_blaucavalier end function cm.cfilter1(c,tp) return c:IsType(TYPE_TUNER) and c:IsAbleToGraveAsCost() and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and Duel.GetMZoneCount(tp,c)>0 end function cm.spcost1(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter1,tp,LOCATION_MZONE+LOCATION_HAND,0,1,e:GetHandler(),tp) and e:GetHandler():IsAbleToGraveAsCost() end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,cm.cfilter1,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,e:GetHandler(),tp) g:AddCard(e:GetHandler()) Duel.SendtoGrave(g,REASON_COST) end function cm.spfilter1(c,e,tp) return c:IsLevel(8) and cm.blaucavalier(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsType(TYPE_TUNER) end function cm.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.spfilter1,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK) end function cm.spop1(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter1),tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil,e,tp) if g:GetCount()>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end function cm.spcost2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsType,1,nil,TYPE_TUNER) end local g=Duel.SelectReleaseGroup(tp,Card.IsType,1,1,nil,TYPE_TUNER) Duel.Release(g,REASON_COST) end function cm.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) end function cm.spop2(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end end