* 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://svn.code.sf.net/p/rathena/svn/athena@187 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
abb9ac358f
commit
31340d52a1
@ -1,4 +1,14 @@
|
|||||||
Date Added
|
Date Added
|
||||||
|
11/15
|
||||||
|
* 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.
|
||||||
|
|
||||||
11/14
|
11/14
|
||||||
* Made the Advance jobchangers to kRO standars with the following;
|
* Made the Advance jobchangers to kRO standars with the following;
|
||||||
- Checks if you are level 99/50 and 2nd class OR above.
|
- Checks if you are level 99/50 and 2nd class OR above.
|
||||||
|
@ -724,5 +724,8 @@ area_size: 14
|
|||||||
// Zeny from mobs
|
// Zeny from mobs
|
||||||
zeny_from_mobs: no
|
zeny_from_mobs: no
|
||||||
|
|
||||||
|
// Monsters level up (monster will level up each time a player is killed and they will grow stronger)
|
||||||
|
mobs_level_up: no
|
||||||
|
|
||||||
import: conf/import/battle_conf.txt
|
import: conf/import/battle_conf.txt
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ int battle_get_lv(struct block_list *bl)
|
|||||||
{
|
{
|
||||||
nullpo_retr(0, bl);
|
nullpo_retr(0, bl);
|
||||||
if(bl->type==BL_MOB && (struct mob_data *)bl)
|
if(bl->type==BL_MOB && (struct mob_data *)bl)
|
||||||
return mob_db[((struct mob_data *)bl)->class].lv;
|
return ((struct mob_data *)bl)->level;
|
||||||
else if(bl->type==BL_PC && (struct map_session_data *)bl)
|
else if(bl->type==BL_PC && (struct map_session_data *)bl)
|
||||||
return ((struct map_session_data *)bl)->status.base_level;
|
return ((struct map_session_data *)bl)->status.base_level;
|
||||||
else if(bl->type==BL_PET && (struct pet_data *)bl)
|
else if(bl->type==BL_PET && (struct pet_data *)bl)
|
||||||
@ -153,6 +153,8 @@ int battle_get_max_hp(struct block_list *bl)
|
|||||||
int max_hp=1;
|
int max_hp=1;
|
||||||
if(bl->type==BL_MOB && ((struct mob_data*)bl)) {
|
if(bl->type==BL_MOB && ((struct mob_data*)bl)) {
|
||||||
max_hp = mob_db[((struct mob_data*)bl)->class].max_hp;
|
max_hp = mob_db[((struct mob_data*)bl)->class].max_hp;
|
||||||
|
if(battle_config.mobs_level_up) // mobs leveling up increase [Valaris]
|
||||||
|
max_hp+=(((struct mob_data *)bl)->level - mob_db[((struct mob_data *)bl)->class].lv)*battle_get_vit(bl);
|
||||||
if(mob_db[((struct mob_data*)bl)->class].mexp > 0) {
|
if(mob_db[((struct mob_data*)bl)->class].mexp > 0) {
|
||||||
if(battle_config.mvp_hp_rate != 100)
|
if(battle_config.mvp_hp_rate != 100)
|
||||||
max_hp = (max_hp * battle_config.mvp_hp_rate)/100;
|
max_hp = (max_hp * battle_config.mvp_hp_rate)/100;
|
||||||
@ -195,8 +197,11 @@ int battle_get_str(struct block_list *bl)
|
|||||||
|
|
||||||
nullpo_retr(0, bl);
|
nullpo_retr(0, bl);
|
||||||
sc_data=battle_get_sc_data(bl);
|
sc_data=battle_get_sc_data(bl);
|
||||||
if(bl->type==BL_MOB && ((struct mob_data *)bl))
|
if(bl->type==BL_MOB && ((struct mob_data *)bl)) {
|
||||||
str = mob_db[((struct mob_data *)bl)->class].str;
|
str = mob_db[((struct mob_data *)bl)->class].str;
|
||||||
|
if(battle_config.mobs_level_up) // mobs leveling up increase [Valaris]
|
||||||
|
str+=((struct mob_data *)bl)->level - mob_db[((struct mob_data *)bl)->class].lv;
|
||||||
|
}
|
||||||
else if(bl->type==BL_PC && ((struct map_session_data *)bl))
|
else if(bl->type==BL_PC && ((struct map_session_data *)bl))
|
||||||
return ((struct map_session_data *)bl)->paramc[0];
|
return ((struct map_session_data *)bl)->paramc[0];
|
||||||
else if(bl->type==BL_PET && ((struct pet_data *)bl))
|
else if(bl->type==BL_PET && ((struct pet_data *)bl))
|
||||||
@ -229,8 +234,11 @@ int battle_get_agi(struct block_list *bl)
|
|||||||
|
|
||||||
nullpo_retr(0, bl);
|
nullpo_retr(0, bl);
|
||||||
sc_data=battle_get_sc_data(bl);
|
sc_data=battle_get_sc_data(bl);
|
||||||
if(bl->type==BL_MOB && (struct mob_data *)bl)
|
if(bl->type==BL_MOB && (struct mob_data *)bl) {
|
||||||
agi=mob_db[((struct mob_data *)bl)->class].agi;
|
agi=mob_db[((struct mob_data *)bl)->class].agi;
|
||||||
|
if(battle_config.mobs_level_up) // increase of mobs leveling up [Valaris]
|
||||||
|
agi+=((struct mob_data *)bl)->level - mob_db[((struct mob_data *)bl)->class].lv;
|
||||||
|
}
|
||||||
else if(bl->type==BL_PC && (struct map_session_data *)bl)
|
else if(bl->type==BL_PC && (struct map_session_data *)bl)
|
||||||
agi=((struct map_session_data *)bl)->paramc[1];
|
agi=((struct map_session_data *)bl)->paramc[1];
|
||||||
else if(bl->type==BL_PET && (struct pet_data *)bl)
|
else if(bl->type==BL_PET && (struct pet_data *)bl)
|
||||||
@ -270,8 +278,11 @@ int battle_get_vit(struct block_list *bl)
|
|||||||
|
|
||||||
nullpo_retr(0, bl);
|
nullpo_retr(0, bl);
|
||||||
sc_data=battle_get_sc_data(bl);
|
sc_data=battle_get_sc_data(bl);
|
||||||
if(bl->type==BL_MOB && (struct mob_data *)bl)
|
if(bl->type==BL_MOB && (struct mob_data *)bl) {
|
||||||
vit=mob_db[((struct mob_data *)bl)->class].vit;
|
vit=mob_db[((struct mob_data *)bl)->class].vit;
|
||||||
|
if(battle_config.mobs_level_up) // increase from mobs leveling up [Valaris]
|
||||||
|
vit+=((struct mob_data *)bl)->level - mob_db[((struct mob_data *)bl)->class].lv;
|
||||||
|
}
|
||||||
else if(bl->type==BL_PC && (struct map_session_data *)bl)
|
else if(bl->type==BL_PC && (struct map_session_data *)bl)
|
||||||
vit=((struct map_session_data *)bl)->paramc[2];
|
vit=((struct map_session_data *)bl)->paramc[2];
|
||||||
else if(bl->type==BL_PET && (struct pet_data *)bl)
|
else if(bl->type==BL_PET && (struct pet_data *)bl)
|
||||||
@ -298,8 +309,11 @@ int battle_get_int(struct block_list *bl)
|
|||||||
|
|
||||||
nullpo_retr(0, bl);
|
nullpo_retr(0, bl);
|
||||||
sc_data=battle_get_sc_data(bl);
|
sc_data=battle_get_sc_data(bl);
|
||||||
if(bl->type==BL_MOB && (struct mob_data *)bl)
|
if(bl->type==BL_MOB && (struct mob_data *)bl){
|
||||||
int_=mob_db[((struct mob_data *)bl)->class].int_;
|
int_=mob_db[((struct mob_data *)bl)->class].int_;
|
||||||
|
if(battle_config.mobs_level_up) // increase from mobs leveling up [Valaris]
|
||||||
|
int_+=((struct mob_data *)bl)->level - mob_db[((struct mob_data *)bl)->class].lv;
|
||||||
|
}
|
||||||
else if(bl->type==BL_PC && (struct map_session_data *)bl)
|
else if(bl->type==BL_PC && (struct map_session_data *)bl)
|
||||||
int_=((struct map_session_data *)bl)->paramc[3];
|
int_=((struct map_session_data *)bl)->paramc[3];
|
||||||
else if(bl->type==BL_PET && (struct pet_data *)bl)
|
else if(bl->type==BL_PET && (struct pet_data *)bl)
|
||||||
@ -331,8 +345,11 @@ int battle_get_dex(struct block_list *bl)
|
|||||||
|
|
||||||
nullpo_retr(0, bl);
|
nullpo_retr(0, bl);
|
||||||
sc_data=battle_get_sc_data(bl);
|
sc_data=battle_get_sc_data(bl);
|
||||||
if(bl->type==BL_MOB && (struct mob_data *)bl)
|
if(bl->type==BL_MOB && (struct mob_data *)bl) {
|
||||||
dex=mob_db[((struct mob_data *)bl)->class].dex;
|
dex=mob_db[((struct mob_data *)bl)->class].dex;
|
||||||
|
if(battle_config.mobs_level_up) // increase from mobs leveling up [Valaris]
|
||||||
|
dex+=((struct mob_data *)bl)->level - mob_db[((struct mob_data *)bl)->class].lv;
|
||||||
|
}
|
||||||
else if(bl->type==BL_PC && (struct map_session_data *)bl)
|
else if(bl->type==BL_PC && (struct map_session_data *)bl)
|
||||||
dex=((struct map_session_data *)bl)->paramc[4];
|
dex=((struct map_session_data *)bl)->paramc[4];
|
||||||
else if(bl->type==BL_PET && (struct pet_data *)bl)
|
else if(bl->type==BL_PET && (struct pet_data *)bl)
|
||||||
@ -371,8 +388,11 @@ int battle_get_luk(struct block_list *bl)
|
|||||||
|
|
||||||
nullpo_retr(0, bl);
|
nullpo_retr(0, bl);
|
||||||
sc_data=battle_get_sc_data(bl);
|
sc_data=battle_get_sc_data(bl);
|
||||||
if(bl->type==BL_MOB && (struct mob_data *)bl)
|
if(bl->type==BL_MOB && (struct mob_data *)bl) {
|
||||||
luk=mob_db[((struct mob_data *)bl)->class].luk;
|
luk=mob_db[((struct mob_data *)bl)->class].luk;
|
||||||
|
if(battle_config.mobs_level_up) // increase from mobs leveling up [Valaris]
|
||||||
|
luk+=((struct mob_data *)bl)->level - mob_db[((struct mob_data *)bl)->class].lv;
|
||||||
|
}
|
||||||
else if(bl->type==BL_PC && (struct map_session_data *)bl)
|
else if(bl->type==BL_PC && (struct map_session_data *)bl)
|
||||||
luk=((struct map_session_data *)bl)->paramc[5];
|
luk=((struct map_session_data *)bl)->paramc[5];
|
||||||
else if(bl->type==BL_PET && (struct pet_data *)bl)
|
else if(bl->type==BL_PET && (struct pet_data *)bl)
|
||||||
@ -876,9 +896,11 @@ int battle_get_speed(struct block_list *bl)
|
|||||||
else {
|
else {
|
||||||
struct status_change *sc_data=battle_get_sc_data(bl);
|
struct status_change *sc_data=battle_get_sc_data(bl);
|
||||||
int speed = 1000;
|
int speed = 1000;
|
||||||
if(bl->type==BL_MOB && (struct mob_data *)bl)
|
if(bl->type==BL_MOB && (struct mob_data *)bl) {
|
||||||
// speed = mob_db[((struct mob_data *)bl)->class].speed;
|
|
||||||
speed = ((struct mob_data *)bl)->speed;
|
speed = ((struct mob_data *)bl)->speed;
|
||||||
|
if(battle_config.mobs_level_up) // increase from mobs leveling up [Valaris]
|
||||||
|
speed-=((struct mob_data *)bl)->level - mob_db[((struct mob_data *)bl)->class].lv;
|
||||||
|
}
|
||||||
else if(bl->type==BL_PET && (struct pet_data *)bl)
|
else if(bl->type==BL_PET && (struct pet_data *)bl)
|
||||||
speed = ((struct pet_data *)bl)->msd->petDB->speed;
|
speed = ((struct pet_data *)bl)->msd->petDB->speed;
|
||||||
|
|
||||||
@ -5087,6 +5109,7 @@ static const struct {
|
|||||||
{ "area_size", &battle_config.area_size }, // added by [MouseJstr]
|
{ "area_size", &battle_config.area_size }, // added by [MouseJstr]
|
||||||
{ "muting_players", &battle_config.muting_players}, // added by [Apple]
|
{ "muting_players", &battle_config.muting_players}, // added by [Apple]
|
||||||
{ "zeny_from_mobs", &battle_config.zeny_from_mobs}, // [Valaris]
|
{ "zeny_from_mobs", &battle_config.zeny_from_mobs}, // [Valaris]
|
||||||
|
{ "mobs_level_up", &battle_config.mobs_level_up}, // [Valaris]
|
||||||
//SQL-only options start
|
//SQL-only options start
|
||||||
#ifndef TXT_ONLY
|
#ifndef TXT_ONLY
|
||||||
{ "mail_system", &battle_config.mail_system }, // added by [Valaris]
|
{ "mail_system", &battle_config.mail_system }, // added by [Valaris]
|
||||||
@ -5307,6 +5330,7 @@ void battle_set_defaults() {
|
|||||||
battle_config.min_cloth_color = 0;
|
battle_config.min_cloth_color = 0;
|
||||||
battle_config.max_cloth_color = 4;
|
battle_config.max_cloth_color = 4;
|
||||||
battle_config.zeny_from_mobs = 0;
|
battle_config.zeny_from_mobs = 0;
|
||||||
|
battle_config.mobs_level_up = 0;
|
||||||
|
|
||||||
battle_config.castrate_dex_scale = 150;
|
battle_config.castrate_dex_scale = 150;
|
||||||
|
|
||||||
|
@ -332,6 +332,7 @@ extern struct Battle_Config {
|
|||||||
int area_size; // added by [MouseJstr]
|
int area_size; // added by [MouseJstr]
|
||||||
|
|
||||||
int zeny_from_mobs; // [Valaris]
|
int zeny_from_mobs; // [Valaris]
|
||||||
|
int mobs_level_up; // [Valaris]
|
||||||
|
|
||||||
#ifndef TXT_ONLY /* SQL-only options */
|
#ifndef TXT_ONLY /* SQL-only options */
|
||||||
int mail_system; // [Valaris]
|
int mail_system; // [Valaris]
|
||||||
|
@ -4578,7 +4578,7 @@ int clif_skill_estimation(struct map_session_data *sd,struct block_list *dst)
|
|||||||
|
|
||||||
WBUFW(buf, 0)=0x18c;
|
WBUFW(buf, 0)=0x18c;
|
||||||
WBUFW(buf, 2)=mob_get_viewclass(md->class);
|
WBUFW(buf, 2)=mob_get_viewclass(md->class);
|
||||||
WBUFW(buf, 4)=mob_db[md->class].lv;
|
WBUFW(buf, 4)=md->level;
|
||||||
WBUFW(buf, 6)=mob_db[md->class].size;
|
WBUFW(buf, 6)=mob_db[md->class].size;
|
||||||
WBUFL(buf, 8)=md->hp;
|
WBUFL(buf, 8)=md->hp;
|
||||||
WBUFW(buf,12)=battle_get_def2(&md->bl);
|
WBUFW(buf,12)=battle_get_def2(&md->bl);
|
||||||
|
@ -2350,22 +2350,31 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type)
|
|||||||
if(per>512) per=512;
|
if(per>512) per=512;
|
||||||
if(per<1) per=1;
|
if(per<1) per=1;
|
||||||
base_exp=mob_db[md->class].base_exp*per/256;
|
base_exp=mob_db[md->class].base_exp*per/256;
|
||||||
|
|
||||||
if(base_exp < 1) base_exp = 1;
|
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)) {
|
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]
|
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;
|
job_exp=mob_db[md->class].job_exp*per/256;
|
||||||
if(job_exp < 1) job_exp = 1;
|
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)) {
|
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]
|
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]
|
if(md->state.special_mob_ai >= 1 && battle_config.alchemist_summon_reward != 1) { // for summoned creatures [Valaris]
|
||||||
else if(battle_config.zeny_from_mobs) {
|
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(md->level > 0) zeny=(md->level+rand()%md->level)*per/256; // zeny calculation moblv + random moblv [Valaris]
|
||||||
if(mob_db[md->class].mexp > 0)
|
if(mob_db[md->class].mexp > 0)
|
||||||
zeny*=rand()%250;
|
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){ // ƒp<C692>[ƒeƒB‚É“ü‚Á‚Ä‚¢‚é
|
if((pid=tmpsd[i]->status.party_id)>0){ // ƒp<C692>[ƒeƒB‚É“ü‚Á‚Ä‚¢‚é
|
||||||
int j=0;
|
int j=0;
|
||||||
|
19
src/map/pc.c
19
src/map/pc.c
@ -2648,6 +2648,11 @@ int pc_skill(struct map_session_data *sd,int id,int level,int flag)
|
|||||||
pc_calcstatus(sd,0);
|
pc_calcstatus(sd,0);
|
||||||
clif_skillinfoblock(sd);
|
clif_skillinfoblock(sd);
|
||||||
}
|
}
|
||||||
|
else if(flag==2 && (sd->status.skill[id].id == id || level == 0)){ // クエスト所得ならここで条件を確認して送信する
|
||||||
|
sd->status.skill[id].lv+=level;
|
||||||
|
pc_calcstatus(sd,0);
|
||||||
|
clif_skillinfoblock(sd);
|
||||||
|
}
|
||||||
else if(sd->status.skill[id].lv < level){ // 覚えられるがlvが小さいなら
|
else if(sd->status.skill[id].lv < level){ // 覚えられるがlvが小さいなら
|
||||||
if(sd->status.skill[id].id==id)
|
if(sd->status.skill[id].id==id)
|
||||||
sd->status.skill[id].flag=sd->status.skill[id].lv+2; // lvを記憶
|
sd->status.skill[id].flag=sd->status.skill[id].lv+2; // lvを記憶
|
||||||
@ -5014,6 +5019,20 @@ int pc_damage(struct block_list *src,struct map_session_data *sd,int damage)
|
|||||||
clif_updatestatus(sd,SP_JOBEXP);
|
clif_updatestatus(sd,SP_JOBEXP);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// monster level up [Valaris]
|
||||||
|
if(battle_config.mobs_level_up && src && src->type==BL_MOB) {
|
||||||
|
struct mob_data *md=(struct mob_data *)src;
|
||||||
|
if(md && md->target_id != 0 && md->target_id==sd->bl.id) { // reset target id when player dies
|
||||||
|
md->target_id=0;
|
||||||
|
mob_changestate(md,MS_WALK,0);
|
||||||
|
}
|
||||||
|
if(md && md->state.state!=MS_DEAD && md->level < 99) {
|
||||||
|
clif_misceffect(&md->bl,0);
|
||||||
|
md->level++;
|
||||||
|
md->hp+=sd->status.max_hp*.1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//ナイトメアモードアイテムドロップ
|
//ナイトメアモードアイテムドロップ
|
||||||
if(map[sd->bl.m].flag.pvp_nightmaredrop){ // Moved this outside so it works when PVP isnt enabled and during pk mode [Ancyker]
|
if(map[sd->bl.m].flag.pvp_nightmaredrop){ // Moved this outside so it works when PVP isnt enabled and during pk mode [Ancyker]
|
||||||
for(j=0;j<MAX_DROP_PER_MAP;j++){
|
for(j=0;j<MAX_DROP_PER_MAP;j++){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user