diff options
author | Kisuka <Kisuka@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-11-29 07:18:35 +0000 |
---|---|---|
committer | Kisuka <Kisuka@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-11-29 07:18:35 +0000 |
commit | adfe051544021eac9278b1bc153e045e903df12b (patch) | |
tree | 37086e9b9104207aa3989f37f0aea5cfad36e327 /src/map/status.c | |
parent | 1dbfe55e921d79c745925b549c5903ce1595b02a (diff) | |
download | hercules-adfe051544021eac9278b1bc153e045e903df12b.tar.gz hercules-adfe051544021eac9278b1bc153e045e903df12b.tar.bz2 hercules-adfe051544021eac9278b1bc153e045e903df12b.tar.xz hercules-adfe051544021eac9278b1bc153e045e903df12b.zip |
- Official castle defense damage reduction/defense status changes. (bugreport:2901)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14175 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/status.c')
-rw-r--r-- | src/map/status.c | 33 |
1 files changed, 25 insertions, 8 deletions
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 |