kdechant / eamon

A web port of the classic text adventure game, the Wonderful World of Eamon
https://eamon-remastered.com
MIT License
23 stars 5 forks source link

Friends are open to attack during maylays #29

Open eburggraaf opened 5 years ago

eburggraaf commented 5 years ago

My brother discovered this to his horror, and I tested it so far in beginner's cave and beginner's forest. The general attack keyword includes friends which it shouldn'otta'do, resulting in some catastrophically bad maylays.

Simple sinario. You visit the hermit in beginner's cave and befriend him, acquiring his healing potion.

You then visit the rats and engage. A maylay has five combatants, main character (you), and hermit for the good guys, black rat, brown rat, and tan rat for the bad guys. It matters little which enemy you attack.

Enter attack and allow the game to choose which enemy you fight, ooopse! Erik attacks hermit. ...Whah? The game should allow me to be a jerk if somehow I wasn't raised with manners and I decide to try and grab hit points by battering my friend using attack hermit, but using the attack general command during a maylay should only attack my, ...our... enemies.

The game doesn't require anyone to take unnecessary abuse. So allies quickly become enemies when they get singled out for friendly fire during a maylay.

I'm a programming student, and I'd like to take on the challenge of fixing this. Please email me at erik@erik-burggraaf.com and let me know how I can get involved.

Thanks,

Erik

kdechant commented 5 years ago

The simple answer to this is to use the name of the monster ("attack rat") instead of just "attack" by itself. In fact, it should just reply with "Attack whom?" if you don't specify a target, which is an oversight on my part,

In general, there are a couple improvements that can be made here:

  1. Require a target when attacking (as mentioned above)
  2. If the target could match multiple monsters [e.g., "attack frost" in the Orb of Polaris could match Frosty (a friend) or the Frost Monster (an enemy)] it should ask which one (by asking "Did you mean Frost Monster or Frosty?")
  3. A better version of 2 would be to have it automatically only attack an enemy if there is an enemy present with a matching name
  4. Add a prompt to confirm whenever they player tries to attack a friend or a neutral monster. (This is how Eamon Deluxe worked.)

I would love to have people submit pull requests to the project. But first, I need to do a little work to make it easier to get the project running on other peoples' machines besides mine. I hope to get to that this weekend.