summaryrefslogtreecommitdiff
path: root/src/map/status.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/status.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/status.c')
-rw-r--r--src/map/status.c18
1 files changed, 9 insertions, 9 deletions
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)))