浏览代码

* Further optimization of the skill unit code
- removed code for Crimson Fire Formation it now uses the same code as Fire Wall
- added same knockback behavior as Fire Wall for Fire Formation
- Heat now does 50 hits a second in pvp too
- please let me know of any bugs that might appear

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

Playtester 17 年之前
父节点
当前提交
6bcbcb11bb
共有 5 个文件被更改,包括 25 次插入28 次删除
  1. 5 0
      Changelog-Trunk.txt
  2. 2 0
      db/Changelog.txt
  3. 1 1
      db/skill_db.txt
  4. 1 0
      src/map/battle.c
  5. 16 27
      src/map/skill.c

+ 5 - 0
Changelog-Trunk.txt

@@ -4,6 +4,11 @@ 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.
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
 
 2007/10/18
 2007/10/18
+	* Further optimization of the skill unit code [Playtester]
+	- removed code for Crimson Fire Formation it now uses the same code as Fire Wall
+	- added same knockback behavior as Fire Wall for Fire Formation
+	- Heat now does 50 hits a second in pvp too
+	- please let me know of any bugs that might appear
 	* Optimized the skill unit code [Playtester]
 	* Optimized the skill unit code [Playtester]
 	- reverted the unit timer interval to 100ms to save CPU usage
 	- reverted the unit timer interval to 100ms to save CPU usage
 	- rewrote the unit code of Fire Wall, Fire Formation and Heat so that they hit
 	- rewrote the unit code of Fire Wall, Fire Formation and Heat so that they hit

+ 2 - 0
db/Changelog.txt

@@ -33,6 +33,8 @@
 	13034 Desert_Twilight		Small chance to activate max Attack Speed for 7 seconds.
 	13034 Desert_Twilight		Small chance to activate max Attack Speed for 7 seconds.
 
 
 =======================
 =======================
+10/18
+	* Added knockback to Crimson Fire Formation [Playtester]
 10/16
 10/16
 	* Fixed used levels of NPC_CRITICALWOUND [Playtester]
 	* Fixed used levels of NPC_CRITICALWOUND [Playtester]
 10/15
 10/15

+ 1 - 1
db/skill_db.txt

@@ -574,7 +574,7 @@
 532,0,6,4,0,0x1,0,10,1,yes,0,0,0,magic,0	//NJ_BUNSINJYUTSU#NJ_BUNSINJYUTSU#
 532,0,6,4,0,0x1,0,10,1,yes,0,0,0,magic,0	//NJ_BUNSINJYUTSU#NJ_BUNSINJYUTSU#
 533,0,0,0,0,0,0,10,0,no,0,0,0,none,0	//NJ_NINPOU#NJ_NINPOU#
 533,0,0,0,0,0,0,10,0,no,0,0,0,none,0	//NJ_NINPOU#NJ_NINPOU#
 534,9,8,1,3,0,0,10,1:2:3:4:5:6:7:8:9:10,yes,0,0,0,magic,0	//NJ_KOUENKA#NJ_KOUENKA#
 534,9,8,1,3,0,0,10,1:2:3:4:5:6:7:8:9:10,yes,0,0,0,magic,0	//NJ_KOUENKA#NJ_KOUENKA#
-535,0,8,4,3,0,0,10,1,yes,0,0,0,magic,0	//NJ_KAENSIN#NJ_KAENSIN#
+535,0,8,4,3,0,0,10,1,yes,0,0,0,magic,1	//NJ_KAENSIN#NJ_KAENSIN#
 536,9,8,1,3,0x2,2,5,3,yes,0,0,0,magic,0	//NJ_BAKUENRYU#NJ_BAKUENRYU#
 536,9,8,1,3,0x2,2,5,3,yes,0,0,0,magic,0	//NJ_BAKUENRYU#NJ_BAKUENRYU#
 537,9,8,1,1,0,0,10,3:4:5:6:7:8:9:10:11:12,yes,0,0,0,magic,0	//NJ_HYOUSENSOU#NJ_HYOUSENSOU#
 537,9,8,1,1,0,0,10,3:4:5:6:7:8:9:10:11:12,yes,0,0,0,magic,0	//NJ_HYOUSENSOU#NJ_HYOUSENSOU#
 538,9,6,2,0,0x1,0,10,1,yes,0,0,0,magic,0	//NJ_SUITON#NJ_SUITON#
 538,9,6,2,0,0x1,0,10,1,yes,0,0,0,magic,0	//NJ_SUITON#NJ_SUITON#

+ 1 - 0
src/map/battle.c

@@ -2156,6 +2156,7 @@ struct Damage battle_calc_magic_attack(
 	switch(skill_num)
 	switch(skill_num)
 	{
 	{
 		case MG_FIREWALL:
 		case MG_FIREWALL:
+		case NJ_KAENSIN:
 			ad.dmotion = 0; //No flinch animation.
 			ad.dmotion = 0; //No flinch animation.
 			if(mflag) //mflag has a value when it was checked against an undead in skill.c [Skotlex]
 			if(mflag) //mflag has a value when it was checked against an undead in skill.c [Skotlex]
 				ad.blewcount = 0; //No knockback
 				ad.blewcount = 0; //No knockback

+ 16 - 27
src/map/skill.c

@@ -7288,16 +7288,17 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
 	switch (sg->unit_id)
 	switch (sg->unit_id)
 	{
 	{
 		case UNT_FIREWALL:
 		case UNT_FIREWALL:
+		case UNT_KAENSIN:
 			if (tstatus->def_ele == ELE_FIRE || battle_check_undead(tstatus->race, tstatus->def_ele)) {
 			if (tstatus->def_ele == ELE_FIRE || battle_check_undead(tstatus->race, tstatus->def_ele)) {
 				int count=0;
 				int count=0;
-				//Fire property mobs and Undeads are never knocked back by firewall
+				//Fire property mobs and Undeads are never knocked back
 				//Should hit every 20ms [Playtester]
 				//Should hit every 20ms [Playtester]
 				while (count++ < battle_config.firewall_hits_on_undead && !status_isdead(bl) && src->val2--)
 				while (count++ < battle_config.firewall_hits_on_undead && !status_isdead(bl) && src->val2--)
 					skill_attack(BF_MAGIC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick+count*20,1);
 					skill_attack(BF_MAGIC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick+count*20,1);
 			} else {
 			} else {
 				int count=0;
 				int count=0;
 				int x = bl->x, y = bl->y;
 				int x = bl->x, y = bl->y;
-				//If mob isn't knocked back it should hit every 20ms [Playtester]
+				//If target isn't knocked back it should hit every 20ms [Playtester]
 				while (count++ < battle_config.firewall_hits_on_undead && x == bl->x && y == bl->y && !status_isdead(bl) && src->val2--)
 				while (count++ < battle_config.firewall_hits_on_undead && x == bl->x && y == bl->y && !status_isdead(bl) && src->val2--)
 					skill_attack(BF_MAGIC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick+count*20,0);
 					skill_attack(BF_MAGIC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick+count*20,0);
 			}
 			}
@@ -7359,21 +7360,20 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
 				case SG_SUN_WARM: //SG skills [Komurka]
 				case SG_SUN_WARM: //SG skills [Komurka]
 				case SG_MOON_WARM:
 				case SG_MOON_WARM:
 				case SG_STAR_WARM:
 				case SG_STAR_WARM:
-					if(!status_charge(ss, 0, 2)){  //should end when out of sp.
-						sg->limit=DIFF_TICK(tick,sg->tick);
-						break;
-					}
-					else if(bl->type==BL_PC){
-						//Only damage SP [Skotlex]
-						status_zap(bl, 0, 15);
-					}
-					else{
-						int count=1;
+					{
+						int count=0;
 						int x = bl->x, y = bl->y;
 						int x = bl->x, y = bl->y;
-						skill_attack(BF_WEAPON,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
-						//If mob isn't knocked back it should hit every 20ms [Playtester]
-						while (count++ < battle_config.firewall_hits_on_undead && x == bl->x && y == bl->y && !status_isdead(bl) && status_charge(ss, 0, 2))
-							skill_attack(BF_WEAPON,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick+count*20,0);
+						//If target isn't knocked back it should hit every 20ms [Playtester]
+						while (count++ < battle_config.firewall_hits_on_undead && x == bl->x && y == bl->y && !status_isdead(bl)){
+							if (!status_charge(ss, 0, 2)){  //should end when out of sp.
+								sg->limit=DIFF_TICK(tick,sg->tick);
+								break;
+							}
+							else if (bl->type==BL_PC) 
+								status_zap(bl, 0, 15); //Only damage SP [Skotlex]
+							else 
+								skill_attack(BF_WEAPON,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick+count*20,0);
+						}
 					}
 					}
 				break;
 				break;
 				case WZ_STORMGUST:
 				case WZ_STORMGUST:
@@ -7629,17 +7629,6 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
 			clif_changetraplook(&src->bl, UNT_FIREPILLAR_ACTIVE);
 			clif_changetraplook(&src->bl, UNT_FIREPILLAR_ACTIVE);
 			sg->limit=DIFF_TICK(tick,sg->tick)+1500;
 			sg->limit=DIFF_TICK(tick,sg->tick)+1500;
 			break;
 			break;
-
-		case UNT_KAENSIN:
-			{
-				int count=0;
-				//Should hit every 20ms [Playtester]
-				while (count++ < battle_config.firewall_hits_on_undead && !status_isdead(bl) && src->val2--)
-					skill_attack(BF_MAGIC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick+count*20,0);
-				if (src->val2 <= 0)
-					skill_delunit(src);
-			}
-			break;
 	}
 	}
 
 
 	if (sg->state.magic_power && sc && sc->data[SC_MAGICPOWER].timer == -1)
 	if (sg->state.magic_power && sc && sc->data[SC_MAGICPOWER].timer == -1)