summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt3
-rw-r--r--src/map/battle.c1
-rw-r--r--src/map/skill.c28
3 files changed, 16 insertions, 16 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 9f49f4a82..b85dce1ec 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -4,6 +4,9 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/06/22
+ * 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). [Skotlex]
* Updated the tools/stackdump script to also handle sig-plugin generated
backtraces. Now it will also auto-determine whether the exe needs a .exe at
the end or not. Help me test it as I want this script on stable NOW :X
diff --git a/src/map/battle.c b/src/map/battle.c
index 90260a74e..84bea03bc 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -2395,7 +2395,6 @@ struct Damage battle_calc_misc_attack(
if( src == NULL || target == NULL ){
nullpo_info(NLP_MARK);
- memset(&md,0,sizeof(md));
return md;
}
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);