Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix long farlook loop, add traps to situation patch

  • Loading branch information...
commit b45e5938faf4c3cf1d16947c262823b30a30c339 1 parent 9d25186
@sorear authored
Showing with 15 additions and 3 deletions.
  1. +14 −3 patches/situation.patch
  2. +1 −0  src/Actions/FarLook.cpp
View
17 patches/situation.patch
@@ -1,6 +1,6 @@
--- nethack-3.4.3-orig/src/allmain.c 2003-12-07 15:39:13.000000000 -0800
-+++ nethack-3.4.3/src/allmain.c 2011-04-20 13:11:53.000000000 -0700
-@@ -477,6 +477,239 @@
++++ nethack-3.4.3/src/allmain.c 2011-08-09 21:15:13.000000000 -0700
+@@ -477,6 +477,250 @@
}
void
@@ -38,6 +38,11 @@
+ } else if (!strncmp(lbuf, "skill ", 6)) {
+ sscanf(lbuf, "skill %d %d", &a[0], &a[1]);
+ P_SKILL(a[0]) = a[1];
++ } else if (!strncmp(lbuf, "skillx ", 7)) {
++ sscanf(lbuf, "skillx %d %d %d %d", &a[0], &a[1], &a[2], &a[3]);
++ P_SKILL(a[0]) = a[1];
++ P_MAX_SKILL(a[0]) = a[2];
++ P_ADVANCE(a[0]) = a[3];
+ } else if (!strncmp(lbuf, "blind ", 6)) {
+ sscanf(lbuf, "blind %d", &i);
+ make_blinded(i, FALSE);
@@ -126,6 +131,9 @@
+ } else if (!strncmp(lbuf, "at ", 3)) {
+ sscanf(lbuf, "at %d %d", &a[0], &a[1]);
+ u.ux = a[0]; u.uy = a[1];
++ } else if (!strncmp(lbuf, "mkroom ", 7)) {
++ sscanf(lbuf, "mkroom %d", &i);
++ mkroom(i);
+ } else if (!strncmp(lbuf, "room ", 5)) {
+ sscanf(lbuf, "room %d %d %d %d %d %d",
+ &a[0], &a[1], &a[2], &a[3], &a[4], &a[5]);
@@ -147,6 +155,9 @@
+ } else if (!strncmp(lbuf, "fountain ", 9)) {
+ sscanf(lbuf, "fountain %d %d", &a[0], &a[1]);
+ levl[a[0]][a[1]].typ = FOUNTAIN;
++ } else if (!strncmp(lbuf, "trap ", 5)) {
++ sscanf(lbuf, "trap %d %d %d", &a[0], &a[1], &a[2]);
++ maketrap(a[0], a[1], a[2]);
+ } else if (!strncmp(lbuf, "obj ", 4)) {
+ lbuf[strlen(lbuf)-1] = 0;
+ sscanf(lbuf, "obj %d %d %n", &a[0], &a[1], &i);
@@ -240,7 +251,7 @@
newgame()
{
int i;
-@@ -514,6 +747,7 @@
+@@ -514,6 +758,7 @@
mklev();
u_on_upstairs();
View
1  src/Actions/FarLook.cpp
@@ -35,6 +35,7 @@ const Command& FarLook::command() {
string moves = World::cursorMoves(Saiph::position(), iter->where);
cmdbuf.insert(cmdbuf.end(), moves.begin(), moves.end());
cmdbuf.push_back('.');
+ cmdbuf.push_back(' ');
}
_command = Command(cmdbuf, PRIORITY_LOOK);
return _command;
Please sign in to comment.
Something went wrong with that request. Please try again.