Skip to content

Enemy Actions

charvei edited this page Oct 22, 2017 · 1 revision

Enemy Actions Overview

Enemy actions are TimeEvents that define discrete behaviours that can be assigned to enemies in order to give them interesting traits outside of simply walking.

Usage

Enemy actions are assigned to enemy's in their initStats method via the PropertiesBuilder. To do this, simply append the PropertiesBuilder method addEvent with the enemy action desired for the enemy to hold to the returned PropertiesBuilder. For guide to creating your own enemy action see TimeEvents. The existing enemy actions detailed below can also be used for examples.

Current Enemy Actions

The enemy actions currently in Rocket Potatoes are:

  • ChannelEvent
  • HealingWaveEvent
  • MeleeAttackEvent
  • StealingEvent

Description and usage tips for existing enemy actions

ChannelEvent

ChannelEvent is a behaviour that can be attached to another enemy action in order to create the impression that the enemy is "channeling" in order to perform the event by pausing for a period of time before performing the channel event's connected enemy action. An example of this pairing is the moose enemy's healing wave which results in the moose pausing before initiating the healing wave. The parameters for ChannelEvent define the time resolution in which it polls its connected action for when to begin channeling, for how long prior to it's connected action should channeling endure, and the action desired for this channel event to be intertwined with.

HealingWaveEvent

HealingWaveEvent defines a healing wave that is emitted from the enemy and heals all enemies within its radius. The parameters for the action allow for the rate at which an enemy emits the wave, the radius of the wave and the amount the wave heals for to be specified.

MeleeAttackEvent

MeleeAttackEvent gives the enemy the ability to perform a close-range melee attack to a target. The rate at which the enemy performs attacks as well as the target of the enemy's attacks are specified in its parameters.

StealingEvent

StealingEvent gives an enemy the ability to steal from resource trees. An enemy with this enemy action will, if within range of a resource tree, stop, turn to face the tree and steal its resources gradually over time until the tree is depleted of resources and then begin moving again. The rate at which this action is performed by the enemy holding it, and therefore the speed at which it depletes a tree of resources can be defined in its parameters.


Gameplay

Design

Asset Creation

User Testing

Code Guidelines


http://cultofthepartyparrot.com/parrots/partyparrot.gifhttp://cultofthepartyparrot.com/parrots/partyparrot.gifhttp://cultofthepartyparrot.com/parrots/partyparrot.gifhttp://cultofthepartyparrot.com/parrots/partyparrot.gifhttp://cultofthepartyparrot.com/parrots/partyparrot.gif

Clone this wiki locally