Barry Carter - 2013-12-27

[I originally posted this as a Perl-specific project, but I now believe a more OO language [perhaps Ruby] would be more appropriate]

The specs are there
(https://sourceforge.net/p/bcapps/bcapps/ci/master/tree/YAMC/), the
code is not. Help rewrite the classic M.U.L.E. game with improvements:

YAMC: Yet Another M.U.L.E. Clone

Another attempt at cloning M.U.L.E. with the following differences:

  • no randomness (pure strategy game)

  • no "arcade" action (ie, more like a board game)

  • free and open source

  • playable online

  • text-based at heart

The story:

You and your fellow evil robots have started a colony in space (who
needs planets!), and compete to see who can produce the most
resources.

Before destroying Earth, you were able to save a number of Young
Australian Material Collectors (YAMC), who do the grunt work of
harvesting resources.

The resources in this game [all game parameters are subject to change]:

  • (S)ilver: the game's basic currency

  • (F)uel: determines how many things you can do per turn (~ food in
    the original)

  • (G)old: the bank will buy this for n silver on the nth turn (it's
    value keeps increasing) (~ crystite in the original)

  • (W)arp: lets you travel through a tile at lower fuel cost

  • (Y)AMC: Young Australian Material Collectors: harvest resources on
    your land (~ M.U.L.E. in the original)

  • (E)nergy: all working YAMCs need 1 Energy per turn to keep working
    (~ energy in the original)

  • (P)illager: can rob adjacent enemy land of 1 resource per move;
    can also move one tile per move

  • (T)eleport: transportation between teleports (and/or the bank)
    takes 1 move.

  • (N)aCl: when combined with a resource, prevents spoilage

  • (C)at: a Schroedingers cat: when combined with one energy, can
    become any other resource in the game

  • p(L)ants: a (resource) plant [eg, a silver plant] produces 1
    resource per turn per YAMC working the land.

The land:

  • Currently on a square (Cartesian) grid, but perhaps a hex grid or
    even true 3-D grid

  • Each land tile can hold 16 items, some combination of the following:

    • YAMC: they use 1 energy per turn, and harvest 1 resource from
      each plant on the tile. If you have 3 YAMCs, they will use 3
      energy and harvest 3 resources from each plant.

    • Plants (of any resource): each plant will produce n units of
      resource, where n = the number of YAMCs in the tile. You have an
      unlimited supply of plants of each type.

    • Warps: for every warp on the tile, it costs only 1/2 as much
      fuel to move to the tile (5 warps = 1/32 fuel)

    • Pillager: can remove resources from adjacent enemy tiles, 1
      resource per move

    • Teleport: movement from this tile to any other tile with a
      teleport (or to the home base) costs only 1 fuel. Multiple
      teleports reduce this to 1/2 fuel, 1/4 fuel, etc.

EXAMPLE: if you have 3 gold plants, 4 silver plants, 5 mules, and 4
empty slots, this tile will produce 35 = 15 gold per turn and 45 =
20 silver per turn. The tile will also cost you 5*1 = 5 energy per
turn.

The play:

  • Land phase: each player chooses one land tile that is adjacent to
    one of their existing tiles or to the home base. If two or more
    players want the same land tile, they can bid for it. The winner
    receives the tile, but the loser may choose another tile.

  • Sow phase: Use your fuel to move items (eg, plants and YAMCs) to
    your land. Placing an item on a tile requires moving to the tile and
    then returning to home base. You can only place one item per
    trip. If you have 16 items on a tile, you must remove items (one per
    trip) before putting in new items.

  • Spoilage phase: items in your inventory (but not those on land
    tiles) diminish as follows (always rounded in the player's favor):

    • (S)ilver: increases by 10% per turn (bank interest)

    • (F)uel: decreases by 10% per turn

    • (W)arp: decreases by 25% per turn

    • (E)nergy: decreases by 25% per turn

    • (T)eleports: decreases by 50% per turn

    • (N)aCl: decreases by 50% per turn

    • (C)at: decreases by 50% per turn

    • (G)old, (Y)AMCs, (P)illagers do not increase or decrease.

However, if you combine an item with NaCl (including NaCl itself) it
becomes a non-spoiling version of itself (eg, non-spoiling fuel) which
will no longer spoil.

  • Reap phase: You reap what you have sowed. Each of your plants
    produce resources, and each of your YAMCs use one energy.

Trading with other players:

The game will support basic trades of resources, but also more
sophisticated trades. A simple example:

Player 1: I will "GIVE 200 SILVER TO PLAYER3" if Player3 will "GIVE
20 GOLD TO PLAYER1"

In other words, player 1 promises to run a command if player 3 agrees
to run a command. In this case, it's a simple trade, but here's a more
sophisticated example.

Player 1: I will "GIVE 1000 SILVER TO PLAYER3" if Player 3 does all of
the following:

  • "ON TURN 7, GIVE 100 SILVER TO PLAYER1"
  • "ON TURN 8, GIVE 100 SILVER TO PLAYER1"
  • "ON TURN 8, GIVE 500 ENERGY TO PLAYER1"

This allows from some fairly complex bargains. Once Player 1 and
Player 3 agree, the commands will be executed automatically.

If it's impossible for either player to run the promised command on
the current turn, the trade is canceled.

If it becomes impossible for player X to run a promised command on a
future turn, they can bargain with the other player. If this fails,
player X is eliminated from the game, and his lands revert to unowned.

Miscellaneous:

  • Players start with 1000 gold, 1000 fuel, 50 YAMCs, 500 energy

  • There is no way to forcibly take land from another player. This is
    intentional.

  • If you trade another player for land, the acquired land must be
    adjacent to your own land (or to home base).

  • Possible feature: cede land back to the bank

  • Possible feature/resource: mana to cast "spells"

  • There is currently no "win" condition and this is more of a
    playground.