summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-04-15 20:13:07 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-04-15 20:13:07 +0000
commit7f4e1417b9cae61f65b74c98c1ef4613544ad1a3 (patch)
tree1ce38a72bc26c68124b27cd3f77192f0ce1bdc65 /src/map/skill.c
parent268fdec11b1eea604dc5dec385645b9769ecc634 (diff)
downloadhercules-7f4e1417b9cae61f65b74c98c1ef4613544ad1a3.tar.gz
hercules-7f4e1417b9cae61f65b74c98c1ef4613544ad1a3.tar.bz2
hercules-7f4e1417b9cae61f65b74c98c1ef4613544ad1a3.tar.xz
hercules-7f4e1417b9cae61f65b74c98c1ef4613544ad1a3.zip
- Fixed battle_getenemy picking dead characters.
- Adjusted Spiral Pierce, Shield Boomerang and Shield Chain to use atk2 instead of weight when used by non-players. - Adjusted skills blindAttack, SilenceAttack, StunAttack, PetrifyAttack, CurseAttack, SleepAttack, Lex Divina and Dispell to be area effect skills, if the used skill level has a splash-range different from 0. - Mob used Meteor Assault (and by extension Spread Attack) is able to hit icewalls now. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10264 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c51
1 files changed, 36 insertions, 15 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 72a100e5d..74e254333 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -2761,12 +2761,6 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
case NPC_COMBOATTACK:
case NPC_GUIDEDATTACK:
case NPC_POISON:
- case NPC_BLINDATTACK:
- case NPC_SILENCEATTACK:
- case NPC_STUNATTACK:
- case NPC_PETRIFYATTACK:
- case NPC_CURSEATTACK:
- case NPC_SLEEPATTACK:
case NPC_RANDOMATTACK:
case NPC_WATERATTACK:
case NPC_GROUNDATTACK:
@@ -2814,6 +2808,20 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
case HFLI_SBR44: //[orn]
skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
break;
+ case NPC_BLINDATTACK:
+ case NPC_SILENCEATTACK:
+ case NPC_STUNATTACK:
+ case NPC_PETRIFYATTACK:
+ case NPC_CURSEATTACK:
+ case NPC_SLEEPATTACK:
+ if (flag&1 || skill_get_splash(skillid, skilllv) < 1)
+ skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
+ else
+ map_foreachinrange(skill_area_sub, bl,
+ skill_get_splash(skillid, skilllv),BL_CHAR,
+ src,skillid,skilllv,tick, flag|BCT_ENEMY|1,
+ skill_castend_damage_id);
+ break;
case LK_JOINTBEAT: // decide the ailment first (affects attack damage and effect)
switch( rand()%6 ){
@@ -3502,14 +3510,21 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
break;
case PR_LEXDIVINA:
- if (tsc && tsc->count && tsc->data[type].timer != -1) {
- status_change_end(bl,type, -1);
- clif_skill_nodamage (src, bl, skillid, skilllv, 1);
- } else
- clif_skill_nodamage (src, bl, skillid, skilllv,
- sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)));
+ if (flag&1 || (i = skill_get_splash(skillid, skilllv)) < 1)
+ {
+ if (tsc && tsc->count && tsc->data[type].timer != -1) {
+ status_change_end(bl,type, -1);
+ clif_skill_nodamage (src, bl, skillid, skilllv, 1);
+ } else
+ clif_skill_nodamage (src, bl, skillid, skilllv,
+ sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)));
+ break;
+ }
+ //Affect all targets on splash area.
+ map_foreachinrange(skill_area_sub, bl, i, BL_CHAR,
+ src, skillid, skilllv, tick, flag|1,
+ skill_castend_damage_id);
break;
-
case SA_ABRACADABRA:
{
int abra_skillid = 0, abra_skilllv;
@@ -4069,8 +4084,9 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
case GS_SPREADATTACK:
clif_skill_nodamage(src,bl,skillid,skilllv,1);
skill_area_temp[1] = bl->id;
+ //Mob casted skills should also hit skills.
map_foreachinrange(skill_area_sub, bl,
- skill_get_splash(skillid, skilllv), BL_CHAR,
+ skill_get_splash(skillid, skilllv), md?BL_CHAR|BL_SKILL:BL_CHAR,
src,skillid,skilllv,tick, flag|BCT_ENEMY|1,
skill_castend_damage_id);
break;
@@ -4661,8 +4677,8 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
}
break;
case SA_DISPELL:
+ if (flag&1 || (i = skill_get_splash(skillid, skilllv)) < 1)
{
- int i;
clif_skill_nodamage(src,bl,skillid,skilllv,1);
i = tstatus->mdef;
if (i >= 100 ||
@@ -4698,7 +4714,12 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
if(i==SC_BERSERK) tsc->data[i].val2=0; //Mark a dispelled berserk to avoid setting hp to 100 by setting hp penalty to 0.
status_change_end(bl,i,-1);
}
+ break;
}
+ //Affect all targets on splash area.
+ map_foreachinrange(skill_area_sub, bl, i, BL_CHAR,
+ src, skillid, skilllv, tick, flag|1,
+ skill_castend_damage_id);
break;
case TF_BACKSLIDING: //This is the correct implementation as per packet logging information. [Skotlex]