Automatisch erzeugte Manpages.
Damit nicht jeder sphinx auf dem Rechner haben muss,
behalten wir bis auf weiteres die aus den .rst
erzeugten Manpoages auch im Repo.
Change-Id: Id556c0d11cf5f79659d8350952ce1c014d81ea44
diff --git a/doc/sphinx/man/lfun/spellbook/AddSpell b/doc/sphinx/man/lfun/spellbook/AddSpell
new file mode 100644
index 0000000..65f0df8
--- /dev/null
+++ b/doc/sphinx/man/lfun/spellbook/AddSpell
@@ -0,0 +1,78 @@
+
+AddSpell()
+**********
+
+
+FUNKTION
+========
+
+ varargs int AddSpell(string verb, int kosten, mixed ski)
+
+
+DEFINIERT IN
+============
+
+ /std/spellbook.c
+
+
+ARGUMENTE
+=========
+
+ string verb Name des Spells
+ int kosten normale Kosten (Grundkosten)
+ mixed ski Skillmapping mit allen Eintraegen zum Spell
+
+
+BESCHREIBUNG
+============
+
+ Addiert einen Eintrag fuer den Spell im Spellbook. Wenn dieser
+ Spell direkt vom Spieler (SI_SPELLBOOK) oder (normalerweise)
+ ueber ein Gildenobjekt aufgerufen wird, wird das Mapping auf
+ die Skillinformationen aus Spieler und Gilde addiert und
+ beeinflusst damit den Aufruf der letztlichen Spellfunktion.
+
+
+BEMERKUNGEN
+===========
+
+ Siehe das Verhalten von QuerySpell (gilde) zum Zusammenfuegen
+ der AddSpell-Informationen aus Gilde und Spellbook. Relevant
+ zB fuer Lernrestriktionen.
+
+
+BEISPIEL
+========
+
+ AddSpell("kampfschrei", 30,
+ ([SI_SKILLRESTR_LEARN:([P_LEVEL:13]),
+ SI_MAGIC_TYPE: ({MT_PSYCHO}),
+ SI_SPELL: ([
+ SP_NAME: "Kampfschrei",
+ SP_SHOW_DAMAGE:
+ ({({ -1, "Dir geschieht jedoch nichts.",
+ "@WEM1 geschieht jedoch nichts.",
+ "@WEM1 geschieht jedoch nichts." }),
+ ({ 0, "Du kannst darueber aber nur lachen.",
+ "@WER1 kann darueber aber nur lachen.",
+ "@WER1 kann darueber aber nur lachen." }),
+ ({ 10, "Dir droehnen die Ohren.",
+ "@WEM1 droehnen die Ohren.",
+ "@WEM1 droehnen die Ohren." })
+ })])
+ ]));
+
+
+SIEHE AUCH
+==========
+
+ Spellbook Lernen: Learn, SpellSuccess, Erfolg, Misserfolg
+ * Verwalten: QuerySpell
+ * Angriff: TryAttackSpell, TryDefaultAttackSpell,
+ TryGlobalAttackSpell
+ * Properties: P_GLOBAL_SKILLPROPS, P_SB_SPELLS
+ Skills Lernen: LearnSkill, ModifySkill, LimitAbility
+ * Nutzung: UseSpell, UseSkill
+ * sonstig: spruchermuedung, skill_info_liste
+
+5. Okt 2011 Gloinson
diff --git a/doc/sphinx/man/lfun/spellbook/Erfolg b/doc/sphinx/man/lfun/spellbook/Erfolg
new file mode 100644
index 0000000..6338e6d
--- /dev/null
+++ b/doc/sphinx/man/lfun/spellbook/Erfolg
@@ -0,0 +1,46 @@
+
+Erfolg()
+********
+
+
+FUNKTION
+========
+
+ void Erfolg(object caster, string spell, mapping sinfo)
+
+
+DEFINIERT IN
+============
+
+ /std/spellbook.c
+
+
+ARGUMENTE
+=========
+
+ object caster Spell sprechender Spieler
+ string spell Spellname
+ mapping sinfo Spell-Info-Mapping mit allen Informationen
+
+
+BESCHREIBUNG
+============
+
+ Wird bei Erfolg eines Spells gerufen. Ruft SpellInform() am
+ Environment.
+
+
+SIEHE AUCH
+==========
+
+ Sonstiges: SpellInform
+ Spellbook Lernen: Learn, SpellSuccess, Misserfolg
+ * Verwalten: AddSpell, QuerySpell
+ * Angriff: TryAttackSpell, TryDefaultAttackSpell,
+ TryGlobalAttackSpell
+ * Properties: P_GLOBAL_SKILLPROPS, P_SB_SPELLS
+ Skills Lernen: LearnSkill, ModifySkill, LimitAbility
+ * Nutzung: UseSpell, UseSkill
+ * sonstig: spruchermuedung, skill_info_liste
+
+5. Okt 2011 Gloinson
diff --git a/doc/sphinx/man/lfun/spellbook/Learn b/doc/sphinx/man/lfun/spellbook/Learn
new file mode 100644
index 0000000..8de112e
--- /dev/null
+++ b/doc/sphinx/man/lfun/spellbook/Learn
@@ -0,0 +1,54 @@
+
+Learn()
+*******
+
+
+FUNKTION
+========
+
+ void Learn(object caster, string spell, mapping sinfo)
+
+
+DEFINIERT IN
+============
+
+ /std/spellbook.c
+
+
+ARGUMENTE
+=========
+
+ object caster Derjenige, der den Spruch spricht.
+ string spell Der gesprochene Spell
+ mapping sinfo Mapping mit allen moeglichen Informationen zum Spell
+
+
+BESCHREIBUNG
+============
+
+ Diese Funktion wird von der Funktion "Misserfolg" aus dem
+ Spellbook aufgerufen. Hier lernt der Spieler den Spruch, der
+ nicht geglueckt ist.
+
+
+BEMERKUNGEN
+===========
+
+ Kann auch ueberschrieben werden, wenn man komplexe Lern-Aenderungen
+ vornehmen will. Andere Attribute sind ueber SI_LEARN_ATTRIBUTE
+ setzbar.
+
+
+SIEHE AUCH
+==========
+
+ Spellbook Lernen: SpellSuccess, Erfolg, Misserfolg
+ * Verwalten: AddSpell, QuerySpell
+ * Angriff: TryAttackSpell, TryDefaultAttackSpell,
+ TryGlobalAttackSpell
+ * Properties: P_GLOBAL_SKILLPROPS, P_SB_SPELLS
+ Skills Lernen: LearnSkill, ModifySkill, LimitAbility
+ * Nutzung: UseSpell, UseSkill
+ * sonstig: spruchermuedung, skill_info_liste
+
+5. Okt 2011 Gloinson
diff --git a/doc/sphinx/man/lfun/spellbook/Misserfolg b/doc/sphinx/man/lfun/spellbook/Misserfolg
new file mode 100644
index 0000000..5ffe8de
--- /dev/null
+++ b/doc/sphinx/man/lfun/spellbook/Misserfolg
@@ -0,0 +1,78 @@
+
+Misserfolg()
+************
+
+
+FUNKTION
+========
+
+ void Misserfolg(object caster, string spell, mapping sinfo)
+
+
+DEFINIERT IN
+============
+
+ /std/spellbook.c
+
+
+ARGUMENTE
+=========
+
+ object caster Spell sprechender Spieler
+ string spell Spellname
+ mapping sinfo Spell-Info-Mapping mit allen Informationen
+
+
+BESCHREIBUNG
+============
+
+ Wird bei Misserfolg eines Spells im Spellbook aufgerufen und
+ ruft die Lernfunktion Learn() nach einer Fehlermeldung.
+
+
+
+ Kann ueberschrieben werden, um die Meldungen anzupassen.
+
+
+BEISPIEL
+========
+
+ // Misserfolge im Klerus mit angepassten Meldungen
+ void Misserfolg(object caster, string spell, mapping sinfo) {
+ switch(spell) {
+ case "begrabe":
+ tell_object(caster, BS(
+ "Du begraebst Deine Hoffnungen, dass Du diese Anrufung jemals "
+ "perfekt beherrschen wirst."));
+ tell_room(environment(caster),
+ caster->Name(WER)+" tritt die Leiche lustlos.\n", ({caster}));
+ break;
+ case "blitz":
+ [...]
+ }
+
+
+
+ int old_abil = sinfo[SI_SKILLABILITY];
+ Learn(caster, spell, sinfo);
+ int new_abil = caster->QuerySkillAbility(spell);
+ if (old_abil < new_abil)
+ tell_object(caster, "Die Goetter schenken Dir eine Erleuchtung.\n");
+ else
+ tell_object(caster, "Leider lernst Du nicht aus Deinem Fehler.\n");
+ }
+
+
+SIEHE AUCH
+==========
+
+ Spellbook Lernen: Learn, SpellSuccess, Erfolg
+ * Verwalten: AddSpell, QuerySpell
+ * Angriff: TryAttackSpell, TryDefaultAttackSpell,
+ TryGlobalAttackSpell
+ * Properties: P_GLOBAL_SKILLPROPS, P_SB_SPELLS
+ Skills Lernen: LearnSkill, ModifySkill, LimitAbility
+ * Nutzung: UseSpell, UseSkill
+ * sonstig: spruchermuedung, skill_info_liste
+
+5. Okt 2011 Gloinson
diff --git a/doc/sphinx/man/lfun/spellbook/QuerySpell b/doc/sphinx/man/lfun/spellbook/QuerySpell
new file mode 100644
index 0000000..963d30c
--- /dev/null
+++ b/doc/sphinx/man/lfun/spellbook/QuerySpell
@@ -0,0 +1,46 @@
+
+QuerySpell()
+************
+
+
+FUNKTION
+========
+
+ mapping QuerySpell(string spell)
+
+
+DEFINIERT IN
+============
+
+ /std/spellbook.c
+
+
+ARGUMENTE
+=========
+
+ string spell Name des Spells
+
+
+BESCHREIBUNG
+============
+
+ Gibt das Spellmapping aus P_SB_SPELLS fuer diesen Spell zurueck.
+
+
+
+ Hier enthaelt QuerySpell nur die Spellbook-Informationen.
+
+
+SIEHE AUCH
+==========
+
+ Spellbook Lernen: Learn, SpellSuccess, Erfolg, Misserfolg
+ * Verwalten: AddSpell
+ * Angriff: TryAttackSpell, TryDefaultAttackSpell,
+ TryGlobalAttackSpell
+ * Properties: P_GLOBAL_SKILLPROPS, P_SB_SPELLS
+ Skills Lernen: LearnSkill, ModifySkill, LimitAbility
+ * Nutzung: UseSpell, UseSkill
+ * sonstig: spruchermuedung, skill_info_liste
+
+5. Okt 2011 Gloinson
diff --git a/doc/sphinx/man/lfun/spellbook/SpellSuccess b/doc/sphinx/man/lfun/spellbook/SpellSuccess
new file mode 100644
index 0000000..564c948
--- /dev/null
+++ b/doc/sphinx/man/lfun/spellbook/SpellSuccess
@@ -0,0 +1,52 @@
+
+SpellSuccess()
+**************
+
+
+FUNKTION
+========
+
+ int SpellSuccess(object caster, mapping sinfo)
+
+
+DEFINIERT IN
+============
+
+ /std/spellbook.c
+
+
+ARGUMENTE
+=========
+
+ object caster Spell sprechender Spieler
+ mapping sinfo Spell-Info-Mapping mit allen Informationen
+
+
+BESCHREIBUNG
+============
+
+ Berechnet den Erfolg der Anwendung eines Spells aus seiner
+ SI_SKILLABILITY und dem Skill SK_CASTING im Spieler. Laesst
+ den Spieler bei besonders gutem Gelingen SK_CASTING lernen.
+
+
+BEMERKUNGEN
+===========
+
+ SK_CASTING muss fuer die SK_CASTING-Boni beherrscht werden.
+ Das ist zB im Klerus ab bestimmtem Level der Fall.
+
+
+SIEHE AUCH
+==========
+
+ Spellbook Lernen: Learn, Erfolg, Misserfolg
+ * Verwalten: AddSpell, QuerySpell
+ * Angriff: TryAttackSpell, TryDefaultAttackSpell,
+ TryGlobalAttackSpell
+ * Properties: P_GLOBAL_SKILLPROPS, P_SB_SPELLS
+ Skills Lernen: LearnSkill, ModifySkill, LimitAbility
+ * Nutzung: UseSpell, UseSkill
+ * sonstig: spruchermuedung, skill_info_liste
+
+5. Okt 2011 Gloinson
diff --git a/doc/sphinx/man/lfun/spellbook/TryAttackSpell b/doc/sphinx/man/lfun/spellbook/TryAttackSpell
new file mode 100644
index 0000000..d66684e
--- /dev/null
+++ b/doc/sphinx/man/lfun/spellbook/TryAttackSpell
@@ -0,0 +1,57 @@
+
+TryAttackSpell()
+****************
+
+** gilden-doku
+ o TryAttackSpell(opfer,schaden,typen,is_spell,caster,info)
+ Versucht den Angriffs-Spruch auf den Gegner anzuwenden. Die
+ mittleren 4 Werte sind die, die auch bei Defend uebergeben
+ werden. Dabei wird die Abwehrfaehigkeit des Gegners gegen Magie
+ und das Skill-Attribut SA_DAMAGE automatisch beruecksichtigt.
+
+
+FUNKTION
+========
+
+int TryAttackSpell(object victim, int damage, mixed dtypes,
+ mixed is_spell, object caster, mapping sinfo)
+
+
+ARGUMENTE
+=========
+
+ victim : Das arme Opfer.
+ damage : Der Schaden.
+ dtypes : Die Schadensarten.
+ is_spell : Ist es ein Spell? Werden noch Spezielle Parameter
+ uebergeben (als mapping) ?
+ caster : Derjenige, der den Spruch spricht.
+ sinfo : Mapping mit allen moeglichen Informationen zum Spell
+
+
+BESCHREIBUNG
+============
+
+ Diese Funktion wird vom Spellbook aufgerufen, wenn der Spieler
+ einen Angriffsspell gemacht hat und damit Schaden anrichten will.
+
+
+RUECKGABEWERT
+=============
+
+ Der Wert, der vom Defend() des Gegners zurueckgeliefert wird.
+
+
+BEMERKUNGEN
+===========
+
+ Zu erst wird ueberprueft, ob das Ziel ueberhaupt angreifbar ist. Dies
+ verhindert das ueben von Spells an unangreifbaren NPCs.
+ Als naechstes wird die Faehigkeit, Spells abzuwehren ueberprueft.
+ Falls beide Abfragen ok sind, wird Defend aufgerufen.
+
+Siehe auch:
+
+TryDefaultAttackSpell (to be written)
+
+07.10.2007, Zesstra