- Official castle defense damage reduction/defense status changes. (bugreport:2901)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14175 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
80591b2611
commit
cb6fdc59cd
@ -615,9 +615,11 @@ int battle_calc_gvg_damage(struct block_list *src,struct block_list *bl,int dama
|
||||
case NJ_ZENYNAGE:
|
||||
break;
|
||||
default:
|
||||
/* Uncomment if you want god-mode Emperiums at 100 defense. [Kisuka]
|
||||
if (md && md->guardian_data) {
|
||||
damage -= damage * (md->guardian_data->castle->defense/100) * battle_config.castle_defense_rate/100;
|
||||
}
|
||||
*/
|
||||
if (flag & BF_SKILL) { //Skills get a different reduction than non-skills. [Skotlex]
|
||||
if (flag&BF_WEAPON)
|
||||
damage = damage * battle_config.gvg_weapon_damage_rate/100;
|
||||
|
@ -1385,6 +1385,8 @@ int status_calc_mob_(struct mob_data* md, bool first)
|
||||
|
||||
if (md->guardian_data && md->guardian_data->guardup_lv)
|
||||
flag|=4;
|
||||
if (md->class_ == MOBID_EMPERIUM)
|
||||
flag|=4;
|
||||
|
||||
if (battle_config.slaves_inherit_speed && md->master_id)
|
||||
flag|=8;
|
||||
@ -1497,15 +1499,30 @@ int status_calc_mob_(struct mob_data* md, bool first)
|
||||
if (!gc)
|
||||
ShowError("status_calc_mob: No castle set at map %s\n", map[md->bl.m].name);
|
||||
else {
|
||||
status->max_hp += 2000 * gc->defense;
|
||||
status->max_sp += 200 * gc->defense;
|
||||
status->hp = status->max_hp;
|
||||
status->sp = status->max_sp;
|
||||
if(gc->castle_id > 23) {
|
||||
if(md->class_ == MOBID_EMPERIUM) {
|
||||
status->max_hp += 1000 * gc->defense;
|
||||
status->max_sp += 200 * gc->defense;
|
||||
status->hp = status->max_hp;
|
||||
status->sp = status->max_sp;
|
||||
status->def += (gc->defense+2)/3;
|
||||
status->mdef += (gc->defense+2)/3;
|
||||
}
|
||||
}else{
|
||||
status->max_hp += 1000 * gc->defense;
|
||||
status->max_sp += 200 * gc->defense;
|
||||
status->hp = status->max_hp;
|
||||
status->sp = status->max_sp;
|
||||
status->def += (gc->defense+2)/3;
|
||||
status->mdef += (gc->defense+2)/3;
|
||||
}
|
||||
}
|
||||
if(md->class_ != MOBID_EMPERIUM) {
|
||||
status->batk += status->batk * 10*md->guardian_data->guardup_lv/100;
|
||||
status->rhw.atk += status->rhw.atk * 10*md->guardian_data->guardup_lv/100;
|
||||
status->rhw.atk2 += status->rhw.atk2 * 10*md->guardian_data->guardup_lv/100;
|
||||
status->aspd_rate -= 100*md->guardian_data->guardup_lv;
|
||||
}
|
||||
status->batk += status->batk * 10*md->guardian_data->guardup_lv/100;
|
||||
status->rhw.atk += status->rhw.atk * 10*md->guardian_data->guardup_lv/100;
|
||||
status->rhw.atk2 += status->rhw.atk2 * 10*md->guardian_data->guardup_lv/100;
|
||||
status->aspd_rate -= 100*md->guardian_data->guardup_lv;
|
||||
}
|
||||
|
||||
if( first ) //Initial battle status
|
||||
|
Loading…
x
Reference in New Issue
Block a user