1. Jake Albano
  2. Ifrit
  3. Issues
Issue #15 resolved

Enemies

Chris Logsdon
created an issue

Different types. Stronger, tougher, faster, bigger, more of them.

We can't really have the same elf-like guys running around on a ship, in a forest, or in the depths hell.

The AI is essentially all yours, so I don't want to create new tasks for it unless you are just as much into the ideas as I am.

Comments (4)

  1. Jake Albano repo owner

    This is definitely a priority. I want to extend the enemy class to allow for different traits to make each enemy type unique. So far I'm thinking:

    • Flying
    • No fear
    • No melee
    • No ranged

    Can you think of any others? Also, if you feel like making animations for a new enemy and then telling me how he should behave, I'd be happy to implement him.

  2. Chris Logsdon reporter

    Those all sound good. I think it'd be very cool to get some sort of group cooperation with them.

    Another possibility: all fear. The enemy tries to avoid the player, essentially luring the player to him and forcing a reckless action from the player (melee or an expensive lightning strike).

    I do want to finish the skeleton enemy I started. If there will be flying, I will of course be making some flight-capable enemies. Here's a thought: What if the boss fight involved flying? Or perhaps floating around on something?

  3. Jake Albano repo owner

    Implemented in revision 31d2feb4fb58

    All the AI logic is contained within the Enemy class. Other enemies extend this class and specify behavior with optional flags in the constructor.

    For example, the original enemy has been renamed to Elf Mage, and is made up of this code only:

    // Constructor
    public function ElfMage(x:Number, y:Number) 
    {
    	super(x, y, Library.IMG("enemy.png"), 60, 23, 13, 23);
    }
    

    A class that had no fear and can only attack up close would be passed behavior flags in the superconstructor:

    // Constructor
    public function Skeleton(x:Number, y:Number) 
    {
    	super(x, y, Library.IMG("skeleton.png"), 60, 23, 13, 23, Enemy.NO_FEAR | Enemy.NO_RANGED);
    }
    

    The available modifiers are the following:

    • No fear
    • Afraid
    • Passive
    • Flying
    • No melee
    • No ranged
  4. Log in to comment