forked from github/server
Monster attackieren keine Einheiten in Gebäuden.
This commit is contained in:
parent
3fde10d9e8
commit
e69fb78e6b
|
@ -175,7 +175,7 @@ static order *get_money_for_dragon(region * r, unit * u, int wanted)
|
||||||
/* falls der drache launisch ist, oder das regionssilber knapp, greift er alle an */
|
/* falls der drache launisch ist, oder das regionssilber knapp, greift er alle an */
|
||||||
n = 0;
|
n = 0;
|
||||||
for (u2 = r->units; u2; u2 = u2->next) {
|
for (u2 = r->units; u2; u2 = u2->next) {
|
||||||
if (u2->faction != u->faction && cansee(u->faction, r, u2, 0)) {
|
if (inside_building(u2)!=u->building && u2->faction != u->faction && cansee(u->faction, r, u2, 0)) {
|
||||||
int m = get_money(u2);
|
int m = get_money(u2);
|
||||||
if (m == 0 || is_guard(u2, GUARD_TAX))
|
if (m == 0 || is_guard(u2, GUARD_TAX))
|
||||||
continue;
|
continue;
|
||||||
|
@ -537,7 +537,7 @@ static void monster_attacks(unit * u)
|
||||||
unit *u2;
|
unit *u2;
|
||||||
|
|
||||||
for (u2 = r->units; u2; u2 = u2->next) {
|
for (u2 = r->units; u2; u2 = u2->next) {
|
||||||
if (cansee(u->faction, r, u2, 0) && u2->faction != u->faction
|
if (cansee(u->faction, r, u2, 0) && u2->faction != u->faction && inside_building(u2)!=u->building
|
||||||
&& chance(0.75)) {
|
&& chance(0.75)) {
|
||||||
order *ord = monster_attack(u, u2);
|
order *ord = monster_attack(u, u2);
|
||||||
if (ord)
|
if (ord)
|
||||||
|
|
Loading…
Reference in New Issue