Jump to content
  • 0

Add double attack chance to raid and backstab skill.


Question

Posted

Is this possible via SCR?

Without editing skilldb.yml 

Chances Need to work together with tf_double  skill level.

 

image.thumb.png.6747e9e77794c1db2c4d3b558f123aa9.png

4 answers to this question

Recommended Posts

  • 0
Posted

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;

 

  • 1
Posted

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.

  • 0
Posted (edited)

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

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...