summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-04-21 17:08:08 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-04-21 17:08:08 +0000
commitbe72ecd0560eb5dcdcc15805491e48e2d63f4e0e (patch)
treef92f63c46e001c557993e1d6b605163c561bfddc /src/map/skill.c
parent2f3160392cbb364d08ae40d61d2e11f587a6dc8a (diff)
downloadhercules-be72ecd0560eb5dcdcc15805491e48e2d63f4e0e.tar.gz
hercules-be72ecd0560eb5dcdcc15805491e48e2d63f4e0e.tar.bz2
hercules-be72ecd0560eb5dcdcc15805491e48e2d63f4e0e.tar.xz
hercules-be72ecd0560eb5dcdcc15805491e48e2d63f4e0e.zip
- Removed the +25% mdef, -50% def effect from Freeze status
- Changed autocast skills, they now only work with normal attacks - Fixed a few spots where the attack_type flag was getting truncated - Hopefully fixed the cygwin + size_t problem (using stddef.h as source) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10298 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 34c07dd51..1279aa822 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -1349,7 +1349,7 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int
break;
case TK_TURNKICK:
case MO_BALKYOUNG: //Note: attack_type is passed as BF_WEAPON for the actual target, BF_MISC for the splash-affected mobs.
- if(attack_type == BF_MISC) //70% base stun chance...
+ if(attack_type&BF_MISC) //70% base stun chance...
sc_start(bl,SC_STUN,70,skilllv,skill_get_time2(skillid,skilllv));
break;
case GS_BULLSEYE: //0.1% coma rate.
@@ -1410,18 +1410,18 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int
src = sd?&sd->bl:src;
}
- //Reports say that autospell effects get triggered on skills and pretty much everything including splash attacks. [Skotlex]
- //But Gravity Patched this silently, and it now seems to trigger only on
- //weapon attacks.
+ // Autospell when attacking
if(sd && !status_isdead(bl) && src != bl && sd->autospell[0].id) {
struct block_list *tbl;
struct unit_data *ud;
int i, skilllv;
+
for (i = 0; i < MAX_PC_BONUS && sd->autospell[i].id; i++) {
- if(!(sd->autospell[i].flag&attack_type&BF_RANGEMASK &&
- sd->autospell[i].flag&attack_type&BF_WEAPONMASK))
- continue; //Attack type or range type did not match.
+ if(!(sd->autospell[i].flag&attack_type&BF_WEAPONMASK &&
+ sd->autospell[i].flag&attack_type&BF_RANGEMASK &&
+ sd->autospell[i].flag&attack_type&BF_SKILLMASK))
+ continue; // one or more trigger conditions were not fulfilled
skill = (sd->autospell[i].id > 0) ? sd->autospell[i].id : -sd->autospell[i].id;
@@ -1583,7 +1583,7 @@ int skill_counter_additional_effect (struct block_list* src, struct block_list *
}
}
- //Trigger counter-spells to retaliate against damage causing skills. [Skotlex]
+ // Trigger counter-spells to retaliate against damage causing skills.
if(dstsd && !status_isdead(bl) && src != bl && dstsd->autospell2[0].id &&
!(skillid && skill_get_nk(skillid)&NK_NO_DAMAGE))
{
@@ -1593,9 +1593,10 @@ int skill_counter_additional_effect (struct block_list* src, struct block_list *
for (i = 0; i < MAX_PC_BONUS && dstsd->autospell2[i].id; i++) {
- if(!(dstsd->autospell2[i].flag&attack_type&BF_RANGEMASK &&
- dstsd->autospell2[i].flag&attack_type&BF_WEAPONMASK))
- continue; //Attack type or range type did not match.
+ if(!(dstsd->autospell2[i].flag&attack_type&BF_WEAPONMASK &&
+ dstsd->autospell2[i].flag&attack_type&BF_RANGEMASK &&
+ dstsd->autospell2[i].flag&attack_type&BF_SKILLMASK))
+ continue; // one or more trigger conditions were not fulfilled
skillid = (dstsd->autospell2[i].id > 0) ? dstsd->autospell2[i].id : -dstsd->autospell2[i].id;
skilllv = dstsd->autospell2[i].lv?dstsd->autospell2[i].lv:1;