%%%%%
%%
%% This file sets up the Abil datatype and creates Abil macros.  These
%% are for abilities that characters may have.
%%
%%%%%

\DECLARESUBTYPE{Abil}{Element}
\PRESETS{Abil}{
  \F\MYtext     %% text of ability, read by user
  \F\MYeffect   %% effect text of ability, read by recipient(s)
  }


%%%%%
%% \ability{<name>}{<text>}{<effect>}
%%
%% \ability is a wrapper around \INSTANCE, useful for 1-shot abilities,
%% etc.
\newinstance{Abil}{\ability[3]}{
  \s\MYname{#1}\s\MYtext{#2}\s\MYeffect{#3}}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\NEW{Abil}{\aTest}{
  \s\MYname     {Test Ability}
  \s\MYtext     {You are a test.}
  \s\MYeffect   {This is a Test.}
  }

\NEW{Abil}{\aSpecial}{
  \s\MYname     {Special Powers}
  \s\MYtext     {You have special powers, as detailed in your \gTest{}
                greensheet.}
  \s\MYeffect   {I have special powers!}
  \s\MYgreens   {\gTest{}}
  \suite
  }

\NEW{Abil}{\aInsane}{
  \s\MYname     {Hopelessly Insane}
  \s\MYtext      {You are already so determinedly deluded and insane that no
                in-game sanity effects affect you. Ignore any mechanic
                that would change your $\psi$ score.}
  \s\MYeffect   {Nothing happens.}
}

\NEW{Abil}{\aBlackChamberBind}{
  \s\MYname     {Black Chamber binding geas}
  \s\MYtext     {You know the control codes to the following \bBlackChamber{}
                 agents' binding geas. 
                 \begin{tabular}{rl}
                 \cLiason{}: & \cLiason{\MYbccode} \\
                 Unknown agent: & \cBlackChamberOp{\MYbccode} \\
                 \end{tabular} \\
                 Show your target this card and read one of the above
                   numbers. Destroy this card after use.}
  \s\MYeffect   {I am going to read a number to you. Open the
                corresponding mempacket if you have one, even if your
                character cannot hear me.}
}

\NEW{Abil}{\aSanity}{
  \s\MYname     {Restore Sanity}
  \s\MYtext     {You can improve someone else's sanity. Spend an
                appropriate amount of time working (as detailed by the
                \gSanity{} greensheet) and then show them this card.}
  \s\MYeffect   {You feel some of the horrible things you have
                witnessed leave your mind. Increase your $\psi$ by $1$.}
}

\NEW{Abil}{\aInsubstantial} {
  \s\MYname     {Insubstantial}
  \s\MYtext     {You are a being composed of incorporeal energy, which has several
  effects.\\
  You are immune any form of physical attack (including bullets) as well as Killing Blows.\\
  You cannot manipulate any significant quantity of ordinary physical matter.  This means you
  cannot carry anything beyond \textbf{a single non-bulky item}, and you cannot martial attack.\\
  As a being of energy, you can interact with computers normally.\\
  You can still perform research of any type; this is a kludge.}
  \s\MYeffect   {Your physical attack passes right through me.}
} 

\NEW{Abil}{\aHumanSoul} {
  \s\MYname     {Human Soul}
  \s\MYtext     {You are immune to any effects that specifically harm or
  banish demons.}
  \s\MYeffect   {I resist your effect.} 
}

\NEW{Abil}{\aIntSec}{
  \s\MYname     {\gIntSec{} Warrant Card}
  \s\MYtext     {If you have your \iWarrantCard{}, this geas can bind a human
                 member of the \bLaundry{} to answer a single question, as detailed in the
                 \gIntSec{} greensheet.
                 \emph{``In the name of Claude Dansey and by the
                     authority of the Audit Commission, I hereby exercise subsection four clause
    seventeen paragraph one of the Official Secrets Act and bind you to
    answer the question I put to you.''}}
  \s\MYeffect {You feel the spoken geas tightening around you, binding
    you to \textbf{truthfully} answer Yes or No to a
    single question put to you.\\
    This is a class $\alpha$ ability.}
}

\NEW{Abil}{\aUnbindGeas}{
	\s\MYname {Unbind Geas}
        \s\MYtext {Given the right set of circumstances, you can
            unlink the geas that binds an individual to a particular
            organization, such as the \bLaundry{}.  You must have at
            least one other member of the Laundry present.  The target
            must be willing and conscious. Show the target this card,
            and read the following incant: \\

            ``By the authority vested in me by the emissaries of
            Y'ghonzzh N'hai I have the power to bind and to release,
            and I hereby revoke any binding you have to {\it name of
            organization}''}

          \s\MYeffect     {You feel the binding geas loosen from you.  See a GM
            immediately.}
}

\NEW{Abil}{\aResistTruthing}{
  \s\MYname {Uncanny Resistance} 
  \s\MYtext {If someone uses a class
  $\alpha$ ability on you, show them this card.  The ability fails,
  and the person trying to use it on you is knocked unconscious by the energy backlash.}
  \s\MYeffect {You feel energy rebounding on you with devastating effect.  You are knocked unconscious for one minute.}
} 

\NEW{Abil}{\aResistAlpha}{
  \s\MYname {Unbound}
  \s\MYtext {You are immune to class $\alpha$ abilities.}
  \s\MYeffect {I resist your effect.}
}
\NEW{Abil}{\aThickSkinned}{
  \s\MYname {Thick Skinned}
  \s\MYtext {You may resist one dart or disc per 5 minutes.}
  \s\MYeffect {Your attack bounces off my thicker skin.}
}

\NEW{Abil}{\aHacking}{
  \s\MYname {Computer hacking}
  \s\MYtext {You have the technical expertise and experience to
    interact with the base's computer system. You may spend 10 seconds
    times the listed level to perform any class $\eta$ mechanic.}
  \s\MYeffect {I type away furiously at the terminal}
}

\NEW{Abil}{\aPurityTest}{
  \s\MYname {Soul Probe}
  \s\MYtext {Spend one minute within ZoC of another character, then
    show them this card. If their $\Pi$ stat is nonzero, they have a
    pure human soul.}
  \s\MYeffect {Tell me your $\Pi$ stat.}
  } 

\NEW{Abil}{\aFirstAid}{
  \s\MYname {First Aid}
  \s\MYtext {Spend five minutes within ZoC of another character. After 
the five minutes, the character goes from Bleeding Out to Healthy. When 
you being applying First Aid, the person's bleed out counter stops. If 
at any point you stop during the five minutes you're applying First Aid, 
the person's bleed out counter resets to five minutes.}
  \s\MYeffect {You feel completely healed.}
}

%% Basic DarkWater-style Martial Attack abilities


%% Everyone has these 3
\NEW{Abil}{\aAssist}{
  \s\MYname     {Assist}
  \s\MYtext     {You can assist someone else's attack.  You must be
                within ZoC of both the attacker and target.  Within two
                seconds of an attack, direct this at the attacker,
                saying ``\MYname'' and your CR.}
  \s\MYeffect   {I assist your attack.}
  }

\NEW{Abil}{\aKnockOut}{
  \s\MYname     {Knock Out}
  \s\MYtext     {You can knock someone out as an attack.  This requires
                a {\bf blunt} weapon.  Say ``\MYname'' and your CR.}
  \s\MYeffect   {I knock you out.}
  }

\NEW{Abil}{\aWound}{
  \s\MYname     {Wound}
  \s\MYtext     {You can wound someone as an attack.  This requires an
                {\bf edged} weapon, such as a knife.  Say ``\MYname'' and
                your CR.}
  \s\MYeffect   {I wound you.}
  }


\NEW{Abil}{\aUnstable}{
  \s\MYname     {Unstable}
  \s\MYtext	{Your mind has become unhinged by the things you've seen.
  Unless you know otherwise, every half hour your $\psi$ stat goes down by 1.}
  \s\MYeffect   {\ldots{}}
}


%% the \basecombat macro can be prepended to the Char abils list
%% (in char-LIST.tex)
\def\basecombat{\aKnockOut{}\aWound{}\aAssist{}}


%% only some people have these
\NEW{Abil}{\aDisarm}{
  \s\MYname     {Disarm}
  \s\MYtext     {You can disarm one item from someone as an attack.  Say
                ``\MYname'' and your CR.  Point at the item you want to
                disarm.  If the attack works, they must drop that item.}
  \s\MYeffect   {I disarm that item.}
  }

\NEW{Abil}{\aRestrain}{
  \s\MYname     {Restrain}
  \s\MYtext     {You can restrain someone as an attack.  Say ``\MYname''
                and your CR.  You may freely drag, attack, or (if you have
                a weapon) killing-blow them.  To do anything else, or if
                your health state changes, incant ``release'' and let them
                go.}
  \s\MYeffect   {I restrain you.  You are restrained until I incant
                ``release.''}
  }

\NEW{Abil}{\aThrow}{
  \s\MYname     {Throw}
  \s\MYtext     {You can throw someone as an attack.  Say ``\MYname'' and
                your CR.  Point in the direction you want to throw them.}
  \s\MYeffect   {I throw you.  Go in the direction I point ten full steps
                or until you hit a wall or similar.}
  }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
