projects
/
open-adventure.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8f5c262
)
Stop overwriting obj by dragon check
219/head
author
NHOrus
<jy6x2b32pie9@yahoo.com>
Thu, 6 Jul 2017 16:12:16 +0000
(19:12 +0300)
committer
NHOrus
<jy6x2b32pie9@yahoo.com>
Thu, 6 Jul 2017 16:12:16 +0000
(19:12 +0300)
actions.c
patch
|
blob
|
history
diff --git
a/actions.c
b/actions.c
index 5f6f670c8861f29d5f81d8edf6183d778d0389fd..31fc18691aa60bdeab380933a46b1be2a4fd2824 100644
(file)
--- a/
actions.c
+++ b/
actions.c
@@
-121,10
+121,10
@@
static int attack(struct command_t *command)
move(DRAGON, LOC_SECRET5);
move(RUG, LOC_SECRET5);
drop(BLOOD, LOC_SECRET5);
move(DRAGON, LOC_SECRET5);
move(RUG, LOC_SECRET5);
drop(BLOOD, LOC_SECRET5);
- for (obj
= 1; obj <= NOBJECTS; obj
++) {
- if (game.place[
obj
] == objects[DRAGON].plac ||
- game.place[
obj
] == objects[DRAGON].fixd)
- move(
obj
, LOC_SECRET5);
+ for (obj
_t i = 1; i <= NOBJECTS; i
++) {
+ if (game.place[
i
] == objects[DRAGON].plac ||
+ game.place[
i
] == objects[DRAGON].fixd)
+ move(
i
, LOC_SECRET5);
}
game.loc = LOC_SECRET5;
return GO_MOVE;
}
game.loc = LOC_SECRET5;
return GO_MOVE;