AgentProxy

AgentProxy

Abstract base class for agent proxies (a kind of decorator class).

Wraps another agent and forwards all behaviour to it, with the exception of onTurn which is intentionally suppressed so that creature AI is disabled for the duration of any proxy effect (giving paralysis for free for non-player agents).

Subclasses can override individual callbacks to add effect-specific behaviour. The wrapped agent is accessible as this.agent.

Mirrors Java's AgentProxy abstract class.

Constructor

new AgentProxy()

Source:

Classes

AgentProxy

Methods

is()

Description:
  • Returns true if either the proxy's own flags OR the wrapped agent has the given flag. This is critical so that PLAYER propagates through a Paralyzed wrapper.

Source:

not()

Description:
  • Returns true only if neither the proxy flags nor the wrapped agent has the given flag.

Source:

onFrame()

Description:
  • Delegates to the wrapped agent's onFrame if it defines one.

Source: