remove spellid.h, it represents an outdated way of doing things.

merge the enum into combatspells, and reduce it to the spells actually used here.
This commit is contained in:
Enno Rehling 2015-08-06 17:57:51 +02:00
parent b00d7b6d5a
commit 4c877288d3
4 changed files with 25 additions and 180 deletions

View File

@ -118,7 +118,6 @@ extern "C" {
extern int num_races;
typedef struct race {
struct param *parameters;
char *_name;
float magres;
float maxaura; /* Faktor auf Maximale Aura */
@ -139,6 +138,7 @@ extern "C" {
int df_default; /* Verteidigungsskill Unbewaffnet (default: -2) */
int at_bonus; /* Verändert den Angriffsskill (default: 0) */
int df_bonus; /* Verändert den Verteidigungskill (default: 0) */
struct param *parameters; // additional properties, for an example see natural_armor
const struct spell *precombatspell;
signed char *study_speed; /* study-speed-bonus in points/turn (0=30 Tage) */
int flags;

View File

@ -1,176 +0,0 @@
/*
* +-------------------+ Christian Schlittchen <corwin@amber.kn-bremen.de>
* | | Enno Rehling <enno@eressea.de>
* | Eressea PBEM host | Katja Zedel <katze@felidae.kn-bremen.de>
* | (c) 1998 - 2005 |
* | | This program may not be used, modified or distributed
* +-------------------+ without prior permission by the authors of Eressea.
*
*/
#ifndef H_KRNL_SPELLID
#define H_KRNL_SPELLID
/* Sprüche. Neue NUR hinten anfügen, oder das Datenfile geht kaputt */
enum {
SPL_NOSPELL = 0,
SPL_FIREBALL = 4,
SPL_HAGEL,
SPL_RUSTWEAPON,
SPL_COMBATRUST,
SPL_TREEGROW,
SPL_HEALING,
SPL_HEALINGSONG,
SPL_BADDREAMS,
SPL_GOODDREAMS,
SPL_DREAMREADING,
SPL_SWEETDREAMS,
SPL_TIREDSOLDIERS,
SPL_PLAGUE,
SPL_MAGICBOOST,
SPL_CHAOSROW,
SPL_SONG_OF_CONFUSION,
SPL_FLEE,
SPL_SONG_OF_FEAR,
SPL_BERSERK,
SPL_BLOODTHIRST,
SPL_MAELSTROM,
SPL_TRANSFERAURA_DRUIDE = 27,
SPL_TRANSFERAURA_BARDE,
SPL_TRANSFERAURA_CHAOS,
SPL_TRANSFERAURA_TRAUM,
SPL_TRANSFERAURA_ASTRAL,
SPL_STONEGOLEM,
SPL_IRONGOLEM,
SPL_SUMMONSHADOW,
SPL_SUMMONSHADOWLORDS,
SPL_REELING_ARROWS,
SPL_ANTIMAGICZONE = 37,
SPL_KAELTESCHUTZ = 39,
SPL_STEALAURA,
SPL_SUMMONUNDEAD,
SPL_AURALEAK,
SPL_GREAT_DROUGHT,
SPL_STRONG_WALL,
SPL_HOMESTONE,
SPL_DROUGHT,
SPL_FOREST_FIRE = 47,
SPL_SUMMONENT = 49,
SPL_DISTURBINGDREAMS,
SPL_DENYATTACK,
SPL_SLEEP,
SPL_EARTHQUAKE,
SPL_IRONKEEPER,
SPL_STORMWINDS,
SPL_GOODWINDS,
SPL_FLYING_SHIP,
SPL_SUMMON_ALP,
SPL_WINDSHIELD,
SPL_RAISEPEASANTS,
SPL_DEPRESSION,
SPL_HEADACHE = 62,
SPL_ENTERASTRAL = 64,
SPL_LEAVEASTRAL,
SPL_SHOWASTRAL,
SPL_VERSTEINERN,
SPL_TREEWALKENTER,
SPL_TREEWALKEXIT,
SPL_CHAOSSUCTION,
SPL_VIEWREALITY,
SPL_DISRUPTASTRAL,
SPL_SEDUCE,
SPL_PUMP,
SPL_CALM_MONSTER,
SPL_HERO,
SPL_FRIGHTEN,
SPL_MINDBLAST,
SPL_SPEED,
SPL_SPEED2,
SPL_FIREDRAGONODEM,
SPL_DRAGONODEM,
SPL_WYRMODEM, /* 83 */
SPL_MAGICSTREET,
SPL_REANIMATE,
SPL_RECRUIT,
SPL_GENEROUS,
SPL_PERMTRANSFER,
SPL_SONG_OF_PEACE,
SPL_MIGRANT,
SPL_RALLYPEASANTMOB,
SPL_RAISEPEASANTMOB,
SPL_ILL_SHAPESHIFT,
SPL_WOLFHOWL,
SPL_FOG_OF_CONFUSION,
SPL_DREAM_OF_CONFUSION,
SPL_RESISTMAGICBONUS,
SPL_KEEPLOOT,
SPL_SCHILDRUNEN,
SPL_SONG_RESISTMAGIC,
SPL_SONG_SUSCEPTMAGIC,
SPL_ANALYSEMAGIC,
SPL_ANALYSEDREAM,
SPL_UNIT_ANALYSESONG,
SPL_OBJ_ANALYSESONG,
SPL_TYBIED_DESTROY_MAGIC,
SPL_DESTROY_MAGIC,
SPL_METEORRAIN,
SPL_REDUCESHIELD,
SPL_ARMORSHIELD,
SPL_DEATHCLOUD,
SPL_ORKDREAM,
SPL_SUMMONDRAGON = 113,
SPL_MOVECASTLE = 116,
SPL_BLESSSTONECIRCLE,
SPL_ILLAUN_FAMILIAR,
SPL_GWYRRD_FAMILIAR,
SPL_DRAIG_FAMILIAR,
SPL_CERDDOR_FAMILIAR,
SPL_TYBIED_FAMILIAR,
SPL_SONG_OF_ENSLAVE = 123,
SPL_FUMBLECURSE = 136,
SPL_ICASTLE,
SPL_GWYRRD_DESTROY_MAGIC,
SPL_DRAIG_DESTROY_MAGIC,
SPL_ILLAUN_DESTROY_MAGIC,
SPL_CERDDOR_DESTROY_MAGIC,
SPL_GWYRRD_ARMORSHIELD,
SPL_DRAIG_FUMBLESHIELD,
SPL_GWYRRD_FUMBLESHIELD,
SPL_CERRDOR_FUMBLESHIELD,
SPL_TYBIED_FUMBLESHIELD,
SPL_SHADOWKNIGHTS = 147,
SPL_ITEMCLOAK = 150,
SPL_FIREWALL,
SPL_WISPS,
SPL_SPARKLE_CHAOS,
SPL_SPARKLE_DREAM = 154,
SPL_PULLASTRAL = 156,
SPL_FETCHASTRAL = 157,
SPL_SHOCKWAVE = 163,
SPL_UNDEADHERO = 164,
SPL_BECOMEWYRM = 166,
SPL_ETERNIZEWALL,
SPL_PUTTOREST,
SPL_UNHOLYPOWER,
SPL_HOLYGROUND,
SPL_BLOODSACRIFICE,
SPL_MALLORN,
SPL_CLONECOPY,
SPL_DRAINODEM,
SPL_AURA_OF_FEAR,
SPL_SHADOWCALL,
SPL_MALLORNTREEGROW = 177,
SPL_BIGRECRUIT = 179,
SPL_IMMOLATION,
SPL_FIREODEM, /* 181 */
SPL_ICEODEM,
SPL_ACIDODEM,
/* no longer used, but kept for reference: */
XMLSPL_WDWPYRAMID_TRAUM = 184,
XMLSPL_WDWPYRAMID_ASTRAL = 185,
XMLSPL_WDWPYRAMID_DRUIDE = 186,
XMLSPL_WDWPYRAMID_BARDE = 187,
XMLSPL_WDWPYRAMID_CHAOS = 188
};
#endif

View File

@ -36,7 +36,6 @@
#include <kernel/connection.h>
#include <kernel/building.h>
#include <kernel/curse.h>
#include <kernel/spellid.h>
#include <kernel/faction.h>
#include <kernel/item.h>
#include <kernel/messages.h>
@ -6663,7 +6662,6 @@ static spelldata spell_functions[] = {
{ "firestorm", sp_immolation, 0 },
{ "coldfront", sp_immolation, 0 },
{ "acidrain", sp_immolation, 0 },
/* SPL_NOSPELL MUSS der letzte Spruch der Liste sein */
{ 0, 0, 0 }
};

View File

@ -25,7 +25,6 @@
#include <kernel/region.h>
#include <kernel/unit.h>
#include <kernel/spell.h>
#include <kernel/spellid.h>
#include <kernel/race.h>
#include <kernel/terrain.h>
@ -47,6 +46,30 @@
#define EFFECT_HEALING_SPELL 5
// Some spells with a fixed, known ID (in XML).
// TODO: this method of identifying spells is error-prone, do not use it for new spells.
enum {
SPL_FIREBALL = 4,
SPL_HAGEL = 5,
SPL_CHAOSROW = 18,
SPL_FLEE = 20,
SPL_SONG_OF_FEAR = 21,
SPL_BERSERK = 22,
SPL_BLOODTHIRST = 23,
SPL_WINDSHIELD = 59,
SPL_HERO = 76,
SPL_METEORRAIN = 108,
SPL_REDUCESHIELD = 109,
SPL_ARMORSHIELD = 110,
SPL_DRAIG_FUMBLESHIELD = 143,
SPL_GWYRRD_FUMBLESHIELD = 144,
SPL_CERRDOR_FUMBLESHIELD = 145,
SPL_TYBIED_FUMBLESHIELD = 146,
SPL_SHADOWKNIGHTS = 147,
SPL_SHOCKWAVE = 163,
SPL_AURA_OF_FEAR = 175
};
/* ------------------------------------------------------------------ */
/* Kampfzauberfunktionen */