-
Notifications
You must be signed in to change notification settings - Fork 13
Battles ~ Move Changes Design Document
typedef struct move {
battle_item_t *item;
int id;
// NOTE: functions to create move_new do not take into account a name
char* name;
char* info;
bool attack;
int damage;
int defense;
struct move *next;
struct move *prev;
} move_t;
typedef enum damage_type {
PHYS, //A move that would inflict physical damage on the opponent.
MAG; //A move that would inflict magical damage on the opponent.
NONE; //A move that does not inflict damage.
} damage_type_t;
This defines who the target is for the move. This would be used for moves that do not do damage, i.e. stat changing ones as well as status effects ones.
typedef enum target_type {
USER, //A move that targets the user.
TARGET; //A move that would target the target.
BOTH; //A move that targets both the user and target. How it affects both can be different.
NONE; //A move that does not target the opponent nor the user that is not an attacking move.
} target_type_t;
typedef enum target_count {
SINGLE, //A move that hits a single target
MULTI; //A move that hits multiple targets
} target_count_t;
This is the new move_t struct. It will be able to support physical attacking moves, magical attacking moves, status changing moves, and eventually effect inflicting moves. We will not be implementing effects for this pull request.
typedef struct move_t {
int id; //the unique identifier of the move
char* name; //the name of the move
char* info; //a description of what the move does
damage_type_t dmg_type; //whether a move does physical damage, magical damage, or no damage
target_type_t stat_mods; //whether a move changes a user's stats, the opponent's stats, both, or neither
target_type_t effects; //whether a move has an effect that targets the user, opponent, both, or neither
target_count_t count;
int sp_cost; //the amount of sp required to use a move
battle_item_t* req_item; //an item required to use the move or NULL for none
int damage; //the damage the move will do
int accuracy; //the accuracy of the move
stat_change_t* user_mods; //stat changes for the user
stat_change_t* opponent_mods; //stat changes for the opponent
move_t* prev; //the previous move in the list, or NULL for no move
move_t* next; //the next move in the list, or NULL for no move
} move_t;
We will need to move calculate_crit() to this file.
This function would need to change to accommodate different types of moves. We would have to filter the types using if statements kind of like this after the accuracy check. This also raises some questions as to how battle_print_move.c will have to change. Needs to also account for sp change:
if(move->dmg_type != NONE){
//call the damage function and inflict damage on opponent.
}
if(move->stat_mods != NONE){
//calls a function that would inflict stat changes on opponent and user
}
if(move->effects != NONE){
//calls a function that would inflict affects. Not implemented in the PR
}
See above implementation of enemy_make_move(). It will be very similar.
We must now think about how to account for the move's accuracy too. This might not be a change to the actual function, but instead the function takes one argument and it is the product of the move's accuracy with the user's accuracy.
This will now need to print messages for stat changes and effect inflictions. Also needs to accommodate for critical hit.
This will need to make sure that it is clear that everything has missed and that damage isn't 0 for a non damaging move.
Needs to accommodate if the move is physical or magical damage.
Needs to change to accommodate new fields of move_t.
Needs to change to accommodate new fields of move_t.
Needs to change to accommodate new fields of move_t.
Freeing move_t may have to become a bit different now that there are different fields.
These need to be updated to accommodate new move_t
This will inflict the stat changes of a move on a user. This will be located in battle_logic.c
-
Action Management
-
Battles
- Design Document
- Text Based Combat in Other Games
- User Stories
- Wishlist
- Battle Planning 2022
- Battle User Stories Review 2022
- Structs in Other Modules Related to Battles 2022
- Stat Changes Design Document
- Run Function Design Document
- CLI Integration Design Document
- Move Changes Design Document
- Unstubbing Stubs Design Document
- Battle Items and Equipment Design Document
- Battle Item Stats
- Battles Demo Design Document
- Battles Testing Moves, Items, and Equipment Design Document
- Sound integration with battle (design document)
-
Custom Actions
-
Custom Scripts
-
DSL
-
CLI
-
Enhanced CLI
-
Game-State
-
Graphics
- Design Plan
- Design document for integrating split screen graphics with chiventure
- GDL (Graphical Description Language)
- Graphics Sandbox
- Design Document for NPC Graphics and Dialogue
- Feature Wishlist (Spring 2021)
- Installing and Building raylib on a VM
- LibSDL Research
- Module Interactions
- Working with Raylib and SSH
- raylib
- GDL
-
Linking the Libzip and Json C to chiventure on CSIL machines
-
Lua
-
NPC
- Dependencies: Player class, Open world, Battle
- Action Documentation
- Design Document for NPC Generation in Openworld
- Design and Planning
- Establishing Dependencies
- Implementation of Custom Scripts
- Independent Feature: NPC Movement Design Document
- Player Interaction Design and Planning
- Dialogue
- Design Document for NPC Dialogue and Action Implementation
- Loading NPCs from WDL Files
- NPC Battle Integration Design Document
- NPC Battle Integration Changes Design Document
-
Open World
- Autogeneration and Game State
- Deciding an integration approach
- Designing approach for static integration into chiventure
- Feature Wishlist
- Generation Module Design layout
- Potential connections to the rest of chiventure
- Single Room Generation Module Design
- Source Document
- User Stories
- World Generation Algorithm Plan
- Loading OpenWorld Attribute from WDL
-
Player Class
-
Player
-
Quests
-
Rooms
-
Skill Trees
- Avoiding soft locks in skill tree integration
- Components of Exemplary Skill Trees
- Design Document and Interface Guide
- Environment interactions based on skill characteristics
- Integrating complex skill (combined, random, sequential, etc.) implementation
- Integration of a Leveling System
- Potential Integration with existing WDL
- Research on game balancing in regards to skill trees
- Research on skill tree support in modern day game engines
- SkillTree Wiki Summary
- Skilltree "effect" implementation and roadmap
- Summary of md doc file for skilltrees
- Design ideas in connection to other features
- Summary of Skill Tree Integration 2022
- The Difficulty of the Reading the World
- Complex Skills Summary
-
Sound
-
Stats
-
WDL