--created by Walrus, coded by Lyris, art from Shadowverse's "Restless Parish" local s,id=GetID() function s.initial_effect(c) local e0=Effect.CreateEffect(c) e0:SetType(EFFECT_TYPE_ACTIVATE) e0:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e0) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_FZONE) e1:SetCountLimit(2,id) e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) e1:SetDescription(1109) e1:SetCost(s.cost) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_FZONE) e2:SetCountLimit(2,id+1000) e2:SetDescription(aux.Stringid(id,0)) e2:SetTarget(s.lvtg) e2:SetOperation(s.lvop) c:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetCode(EVENT_ATTACK_ANNOUNCE) e3:SetRange(LOCATION_FZONE) e3:SetCategory(CATEGORY_ATKCHANGE) e3:SetCondition(s.condition) e3:SetCost(s.acost) e3:SetTarget(s.target) e3:SetOperation(s.activate) c:RegisterEffect(e3) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST) end function s.filter(c) return c:IsSetCard(0x106) and (c:IsFaceup() or c:IsLocation(LOCATION_DECK)) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_REMOVED) end function s.thop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,1,nil) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end function s.lfilter(c) return c:IsFaceup() and not c:IsType(TYPE_RITUAL) and c:IsSetCard(0x106) end function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(aux.AND(s.lfilter,aux.NOT(Card.IsLevel)),tp,LOCATION_MZONE,0,1,nil,2) end end function s.lvop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end local g=Duel.GetMatchingGroup(s.lfilter,tp,LOCATION_MZONE,0,nil) for tc in aux.Next(g) do local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(2) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) tc:RegisterEffect(e1) end local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e2:SetReset(RESET_PHASE+PHASE_END) e2:SetTargetRange(1,0) e2:SetLabelObject(e) e2:SetTarget(aux.TargetBoolFunction(aux.NOT(Card.IsRace),RACE_ZOMBIE)) Duel.RegisterEffect(e2,tp) end function s.cfilter(c,tp) return c:IsControler(tp) and c:IsSetCard(0x106) end function s.condition(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() local d=Duel.GetAttackTarget() local c=s.cfilter(a) and a or d and s.cfilter(d,tp) and d or nil e:SetLabelObject(c) return c end function s.acost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(aux.AND(Card.IsFaceup,Card.IsSetCard,Card.IsAbleToDeckAsCost),tp,LOCATION_REMOVED,0,1,nil,0x106) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.SendtoDeck(Duel.SelectMatchingCard(tp,aux.AND(Card.IsFaceup,Card.IsSetCard,Card.IsAbleToDeckAsCost),tp,LOCATION_REMOVED,0,1,1,nil,0x106),nil,2,REASON_COST) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local tc=e:GetLabelObject() if chk==0 then return tc and tc:IsLevelAbove(1) end end function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(e:GetLabelObject():GetLevel()*200) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE) e:GetLabelObject():RegisterEffect(e1) end