From c161174bedba0cb6d6200b667ef7d245dfcb46d6 Mon Sep 17 00:00:00 2001 From: valaris Date: Mon, 15 Nov 2004 07:14:58 +0000 Subject: * Added mobs_level_up option. [Valaris] -Everytime a monster kills a play their level will increase and show levelup animation. -Their 6 main stats and speed will increase as they level. -They will recover 10% of the max hp of the player it kills. -Player will gain extra exp based on how much stronger a monster is than normal. -Skill estimation will show monsters current level (instead of reading from db). -Will display level 99 aura if and when a monster hits level 99. -They will not go higher than level 99. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/athena@187 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/mob.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'src/map/mob.c') diff --git a/src/map/mob.c b/src/map/mob.c index 57ff28eda..ea4f46685 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -2350,21 +2350,30 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type) if(per>512) per=512; if(per<1) per=1; base_exp=mob_db[md->class].base_exp*per/256; + if(base_exp < 1) base_exp = 1; if(sd && md && battle_config.pk_mode==1 && (mob_db[md->class].lv - sd->status.base_level >= 20)) { base_exp*=1.15; // pk_mode additional exp if monster >20 levels [Valaris] } - if(md->state.special_mob_ai >= 1 && battle_config.alchemist_summon_reward != 1) base_exp = 0; // Added [Valaris] job_exp=mob_db[md->class].job_exp*per/256; if(job_exp < 1) job_exp = 1; if(sd && md && battle_config.pk_mode==1 && (mob_db[md->class].lv - sd->status.base_level >= 20)) { job_exp*=1.15; // pk_mode additional exp if monster >20 levels [Valaris] } - if(md->state.special_mob_ai >= 1 && battle_config.alchemist_summon_reward != 1) job_exp = 0; // Added [Valaris] - else if(battle_config.zeny_from_mobs) { - if(md->level > 0) zeny=(md->level+rand()%md->level)*per/256; // zeny calculation moblv + random moblv [Valaris] - if(mob_db[md->class].mexp > 0) - zeny*=rand()%250; + if(md->state.special_mob_ai >= 1 && battle_config.alchemist_summon_reward != 1) { // for summoned creatures [Valaris] + base_exp = 0; + job_exp = 0; + } + else { + if(battle_config.zeny_from_mobs) { + if(md->level > 0) zeny=(md->level+rand()%md->level)*per/256; // zeny calculation moblv + random moblv [Valaris] + if(mob_db[md->class].mexp > 0) + zeny*=rand()%250; + } + if(battle_config.mobs_level_up && md->level > mob_db[md->class].lv) { // [Valaris] + job_exp+=((md->level-mob_db[md->class].lv)*mob_db[md->class].job_exp*.03)*per/256; + base_exp+=((md->level-mob_db[md->class].lv)*mob_db[md->class].base_exp*.03)*per/256; + } } if((pid=tmpsd[i]->status.party_id)>0){ // パーティに入っている -- cgit v1.2.3-70-g09d2