* Updated description for player_check_cloak_type

* Increased skill range limitations in pc_no_footset
* Added exp_calc_type

git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@831 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
celest 2004-12-28 04:45:26 +00:00
parent 20cd4f81bc
commit b4256fc8d6
6 changed files with 47 additions and 26 deletions

View File

@ -1,5 +1,9 @@
Date Added Date Added
12/27 12/27
* Updated description for player_check_cloak_type [celest]
* Increased skill range limitations in pc_no_footset [celest]
* Added exp_calc_type - to alternate between 3 different versions for exp
calculating [celest]
* Reinitialized variable 'c' in map_readmap, it's supposed to have a start value. Ex. '-'. [MC Cameri] * Reinitialized variable 'c' in map_readmap, it's supposed to have a start value. Ex. '-'. [MC Cameri]
* Commented out dump_timer_heap() again... [MC Cameri] * Commented out dump_timer_heap() again... [MC Cameri]
* Added include of string.h in malloc.c, was causing compile errors/warnings [MC Cameri] * Added include of string.h in malloc.c, was causing compile errors/warnings [MC Cameri]

View File

@ -522,8 +522,8 @@ player_skill_nofootset: yes
monster_skill_nofootset: yes monster_skill_nofootset: yes
// When a player is cloaking, Whether the wall is checked or not. (Note 1) // When a player is cloaking, Whether the wall is checked or not. (Note 1)
// Note: When set to yes players can still cloak away from walls, but cannot move // Note: When set to no players can always cloak away from walls and move around
// as well as receive movement penalties if the skill level is below 3. // freely even if the skill level is below 3.
player_cloak_check_type: yes player_cloak_check_type: yes
// When a monster is cloaking, Whether the wall is checked or not. (Note 1) // When a monster is cloaking, Whether the wall is checked or not. (Note 1)

View File

@ -5308,6 +5308,7 @@ static const struct {
{ "motd_type", &battle_config.motd_type}, // [celest] { "motd_type", &battle_config.motd_type}, // [celest]
{ "allow_atcommand_when_mute", &battle_config.allow_atcommand_when_mute}, // [celest] { "allow_atcommand_when_mute", &battle_config.allow_atcommand_when_mute}, // [celest]
{ "finding_ore_rate", &battle_config.finding_ore_rate}, // [celest] { "finding_ore_rate", &battle_config.finding_ore_rate}, // [celest]
{ "exp_calc_type", &battle_config.exp_calc_type}, // [celest]
//SQL-only options start //SQL-only options start
#ifndef TXT_ONLY #ifndef TXT_ONLY
@ -5567,6 +5568,7 @@ void battle_set_defaults() {
battle_config.finding_ore_rate = 100; battle_config.finding_ore_rate = 100;
battle_config.castrate_dex_scale = 150; battle_config.castrate_dex_scale = 150;
battle_config.area_size = 14; battle_config.area_size = 14;
battle_config.exp_calc_type = 1;
//SQL-only options start //SQL-only options start
#ifndef TXT_ONLY #ifndef TXT_ONLY

View File

@ -356,6 +356,7 @@ extern struct Battle_Config {
int motd_type; // [celest] int motd_type; // [celest]
int allow_atcommand_when_mute; // [celest] int allow_atcommand_when_mute; // [celest]
int finding_ore_rate; // orn int finding_ore_rate; // orn
int exp_calc_type;
#ifndef TXT_ONLY /* SQL-only options */ #ifndef TXT_ONLY /* SQL-only options */
int mail_system; // [Valaris] int mail_system; // [Valaris]

View File

@ -2369,31 +2369,45 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type)
struct party *p; struct party *p;
if(tmpsd[i]==NULL || tmpsd[i]->bl.m != md->bl.m || pc_isdead(tmpsd[i])) if(tmpsd[i]==NULL || tmpsd[i]->bl.m != md->bl.m || pc_isdead(tmpsd[i]))
continue; continue;
/* jAthena's exp formula
if (battle_config.exp_calc_type == 0) {
// jAthena's exp formula
// per = ((double)md->dmglog[i].dmg)*(9.+(double)((count > 6)? 6:count))/10./((double)max_hp) * dmg_rate; // per = ((double)md->dmglog[i].dmg)*(9.+(double)((count > 6)? 6:count))/10./((double)max_hp) * dmg_rate;
per = ((double)md->dmglog[i].dmg)*(9.+(double)((count > 6)? 6:count))/10./tdmg; per = ((double)md->dmglog[i].dmg)*(9.+(double)((count > 6)? 6:count))/10./tdmg;
temp = ((double)mob_db[md->class].base_exp * (double)battle_config.base_exp_rate / 100. * per); temp = (double)mob_db[md->class].base_exp * per;
base_exp = (temp > 2147483647.)? 0x7fffffff:(int)temp; base_exp = (temp > 2147483647.)? 0x7fffffff:(int)temp;
if(mob_db[md->class].base_exp > 0 && base_exp < 1) base_exp = 1; if(mob_db[md->class].base_exp > 0 && base_exp < 1) base_exp = 1;
if(base_exp < 0) base_exp = 0; if(base_exp < 0) base_exp = 0;
temp = ((double)mob_db[md->class].job_exp * (double)battle_config.job_exp_rate / 100. * per); temp = (double)mob_db[md->class].job_exp * per;
job_exp = (temp > 2147483647.)? 0x7fffffff:(int)temp; job_exp = (temp > 2147483647.)? 0x7fffffff:(int)temp;
if(mob_db[md->class].job_exp > 0 && job_exp < 1) job_exp = 1; if(mob_db[md->class].job_exp > 0 && job_exp < 1) job_exp = 1;
if(job_exp < 0) job_exp = 0; if(job_exp < 0) job_exp = 0;
*/ }
else if (battle_config.exp_calc_type == 1) {
//eAthena's exp formula rather than jAthena's //eAthena's exp formula rather than jAthena's
per=(double)md->dmglog[i].dmg*256*(9+(double)((count > 6)? 6:count))/10/(double)max_hp; per=(double)md->dmglog[i].dmg*256*(9+(double)((count > 6)? 6:count))/10/(double)max_hp;
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)) {
base_exp*=1.15; // pk_mode additional exp if monster >20 levels [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)) { }
else {
//eAthena's exp formula rather than jAthena's, but based on total damage dealt
per=(double)md->dmglog[i].dmg*256*(9+(double)((count > 6)? 6:count))/10/tdmg;
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;
job_exp=mob_db[md->class].job_exp*per/256;
if(job_exp < 1) job_exp = 1;
}
if(sd && battle_config.pk_mode && (mob_db[md->class].lv - sd->status.base_level >= 20)) {
base_exp*=1.15; // pk_mode additional exp if monster >20 levels [Valaris]
}
if(sd && battle_config.pk_mode && (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->master_id || (md->state.special_mob_ai >= 1 && battle_config.alchemist_summon_reward != 1)) { // for summoned creatures [Valaris] if(md->master_id || (md->state.special_mob_ai >= 1 && battle_config.alchemist_summon_reward != 1)) { // for summoned creatures [Valaris]

View File

@ -6717,7 +6717,7 @@ int skill_castend_pos( int tid, unsigned int tick, int id,int data )
case HT_TALKIEBOX: case HT_TALKIEBOX:
case PF_SPIDERWEB: /* スパイダ?ウェッブ */ case PF_SPIDERWEB: /* スパイダ?ウェッブ */
case WZ_ICEWALL: case WZ_ICEWALL:
range = 1; range = 2;
break; break;
case AL_WARP: case AL_WARP:
range = 0; range = 0;