forked from github/server
remove the nearly unused illusion race
This commit is contained in:
parent
5ba3d76efb
commit
4bd295e3b2
|
@ -3266,20 +3266,6 @@
|
|||
<text locale="de">"$unit($unit) marschiert in eine Antimagiezone und löst sich auf."</text>
|
||||
<text locale="en">"$unit($unit) walks into an antimagical zone and dissolves."</text>
|
||||
</message>
|
||||
<message name="illusiondissolve" section="events">
|
||||
<type>
|
||||
<arg name="unit" type="unit"/>
|
||||
</type>
|
||||
<text locale="de">"$unit($unit) hat sich unbemerkt verflüchtigt."</text>
|
||||
<text locale="en">"$unit($unit) has dissolved without a trace."</text>
|
||||
</message>
|
||||
<message name="warnillusiondissolve" section="events">
|
||||
<type>
|
||||
<arg name="unit" type="unit"/>
|
||||
</type>
|
||||
<text locale="de">"$unit($unit) wird sich bald verflüchtigen."</text>
|
||||
<text locale="en">"$unit($unit) will dissolve soon."</text>
|
||||
</message>
|
||||
<message name="fleescared" section="events">
|
||||
<type>
|
||||
<arg name="amount" type="int"/>
|
||||
|
|
|
@ -696,13 +696,6 @@
|
|||
<attack type="4" damage="2d12"/>
|
||||
</race>
|
||||
|
||||
<race name="illusion" maxaura="0.000000" regaura="0.000000" weight="0" capacity="0" speed="1.0" hp="1" damage="1d1" unarmedattack="0" unarmeddefense="0" walk="yes" canlearn="no" teach="no" noweapons="yes" illusionary="yes">
|
||||
<ai splitsize="999999"/>
|
||||
<function name="age" value="ageillusion"/>
|
||||
<skill name="unarmed" modifier="-99"/>
|
||||
<attack type="1" damage="1d1"/>
|
||||
</race>
|
||||
|
||||
<race name="undead" maxaura="1.0" regaura="1.0" weight="1000" capacity="540" speed="1.0" hp="20" damage="1d7" unarmedattack="0" unarmeddefense="0" attackmodifier="1" defensemodifier="1" scarepeasants="yes" walk="yes" canlearn="no" teach="no" noheal="yes" undead="yes" equipment="yes">
|
||||
<ai splitsize="20000" moverandom="yes"/>
|
||||
<function name="name" value="nameundead"/>
|
||||
|
|
|
@ -745,12 +745,6 @@
|
|||
<attack type="4" damage="1d30"/>
|
||||
<attack type="6" spell="fiery_dragonbreath" level="3" />
|
||||
</race>
|
||||
<race name="illusion" maxaura="0.000000" regaura="0.000000" weight="0" capacity="0" speed="1.000000" hp="1" damage="1d1" unarmedattack="0" unarmeddefense="0" walk="yes" canlearn="no" teach="no" noweapons="yes" illusionary="yes">
|
||||
<ai splitsize="999999"/>
|
||||
<function name="age" value="ageillusion"/>
|
||||
<skill name="unarmed" modifier="-99"/>
|
||||
<attack type="1" damage="1d1"/>
|
||||
</race>
|
||||
<race name="undead" maxaura="1.000000" regaura="1.000000" weight="1000" capacity="540" speed="1.000000" hp="20" damage="1d7" unarmedattack="0" unarmeddefense="0" attackmodifier="1" defensemodifier="1" scarepeasants="yes" walk="yes" canlearn="no" teach="no" noheal="yes" undead="yes" equipment="yes">
|
||||
<ai splitsize="20000" moverandom="yes"/>
|
||||
<function name="name" value="nameundead"/>
|
||||
|
|
|
@ -66,7 +66,7 @@ static int rc_changes = 1;
|
|||
|
||||
static const char *racenames[MAXRACES] = {
|
||||
"dwarf", "elf", NULL, "goblin", "human", "troll", "demon", "insect",
|
||||
"halfling", "cat", "aquarian", "orc", "snotling", "undead", "illusion",
|
||||
"halfling", "cat", "aquarian", "orc", "snotling", "undead", NULL,
|
||||
"youngdragon", "dragon", "wyrm", "ent", "catdragon", "dracoid",
|
||||
NULL, "spell", "irongolem", "stonegolem", "shadowdemon",
|
||||
"shadowmaster", "mountainguard", "alp", "toad", "braineater", "peasant",
|
||||
|
@ -296,9 +296,16 @@ static race *rc_find_i(const char *name)
|
|||
while (rc && strcmp(rname, rc->_name) != 0) {
|
||||
rc = rc->next;
|
||||
}
|
||||
if (!rc && strcmp(name, "uruk") == 0) {
|
||||
rc = rc_find_i("orc");
|
||||
if (!rc) {
|
||||
const char *rc_depr[] = { "uruk", "orc", "illusion", "template", NULL };
|
||||
int i;
|
||||
for (i = 0; rc_depr[i]; i += 2) {
|
||||
if (strcmp(name, rc_depr[i]) == 0) {
|
||||
rc = rc_find_i(rc_depr[i + 1]);
|
||||
log_warning("a reference was made to the retired race '%s', returning '%s'.", name, rc->_name);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
|
|
@ -65,8 +65,8 @@ extern "C" {
|
|||
RC_ORC,
|
||||
RC_SNOTLING,
|
||||
RC_UNDEAD,
|
||||
RC_ILLUSION,
|
||||
RC_FIREDRAGON,
|
||||
|
||||
RC_FIREDRAGON = 15,
|
||||
RC_DRAGON,
|
||||
RC_WYRM,
|
||||
RC_TREEMAN,
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
PROJECT(races C)
|
||||
SET(_FILES
|
||||
dragons.c
|
||||
illusion.c
|
||||
races.c
|
||||
zombies.c
|
||||
)
|
||||
|
|
|
@ -1,38 +0,0 @@
|
|||
/*
|
||||
* Eressea PB(E)M host Copyright (C) 1998-2015
|
||||
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
||||
* Katja Zedel (katze@felidae.kn-bremen.de)
|
||||
* Henning Peters (faroul@beyond.kn-bremen.de)
|
||||
* Enno Rehling (enno@eressea.de)
|
||||
* Ingo Wilken (Ingo.Wilken@informatik.uni-oldenburg.de)
|
||||
*
|
||||
* This program may not be used, modified or distributed without
|
||||
* prior permission by the authors of Eressea.
|
||||
*/
|
||||
|
||||
#include <platform.h>
|
||||
|
||||
/* kernel includes */
|
||||
#include <kernel/race.h>
|
||||
#include <kernel/unit.h>
|
||||
#include <kernel/faction.h>
|
||||
#include <kernel/messages.h>
|
||||
|
||||
/* libc includes */
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
|
||||
#define ILLUSIONMAX 6
|
||||
|
||||
void age_illusion(unit * u)
|
||||
{
|
||||
if (u->faction->race != get_race(RC_ILLUSION)) {
|
||||
if (u->age == ILLUSIONMAX) {
|
||||
ADDMSG(&u->faction->msgs, msg_message("warnillusiondissolve", "unit", u));
|
||||
}
|
||||
else if (u->age > ILLUSIONMAX) {
|
||||
set_number(u, 0);
|
||||
ADDMSG(&u->faction->msgs, msg_message("illusiondissolve", "unit", u));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -31,7 +31,6 @@
|
|||
|
||||
void age_firedragon(struct unit *u);
|
||||
void age_dragon(struct unit *u);
|
||||
void age_illusion(struct unit *u);
|
||||
void age_undead(struct unit *u);
|
||||
void age_skeleton(struct unit *u);
|
||||
void age_zombie(struct unit *u);
|
||||
|
@ -101,7 +100,6 @@ void register_races(void)
|
|||
|
||||
/* function age for race->age() */
|
||||
register_function((pf_generic)age_undead, "ageundead");
|
||||
register_function((pf_generic)age_illusion, "ageillusion");
|
||||
register_function((pf_generic)age_skeleton, "ageskeleton");
|
||||
register_function((pf_generic)age_zombie, "agezombie");
|
||||
register_function((pf_generic)age_ghoul, "ageghoul");
|
||||
|
|
|
@ -123,13 +123,12 @@ const char *options[MAXOPTIONS] = {
|
|||
|
||||
bool omniscient(const faction *f)
|
||||
{
|
||||
static const race *rc_template, *rc_illusion;
|
||||
static const race *rc_template;
|
||||
static int cache;
|
||||
if (rc_changed(&cache)) {
|
||||
rc_illusion = get_race(RC_ILLUSION);
|
||||
rc_template = get_race(RC_TEMPLATE);
|
||||
}
|
||||
return (f->race == rc_template || f->race == rc_illusion);
|
||||
return (f->race == rc_template);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue