forked from github/server
"(gezauberte) Skelette können nie bewachen" - removed an old hack (CANGUARD flag) - gave summoned undead some base skills.
This commit is contained in:
parent
f8398db851
commit
8421cf23c1
4 changed files with 18 additions and 3 deletions
|
@ -203,7 +203,7 @@ armedmen(const unit * u)
|
|||
item * itm;
|
||||
int n = 0;
|
||||
if (!(urace(u)->flags & RCF_NOWEAPONS)) {
|
||||
if ((urace(u)->ec_flags & CANGUARD) || effskill(u, SK_WEAPONLESS)>=1) {
|
||||
if (effskill(u, SK_WEAPONLESS)>=1) {
|
||||
/* kann ohne waffen bewachen: fuer drachen */
|
||||
n = u->number;
|
||||
} else {
|
||||
|
|
|
@ -140,7 +140,6 @@ extern int rc_specialdamage(const race *, const race *, const struct weapon_type
|
|||
#define GIVEPERSON (1<<2) /* übergibt Personen */
|
||||
#define GIVEUNIT (1<<3) /* Einheiten an andere Partei übergeben */
|
||||
#define GETITEM (1<<4) /* nimmt Gegenstände an */
|
||||
#define CANGUARD (1<<5) /* bewachen auch ohne Waffen */
|
||||
#define ECF_REC_HORSES (1<<6) /* Rekrutiert aus Pferden */
|
||||
#define ECF_REC_ETHEREAL (1<<7) /* Rekrutiert aus dem Nichts */
|
||||
#define ECF_REC_UNLIMITED (1<<8) /* Rekrutiert ohne Limit */
|
||||
|
|
|
@ -1495,7 +1495,6 @@ parse_races(xmlDocPtr doc)
|
|||
if (xml_bvalue(node, "giveperson", false)) rc->ec_flags |= GIVEPERSON;
|
||||
if (xml_bvalue(node, "giveunit", false)) rc->ec_flags |= GIVEUNIT;
|
||||
if (xml_bvalue(node, "getitem", false)) rc->ec_flags |= GETITEM;
|
||||
if (xml_bvalue(node, "canguard", false)) rc->ec_flags |= CANGUARD;
|
||||
if (xml_bvalue(node, "recruithorses", false)) rc->ec_flags |= ECF_REC_HORSES;
|
||||
if (xml_bvalue(node, "recruitethereal", false)) rc->ec_flags |= ECF_REC_ETHEREAL;
|
||||
if (xml_bvalue(node, "recruitunlimited", false)) rc->ec_flags |= ECF_REC_UNLIMITED;
|
||||
|
|
|
@ -3590,6 +3590,22 @@ sp_bloodsacrifice(castorder *co)
|
|||
return cast_level;
|
||||
}
|
||||
|
||||
/** gives a summoned undead unit some base skills.
|
||||
*/
|
||||
static void
|
||||
skill_summoned(unit * u, int level)
|
||||
{
|
||||
if (level>0) {
|
||||
const race * rc = u->race;
|
||||
skill_t sk;
|
||||
for (sk=0;sk!=MAXSKILLS;++sk) {
|
||||
if (rc->bonus[sk>0]) {
|
||||
set_level(u, sk, level);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------- */
|
||||
/* Name: Totenruf - Mächte des Todes
|
||||
* Stufe: 6
|
||||
|
@ -3630,6 +3646,7 @@ sp_summonundead(castorder *co)
|
|||
|
||||
u = create_unit(r, mage->faction, undead, race, 0, NULL, mage);
|
||||
make_undead_unit(u);
|
||||
skill_summoned(u, cast_level/2);
|
||||
|
||||
ADDMSG(&mage->faction->msgs, msg_message("summonundead_effect_1", "mage region amount", mage, r, undead));
|
||||
ADDMSG(&r->msgs, msg_message("summonundead_effect_2", "mage region", mage, r));
|
||||
|
|
Loading…
Reference in a new issue