--Hellstrain Genesis function c212027.initial_effect(c) c:EnableReviveLimit() aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLevel,1),1) --battle indestructable local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) c:RegisterEffect(e1) --move local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(212027,0)) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1,212027) e2:SetTarget(c212027.seqtg) e2:SetOperation(c212027.seqop) c:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) e3:SetValue(1) c:RegisterEffect(e3) --atkup local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_SINGLE) e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e4:SetRange(LOCATION_MZONE) e4:SetCode(EFFECT_UPDATE_ATTACK) e4:SetValue(c212027.atkval) c:RegisterEffect(e4) --atk local e5=Effect.CreateEffect(c) e5:SetType(EFFECT_TYPE_FIELD) e5:SetRange(LOCATION_MZONE) e5:SetTargetRange(LOCATION_MZONE,0) e5:SetCode(EFFECT_UPDATE_ATTACK) e5:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x22f)) e5:SetValue(200) c:RegisterEffect(e5) end function c212027.seqfilter(c) return c:IsFaceup() and c:IsSetCard(0x22f) end function c212027.seqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c212027.seqfilter(chkc) end if chk==0 then return Duel.IsExistingTarget(c212027.seqfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_CONTROL)>0 end Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(212027,1)) Duel.SelectTarget(tp,c212027.seqfilter,tp,LOCATION_MZONE,0,1,1,nil) end function c212027.seqop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE) local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0) local nseq=math.log(s,2) Duel.MoveSequence(tc,nseq) end function c212027.distg2(e,c) return e:GetHandler():IsHasCardTarget(c) end function c212027.atkfilter(c) return c:IsFaceup() and c:IsSetCard(0x22f) end function c212027.atkval(e,c) return Duel.GetMatchingGroupCount(c212027.atkfilter,c:GetControler(),LOCATION_MZONE,0,nil)*200 end