X-Git-Url: https://jxself.org/git/?p=open-adventure.git;a=blobdiff_plain;f=actions.c;h=49988ecec4bc9f02e5cf58aeb5d8b843d0c8d9f3;hp=70d5acd127db9945dcae2ec010605085b04cd420;hb=6333544efb71ec4a1e0c883bf95ec860cd8b3498;hpb=9e1143e780e2526366f439fc7089097bb4bf8d1d diff --git a/actions.c b/actions.c index 70d5acd..49988ec 100644 --- a/actions.c +++ b/actions.c @@ -21,9 +21,8 @@ static int attack(FILE *input, long verb, token_t obj) * enemies, or no enemies but 2 others. */ { int spk = ACTSPK[verb]; - int d = ATDWRF(game.loc); - if (obj == 0) { - if (d > 0) + if (obj == 0 || obj == INTRANSITIVE) { + if (ATDWRF(game.loc) > 0) obj = DWARF; if (HERE(SNAKE))obj = obj * NOBJECTS + SNAKE; if (AT(DRAGON) && game.prop[DRAGON] == 0)obj = obj * NOBJECTS + DRAGON; @@ -65,7 +64,7 @@ static int attack(FILE *input, long verb, token_t obj) if (obj == DRAGON)spk = ALREADY_DEAD; if (obj == TROLL)spk = ROCKY_TROLL; if (obj == OGRE)spk = OGRE_DODGE; - if (obj == OGRE && d > 0) { + if (obj == OGRE && ATDWRF(game.loc) > 0) { RSPEAK(spk); RSPEAK(KNIFE_THROWN); DESTROY(OGRE);