diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/map/battle.c | 26 | ||||
-rw-r--r-- | src/map/status.c | 18 |
2 files changed, 22 insertions, 22 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index 150a6a39b..518c52ad2 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -395,19 +395,22 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,int damage,i } //Now damage increasing effects - if(sc->data[SC_AETERNA] && skill_num != PF_SOULBURN){ - damage<<=1; - //Shouldn't end until Breaker's non-weapon part connects. - if (skill_num != ASC_BREAKER || !(flag&BF_WEAPON)) - status_change_end( bl,SC_AETERNA,-1 ); + if( sc->data[SC_AETERNA] && skill_num != PF_SOULBURN ) + { + if( src->type != BL_MER || skill_num == 0 ) + damage <<= 1; // Lex Aeterna only doubles damage of regular attacks from mercenaries + + if( skill_num != ASC_BREAKER || !(flag&BF_WEAPON) ) + status_change_end( bl,SC_AETERNA,-1 ); //Shouldn't end until Breaker's non-weapon part connects. } //Finally damage reductions.... - if(sc->data[SC_ASSUMPTIO]){ - if(map_flag_vs(bl->m)) - damage=damage*2/3; //Receive 66% damage + if( sc->data[SC_ASSUMPTIO] ) + { + if( map_flag_vs(bl->m) ) + damage = damage*2/3; //Receive 66% damage else - damage>>=1; //Receive 50% damage + damage >>= 1; //Receive 50% damage } if(sc->data[SC_DEFENDER] && @@ -3264,10 +3267,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f if (flag&(BCT_GUILD|BCT_ENEMY)) { int s_guild = status_get_guild_id(s_bl); int t_guild = status_get_guild_id(t_bl); - if ( - !(map[m].flag.pvp && map[m].flag.pvp_noguild) && - s_guild && t_guild && (s_guild == t_guild || guild_isallied(s_guild, t_guild)) - ) + if( !(map[m].flag.pvp && map[m].flag.pvp_noguild) && s_guild && t_guild && (s_guild == t_guild || guild_isallied(s_guild, t_guild)) ) state |= BCT_GUILD; else state |= BCT_ENEMY; diff --git a/src/map/status.c b/src/map/status.c index 59ae8f306..3bdc84221 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -1125,10 +1125,10 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, int hide_flag = flag?OPTION_HIDE:(OPTION_HIDE|OPTION_CLOAK|OPTION_CHASEWALK); //You cannot hide from ground skills. - if(skill_get_ele(skill_num,1) == ELE_EARTH) //TODO: Need Skill Lv here :/ + if( skill_get_ele(skill_num,1) == ELE_EARTH ) //TODO: Need Skill Lv here :/ hide_flag &= ~OPTION_HIDE; - switch (target->type) + switch( target->type ) { case BL_PC: { @@ -1146,13 +1146,13 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, int return 1; return 0; case BL_HOM: - //Can't use support skills on homun (only master/self can) - //Placed here instead of battle_check_target because support skill - //invocations don't call that function. - if (skill_num && battle_config.hom_setting&0x1 && - skill_get_inf(skill_num)&INF_SUPPORT_SKILL && - battle_get_master(target) != src) - return 0; + case BL_MER: + if( target->type == BL_HOM && skill_num && battle_config.hom_setting&0x1 && skill_get_inf(skill_num)&INF_SUPPORT_SKILL && battle_get_master(target) != src ) + return 0; // Can't use support skills on Homunculus (only Master/Self) + if( target->type == BL_MER && (skill_num == PR_ASPERSIO || (skill_num >= SA_FLAMELAUNCHER && skill_num <= SA_SEISMICWEAPON)) && battle_get_master(target) != src ) + return 0; // Can't use Weapon endow skills on Mercenary (only Master) + if( target->type == BL_MER && skill_num == AM_POTIONPITCHER ) + return 0; // Can't use Potion Pitcher on Mercenaries default: //Check for chase-walk/hiding/cloaking opponents. if (tsc && tsc->option&hide_flag && !(status->mode&(MD_BOSS|MD_DETECTOR))) |