Added custom battle config support
You can now define custom battle config structure members in src/custom/battle_config_struct.inc and initialize them in src/custom/battle_config_init.inc You can put the configuration into any battle configuration file, but we recommend you to put it into conf/import/battle_conf.txt
This commit is contained in:
parent
5090693182
commit
8857ff6279
13
src/custom/battle_config_init.inc
Normal file
13
src/custom/battle_config_init.inc
Normal file
@ -0,0 +1,13 @@
|
||||
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
|
||||
// For more information, see LICENCE in the main folder
|
||||
|
||||
/**
|
||||
* Custom battle config initializations
|
||||
* Place the definition of custom battle configuration initializations in this file.
|
||||
*
|
||||
* Do not forget to add a comma at the end of the line, if you want to add another config
|
||||
*
|
||||
* Format:
|
||||
* { "name", &battle_config.<variable name>, <default value>, <minimum value>, <maximum value> },
|
||||
**/
|
||||
|
14
src/custom/battle_config_struct.inc
Normal file
14
src/custom/battle_config_struct.inc
Normal file
@ -0,0 +1,14 @@
|
||||
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
|
||||
// For more information, see LICENCE in the main folder
|
||||
|
||||
/**
|
||||
* Custom battle config structure
|
||||
* Place the definition of custom battle configuration structure members in this file.
|
||||
*
|
||||
* Make sure that the name you want is not already taken by looking into battle.h
|
||||
* Do not forget to add initilization logic to battle_config_init.inc
|
||||
*
|
||||
* Format:
|
||||
* <datatype> name;
|
||||
**/
|
||||
|
@ -8329,6 +8329,8 @@ static const struct _battle_data {
|
||||
{ "exp_cost_inspiration", &battle_config.exp_cost_inspiration, 1, 0, 100, },
|
||||
{ "mvp_exp_reward_message", &battle_config.mvp_exp_reward_message, 0, 0, 1, },
|
||||
{ "can_damage_skill", &battle_config.can_damage_skill, 1, 0, BL_ALL, },
|
||||
|
||||
#include "../custom/battle_config_init.inc"
|
||||
};
|
||||
|
||||
#ifndef STATS_OPT_OUT
|
||||
|
@ -610,6 +610,8 @@ extern struct Battle_Config
|
||||
int exp_cost_inspiration;
|
||||
int mvp_exp_reward_message;
|
||||
int can_damage_skill; //Which BL types can damage traps
|
||||
|
||||
#include "../custom/battle_config_struct.inc"
|
||||
} battle_config;
|
||||
|
||||
void do_init_battle(void);
|
||||
|
Loading…
x
Reference in New Issue
Block a user