--created & coded by Lyris, art at https://kaiserscience.files.wordpress.com/2015/06/mid-atlantic-ridge-noaa.png --アーマリン降臨 local s,id,o=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCategory(CATEGORY_SUMMON) e2:SetCost(aux.bfgcost) e2:SetTarget(s.sumtg) e2:SetOperation(s.sumop) c:RegisterEffect(e2) end function s.filter(c,...) return c:IsSetCard(0xa6c) and c:IsType(TYPE_MONSTER) and not (#({...}))>0 and c:IsCode(...)) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(aux.AND(s.filter,Card.IsAbleToHand),tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,aux.AND(s.filter,Card.IsAbleToHand),tp,LOCATION_DECK,0,1,1,nil) if Duel.SendtoHand(g,nil,REASON_EFFECT)==0 then return end Duel.ConfirmCards(1-tp,g) Duel.ShuffleHand(tp) local dg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_HAND,0,nil,g:GetFirst():GetCode()) if #dg==0 or not Duel.SelectYesNo(tp,1101) then return end Duel.BreakEffect() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Destroy(dg:Select(tp,1,1,nil),REASON_EFFECT) end function s.filter(c) return c:IsSetCard(0xa6c) and c:IsSummonable(true,nil) end function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0) end function s.sumop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND,0,1,1,nil):GetFirst() if tc then Duel.Summon(tp,tc,true,nil) end end