diff options
author | Kenpachi Developer <Kenpachi.Developer@gmx.de> | 2020-03-09 17:19:57 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2020-04-05 21:29:52 +0200 |
commit | ea24f8edd68edb71cb1ea2cee08979667e4f92e6 (patch) | |
tree | 29f49eebb39705fbb0f4b21f35bed9188f572577 | |
parent | c1598fe112a6d28619c0db8f03c0346a196fd486 (diff) | |
download | hercules-ea24f8edd68edb71cb1ea2cee08979667e4f92e6.tar.gz hercules-ea24f8edd68edb71cb1ea2cee08979667e4f92e6.tar.bz2 hercules-ea24f8edd68edb71cb1ea2cee08979667e4f92e6.tar.xz hercules-ea24f8edd68edb71cb1ea2cee08979667e4f92e6.zip |
Add pet_catch_rate_official_formula battle flag
-rw-r--r-- | conf/map/battle/pet.conf | 8 | ||||
-rw-r--r-- | src/map/battle.c | 1 | ||||
-rw-r--r-- | src/map/battle.h | 1 |
3 files changed, 10 insertions, 0 deletions
diff --git a/conf/map/battle/pet.conf b/conf/map/battle/pet.conf index ed784d49c..5797bb2a5 100644 --- a/conf/map/battle/pet.conf +++ b/conf/map/battle/pet.conf @@ -32,6 +32,14 @@ // assume unit types (1: Pc, 2: Mob, 4: Pet, 8: Homun, 16: Mercenary) //========================================================================= +// Use the offical formula to calculate the pet catch rate? (Note 1) +// Official formula: +// CatchRate = CaptureRate * (100 - 100 * MonsterHP / MonsterMaxHP) / 100 + CaptureRate +// Custum *Athena formula: +// CatchRate = (CaptureRate + (CharacterBaseLevel - MonsterLevel) * 30 + CharacterLuk * 20) * (200 - 100 * MonsterHP / MonsterMaxHP) / 100 +// (CaptureRate is defined in db/(pre-)re/pet_db.conf.) +pet_catch_rate_official_formula: true + // Rate for catching pets (Note 2) pet_catch_rate: 100 diff --git a/src/map/battle.c b/src/map/battle.c index 99fd2ab8c..40c645cf7 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -7085,6 +7085,7 @@ static const struct battle_data { { "guild_emperium_check", &battle_config.guild_emperium_check, 1, 0, 1, }, { "guild_exp_limit", &battle_config.guild_exp_limit, 50, 0, 99, }, { "player_invincible_time", &battle_config.pc_invincible_time, 5000, 0, INT_MAX, }, + { "pet_catch_rate_official_formula", &battle_config.pet_catch_rate_official_formula, 1, 0, 1, }, { "pet_catch_rate", &battle_config.pet_catch_rate, 100, 0, INT_MAX, }, { "pet_rename", &battle_config.pet_rename, 0, 0, 1, }, { "pet_friendly_rate", &battle_config.pet_friendly_rate, 100, 0, INT_MAX, }, diff --git a/src/map/battle.h b/src/map/battle.h index f923e6c99..bb907d5b9 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -212,6 +212,7 @@ struct Battle_Config { int guild_aura; int pc_invincible_time; + int pet_catch_rate_official_formula; int pet_catch_rate; int pet_rename; int pet_friendly_rate; |