summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-22 23:56:57 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-22 23:56:57 +0000
commitd353fcc5447fb98064e086754a36d324155bf3ea (patch)
treeca1ffbb58f639bbf5d7af95e7896e90812d1ac07 /src/map/skill.c
parent1d9d5f16b0f9abe8bac5a47910844f8683a77c23 (diff)
downloadhercules-d353fcc5447fb98064e086754a36d324155bf3ea.tar.gz
hercules-d353fcc5447fb98064e086754a36d324155bf3ea.tar.bz2
hercules-d353fcc5447fb98064e086754a36d324155bf3ea.tar.xz
hercules-d353fcc5447fb98064e086754a36d324155bf3ea.zip
- Restored the "Secret" behaviour of Blast Mine and Claymore Trap where each target is hit N times (where N is the number of mobs in the splash area at the moment of triggering).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7302 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c28
1 files changed, 13 insertions, 15 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 22dfc71a7..7cd697cc9 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -6769,15 +6769,18 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
sg->state.into_abyss = 1; //Prevent Remove Trap from giving you the trap back. [Skotlex]
break;
+ case UNT_CLAYMORETRAP:
case UNT_BLASTMINE:
+ //Hold number of targets (required for damage calculation)
+ type = map_foreachinrange(skill_count_target,&src->bl,
+ skill_get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag, &src->bl);
case UNT_SHOCKWAVE:
case UNT_SANDMAN:
case UNT_FLASHER:
case UNT_FREEZINGTRAP:
- case UNT_CLAYMORETRAP:
map_foreachinrange(skill_trap_splash,&src->bl,
skill_get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag,
- &src->bl,tick);
+ &src->bl,tick,type);
sg->unit_id = UNT_USED_TRAPS;
clif_changetraplook(&src->bl, UNT_USED_TRAPS);
sg->limit=DIFF_TICK(tick,sg->tick)+1500;
@@ -8928,18 +8931,9 @@ int skill_ganbatein (struct block_list *bl, va_list ap)
*/
int skill_count_target (struct block_list *bl, va_list ap)
{
- struct block_list *src;
- int *c;
-
- nullpo_retr(0, bl);
- nullpo_retr(0, ap);
-
- if ((src = va_arg(ap,struct block_list *)) == NULL)
- return 0;
- if ((c = va_arg(ap,int *)) == NULL)
- return 0;
+ struct block_list *src = va_arg(ap,struct block_list *);
if (battle_check_target(src,bl,BCT_ENEMY) > 0)
- (*c)++;
+ return 1;
return 0;
}
/*==========================================
@@ -8953,10 +8947,11 @@ int skill_trap_splash (struct block_list *bl, va_list ap)
struct skill_unit *unit;
struct skill_unit_group *sg;
struct block_list *ss;
-
+ int i,count;
src = va_arg(ap,struct block_list *);
unit = (struct skill_unit *)src;
tick = va_arg(ap,int);
+ count = va_arg(ap,int);
nullpo_retr(0, sg = unit->group);
nullpo_retr(0, ss = map_id2bl(sg->src_id));
@@ -8970,7 +8965,10 @@ int skill_trap_splash (struct block_list *bl, va_list ap)
break;
case UNT_BLASTMINE:
case UNT_CLAYMORETRAP:
- skill_attack(BF_MISC,ss,src,bl,sg->skill_id,sg->skill_lv,tick,0);
+ //Special property: Each target is hit N times (N = number of targets on splash area)
+ if (!count) count = 1;
+ for(i=0;i<count;i++)
+ skill_attack(BF_MISC,ss,src,bl,sg->skill_id,sg->skill_lv,tick,0);
break;
case UNT_FREEZINGTRAP:
skill_attack(BF_WEAPON,ss,src,bl,sg->skill_id,sg->skill_lv,tick,0);