summaryrefslogtreecommitdiff
path: root/src/map/mob.c
diff options
context:
space:
mode:
authorvalaris <valaris@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-11-15 07:14:58 +0000
committervalaris <valaris@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-11-15 07:14:58 +0000
commitc161174bedba0cb6d6200b667ef7d245dfcb46d6 (patch)
tree9f863e80645055864768588ccd29a1807099f15d /src/map/mob.c
parent286ed5a89afeeefa3f3e3e45af74d327db6fd35b (diff)
downloadhercules-c161174bedba0cb6d6200b667ef7d245dfcb46d6.tar.gz
hercules-c161174bedba0cb6d6200b667ef7d245dfcb46d6.tar.bz2
hercules-c161174bedba0cb6d6200b667ef7d245dfcb46d6.tar.xz
hercules-c161174bedba0cb6d6200b667ef7d245dfcb46d6.zip
* 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
Diffstat (limited to 'src/map/mob.c')
-rw-r--r--src/map/mob.c21
1 files changed, 15 insertions, 6 deletions
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){ // パーティに入っている