diff --git a/src/common/gamecode/economy.c b/src/common/gamecode/economy.c index 7a0e05220..d4ce52abc 100644 --- a/src/common/gamecode/economy.c +++ b/src/common/gamecode/economy.c @@ -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; diff --git a/src/common/gamecode/give.c b/src/common/gamecode/give.c index 46c035255..10ca486bd 100644 --- a/src/common/gamecode/give.c +++ b/src/common/gamecode/give.c @@ -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; diff --git a/src/common/gamecode/randenc.c b/src/common/gamecode/randenc.c index 4932c5554..86017c9e5 100644 --- a/src/common/gamecode/randenc.c +++ b/src/common/gamecode/randenc.c @@ -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]; diff --git a/src/common/gamecode/spy.c b/src/common/gamecode/spy.c index 8fd36d1f8..b04934ae7 100644 --- a/src/common/gamecode/spy.c +++ b/src/common/gamecode/spy.c @@ -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) { diff --git a/src/common/kernel/alchemy.c b/src/common/kernel/alchemy.c index e8085ff6e..01835864f 100644 --- a/src/common/kernel/alchemy.c +++ b/src/common/kernel/alchemy.c @@ -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); diff --git a/src/common/kernel/battle.c b/src/common/kernel/battle.c index f1136bc98..160f525f3 100644 --- a/src/common/kernel/battle.c +++ b/src/common/kernel/battle.c @@ -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.indexnumber); + df->person[dt.index].hp = du->race->hitpoints; + return false; } - assert(dt.index>=0 && dt.indexnumber); - df->person[dt.index].hp = du->race->hitpoints; - return false; } - #ifdef SHOW_KILLS ++at.fighter->kills; #endif diff --git a/src/common/kernel/config.c b/src/common/kernel/config.c index 1b688d7b7..d5154849c 100644 --- a/src/common/kernel/config.c +++ b/src/common/kernel/config.c @@ -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]; diff --git a/src/common/kernel/faction.c b/src/common/kernel/faction.c index afd974517..d2c62f54b 100644 --- a/src/common/kernel/faction.c +++ b/src/common/kernel/faction.c @@ -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)); diff --git a/src/common/kernel/race.c b/src/common/kernel/race.c index 4c41140ff..d63b73ad8 100644 --- a/src/common/kernel/race.c +++ b/src/common/kernel/race.c @@ -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->versionrace->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);