diff --git a/src/common/attributes/attributes.c b/src/common/attributes/attributes.c index 8eed873f8..6b6067c8a 100644 --- a/src/common/attributes/attributes.c +++ b/src/common/attributes/attributes.c @@ -30,6 +30,7 @@ #include "racename.h" #include "raceprefix.h" #include "synonym.h" +#include "at_movement.h" #ifdef USE_UGROUPS # include "ugroup.h" #endif @@ -62,6 +63,7 @@ init_attributes(void) init_otherfaction(); init_racename(); init_synonym(); + init_movement(); init_moved(); #ifdef AT_OPTION diff --git a/src/common/kernel/save.c b/src/common/kernel/save.c index 096fcd161..6959ee478 100644 --- a/src/common/kernel/save.c +++ b/src/common/kernel/save.c @@ -727,11 +727,11 @@ void read_alliances(FILE * F) { char pbuf[32]; - rns(F, pbuf, sizeof(pbuf)); + rs(F, pbuf); while (strcmp(pbuf, "end")!=0) { rs(F, buf); makealliance(atoi36(pbuf), buf); - rns(F, pbuf, sizeof(pbuf)); + rs(F, pbuf); } } #endif @@ -818,7 +818,7 @@ readgame(boolean backup) /* Read factions */ #ifdef ALLIANCES - if (global.data_version>ALLIANCES_VERSION) { + if (global.data_version>=ALLIANCES_VERSION) { read_alliances(F); } #endif diff --git a/src/mapper/map_units.c b/src/mapper/map_units.c index 3e2b145e0..34cf59a8a 100644 --- a/src/mapper/map_units.c +++ b/src/mapper/map_units.c @@ -34,6 +34,8 @@ #include #include +#include + /* libc includes */ #include #include @@ -51,7 +53,7 @@ SpecialFunctionUnit(unit *u) win = openwin(60, 5, "< Specials Units >"); wmove(win, 1, 2); - wAddstr("B - give balloon"); + wAddstr("B - give balloon, M - set noMovement"); wmove(win, 2, 2); wrefresh(win); switch(getch()) { @@ -70,6 +72,10 @@ SpecialFunctionUnit(unit *u) fset(u, FL_OWNER); } break; + case 'm': + case 'M': + set_movement(&u->attribs, MV_CANNOTMOVE); + break; } delwin(win); } @@ -871,6 +877,10 @@ mapper_spunit(dbllist ** SP, unit * u, int indent) break; } + if(get_movement(&u->attribs, MV_CANNOTMOVE)) { + sncat(buf, ", cannot move", BUFSIZE); + } + sncat(buf, " (", BUFSIZE); icat(u->hp/u->number); sncat(buf, " HP)", BUFSIZE); if (getguard(u))