- Zauber und Illusionen nehmen keinen Schaden

- Gegenstände in Partei- und Regionspool kann man mit ZEIGE anzeigen
This commit is contained in:
Enno Rehling 2005-12-28 21:07:01 +00:00
parent 619a3f5387
commit 2b1c46bbcc
2 changed files with 16 additions and 1 deletions

View File

@ -2237,7 +2237,18 @@ display_item(faction *f, unit *u, const item_type * itype)
char * bufp = buf; char * bufp = buf;
size_t size = sizeof(buf), rsize; size_t size = sizeof(buf), rsize;
if (u && *i_find(&u->items, itype) == NULL) return false; if (u!=NULL) {
int i = i_get(u->items, itype);
if (i==0) {
if (u->region->land!=NULL) {
i = i_get(u->region->land->items, itype);
}
if (i==0) {
i = i_get(u->faction->items, itype);
if (i==0) return false;
}
}
}
name = resourcename(itype->rtype, 0); name = resourcename(itype->rtype, 0);
key = mkname("iteminfo", name); key = mkname("iteminfo", name);

View File

@ -623,6 +623,10 @@ damage_unit(unit *u, const char *dam, boolean physical, boolean magic)
int h; int h;
int i, dead = 0, hp_rem = 0, heiltrank; int i, dead = 0, hp_rem = 0, heiltrank;
if (fval(u, RCF_ILLUSIONARY) || u->race == new_race[RC_SPELL]) {
return 0;
}
if (u->number==0) return 0; if (u->number==0) return 0;
h = u->hp/u->number; h = u->hp/u->number;
/* HP verteilen */ /* HP verteilen */