\def\mycite{\dodoubleempty\domycite}
\def\defaultciterepeat{Ebenda}
\def\defaultciteprefix{Vgl. }
\def\defaultcitepage{S. }
\def\defaultcitechapter{Kap. }

\def\domycite[#1][#2]{%
  \ifsecondargument%
    \getparameters[MCP][prefix=\defaultciteprefix,page=,chapter=,suffix=,#1]%
    \doinsertmycite[#2]{\MCPprefix}{%
      \expandoneargafter\doifnotempty{\MCPpage}{\ \defaultcitepage\MCPpage.}%
      \expandoneargafter\doifnotempty{\MCPchapter}{\ \defaultcitechapter\MCPchapter.}%
      \expandoneargafter\doifnotempty{\MCPsuffix}{\ \MCPsuffix}%
    }%
  \else%
    \doinsertmycite[#1]{\defaultciteprefix}{}%
  \fi%
}

\def\doinsertmycite[#1]#2#3{%
  \footnote{%
    #2%prefix
    \doifelse{\getvalue{mycitelast}}{#1}%
      {\doifemptyelse{#2}%
        {\defaultciterepeat}%
        {\expandoneargafter\lowercase{\defaultciterepeat}}%If there's a prefix, lower-case the cite-repeat string
        .%
      }%
      {\doifelse{\getvalue{mycitepast #1}}{used}%
        {\bgroup%
         \getcitedata[title][#1] to \bibtitle%
         \getcitedata[arttitle][#1] to \bibarttitle%
         \cite[alternative=authoryear][#1]. {\it\bibtitle\bibarttitle}.%
         \egroup}%
        {\cite[alternative=data][#1]}%
      }%
    #3%suffix
  }%
  \setvalue{mycitelast}{#1}%
  \setvalue{mycitepast #1}{used}%
}

%Reset last citation on page break
\appendtoks
  \global\setvalue{mycitelast}{}
\to\everyaftershipout
