From 59fcf9c26e7c9d5cf65b60d0fb148b5214143711 Mon Sep 17 00:00:00 2001 From: toms Date: Sat, 19 Aug 2006 11:32:41 +0000 Subject: Added homunculus_friendly_rate battle config git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8361 54d463be-8e91-2dee-dedb-b68131a5f0ec --- Changelog-Trunk.txt | 1 + conf-tmpl/battle/homunc.conf | 31 +++++++++++++++++++++++++++++++ conf-tmpl/battle_athena.conf | 3 +++ src/map/battle.c | 2 ++ src/map/battle.h | 2 +- src/map/mercenary.c | 3 +++ 6 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 conf-tmpl/battle/homunc.conf diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 055bd0776..f995288bc 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,6 +4,7 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. 2006/08/19 + * Added homunculus_friendly_rate battle config [Toms] * Some compilation warnings fixed [Toms] * Added skill's required item check on homunc skills [Toms] * Add Condensed Red Potion as a required item for HLIF_HEAL [Toms] diff --git a/conf-tmpl/battle/homunc.conf b/conf-tmpl/battle/homunc.conf new file mode 100644 index 000000000..6f27d708a --- /dev/null +++ b/conf-tmpl/battle/homunc.conf @@ -0,0 +1,31 @@ +// ______ __ __ +// /\ _ \/\ \__/\ \ +// __\ \ \L\ \ \ ,_\ \ \___ __ ___ __ +// /'__`\ \ __ \ \ \/\ \ _ `\ /'__`\/' _ `\ /'__`\ +///\ __/\ \ \/\ \ \ \_\ \ \ \ \/\ __//\ \/\ \/\ \L\.\_ +//\ \____\\ \_\ \_\ \__\\ \_\ \_\ \____\ \_\ \_\ \__/.\_\ +// \/____/ \/_/\/_/\/__/ \/_/\/_/\/____/\/_/\/_/\/__/\/_/ +// _ _ _ _ _ _ _ _ _ _ _ _ _ +// / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ +//( e | n | g | l | i | s | h ) ( A | t | h | e | n | a ) +// \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ +// +//-------------------------------------------------------------- +// eAthena Battle Configuration File +// Originally Translated by Peter Kieser +// Made in to plainer English by Ancyker +//-------------------------------------------------------------- +//Note 1: Directives can be set using on/off, yes/no or 1/0. +//Note 2: All rates are in percents, 100 would mean 100%, 200 +// would mean 200%, etc +//Note 3: Value is not limited to 60K (see below) +// Other Information: +// All options are limited to a max of 60K (aprox) which is 600% +// or 60secs as appropiate. +// 1000 miliseconds is 1 second. +// Unless otherwise specified, the minimum value is 0 for all +// features. +//-------------------------------------------------------------- + +// The rate a homunculus will get friendly by feeding it. (Note 2) +homunculus_friendly_rate: 100 diff --git a/conf-tmpl/battle_athena.conf b/conf-tmpl/battle_athena.conf index 255e33a05..eb192f006 100644 --- a/conf-tmpl/battle_athena.conf +++ b/conf-tmpl/battle_athena.conf @@ -47,6 +47,9 @@ import: conf/battle/party.conf //Pet related configuration import: conf/battle/pet.conf +//Homunc related configuration +import: conf/battle/homunc.conf + //Player specific settings import: conf/battle/player.conf diff --git a/src/map/battle.c b/src/map/battle.c index 0376a2ac3..f4a28b534 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -3738,6 +3738,7 @@ static const struct battle_data_short { { "override_mob_names", &battle_config.override_mob_names }, { "min_chat_delay", &battle_config.min_chat_delay }, { "homunculus_show_growth", &battle_config.homunculus_show_growth }, //[orn] + { "homunculus_friendly_rate", &battle_config.homunculus_friendly_rate }, }; static const struct battle_data_int { @@ -4171,6 +4172,7 @@ void battle_set_defaults() { battle_config.min_chat_delay = 0; battle_config.hvan_explosion_intimate = 45000; //[orn] battle_config.homunculus_show_growth = 0; //[orn] + battle_config.homunculus_friendly_rate = 100; } void battle_validate_conf() { diff --git a/src/map/battle.h b/src/map/battle.h index e78713583..588317f2a 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -437,7 +437,7 @@ extern struct Battle_Config { unsigned short min_chat_delay; //Minimum time between client messages. [Skotlex] unsigned int hvan_explosion_intimate ; // fix [albator] unsigned short homunculus_show_growth ; //[orn] - + unsigned short homunculus_friendly_rate; } battle_config; void do_init_battle(void); diff --git a/src/map/mercenary.c b/src/map/mercenary.c index 118bda037..472ac285c 100644 --- a/src/map/mercenary.c +++ b/src/map/mercenary.c @@ -393,6 +393,9 @@ int merc_hom_gainexp(struct homun_data *hd,int exp) // Return then new value int merc_hom_increase_intimacy(struct homun_data * hd, unsigned int value) { + if (battle_config.homunculus_friendly_rate != 100) + value = (value * battle_config.homunculus_friendly_rate) / 100; + if (hd->master->homunculus.intimacy + value <= 100000) hd->master->homunculus.intimacy += value; else -- cgit v1.2.3-70-g09d2