--created & coded by Lyris, art from Shadowverse's Evolved "Cutthroat, Discord Convict" --Psychic Hadouken (Altered) local s,id,o=GetID() function s.initial_effect(c) c:RegisterSetCardString("Hadouken") c:EnableReviveLimit() aux.AddOrigSpatialType(c) local e0=Effect.CreateEffect(c) e0:SetType(EFFECT_TYPE_SINGLE) e0:SetCode(EFFECT_CHANGE_CODE) e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e0:SetValue(102400026) c:RegisterEffect(e0) aux.AddSpatialProc(c,aux.drccheck,aux.TRUE,2,99) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_TO_GRAVE_REDIRECT) e1:SetTargetRange(0xfe,0xfe) e1:SetCondition(s.condition) e1:SetValue(LOCATION_DECKBOT) c:RegisterEffect(e1) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD) e3:SetCode(81674782) e3:SetRange(LOCATION_MZONE) e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e3:SetTargetRange(0xfe,0xfe) e3:SetTarget(aux.TargetBoolFunction(aux.NOT(aux.OR(Card.IsPublic),Card.IsReason),REASON_RETURN)) c:RegisterEffect(e3) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCategory(CATEGORY_REMOVE) e2:SetCost(s.cost) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) end s.spt_other_space=102400026 function s.condition(e) return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_DECK,0)%2<1 end function s.cfilter(c) return c:IsFaceupEx() and c:IsSetCard("Hadouken") and c:IsAbleToDeckAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil) Duel.HintSelection(g) Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_COST) end function s.filter(c) return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,c:GetOwner(),LOCATION_ONFIELD,0,1,nil) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and s.filter(chkc) end if chk==0 then return Duel.IsExistingTarget(s.filter,tp,0,LOCATION_ONFIELD,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,Duel.SelectTarget(tp,s.filter,tp,0,LOCATION_ONFIELD,1,1,nil):GetFirst():GetOwner(),LOCATION_ONFIELD) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if not tc:IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tc:GetOwner(),LOCATION_ONFIELD,0,1,1,nil) Duel.HintSelection(g) Duel.Remove(g,POS_FACEUP,REASON_EFFECT) end