Tuesday, April 1, 2014

Encounters

A turn in Telengard proceeds in sequential phases: the encounter phase, the looting phase, the special feature phase and the command phase.

The encounter phase handles your interaction with the dungeon's inhabitants, including combat.

Every encounter phase there is a 30% chance that you will encounter a monster.  If you do not encounter a monster, then you proceed directly to the looting phase.

Otherwise, you still have an 80% chance of avoiding the encounter if you have the Invisibility spell effect active.

If you do not avoid an encounter, then the next step is to determine what kind of monster you have encountered.

1d20 is rolled and the monster class is determined from the following table



Generally, the higher the number, the more powerful the creature.

If you have the Fear spell effect active, then monsters 1-4 are excluded from the possibilities (it will just re-roll again if it gets one).  This will have the effect of making your average difficulty monster higher, but it will protect you from Hobbits, which will frequently steal your items.

Now that the monster type has been determined, it is possible that you can sneak up on it undetected. A 1d20 is rolled, and if the value is <= your elven cloak bonus you will have the option to avoid combat entirely and go straight to the looting phase.  Essentially, once you get a +20 elven cloak, you will never have to fight again in a normal encounter if you don't want to.  You don't lose out on any loot by doing this, just whatever experience (and damage) you would have gotten during the fight.

If you have been seen or chose to fight, then the level of the monster will be determined by the following formula:

level = floor ((random ^ 1.5) * (depth * 2 + 2) + 1)

where random is a random number evenly distributed in the interval [0, 1) and depth is what dungeon level you are on.  This implies, for example, that the maximum level creature you will encounter on dungeon level 1 is level 4.  The exponentiation tends to distribute the level toward the lower end.

For example on dungeon level 1, the distribution is like this:

Level 1 Monster ~ 39.7%
Level 2 Monster ~ 23.3%
Level 3 Monster ~ 19.5%
Level 4 Monster ~ 17.5%

Here is a somewhat awkward part of the process: if the monster is undead and you have the Light effect active, then there is a 20% chance that the encounter phase will be reset back to the point where the monster class is chosen.  This leads to the possibility of sneaking up on the monster multiple times in a single encounter.  It seems to me like this check would make more sense before the dexterity roll, not after, but this is how the original source is.  I suspect this not intentional and is a minor bug, but it has no real negative impact.

At this point, the monster you have encountered is announced and becomes visible.

If you have the Time Stop spell effect active, and the monster is not immune to the effect (Dwarves, Giants, Specters, Vampires, Demons and Dragons are immune), then combat is aborted and you go straight to the looting phase after seeing your enemy.

The monster's hit points are now calculated according to the formula below:

hp = floor((random ^ 0.5) * level * type + 1)

where level is the monster's level as determined above and type is the number of the monster in the table.  This implies that the maximum health a level 1 dragon can have is 20.  The exponent serves to distribute the monster's health toward the higher end of the range.

For example, a level 1 hobbit will have the following hp distribution:

1 hp ~ 6.3%
2 hp ~ 18.7%
3 hp ~ 31.3%
4 hp ~ 43.7%

There is now a 5% chance that a special encounter will happen where the monster will either heal you, steal an item or give you an item, with equal probability.

If that 5% chance fails, these things can still happen depending on the monster type and your charisma.

Elves will heal you to full health (4 * charisma)% of the time.  If your charisma is maxed out at 18, then elves will heal you a bit over 72% of the time (since they may also heal you based on the check above). Your charisma does not affect the rate at which other monsters will heal you.

Hobbits will steal an item from you (100 - 5 * charisma)% of the time.  If your charisma is maxed out at 18, then they will steal from you only a bit over 10% of the time (since they may also steal from you based on the check above).  Your charisma does not affect the rate at which other monsters steal from you.

Dragons will try to give a piece of equipment to you if a 1d30 roll is <= your charisma.  A piece of equipment (not a consumable like a scroll or potion) will be chosen at random.  If the dragon's level is higher than that piece of equipment's bonus, then the dragon will give you a replacement for that item that is better than what you have and at most the dragon's level.  If you already have something in that slot with a bonus at or better than the dragon's level, no gift will be given, and you'll have to fight the dragon.  Your charisma does not affect the rate at which other monsters will give you gifts.

If a special event successfully occurred, then you go to the looting phase and don't need to fight. Otherwise an initiative roll is done to determine who is first to act: you or the monster.

You will go first (50 + 2 * dexterity)% of the time.

The next post will go into one aspect of combat: fighting.

1 comment:

  1. Hi!
    I know it is been 8 years since this blog entry.
    Nonetheless I am currently working on a Telengard port to the Vectrex video game console...
    (see: http://vide.malban.de/tag/telengard)

    My port is based on the Atari version of Telengard - and I could not help to notice the difference - since you mentioned them...

    In the Atari sources, it is not the LIGHT (3) spell - but ASTRAL WALK (8).
    The line in the C64 version is:
    890 IFSF(3)>0ANDUN=1ANDRND(1)>.8THEN860
    in the Atari version:
    3008 IF SF(FOUR+FOUR)>ZERO AND UN=ONE AND RND(ONE)>FOUR/FIVE THEN 3005

    Cheers!
    Malban

    ReplyDelete