Skip to content

Commit

Permalink
Some bug fixes, minor missing features, new motd
Browse files Browse the repository at this point in the history
  • Loading branch information
Whales committed Apr 23, 2012
1 parent e0ea44a commit 0f9d6ff
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 13 deletions.
26 changes: 13 additions & 13 deletions data/motd
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# This message may be 16 lines long at maximum.
# Max length of a line is 64 characters; the following line is for reference
################################################################
Welcome to 2012, roguelike fans!
I was away on vacation for a few weeks, so excuse my absence and
the small-ish update. This update focuses on a new mutation
system. It now works on a tech tree of sorts; one mutation can
lead to another, some mutations cancel each other, and mutations
are grouped into types; tree-like or fish-like, for example.
Mutating inside a type increases your chances of mutating in
that type in the future.
There's also some rebalance tweaks here; most notably, the XP
pool is capped rather low, and shooting at fast-moving monsters
is harder.
In this version, there's a new special game mode: Defense.

Please visit the official Cataclysm forums:
http://whalesdev.com/forums/index.php
Defense Mode, and the Tutorial, can be found under Special...
<--- Here.

In Defense Mode, you start in a chosen location, and have to
fight off increasingly difficult waves of enemies. There is a
generator nearby which you have to defend.
To aid you, there are regular caravans from which you can buy
supplies. Additionally, crafting performs much, much faster.

It's relatively easy to add new game modes. Read the
code_doc/GAMEMODES file for instructions on the basic, and
check out defense.cpp for some examples.
30 changes: 30 additions & 0 deletions defense.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,36 @@ void defense_game::pre_action(game *g, action_id &act)
g->add_msg("You cannot save in defense mode!");
act = ACTION_NULL;
}

// Big ugly block for movement
if ((act == ACTION_MOVE_N && g->u.posy == SEEX * int(MAPSIZE / 2) &&
g->levy <= 93) ||
(act == ACTION_MOVE_NE && ((g->u.posy == SEEY * int(MAPSIZE / 2) &&
g->levy <= 93) ||
(g->u.posx == SEEX * (1 + int(MAPSIZE / 2))-1 &&
g->levx >= 98))) ||
(act == ACTION_MOVE_E && g->u.posx == SEEX * (1 + int(MAPSIZE / 2)) - 1 &&
g->levx >= 98) ||
(act == ACTION_MOVE_SE && ((g->u.posy == SEEY * (1 + int(MAPSIZE / 2))-1 &&
g->levy >= 98) ||
(g->u.posx == SEEX * (1 + int(MAPSIZE / 2))-1 &&
g->levx >= 98))) ||
(act == ACTION_MOVE_S && g->u.posy == SEEY * (1 + int(MAPSIZE / 2))-1 &&
g->levy >= 98) ||
(act == ACTION_MOVE_SW && ((g->u.posy == SEEY * (1 + int(MAPSIZE / 2))-1 &&
g->levy >= 98) ||
(g->u.posx == SEEX * int(MAPSIZE / 2) &&
g->levx <= 93))) ||
(act == ACTION_MOVE_W && g->u.posx == SEEX * int(MAPSIZE / 2) &&
g->levx <= 93) ||
(act == ACTION_MOVE_NW && ((g->u.posy == SEEY * int(MAPSIZE / 2) &&
g->levy <= 93) ||
(g->u.posx == SEEX * int(MAPSIZE / 2) &&
g->levx <= 93)))) {
g->add_msg("You cannot leave the %s behind!",
defense_location_name(location).c_str());
act = ACTION_NULL;
}
}

void defense_game::post_action(game *g, action_id act)
Expand Down

0 comments on commit 0f9d6ff

Please sign in to comment.