rename uruk->orc for good.

This commit is contained in:
Enno Rehling 2010-02-22 06:44:04 +00:00
parent 779b95c6bc
commit 293835db2e
13 changed files with 50 additions and 44 deletions

View File

@ -575,7 +575,7 @@ recruit(unit * u, struct order * ord, request ** recruitorders)
}
if (!(rc->ec_flags & ECF_REC_HORSES) && fval(r, RF_ORCIFIED)) {
if (rc != new_race[RC_URUK])
if (rc != new_race[RC_ORC])
{
cmistake(u, ord, 238, MSG_EVENT);
return;

View File

@ -305,7 +305,7 @@ give_men(int n, unit * u, unit * u2, struct order * ord)
} else {
if (getunitpeasants) {
#ifdef ORCIFICATION
if (u->race == new_race[RC_ORC] && !fval(u->region, RF_ORCIFIED)) {
if (u->race == new_race[RC_SNOTLING] && !fval(u->region, RF_ORCIFIED)) {
attrib *a = a_find(u->region->attribs, &at_orcification);
if (!a) a = a_add(&u->region->attribs, a_new(&at_orcification));
a->data.i += n;

View File

@ -582,20 +582,21 @@ damage_unit(unit *u, const char *dam, boolean physical, boolean magic)
}
/* Heiltrank */
if (get_effect(u, oldpotiontype[P_HEAL]) > 0) {
change_effect(u, oldpotiontype[P_HEAL], -1);
heiltrank = 1;
} else if (i_get(u->items, oldpotiontype[P_HEAL]->itype) > 0) {
i_change(&u->items, oldpotiontype[P_HEAL]->itype, -1);
change_effect(u, oldpotiontype[P_HEAL], 3);
heiltrank = 1;
if (oldpotiontype[P_HEAL]) {
if (get_effect(u, oldpotiontype[P_HEAL]) > 0) {
change_effect(u, oldpotiontype[P_HEAL], -1);
heiltrank = 1;
} else if (i_get(u->items, oldpotiontype[P_HEAL]->itype) > 0) {
i_change(&u->items, oldpotiontype[P_HEAL]->itype, -1);
change_effect(u, oldpotiontype[P_HEAL], 3);
heiltrank = 1;
}
if (heiltrank && (chance(0.50))) {
hp[i] = u->hp/u->number;
hp_rem += hp[i];
continue;
}
}
if (heiltrank && (chance(0.50))) {
hp[i] = u->hp/u->number;
hp_rem += hp[i];
continue;
}
dead++;
} else {
hp_rem += hp[i];

View File

@ -264,7 +264,7 @@ setstealth_cmd(unit * u, struct order * ord)
if (u->race == new_race[RC_DAEMON]) {
race_t allowed[] = { RC_DWARF, RC_ELF, RC_ORC, RC_GOBLIN, RC_HUMAN,
RC_TROLL, RC_DAEMON, RC_INSECT, RC_HALFLING, RC_CAT, RC_AQUARIAN,
RC_URUK, NORACE };
NORACE };
int i;
for (i=0;allowed[i]!=NORACE;++i) if (new_race[allowed[i]]==trace) break;
if (new_race[allowed[i]]==trace) {

View File

@ -179,7 +179,7 @@ use_potion(unit * u, const item_type * itype, int amount, struct order *ord)
{
const potion_type * ptype = resource2potion(itype->rtype);
if (ptype==oldpotiontype[P_HEAL]) {
if (oldpotiontype[P_HEAL] && ptype==oldpotiontype[P_HEAL]) {
return EUNUSABLE;
} else {
int result = begin_potion(u, ptype, ord);

View File

@ -656,7 +656,7 @@ weapon_skill(const weapon_type * wtype, const unit * u, boolean attacking)
skill = effskill(u, SK_WEAPONLESS);
if (skill<=0) {
/* wenn kein waffenloser kampf, dann den rassen-defaultwert */
if (u->race == new_race[RC_URUK]) {
if (u->race == new_race[RC_ORC]) {
int sword = effskill(u, SK_MELEE);
int spear = effskill(u, SK_SPEAR);
skill = MAX(sword, spear) - 3;
@ -1334,25 +1334,26 @@ terminate(troop dt, troop at, int type, const char *damage, boolean missile)
}
/* Heiltrank schluerfen und hoffen */
if (get_effect(du, oldpotiontype[P_HEAL]) > 0) {
change_effect(du, oldpotiontype[P_HEAL], -1);
heiltrank = 1;
} else if (i_get(du->items, oldpotiontype[P_HEAL]->itype) > 0) {
i_change(&du->items, oldpotiontype[P_HEAL]->itype, -1);
change_effect(du, oldpotiontype[P_HEAL], 3);
heiltrank = 1;
}
if (heiltrank && (chance(0.50))) {
{
message * m = msg_message("battle::potionsave", "unit", du);
message_faction(b, du->faction, m);
msg_release(m);
if (oldpotiontype[P_HEAL]) {
if (get_effect(du, oldpotiontype[P_HEAL]) > 0) {
change_effect(du, oldpotiontype[P_HEAL], -1);
heiltrank = 1;
} else if (i_get(du->items, oldpotiontype[P_HEAL]->itype) > 0) {
i_change(&du->items, oldpotiontype[P_HEAL]->itype, -1);
change_effect(du, oldpotiontype[P_HEAL], 3);
heiltrank = 1;
}
if (heiltrank && (chance(0.50))) {
{
message * m = msg_message("battle::potionsave", "unit", du);
message_faction(b, du->faction, m);
msg_release(m);
}
assert(dt.index>=0 && dt.index<du->number);
df->person[dt.index].hp = du->race->hitpoints;
return false;
}
assert(dt.index>=0 && dt.index<du->number);
df->person[dt.index].hp = du->race->hitpoints;
return false;
}
#ifdef SHOW_KILLS
++at.fighter->kills;
#endif

View File

@ -2805,7 +2805,7 @@ default_wage(const region *r, const faction * f, const race * rc, int in_turn)
if (f!=NULL) {
int index = 0;
if (rc==new_race[RC_ORC] || rc==new_race[RC_URUK] || rc==new_race[RC_SNOTLING]) {
if (rc==new_race[RC_ORC] || rc==new_race[RC_SNOTLING]) {
index = 1;
}
wage = wagetable[esize][index];

View File

@ -188,7 +188,7 @@ addfaction(const char *email, const char * password,
faction * f = calloc(sizeof(faction), 1);
char buf[128];
assert(frace && frace != new_race[RC_ORC]);
assert(frace);
if (set_email(&f->email, email)!=0) {
log_error(("Invalid email address for faction %s: %s\n", itoa36(f->no), email));

View File

@ -289,11 +289,15 @@ read_race_reference(struct storage * store)
variant result;
char zName[20];
store->r_tok_buf(store, zName, sizeof(zName));
if (strcmp(zName, "none")==0) {
if (store->version<FOSS_VERSION && strcmp(zName, "uruk")==0) {
result.v = rc_find("orc");
} else if (strcmp(zName, "none")==0) {
result.v = NULL;
return result;
} else {
result.v = rc_find(zName);
assert(result.v!=NULL);
}
assert(result.v!=NULL);
return result;
}

View File

@ -310,7 +310,6 @@ enum {
enum {
RC_DWARF, /* 0 - Zwerg */
RC_ELF,
RC_ORC,
RC_GOBLIN,
RC_HUMAN,
@ -321,7 +320,7 @@ enum {
RC_CAT,
RC_AQUARIAN,
RC_URUK,
RC_ORC,
RC_SNOTLING,
RC_UNDEAD,
RC_ILLUSION,

View File

@ -64,6 +64,7 @@
#define ALLIANCELEADER_VERSION 333 /* alliances have a leader */
#define CURSEFLOAT_VERSION 334 /* all curse-effects are float */
#define MOURNING_VERSION 335 /* mourning peasants */
#define FOSS_VERSION 336 /* the open source release */
#define MIN_VERSION CURSETYPE_VERSION /* minimal datafile we support */
#define RELEASE_VERSION MOURNING_VERSION /* current datafile */

View File

@ -596,8 +596,8 @@ race_compat(void)
{
/* required for old_race, do not change order! */
const char * oldracenames[MAXRACES] = {
"dwarf", "elf", "orc", "goblin", "human", "troll", "demon", "insect",
"halfling", "cat", "aquarian", "uruk", "snotling", "undead", "illusion",
"dwarf", "elf", "goblin", "human", "troll", "demon", "insect",
"halfling", "cat", "aquarian", "orc", "snotling", "undead", "illusion",
"youngdragon", "dragon", "wyrm", "ent", "catdragon", "dracoid",
"special", "spell", "irongolem", "stonegolem", "shadowdemon",
"shadowmaster", "mountainguard", "alp", "toad", "braineater", "peasant",

View File

@ -3988,7 +3988,7 @@ sp_bigrecruit(castorder *co)
* Rekrutierungskosten mit einfliessen lassen. */
n = (int)force + lovar((force * force * 1000)/f->race->recruitcost);
if (f->race==new_race[RC_URUK]) {
if (f->race==new_race[RC_ORC]) {
n = MIN(2*maxp, n);
n = MAX(n, 1);
rsetpeasants(r, maxp - (n+1) / 2);