diff options
author | xantara <xantara@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-01-23 04:47:38 +0000 |
---|---|---|
committer | xantara <xantara@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-01-23 04:47:38 +0000 |
commit | 8756ba5d50270bbad6ad7065a05a1329ef86878b (patch) | |
tree | f38f058f4b77a563e5e7682ec8c9b2c5af8b54da /src/map | |
parent | 071702a2c76f8a69d33f68984961b735c23ca239 (diff) | |
download | hercules-8756ba5d50270bbad6ad7065a05a1329ef86878b.tar.gz hercules-8756ba5d50270bbad6ad7065a05a1329ef86878b.tar.bz2 hercules-8756ba5d50270bbad6ad7065a05a1329ef86878b.tar.xz hercules-8756ba5d50270bbad6ad7065a05a1329ef86878b.zip |
` Fixed Emperium's skill damage/heal and elemental resist (eg. Aspersio) - bugreport:5256
` Rebranded the Core.h file to rAthena
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15507 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/battle.c | 23 | ||||
-rw-r--r-- | src/map/map.h | 2 | ||||
-rw-r--r-- | src/map/skill.c | 9 |
3 files changed, 27 insertions, 7 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index ed51c63fe..5865ce02b 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -722,20 +722,19 @@ int battle_calc_gvg_damage(struct block_list *src,struct block_list *bl,int dama if (!damage) //No reductions to make. return 0; - + if(md && md->guardian_data) { - if(class_ == MOBID_EMPERIUM && flag&BF_SKILL) + if(class_ == MOBID_EMPERIUM && flag&BF_SKILL) { //Skill immunity. switch (skill_num) { +#if REMODE == 0 case MO_TRIPLEATTACK: +#endif case HW_GRAVITATION: - case AL_HEAL: - case PR_SANCTUARY: - case BA_APPLEIDUN: - case AB_CHEAL: break; default: return 0; + } } if(src->type != BL_MOB) { struct guild *g=guild_search(status_get_guild_id(src)); @@ -2577,10 +2576,22 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo if( flag.infdef ) { //Plants receive 1 damage when hit + short class_ = status_get_class(target); if( flag.hit || wd.damage > 0 ) wd.damage = wd.div_; // In some cases, right hand no need to have a weapon to increase damage if( flag.lh && (flag.hit || wd.damage2 > 0) ) wd.damage2 = wd.div_; + if( flag.hit && class_ == MOBID_EMPERIUM ) { + if(wd.damage2 > 0) { + wd.damage2 = battle_attr_fix(src,target,wd.damage2,s_ele_,tstatus->def_ele, tstatus->ele_lv); + wd.damage2 = battle_calc_gvg_damage(src,target,wd.damage2,wd.div_,skill_num,skill_lv,wd.flag); + } + else if(wd.damage > 0) { + wd.damage = battle_attr_fix(src,target,wd.damage,s_ele_,tstatus->def_ele, tstatus->ele_lv); + wd.damage = battle_calc_gvg_damage(src,target,wd.damage,wd.div_,skill_num,skill_lv,wd.flag); + } + return wd; + } if( !(battle_config.skill_min_damage&1) ) //Do not return if you are supposed to deal greater damage to plants than 1. [Skotlex] return wd; diff --git a/src/map/map.h b/src/map/map.h index 2dece688d..0829d93b3 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -11,7 +11,7 @@ #include "../common/db.h" /** - * [ro-resources.net] + * [rAthena.org] **/ #include "./config/Core.h" diff --git a/src/map/skill.c b/src/map/skill.c index 68769e599..e2cd4269e 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -9474,6 +9474,10 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns { int heal = skill_calc_heal(ss,bl,sg->skill_id,sg->skill_lv,true); struct mob_data *md = BL_CAST(BL_MOB, bl); +#if REMODE + if( md && md->class_ == MOBID_EMPERIUM ) + break; +#endif if( md && mob_is_battleground(md) ) break; if( tstatus->hp >= tstatus->max_hp ) @@ -9663,6 +9667,11 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns case UNT_APPLEIDUN: //Apple of Idun [Skotlex] { int heal; + struct mob_data *md = BL_CAST(BL_MOB, bl); +#if REMODE + if( md && md->class_ == MOBID_EMPERIUM ) + break; +#endif if( sg->src_id == bl->id && !(tsc && tsc->data[SC_SPIRIT] && tsc->data[SC_SPIRIT]->val2 == SL_BARDDANCER) ) break; // affects self only when soullinked heal = skill_calc_heal(ss,bl,sg->skill_id, sg->skill_lv, true); |