summaryrefslogtreecommitdiff
path: root/src/map/mob.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-10-25 14:44:14 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-10-25 14:44:14 +0000
commitbbb2671566dada63d7a34616f93e66b18d91ef44 (patch)
tree76771200cd114f2d1cf01615879c3348c9c0a47b /src/map/mob.c
parent25e3d584866b386b37232320457e6cf1bdcf3d87 (diff)
downloadhercules-bbb2671566dada63d7a34616f93e66b18d91ef44.tar.gz
hercules-bbb2671566dada63d7a34616f93e66b18d91ef44.tar.bz2
hercules-bbb2671566dada63d7a34616f93e66b18d91ef44.tar.xz
hercules-bbb2671566dada63d7a34616f93e66b18d91ef44.zip
- 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
Diffstat (limited to 'src/map/mob.c')
-rw-r--r--src/map/mob.c15
1 files changed, 11 insertions, 4 deletions
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);