Skip to content

Commit

Permalink
bug: skills were not moving to the next level
Browse files Browse the repository at this point in the history
  • Loading branch information
goblinhack committed Aug 7, 2023
1 parent 9d4abbe commit 9964517
Show file tree
Hide file tree
Showing 20 changed files with 276,772 additions and 274,352 deletions.
21 changes: 16 additions & 5 deletions TESTME
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,15 @@ if [ ! -x zorbash ]; then
fi
fi

# alphabase \

testme()
{
for seed in \
dungeonspike \
dwarvedelve \
footpad \
golemheights \
alphabase \
apecastle \
badmonkey \
castlespire \
Expand All @@ -62,7 +63,7 @@ testme()
mkdir -p tests/$seed/expected_output/

printf "%-60s ... " "Running seed ($seed)"
CMD="./zorbash --seed $seed --test-dungeon-gen --ascii --monochrome"
CMD="./zorbash $OPT_DEBUG --seed $seed --test-dungeon-gen --ascii --monochrome"
$CMD > tests/$seed/output/console
cp appdata/zorbash/stdout.txt tests/$seed/output/

Expand Down Expand Up @@ -96,7 +97,7 @@ testme()
moves=$(grep "End of test, move count:" tests/$seed/output/stdout.txt | sed 's/.*://g')
expected_moves=$(grep "End of test, move count:" tests/$seed/expected_output/stdout.txt | sed 's/.*://g')
printf "$RED[%s]$RESET (%s moves expected, found %s)\n" "CHANGED" $expected_moves $moves
if [ "$OPT_UPDATE" -eq "yes" ]; then
if [ "$OPT_UPDATE" = "yes" ]; then
cp -r tests/$seed/output/stdout.txt tests/$seed/expected_output/
fi
else
Expand All @@ -115,6 +116,8 @@ Build options:
Usage: $0 [options]
[--update] Update changed tests
[--debug] Enable debugs
[--debug2] Enable more debugs
%%
}

Expand All @@ -128,8 +131,16 @@ read_opts()
-*update)
OPT_UPDATE="yes"
export OPT_UPDATE
OPT_DEV1="yes"
export OPT_DEV1
shift
;;
-*debug2)
OPT_DEBUG="--debug2"
export OPT_DEBUG
shift
;;
-*debug)
OPT_DEBUG="--debug"
export OPT_DEBUG
shift
;;
*)
Expand Down
3 changes: 3 additions & 0 deletions src/dungeon_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ void dungeon_test(void)
TRACE_AND_INDENT();
player->con("player change level");
player->level_change(new_level);
if (! player->level) {
DIE("Player has no level");
}

player->con("player needs to delete the old level");
TRACE_AND_INDENT();
Expand Down
Loading

0 comments on commit 9964517

Please sign in to comment.