summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/battle.c2
-rw-r--r--src/map/status.c33
2 files changed, 27 insertions, 8 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index dd70de892..d5c79eef2 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -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;
diff --git a/src/map/status.c b/src/map/status.c
index 479e77fd0..0870340eb 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -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