--Hellstrain Prime function c212026.initial_effect(c) c:EnableReviveLimit() aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLevel,1),1) --negate local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(212026,0)) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetOperation(c212026.effop) c:RegisterEffect(e1) --special summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(212026,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,212026) e2:SetCondition(c212026.spcon) e2:SetCost(c212026.spcost) e2:SetTarget(c212026.sptg) e2:SetOperation(c212026.spop) c:RegisterEffect(e2) --atkup local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e3:SetRange(LOCATION_MZONE) e3:SetCode(EFFECT_UPDATE_ATTACK) e3:SetValue(c212026.atkval) c:RegisterEffect(e3) --atk local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_FIELD) e4:SetRange(LOCATION_MZONE) e4:SetTargetRange(LOCATION_MZONE,0) e4:SetCode(EFFECT_UPDATE_ATTACK) e4:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x22f)) e4:SetValue(200) c:RegisterEffect(e4) end function c212026.filter(c) return c:IsFaceup() and c:IsSetCard(0x22f) end function c212026.effop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local g=Duel.GetMatchingGroup(c212026.filter,tp,LOCATION_MZONE,0,nil) local tc=g:GetFirst() while tc do local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(1) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetValue(1) e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) tc:RegisterEffect(e2) tc=g:GetNext() end end function c212026.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2 end function c212026.spcfilter(c,tp,zone) return c:IsSetCard(0x22f) and Duel.GetMZoneCount(tp,c,tp,LOCATION_REASON_TOFIELD,zone)>0 end function c212026.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() local zone=c:GetLinkedZone(tp) if chk==0 then return Duel.CheckReleaseGroup(tp,c212026.spcfilter,1,c,tp,zone) end local g=Duel.SelectReleaseGroup(tp,c212026.spcfilter,1,1,c,tp,zone) Duel.Release(g,REASON_COST) end function c212026.spfilter(c,e,tp) return c:IsSetCard(0x22f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function c212026.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c212026.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function c212026.spop(e,tp,eg,ep,ev,re,r,rp) local zone=e:GetHandler():GetLinkedZone(tp) if Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,c212026.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) if g:GetCount()>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP,zone) end end function c212026.atkfilter(c) return c:IsFaceup() and c:IsSetCard(0x22f) end function c212026.atkval(e,c) return Duel.GetMatchingGroupCount(c212026.atkfilter,c:GetControler(),LOCATION_MZONE,0,nil)*200 end