Jump to content
  • 0

Add double attack chance to raid and backstab skill.


iraciz

Question


  • Group:  Members
  • Topic Count:  140
  • Topics Per Day:  0.03
  • Content Count:  562
  • Reputation:   108
  • Joined:  10/05/12
  • Last Seen:  

Is this possible via SCR?

Without editing skilldb.yml 

Chances Need to work together with tf_double  skill level.

 

image.thumb.png.6747e9e77794c1db2c4d3b558f123aa9.png

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  155
  • Reputation:   51
  • Joined:  07/15/13
  • Last Seen:  

Tested and works fine, not sure if is the right condition but works.

Go to src/map/skill.cpp and go to line:

 

			case ABC_FRENZY_SHOT:
				if (rnd()%100 < 4 * skill_lv)// Need official autocast chance. [Rytech]
					skill_addtimerskill(src, tick + dmg.amotion, bl->id, 0, 0, skill_id, skill_lv, BF_WEAPON, 2);
				break;

and add below:

 

			case RG_BACKSTAP:
			case RG_RAID:
				if( pc_checkskill(sd,TF_DOUBLE) > 0 && rnd()%100 < ( skill_lv < 10 ? 5 + skill_lv * 5 : 55 ) )
					skill_addtimerskill(src, tick + dmg.amotion, bl->id, 0, 0, skill_id, skill_lv, BF_WEAPON, flag|2);
				break;

 

Link to comment
Share on other sites

  • 1

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.01
  • Content Count:  90
  • Reputation:   2
  • Joined:  02/25/19
  • Last Seen:  

well since there are skills that hits twice depending on what weapon type youre using (RK_WINDCUTTER) id suggest looking at that code for inspiration.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  140
  • Topics Per Day:  0.03
  • Content Count:  562
  • Reputation:   108
  • Joined:  10/05/12
  • Last Seen:  

Sorry for the necro posting!

both skills hit twice, but not as I would like, showing the 2 hits with yellow numbers.

I got this in scr/map/battle.c

Line

	switch (skill_id) {
		case RK_WINDCUTTER:
			if (sd && sd->weapontype1 == W_2HSWORD)
				wd->div_ = 2;
			break;

add:

		case RG_BACKSTAP:
			skill_lv = pc_checkskill(sd, TF_DOUBLE);
			if (skill_lv > 0) {
				if(rnd()%100 < (7 * skill_lv)) {
					wd->div_++;
				}
			}
		break;
		
		case RG_RAID:
			skill_lv = pc_checkskill(sd, TF_DOUBLE);
			if (skill_lv > 0) {
				if(rnd()%100 < (7 * skill_lv)) {
					wd->div_++;
				}
			}
		break;	

 

It work as I wish, both skills are taking tf_double chances to hit double, bad is that! It does it with any weapon or even barehanded.. I would like to make it work with daggerclass only!

 

Edited by iraciz
update
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.01
  • Content Count:  90
  • Reputation:   2
  • Joined:  02/25/19
  • Last Seen:  

its litterally right there, check for weapon type as well on windcutter...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...