%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode
\usepackage{xcolor}

\newfontfamily{\sw}{sw-rpg-icons.ttf}
\DeclareTextFontCommand{\textsw}{\sw}

\newcommand{\icon}[2][black]{%
    \hspace{0pt}\raisebox{-1pt}{%
        \textsw{\textcolor{#1}{\char"#2}}%
    }\hspace{-3pt}
}

\newcommand{\iconBig}[2][black]{%
    \hspace{-2pt}\raisebox{-3pt}{%
        \textsw{\textcolor{#1}{\Large\char"#2}}
    }\hspace{-8pt}
}

\newcommand{\iconSmall}[2][black]{%
    \hspace{0pt}\raisebox{-0.5pt}{%
        \textsw{\textcolor{#1}{\char"#2}}%
    }\hspace{-2pt}
}

\newcommand{\iconSmallBig}[2][black]{%
    \hspace{-1pt}\raisebox{-1.5pt}{%
        \textsw{\textcolor{#1}{\small\char"#2}}
    }\hspace{-5.5pt}
}

\definecolor{boostblue}{HTML}{76CDDB}
\definecolor{difficultypurple}{HTML}{52287E}
\definecolor{abilitygreen}{HTML}{13AC4E}
\definecolor{challengered}{HTML}{751317}
\definecolor{proficiencyyellow}{HTML}{FEF035}

\newcommand{\advantage}{\iconBig{E900}}
\newcommand{\despair}{\iconBig{E904}}
\newcommand{\failure}{\iconBig{E905}}
\newcommand{\success}{\iconBig{E90B}}
\newcommand{\threat}{\iconBig{E90D}}
\newcommand{\triumph}{\iconBig{E90F}}

\newcommand{\setback}{\icon[black]{E93D}}
\newcommand{\boost}{\icon[boostblue]{E93D}}
\newcommand{\difficulty}{\iconBig[difficultypurple]{E93F}}
\newcommand{\ability}{\iconBig[abilitygreen]{E93F}}
\newcommand{\challenge}{\iconBig[challengered]{E941}}
\newcommand{\proficiency}{\iconBig[proficiencyyellow]{E941}}
\newcommand{\force}{\iconBig[black]{E942}}

\newcommand{\lightforce}{\icon[black]{E909}}
\newcommand{\darkforce}{\icon[black]{E908}}
\newcommand{\forcepoint}{\icon[black]{E90A}}

%%%
\newcommand{\checkbox}{\icon[white]{E93D}}

\newcommand{\advantageSmall}{\iconSmallBig{E900}}
\newcommand{\despairSmall}{\iconSmallBig{E904}}
\newcommand{\failureSmall}{\iconSmallBig{E905}}
\newcommand{\successSmall}{\iconSmallBig{E90B}}
\newcommand{\threatSmall}{\iconSmallBig{E90D}}
\newcommand{\triumphSmall}{\iconSmallBig{E90F}}

\newcommand{\setbackSmall}{\iconSmall[black]{E93D}}
\newcommand{\boostSmall}{\iconSmall[boostblue]{E93D}}
\newcommand{\difficultySmall}{\iconSmallBig[difficultypurple]{E93F}}
\newcommand{\abilitySmall}{\iconSmallBig[abilitygreen]{E93F}}
\newcommand{\challengeSmall}{\iconSmallBig[challengered]{E941}}
\newcommand{\proficiencySmall}{\iconSmallBig[proficiencyyellow]{E941}}
\newcommand{\forceSmall}{\iconSmallBig[black]{E942}}

\newcommand{\lightforceSmall}{\iconSmall[black]{E909}}
\newcommand{\darkforceSmall}{\iconSmall[black]{E908}}
\newcommand{\forcepointSmall}{\iconSmall[black]{E90A}}

\newcommand{\simple}{Simple (-)}
\newcommand{\easy}{Easy (\difficultySmall)}
\newcommand{\average}{Average (\difficultySmall\difficultySmall)}
\newcommand{\hard}{Hard (\difficultySmall\difficultySmall\difficultySmall)}
\newcommand{\daunting}{Daunting (\difficultySmall\difficultySmall\difficultySmall\difficultySmall)}
\newcommand{\formidable}{Daunting (\difficultySmall\difficultySmall\difficultySmall\difficultySmall\difficultySmall)}
