summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-01-20 02:19:05 +0000
committerzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-01-20 02:19:05 +0000
commitf9d5becbc0b6cafa3cce70b16126638e8e0525c3 (patch)
treefe037cba8494135da8c1feac31191da05f01d81f /src/map/skill.c
parentdc43d9256c146508cc9a835805f36ff4c19d5824 (diff)
downloadhercules-f9d5becbc0b6cafa3cce70b16126638e8e0525c3.tar.gz
hercules-f9d5becbc0b6cafa3cce70b16126638e8e0525c3.tar.bz2
hercules-f9d5becbc0b6cafa3cce70b16126638e8e0525c3.tar.xz
hercules-f9d5becbc0b6cafa3cce70b16126638e8e0525c3.zip
- Added support for item effect Ignore Def Rate by Race. bonus2 bIgnoreDefRate,<race>,<%>;
- Added support for item status effects on skills. bonus3 bAddEff,<sc_effect>,<rate>,ATF_SKILL; - Update to battleground equipment. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13457 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index e344b1630..bd4bd618f 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -842,27 +842,30 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int
break;
}
- if( sd && attack_type&BF_WEAPON &&
- skillid != WS_CARTTERMINATION &&
- skillid != AM_DEMONSTRATION &&
- skillid != CR_REFLECTSHIELD && skillid != MS_REFLECTSHIELD &&
- skillid != ASC_BREAKER )
+ if( sd && skillid != WS_CARTTERMINATION && skillid != AM_DEMONSTRATION && skillid != CR_REFLECTSHIELD && skillid != MS_REFLECTSHIELD && skillid != ASC_BREAKER )
{ // Trigger status effects
enum sc_type type;
int i;
- for(i=0; i < ARRAYLENGTH(sd->addeff) && sd->addeff[i].flag; i++)
+ for( i = 0; i < ARRAYLENGTH(sd->addeff) && sd->addeff[i].flag; i++ )
{
rate = sd->addeff[i].rate;
- if (attack_type&BF_LONG) // Any ranged physical attack takes status arrows into account (Grimtooth...) [DracoRPG]
+ if( attack_type&BF_LONG ) // Any ranged physical attack takes status arrows into account (Grimtooth...) [DracoRPG]
rate += sd->addeff[i].arrow_rate;
- if (!rate) continue;
+ if( !rate ) continue;
- if ((sd->addeff[i].flag&(ATF_LONG|ATF_SHORT)) != (ATF_LONG|ATF_SHORT))
- { //Trigger has range consideration.
+ if( (sd->addeff[i].flag&(ATF_WEAPON|ATF_SKILL)) != (ATF_WEAPON|ATF_SKILL) )
+ { // Trigger has attack type consideration.
+ if( (sd->addeff[i].flag&ATF_WEAPON && !(attack_type&BF_WEAPON)) || (sd->addeff[i].flag&ATF_SKILL && !(attack_type&(BF_MAGIC|BF_MISC))) )
+ continue;
+ }
+
+ if( (sd->addeff[i].flag&(ATF_LONG|ATF_SHORT)) != (ATF_LONG|ATF_SHORT) )
+ { // Trigger has range consideration.
if((sd->addeff[i].flag&ATF_LONG && !(attack_type&BF_LONG)) ||
(sd->addeff[i].flag&ATF_SHORT && !(attack_type&BF_SHORT)))
continue; //Range Failed.
}
+
type = sd->addeff[i].id;
skill = skill_get_time2(status_sc2skill(type),7);