summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-09-01 23:14:35 +0000
committerzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-09-01 23:14:35 +0000
commitc23a8db0769097ef2aaf25d43b07cd6774a6fd8e (patch)
tree8f5955c27fd232ba39219d4a98d468d96e037c2e /src/map/battle.c
parentc9181667d0cea7e6cfe99745d18c760c4a797912 (diff)
downloadhercules-c23a8db0769097ef2aaf25d43b07cd6774a6fd8e.tar.gz
hercules-c23a8db0769097ef2aaf25d43b07cd6774a6fd8e.tar.bz2
hercules-c23a8db0769097ef2aaf25d43b07cd6774a6fd8e.tar.xz
hercules-c23a8db0769097ef2aaf25d43b07cd6774a6fd8e.zip
- Supportive Skill Behavior for Mercenaries:
* Endow skills such as Aspersio and the 4 sage endows can only be cast on the mercenary if they are the master. * Aid Potion does not currently work on mercenaries. * Lex Aeterna only doubles damage of regular attacks. Skill damage from mercenaries are not doubled. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13184 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c26
1 files changed, 13 insertions, 13 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;