From bbb2671566dada63d7a34616f93e66b18d91ef44 Mon Sep 17 00:00:00 2001 From: skotlex Date: Wed, 25 Oct 2006 14:44:14 +0000 Subject: - Made the exp bonus settings be adjustable: - exp_bonus_attacker: Indicates how much additional exp a mob gives per additional attacker (eg: 10 -> +10%*attacker) - exp_bonus_max_attacker: Indicates at which number of attackers the bonus is capped (eg: 5 -> 5 attackers, so a mob yield the same exp whether 5 or 10 people attack it) - Changed the way the party_even_share_bonus setting works. It now uses a simple linear bonus increase (eg: 10 -> +10%*party member) - The defaults are as explained by Tharis: +25%/attacker, capped at 12 attackers, no party bonus. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9067 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/mob.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src/map/mob.c') diff --git a/src/map/mob.c b/src/map/mob.c index 6f73433c7..a9ae329d5 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -1807,8 +1807,13 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) //eAthena's exp formula based on max hp. per = (double)md->dmglog[i].dmg/(double)status->max_hp; - if (count>1) - per *= (9.+(double)((count > 6)? 6:count))/10.; //attackers count bonus. + if (count>1 && battle_config.exp_bonus_attacker) { + //Exp bonus per additional attacker. + if (count > battle_config.exp_bonus_max_attacker) + count = battle_config.exp_bonus_max_attacker; + count--; + per += per*(count*battle_config.exp_bonus_attacker)/100.; + } if(md->special_state.size==1) // change experience for different sized monsters [Valaris] per /=2.; @@ -2053,8 +2058,10 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) //mapflag: noexp check [Lorky] if (map[md->bl.m].flag.nobaseexp) exp =1; - else - exp = (double)md->db->mexp * (9+count)/10.; //[Gengar] + else { + exp = md->db->mexp; + exp += exp*(battle_config.exp_bonus_attacker*count)/100.; //[Gengar] + } mexp = (exp > UINT_MAX)?UINT_MAX:(exp<1?1:(unsigned int)exp); -- cgit v1.2.3-60-g2f50