Combat Help

So, I want to begin my next phase of my game and it deals largely with combat. There are roughly 25-ish rooms and I would like to have about 8 or 9 encounters with monsters that must be slain or, maybe, outwitted.

I'm thinking a few of those need to be beaten with brute force (basic melee), a couple more easily defeated with a magic spell or two, and a couple that are more like puzzle battles (reminiscent of the dragon-ice encounter in Zork).

My question is... is there a library that I could download for these specifics or would I be better off creating something from scratch?

Keep in mind:

  1. I intend to lock all exits in the room except the one that was entered from (so the player can retreat). Retreating resets the monster.
  2. There will be only a few weapons and a few spells. The player will either have armor pieces or not. Very basic defense. Shield. Chest Piece. Or not. Depends on if the player can complete a side quest to get it.
  3. It will be turn based. So, I attack monster (or take a turn), monster attacks me. Repeat until one of us is dead. So, monster will require HPs and some component of attack power.
  4. I would like the player to know how many HPs the monster has remaining. Opponent strength/power need not be known.

So, back to the question. Library or scratch? I don't mind trying to build something that suits my needs but if there is something out there I could use that fits my design/plans, I'd hate to reinvent the wheel and waste a lot of time. I looked at (didn't complete the trial game) Pixie's Library, but it seems WAY more than what I need. Right?

Thanks in advance.


I'd 're-invent the wheel and waste time' as it'd be easier to create your own design for your needs, and you're not doing a complex combat system, letting you get some experience with trying to create combat on your own, at least the basics of combat coding.


have the combat be locked within a looping script (until one of you is dead, and/or you can have an option to run/escape)
you're NOT locked in a looping script, letting you use your one open Exit or whatever other action. I think the easiest would be to use a local Turnscript, as this way the monster will attack you before-or-after every action you do, letting you do whatever action you want (including attacking the monster, hopefully killing it or winning against it)

a simple way to do a combat control is via a menu (attack physically/with-weapon, magic/cast spell, item usage, run/flee/escape, wait/defend, etc etc etc) and have the scripting for each of those choices/options

basically, you're wanting to do a similar combat system to mine from this post (so, I'd take a look at it... there's some un-needed code, as it's old and this was when I was learning to do this stuff as you're trying to do now, lol):

and the key/legend (I've learned since to never use abrevs ever again, lol):

This topic is now closed. Topics are closed after 60 days of inactivity.