Browse Source

- Fixed Landmine's level 1 duration.
- Cleaned up implementation of BlastMine and Claymore Trap.
- Added Freezing trap information to battle_calc_weapon attack.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5998 54d463be-8e91-2dee-dedb-b68131a5f0ec

skotlex 19 years ago
parent
commit
df06ad84f3
4 changed files with 20 additions and 33 deletions
  1. 2 0
      Changelog-Trunk.txt
  2. 1 1
      db/skill_cast_db.txt
  3. 5 6
      src/map/battle.c
  4. 12 26
      src/map/skill.c

+ 2 - 0
Changelog-Trunk.txt

@@ -4,6 +4,8 @@ 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/04/11
+	* Cleaned up implementation of BlastMine and Claymore Trap. [Skotlex]
+	* Added Freezing trap information to battle_calc_weapon attack. [Skotlex]
 	* Merged the can't walk delay code into the weapon-damage delay one, means
 	  less timers for attacks, as well as fixing the ghost-mob issue that
 	  reappeared recently. [Skotlex]

+ 1 - 1
db/skill_cast_db.txt

@@ -216,7 +216,7 @@
 //-- HT_SKIDTRAP
 115,0,0,0,300000:240000:180000:120000:60000,0
 //-- HT_LANDMINE
-116,0,0,0,20000:160000:120000:80000:40000,6000:7000:8000:9000:10000:11000
+116,0,0,0,200000:160000:120000:80000:40000,6000:7000:8000:9000:10000:11000
 //-- HT_ANKLESNARE
 117,0,0,0,250000:200000:150000:100000:50000,4000:8000:12000:16000:20000
 //-- HT_SHOCKWAVE

+ 5 - 6
src/map/battle.c

@@ -1144,11 +1144,6 @@ static struct Damage battle_calc_weapon_attack(
 			case KN_AUTOCOUNTER:
 				wd.flag=(wd.flag&~BF_SKILLMASK)|BF_NORMAL;
 				break;
-
-			//Until they're at right position - gs_arrow- [Vicious]
-			case GS_RAPIDSHOWER:
-				wd.div_= 5;
-				break;
 		}
 	}
 
@@ -1284,6 +1279,7 @@ static struct Damage battle_calc_weapon_attack(
 						break;
 				case NPC_GUIDEDATTACK:
 				case RG_BACKSTAP:
+				case HT_FREEZINGTRAP:
 				case AM_ACIDTERROR:
 				case MO_INVESTIGATE:
 				case MO_EXTREMITYFIST:
@@ -1525,6 +1521,9 @@ static struct Damage battle_calc_weapon_attack(
 				case AC_CHARGEARROW:
 					skillratio += 50;
 					break;
+				case HT_FREEZINGTRAP:
+					skillratio += -50+10*skill_lv;
+					break;
 				case KN_PIERCE:
 					skillratio += 10*skill_lv;
 					break;
@@ -2853,7 +2852,7 @@ struct Damage  battle_calc_misc_attack(
 		if( sd==NULL || (skill = pc_checkskill(sd,HT_STEELCROW)) <= 0)
 			skill=0;
 
-			//Blitz Beat lv5 Damage
+		//Blitz Beat lv5 Damage
 		damage=(dex/10+int_/2+skill*3+40)*2;
 		skill = skill_get_num(HT_BLITZBEAT, 5);
 		damage_div_fix(damage, skill); 

+ 12 - 26
src/map/skill.c

@@ -6740,7 +6740,6 @@ int skill_unit_onplace_timer(struct skill_unit *src,struct block_list *bl,unsign
 	struct skill_unit_group *sg;
 	struct block_list *ss;
 	struct map_session_data *sd = NULL;
-	int splash_count=0;
 	struct status_change *tsc, *sc;
 	struct skill_unit_group_tickset *ts;
 	int type, skillid;
@@ -6915,12 +6914,13 @@ int skill_unit_onplace_timer(struct skill_unit *src,struct block_list *bl,unsign
 	case UNT_FLASHER:
 	case UNT_FREEZINGTRAP:
 	case UNT_CLAYMORETRAP:
-		map_foreachinrange(skill_count_target,&src->bl,
-			skill_get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag,
-			&src->bl,&splash_count);
+// This ain't used anymore....
+//		map_foreachinrange(skill_count_target,&src->bl,
+//			skill_get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag,
+//			&src->bl,&splash_count);
 		map_foreachinrange(skill_trap_splash,&src->bl,
 			skill_get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag,
-			&src->bl,tick,splash_count);
+			&src->bl,tick);
 		sg->unit_id = UNT_USED_TRAPS;
 		clif_changetraplook(&src->bl, UNT_USED_TRAPS);
 		sg->limit=DIFF_TICK(tick,sg->tick)+1500;
@@ -9107,26 +9107,16 @@ int skill_trap_splash (struct block_list *bl, va_list ap)
 {
 	struct block_list *src;
 	int tick;
-	int splash_count;
 	struct skill_unit *unit;
 	struct skill_unit_group *sg;
 	struct block_list *ss;
-	int i;
-
-	nullpo_retr(0, bl);
-	nullpo_retr(0, ap);
-	nullpo_retr(0, src = va_arg(ap,struct block_list *));
-	nullpo_retr(0, unit = (struct skill_unit *)src);
-	nullpo_retr(0, sg = unit->group);
-//	nullpo_retr(0, ss = map_id2bl(sg->src_id));
-	if ((ss = map_id2bl(sg->src_id)) == NULL)
-	{	//Temporal debug until this case is solved. [Skotlex]
-		ShowDebug("skill_trap_splash: Trap's source (id: %d) not found!\n", sg->src_id);
-		return 0;
-	}
 
+	src = va_arg(ap,struct block_list *);
+	unit = (struct skill_unit *)src;
 	tick = va_arg(ap,int);
-	splash_count = va_arg(ap,int);
+	
+	nullpo_retr(0, sg = unit->group);
+	nullpo_retr(0, ss = map_id2bl(sg->src_id));
 
 	if(battle_check_target(src,bl,BCT_ENEMY) > 0){
 		switch(sg->unit_id){
@@ -9137,14 +9127,10 @@ int skill_trap_splash (struct block_list *bl, va_list ap)
 				break;
 			case UNT_BLASTMINE:
 			case UNT_CLAYMORETRAP:
-				for(i=0;i<splash_count;i++){
-					skill_attack(BF_MISC,ss,src,bl,sg->skill_id,sg->skill_lv,tick,(sg->val2)?0x0500:0);
-				}
+				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,(sg->val2)?0x0500:0);
-				break;
-			default:
+				skill_attack(BF_WEAPON,ss,src,bl,sg->skill_id,sg->skill_lv,tick,0);
 				break;
 		}
 	}