Browse Source

- Corrected GS skill ranges using Aegis data. All their targetted skills have a base range of 9 T_T, and Dust (Choke) has a range of 2.
- Updated the code so mobs can use ChainAction as a targetted skill.
- Added GroundDrift effects for Wind (Stun) and Fire (knockback). The knockback value is unknown, so 3 is used for now.
- Cleaned up some more the steal code, now you can't steal the last slot regardless of skill level used.
- Added consideration of Chain Action when cloning GunSlingers.


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

skotlex 18 years ago
parent
commit
43db171cb5
7 changed files with 49 additions and 32 deletions
  1. 7 0
      Changelog-Trunk.txt
  2. 4 0
      db/Changelog.txt
  3. 15 15
      db/skill_db.txt
  4. 2 0
      src/map/battle.c
  5. 2 1
      src/map/mob.c
  6. 12 16
      src/map/pc.c
  7. 7 0
      src/map/skill.c

+ 7 - 0
Changelog-Trunk.txt

@@ -4,6 +4,13 @@ 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.
 
 
 2006/10/30
 2006/10/30
+	* Updated the code so mobs can use ChainAction as a targetted skill.
+	  [Skotlex]
+	* Added GroundDrift effects for Wind (Stun) and Fire (knockback). The
+	  knockback value is unknown, so 3 is used for now. [Skotlex]
+	* Cleaned up some more the steal code, now you can't steal the last slot
+	  regardless of skill level used. [Skotlex]
+	* Added consideration of Chain Action when cloning GunSlingers. [Skotlex]
 	* Modified battle_calc_return_damage to take the skill id as well, now
 	* Modified battle_calc_return_damage to take the skill id as well, now
 	  magic damage return will not work on skills tagged as ground or self
 	  magic damage return will not work on skills tagged as ground or self
 	  targetted. [Skotlex]
 	  targetted. [Skotlex]

+ 4 - 0
db/Changelog.txt

@@ -20,6 +20,10 @@
 
 
 ========================
 ========================
 10/30
 10/30
+	* Corrected GS skill ranges using Aegis data. All their targetted skills
+	  have a base range of 9, and Dust (Choke) has a range of 2. [Skotlex]
+	* Gave Grounddrift a knockback of 3 for the fire-elemental effect (value
+	  totally custom)
 	* Set the inf2 to encore skills of Wand of Hermode [Skotlex]
 	* Set the inf2 to encore skills of Wand of Hermode [Skotlex]
 10/29
 10/29
 	* Official NJ/GS exp chart for level 1-48 [Playtester]
 	* Official NJ/GS exp chart for level 1-48 [Playtester]

+ 15 - 15
db/skill_db.txt

@@ -525,27 +525,27 @@
 499,-9,8,4,-1,0,0,1,2,no,0,520,0,weapon,0	//HT_POWER#Beast Strafing#
 499,-9,8,4,-1,0,0,1,2,no,0,520,0,weapon,0	//HT_POWER#Beast Strafing#
 //Temp Plugs(using bash as base)
 //Temp Plugs(using bash as base)
 500,0,6,4,0,0,0,5,1,no,0,0,0,misc,0	//GS_GLITTERING#Flip the Coin#
 500,0,6,4,0,0,0,5,1,no,0,0,0,misc,0	//GS_GLITTERING#Flip the Coin#
-501,-3,6,1,-1,0,0,1,1,no,0,0,0,misc,0	//GS_FLING#Fling#
-502,-3,8,1,-1,0,0,1,3,no,0,0,0,weapon,0	//GS_TRIPLEACTION#Triple Action#
-503,-3,6,1,-1,0,0,1,1,no,0,0,0,weapon,0	//GS_BULLSEYE#Bulls Eye#
+501,9,6,1,-1,0,0,1,1,no,0,0,0,misc,0	//GS_FLING#Fling#
+502,-9,8,1,-1,0,0,1,3,no,0,0,0,weapon,0	//GS_TRIPLEACTION#Triple Action#
+503,-9,6,1,-1,0,0,1,1,no,0,0,0,weapon,0	//GS_BULLSEYE#Bulls Eye#
 504,0,6,4,0,1,0,1,1,no,0,0,0,weapon,0	//GS_MADNESSCANCEL#Madness Canceler#
 504,0,6,4,0,1,0,1,1,no,0,0,0,weapon,0	//GS_MADNESSCANCEL#Madness Canceler#
 505,0,6,4,0,1,0,1,1,no,0,0,0,weapon,0	//GS_ADJUSTMENT#AdJustment#
 505,0,6,4,0,1,0,1,1,no,0,0,0,weapon,0	//GS_ADJUSTMENT#AdJustment#
 506,0,6,4,0,1,0,1,1,no,0,0,0,weapon,0	//GS_INCREASING#Increasing Accuracy#
 506,0,6,4,0,1,0,1,1,no,0,0,0,weapon,0	//GS_INCREASING#Increasing Accuracy#
-507,-3,6,1,8,0,0,1,1,no,0,0,0,weapon,0	//GS_MAGICALBULLET#Magical Bullet#
-508,-3,6,1,-1,1,0,1,1,no,0,0,0,weapon,0	//GS_CRACKER#Cracker#
-509,-3,0,0,0,0,0,10,0,no,0,0,0,none,0	//GS_SINGLEACTION#Single Action#
+507,-9,6,1,8,0,0,1,1,no,0,0,0,weapon,0	//GS_MAGICALBULLET#Magical Bullet#
+508,-9,6,1,-1,1,0,1,1,no,0,0,0,weapon,0	//GS_CRACKER#Cracker#
+509,0,0,0,0,0,0,10,0,no,0,0,0,none,0	//GS_SINGLEACTION#Single Action#
 510,0,0,0,0,0,0,10,0,no,0,0,0,none,0	//GS_SNAKEEYE#Snake Eye#
 510,0,0,0,0,0,0,10,0,no,0,0,0,none,0	//GS_SNAKEEYE#Snake Eye#
-511,-3,8,0,-1,0,0,10,2,no,0,0,0,weapon,0	//GS_CHAINACTION#Chain Action#
-512,3,6,1,-1,0,0,10,1,no,0,0,0,weapon,0	//GS_TRACKING#Tracking#
-513,7,6,1,-1,1,0,5,1,no,0,0,0,weapon,0	//GS_DISARM#Disarm#
-514,3,6,1,-1,0,0,5,1,no,0,0,0,weapon,0	//GS_PIERCINGSHOT#Piercing Shot#
-515,3,8,1,-1,0,0,10,5,no,0,0,0,weapon,0	//GS_RAPIDSHOWER#Rapid Shower#
+511,-9,8,0,-1,0,0,10,2,no,0,0,0,weapon,0	//GS_CHAINACTION#Chain Action#
+512,-9,6,1,-1,0,0,10,1,no,0,0,0,weapon,0	//GS_TRACKING#Tracking#
+513,-9,6,1,-1,1,0,5,1,no,0,0,0,weapon,0	//GS_DISARM#Disarm#
+514,-9,6,1,-1,0,0,5,1,no,0,0,0,weapon,0	//GS_PIERCINGSHOT#Piercing Shot#
+515,-9,8,1,-1,0,0,10,5,no,0,0,0,weapon,0	//GS_RAPIDSHOWER#Rapid Shower#
 516,0,8,4,-1,2,3,10,1,no,0,0,0,weapon,0	//GS_DESPERADO#Desperado#
 516,0,8,4,-1,2,3,10,1,no,0,0,0,weapon,0	//GS_DESPERADO#Desperado#
 517,0,6,4,-1,1,0,10,1,no,0,0,0,weapon,0	//GS_GATLINGFEVER#Gatling Fever#
 517,0,6,4,-1,1,0,10,1,no,0,0,0,weapon,0	//GS_GATLINGFEVER#Gatling Fever#
-518,3,6,1,-1,0,0,10,1,no,0,0,0,weapon,5	//GS_DUST#Dust#
-519,3,6,1,-1,0,0,10,1,yes,0,0,0,weapon,0	//GS_FULLBUSTER#Full Buster#
-520,3,6,1,-1,2,1:1:1:2:2:2:3:3:3:4,10,1,no,0,0,0,weapon,0	//GS_SPREADATTACK#Spread Attack#
-521,3,6,2,-1,0,0,10,1,no,0,0,0,weapon,0	//GS_GROUNDDRIFT#Ground Drift#
+518,2,6,1,-1,0,0,10,1,no,0,0,0,weapon,5	//GS_DUST#Dust#
+519,-9,6,1,-1,0,0,10,1,yes,0,0,0,weapon,0	//GS_FULLBUSTER#Full Buster#
+520,-9,6,1,-1,2,1:1:1:2:2:2:3:3:3:4,10,1,no,0,0,0,weapon,0	//GS_SPREADATTACK#Spread Attack#
+521,-9,6,2,-1,0,0,10,1,no,0,0,0,weapon,3	//GS_GROUNDDRIFT#Ground Drift#
 522,0,0,0,0,0,0,10,1,no,0,0,0,weapon,0	//NJ_TOBIDOUGU#NJ_TOBIDOUGU#
 522,0,0,0,0,0,0,10,1,no,0,0,0,weapon,0	//NJ_TOBIDOUGU#NJ_TOBIDOUGU#
 523,9,6,1,-1,0,0,10,1,no,0,0,0,weapon,0	//NJ_SYURIKEN#NJ_SYURIKEN#
 523,9,6,1,-1,0,0,10,1,no,0,0,0,weapon,0	//NJ_SYURIKEN#NJ_SYURIKEN#
 524,9,8,1,-1,0,0,5,3,no,0,0,0,weapon,0	//NJ_KUNAI#NJ_KUNAI#
 524,9,8,1,-1,0,0,5,3,no,0,0,0,weapon,0	//NJ_KUNAI#NJ_KUNAI#

+ 2 - 0
src/map/battle.c

@@ -911,6 +911,7 @@ static struct Damage battle_calc_weapon_attack(
 				break;
 				break;
 
 
 			case TF_DOUBLE: //For NPC used skill.
 			case TF_DOUBLE: //For NPC used skill.
+			case GS_CHAINACTION:
 				wd.type = 0x08;
 				wd.type = 0x08;
 				break;
 				break;
 				
 				
@@ -918,6 +919,7 @@ static struct Damage battle_calc_weapon_attack(
 			case KN_BOWLINGBASH:
 			case KN_BOWLINGBASH:
 			case MO_BALKYOUNG:
 			case MO_BALKYOUNG:
 			case TK_TURNKICK:
 			case TK_TURNKICK:
+			case GS_GROUNDDRIFT:
 				wd.blewcount=0;
 				wd.blewcount=0;
 				break;
 				break;
 
 

+ 2 - 1
src/map/mob.c

@@ -3006,10 +3006,11 @@ int mob_clone_spawn(struct map_session_data *sd, int m, int x, int y, const char
 			switch (skill_id) { //Certain Special skills that are passive, and thus, never triggered.
 			switch (skill_id) { //Certain Special skills that are passive, and thus, never triggered.
 				case MO_TRIPLEATTACK:
 				case MO_TRIPLEATTACK:
 				case TF_DOUBLE:
 				case TF_DOUBLE:
+				case GS_CHAINACTION:
 					ms[i].state = MSS_BERSERK;
 					ms[i].state = MSS_BERSERK;
 					ms[i].target = MST_TARGET;
 					ms[i].target = MST_TARGET;
 					ms[i].cond1 = MSC_ALWAYS;
 					ms[i].cond1 = MSC_ALWAYS;
-					ms[i].permillage = skill_id==TF_DOUBLE?(ms[i].skill_lv*500):(3000-ms[i].skill_lv*100);
+					ms[i].permillage = skill_id==MO_TRIPLEATTACK?(3000-ms[i].skill_lv*100):(ms[i].skill_lv*500);
 					ms[i].delay -= 5000; //Remove the added delay as these could trigger on "all hits".
 					ms[i].delay -= 5000; //Remove the added delay as these could trigger on "all hits".
 					break;
 					break;
 				default: //Untreated Skill
 				default: //Untreated Skill

+ 12 - 16
src/map/pc.c

@@ -3173,25 +3173,24 @@ int pc_steal_item(struct map_session_data *sd,struct block_list *bl, int lv)
 	if(!sd || !bl || bl->type!=BL_MOB)
 	if(!sd || !bl || bl->type!=BL_MOB)
 		return 0;
 		return 0;
 
 
+	md = (TBL_MOB *)bl;
+
+	if(md->state.steal_flag == UCHAR_MAX || md->sc.opt1) //already stolen from / status change check
+		return 0;
+	
 	sd_status= status_get_status_data(&sd->bl);
 	sd_status= status_get_status_data(&sd->bl);
 	md_status= status_get_status_data(bl);
 	md_status= status_get_status_data(bl);
-	md = (TBL_MOB *)bl;
 
 
-	if(md->state.steal_flag == UCHAR_MAX || //already stolen from
-		md_status->mode&MD_BOSS || md->master_id ||
+	if(md->master_id || md_status->mode&MD_BOSS ||
 		(md->class_>=1324 && md->class_<1364) || // prevent stealing from treasure boxes [Valaris]
 		(md->class_>=1324 && md->class_<1364) || // prevent stealing from treasure boxes [Valaris]
-		map[md->bl.m].flag.nomobloot ||        // check noloot map flag [Lorky]
-		md->sc.opt1 //status change check
-  	)
-		return 0;
-						
-	if(battle_config.skill_steal_max_tries &&
-		md->state.steal_flag++ >= battle_config.skill_steal_max_tries)
-	{	//Reached limit of steal attempts.
+		map[bl->m].flag.nomobloot || // check noloot map flag [Lorky]
+		(battle_config.skill_steal_max_tries && //Reached limit of steal attempts. [Lupus]
+			md->state.steal_flag++ >= battle_config.skill_steal_max_tries)
+  	) { //Can't steal from
 		md->state.steal_flag = UCHAR_MAX;
 		md->state.steal_flag = UCHAR_MAX;
 		return 0;
 		return 0;
 	}
 	}
-
+						
 	rate = battle_config.skill_steal_type
 	rate = battle_config.skill_steal_type
 		? (sd_status->dex - md_status->dex)/2 + lv*6 + 10
 		? (sd_status->dex - md_status->dex)/2 + lv*6 + 10
 		: (sd_status->dex - md_status->dex)   + lv*3 + 10;
 		: (sd_status->dex - md_status->dex)   + lv*3 + 10;
@@ -3203,10 +3202,7 @@ int pc_steal_item(struct map_session_data *sd,struct block_list *bl, int lv)
 
 
 	//preliminar statistical data hints at this behaviour:
 	//preliminar statistical data hints at this behaviour:
 	//each steal attempt: try to steal against ONE mob drop, and no more.
 	//each steal attempt: try to steal against ONE mob drop, and no more.
-	if (lv > 5) //Include last slot (card slot)
-		i = rand()%MAX_MOB_DROP;
-	else	//Do not include card slot
-		i = rand()%(MAX_MOB_DROP-1);
+	i = rand()%(MAX_MOB_DROP-1); //You can't steal from the last slot.
 
 
 	if(rand() % 10000 >= md->db->dropitem[i].p*rate/100)
 	if(rand() % 10000 >= md->db->dropitem[i].p*rate/100)
 		return 0;
 		return 0;

+ 7 - 0
src/map/skill.c

@@ -2714,6 +2714,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
 	case HT_POWER:
 	case HT_POWER:
 	case TK_DOWNKICK:
 	case TK_DOWNKICK:
 	case TK_COUNTER:
 	case TK_COUNTER:
+	case GS_CHAINACTION:
 	case GS_TRIPLEACTION:
 	case GS_TRIPLEACTION:
 	case GS_MAGICALBULLET:
 	case GS_MAGICALBULLET:
 	case GS_TRACKING:
 	case GS_TRACKING:
@@ -7317,6 +7318,9 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
 
 
 			switch (sg->val1)
 			switch (sg->val1)
 			{
 			{
+				case ELE_WIND:
+					sc_start(bl,SC_STUN,5,sg->skill_lv,skill_get_time2(sg->skill_id, sg->skill_lv));
+					break;
 				case ELE_WATER:
 				case ELE_WATER:
 					sc_start(bl,SC_FREEZE,5,sg->skill_lv,skill_get_time2(sg->skill_id, sg->skill_lv));
 					sc_start(bl,SC_FREEZE,5,sg->skill_lv,skill_get_time2(sg->skill_id, sg->skill_lv));
 					break;
 					break;
@@ -7326,6 +7330,9 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
 				case ELE_DARK:
 				case ELE_DARK:
 					sc_start(bl,SC_BLIND,5,sg->skill_lv,skill_get_time2(sg->skill_id, sg->skill_lv));
 					sc_start(bl,SC_BLIND,5,sg->skill_lv,skill_get_time2(sg->skill_id, sg->skill_lv));
 					break;
 					break;
+				case ELE_FIRE:
+					skill_blown(&src->bl,bl,skill_get_blewcount(sg->skill_id,sg->skill_lv));
+					break;
 			}
 			}
 
 
 			sg->unit_id = UNT_USED_TRAPS;
 			sg->unit_id = UNT_USED_TRAPS;