diff options
-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; |