Skip to content

General Battle System#5

Open
Darrin-Lin wants to merge 2 commits intomainfrom
frontend/creature-init
Open

General Battle System#5
Darrin-Lin wants to merge 2 commits intomainfrom
frontend/creature-init

Conversation

@Darrin-Lin
Copy link

This pull request introduces the foundational class structure for an RPG-style game, establishing core entities, character types, inventory and equipment systems, and resource mechanics. The changes lay out the inheritance hierarchy and encapsulate properties and behaviors for creatures, fighters, items, equipment, and more, providing a solid base for further gameplay development.

Core Entity and Character Hierarchy:

  • Introduced the base Creature class and derived classes such as NPC, Box, Obstacle, and the combat-focused Fighter class, which is further extended by Player and Monster. These classes define shared and specialized properties and methods for entities in the game world. [1] [2] [3] [4] [5] [6] [7]

Resources and Attributes System:

  • Added classes for Abilities, Attributes, and HP to manage stats, health, and their modifications, including logic for updating and calculating derived values. [1] [2] [3]
  • Implemented the Element system with effectiveness logic for elemental interactions.

Inventory and Equipment Management:

  • Introduced the Bag class for inventory, Item and Equipment classes with support for equipping and stat aggregation, and an EquippedItems manager for handling equipped gear and stat calculations. [1] [2] [3]

Skills and Jobs Framework:

  • Added the Skills class with cooldown logic and a placeholder for skill effects, and the Jobs class to encapsulate job-specific stats and skillsets. [1] [2]

Supporting Structures:

  • Added a base NameAndDescription class for shared naming and description functionality.

These changes collectively establish a modular and extensible codebase for building out game mechanics, combat, inventory, and character progression.


Core Entity and Character Hierarchy

  • Added Creature base class and derived entities: NPC, Box, Obstacle, and Fighter (with further specializations for Player and Monster), defining shared and specific properties and methods for in-game actors. [1] [2] [3] [4] [5] [6] [7]

Resources and Attributes System

  • Implemented Abilities, Attributes, and HP classes for managing stats and health, including logic for stat modification and health calculation. [1] [2] [3]
  • Added Element class and effectiveness logic for elemental interactions.

Inventory and Equipment Management

  • Added Bag for inventory, Item and Equipment classes, and EquippedItems for managing equipped gear and calculating total stats. [1] [2] [3]

Skills and Jobs Framework

  • Introduced Skills class with cooldown management and effect placeholder, and Jobs class for job-specific stats and skills. [1] [2]

Supporting Structures

  • Created NameAndDescription base class for reusable naming and description fields.

Copy link
Member

@NaoCoding NaoCoding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to discuss the above reviews

{
public bool IsOpen { get; private set; }
public int GoldAmount { get; private set; }
public List<Item> ContainedItems { get; private set; } = new List<Item>();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we directly treat Gold also as an item? Or you consider that gold should not be an item

public Status CurrentStatus { get; set; }
public Abilities Abilities;
public Element Element { get; set; }
public HP HP;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I consider we have decided to move the HP and Element to attributes?

public class Player : Fighter
{
public Jobs Job { get; private set; }
public int Exp { get; private set; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we'll need double or float for Exp?

public Equipment Body { get; private set; }
public Equipment Arms { get; private set; }
public Equipment Legs { get; private set; }
public Equipment Shoes { get; private set; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can add belt, necklace, rings? Or later?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants