Browse Source

- Some corrections to make Tatami Gaeshi work correctly.
- Fixed SBR44 doing 100% more damage than it should.


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

skotlex 19 years ago
parent
commit
c026d4bcac
3 changed files with 15 additions and 9 deletions
  1. 2 0
      Changelog-Trunk.txt
  2. 1 1
      src/map/battle.c
  3. 12 8
      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/08/22
+	* Some corrections to make Tatami Gaeshi work correctly. [Skotlex]
+	* Fixed SBR44 doing 100% more damage than it should. [Skotlex]
 	* Some more work on the splash skill code. Now splash-damaged enemies
 	  should show no animation at all, just the damage-number, while only the
 	  targetted character should still display the full skill animation.

+ 1 - 1
src/map/battle.c

@@ -1555,7 +1555,7 @@ static struct Damage battle_calc_weapon_attack(
 					skillratio += 10+110*skill_lv;
 					break;
 				case HFLI_SBR44:	//[orn]
-					skillratio += 100 * skill_lv ;
+					skillratio += 100 *(skill_lv-1);
 			}
 
 			ATK_RATE(skillratio);

+ 12 - 8
src/map/skill.c

@@ -6774,19 +6774,15 @@ struct skill_unit_group *skill_unitsetting (struct block_list *src, int skillid,
 					unit->bl.x,unit->bl.y,group->bl_flag,&unit->bl,gettick(),1);
 		}
 	}
-	if (skillid == NJ_TATAMIGAESHI)
-	{	//Disable it, since it should do instant damage
-	   //(which was done in the map_foreachincell call up there) [Skotlex]
-		group->target_flag=BCT_NOONE;
-		group->bl_flag= 0;
-	}
 
 	if (!group->alive_count)
 	{	//No cells? Something that was blocked completely by Land Protector?
 		skill_delunitgroup(src, group);
 		return NULL;
 	}
-	
+	if (skillid == NJ_TATAMIGAESHI) //Store number of tiles.
+		group->val1 = group->alive_count;
+
 	return group;
 }
 
@@ -6915,7 +6911,6 @@ int skill_unit_onplace (struct skill_unit *src, struct block_list *bl, unsigned
 			src->limit = DIFF_TICK(tick+700,sg->tick);
 		break;
 	}	
-
 	return skillid;
 }
 
@@ -9997,6 +9992,15 @@ int skill_unit_timer_sub (struct block_list *bl, va_list ap)
 		unit->val1 -= 5;
 		if(unit->val1 <= 0 && unit->limit + group->tick > tick + 700)
 			unit->limit = DIFF_TICK(tick+700,group->tick);
+	} else
+	if (group->unit_id == UNT_TATAMIGAESHI && unit->range>=0)
+	{	//Disable processed cell.
+		unit->range = -1;
+		if (--group->val1 <= 0)
+	  	{	//All tiles were processed, disable skill.
+			group->target_flag=BCT_NOONE;
+			group->bl_flag= 0;
+		}
 	}
 
 	return 0;