Enemy Entities
This section covers the implementation of enemy entities in Ascend from Nine Mountains. Learn how to transform your enemy concepts into working combat encounters using the game’s stance and rotation systems.
Overview
Enemy entities in AFNM represent all hostile combatants that players encounter throughout their cultivation journey. This documentation focuses on helping you transform your enemy concepts into working implementations using the game’s stance and rotation systems.
Core Systems
Entity Structure
Every enemy follows a consistent structure defined by the EnemyEntity
interface, which includes combat stats, stance rotations, and conditional behaviors.
Stance System
Enemies cycle through stances containing technique sequences, using rotation rules and conditional overrides to create dynamic combat patterns.
Implementation Focus
The documentation emphasizes practical implementation details, showing how to build setup rounds, phase transitions, and adaptive behaviors.
Quick Navigation
- Enemy Structure - Detailed breakdown of the EnemyEntity interface
- Design Guide - Transform concepts into working enemy implementations
- Behavior Patterns - Stance rotations and AI behavior
- Examples - Complete enemy implementation examples
Key Implementation Concepts
Rotation Overrides
Use rotationOverrides
with repeatable: false
to create setup rounds and one-time behaviors.
Conditional Logic
Stance switches based on health, round count, buffs, or other combat state using mathematical expressions.
Pattern Building
Combine cyclic rotations, random selections, and conditional overrides to create complex behaviors.
Enemy Registration
Enemies are not directly registered through the ModAPI. Instead, they are integrated into the game through events and locations:
Integration Methods
- Event Combat Steps: Use
combat
event steps to trigger enemy encounters - Location Enemies: Add enemies to locations as exploration encounters or specific combat events
- Quest Integration: Incorporate enemies into quest objectives and storylines
See the Events documentation for combat step implementation and Locations for enemy placement strategies.
Getting Started
To implement your enemy concept:
- Review the Enemy Structure for the interface definition
- Use the Design Guide to translate your concept into stance rotations
- Study Behavior Patterns for advanced conditional logic
- Check Examples for complete implementations
- Integrate your enemy through Events or location encounters