Monsters, Part 2 : Monster Magic

See also: part 1 and part 3.

In part 1 I wrote about how I am working on a new system for monsters and that the first step is to make it more transparent by revealing all attributes of monsters. In this part I will explain the new magic system of monsters. This new system has been done from scratch and allows for much more transparency,  more fairness and more consistent with the magic system for the player. Let me start by explaining how monster magic actually works in the current and previous releases.

How Monster Magic Currently Works

Before going into the new system I want to explain how magic currently works in TGGW (Release #1-7). Basically, monster’s may have two forms of magic:

Abilities

The first type of monster magic is called “abilities” and are listed in the monster description. Examples of abilities are “blinks”, “regenerates” or “hides in grass”. These abilities use up a (hidden) number of mana points for the monster. Unlike the player, a monster’s mana regenerates every turn, so as soon as the mana is regenerated, the monster can use it again. This is just a way to make sure the monster doesn’t use the ability every turn. A monster which is confused cannot use any abilities.

Magic Attack

The second kind of magic that a monster may use is a “magic attack”. Magic attacks never misses (just like they don’t for the player). Since monsters have only one attack, they can use this ability at will, it doesn’t even use up the monster’s mana. There are no defences for these kind of attacks (other than armour and resists), so they will always hit making these kinds of attacks very dangerous. Since Release #3 monsters cannot use their magic attack when they are confused.

Part 2: Designing a New Magic System

In the next release I am going to remove both “abilities” and “magic attacks” and replace it with “spells”. Spells works very intuitively, and exactly in the same way as it works for the player. A spell will always use up a monster’s mana, and their mana will no longer regenerate except when the player rests (as you would expect). A spell might target either the player, the monster itself, other monsters, or all visible characters (compare this to wands that have different aims and with rods which aims at everyone). A confused monster may not use any spells and a monster must have enough mana in order to be able to use a spell.

All spells, their targets and their effects will be listed in the window when you examine a monster (the window I showed in part 1). Here’s an example of the floating eye’s “gaze”. This used to be a “magic attack” but is now a spell.

A floating eye has the “gaze” spell listed under the “Abilities” heading. It costs one mp, targets you and causes confusion.

 

As you can see, the “gaze” spell uses up 1 mp and the floating eye has 2 in max mp, so it can use this attack only twice per day. A monster can use a spell on the player as long as it can see the player.

Avoiding Spells

Some monster’s spells will target all nearby characters, including you (this roughly corresponds to the monster’s version of a rod). For instance, the previously harmless yellow fungus have become more powerful:

The “spores” spell affects all targets that are visible to the fungus.

Previously there have been no defence for magic attacks (magic always hits). However, with these kinds of attacks around that would simply be unfair (you would just see a yellow fungus and become diseased in the next turn). For this reason, there is now yet another derived attribute called “avoid spells”. Both you and the monsters have this attribute. This means that whenever a magic attack (monster spell, wand or rod) is made, the victim gets a chance to avoid it altogether (similar to a saving throw in Angband/Nethack). The chance to avoid a spell is a plain 5*Maxmp%, making the maxmp attribute important even for characters not relying on magic. This means that you start the game with “avoid spells 35%” since you start with 7 in max mana (this is also why the floating eye has 65% chance to succeed with it’s gaze attack). This also means that all monsters that can cast spells have a non-zero percent chance to avoid your spells. Another interesting thing to note here is that the “spores” spell also affect monsters, so any monster failing to avoid the spell is also going to be diseased (if not immune).

Previous “abilities” like “blink” and “regenerate” is replaced by spells that target the monster itself with the effects of teleport and heal respectively. In other words, you will be able to have a much better understanding of what a monster can do.

A blink dog can teleport itself 5 squares for the cost of 2 mp.

I am very satisfied with this new magic system so far. There is quite a lot of testing and adjustments left to do of course, and I haven’t yet implemented all the spells, but I think this will make TGGW a much better game! In part 3 I will talk about the details on how monster attacks will work in general.

The screenshots in this post contains a few new things that I haven’t explained and that are possibly going to change (for example, the “light” attribute have changed name to “vision”, and the “in light” status is new. I will explain those in a later post).

Comments

  1. Sure must have been a good bit of work to change all that! Makes a lot of sense though, and will certainly improve balance, which is somewhat easier to achieve (in an expansive world) when the player and monsters all use the same rules (or at least using that as a starting point). The monsters’ magic attacks always felt unfairly dangerous before.

    Love the new spell saving throw idea.

    And finally fungi will be more than just an uninteresting obstacle 🙂

    1. Surprisingly little work has been required to change the mechanics, even though I had to rewrite a large part of the AI-engine as well. Adding all the new content (spells) feels like more work. That is what I really like about having a finished game to work on: even radical changes are fairly quick to implement.

      Yes, what I like is that this has many benefits and solves a lot of problems (even more in part 3) I used to have with the game.

      1. I was having the same feeling while working on my own game today–had to rework a major system, but that was nothing compared to implementing that and the interrelated systems in the first place. Most of it was just thinking of exactly what and where needed changing, then updating like 10-15 lines of code 😛

        It felt really nice to have everything in place and just being able to drastically change how it all worked with some minor tweaks. 81k lines in the core game now…

        And I think I already know what’s coming in part 3 😉

        1. Yeah, isn’t it nice?! 🙂 I think that’s one of the best parts of having a fully implemented game that you know everything about. It is a good platform for experimenting with alternative mechanics very easily too.

          If you are referring to that mail discussion so no… I’m not going to post that until I’m 90% sure it’ll be in the game 😉

Comments are closed