Jump to content
  • 0

Reducing desperado's hit


Scylla

Question


  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  374
  • Reputation:   46
  • Joined:  03/27/13
  • Last Seen:  

I don't understand it at all. I've checked stuffs in skill_db and skill.c and i don't see anything that says " it does maximum of 10 hits " because i wanted to make it 5 hits only.

 

So on skill_db:

 

 

id,range,hit,inf,element,nk,splash,max,list_num,castcancel,cast_defence_rate,inf2,maxcount,skill_type,blow_count,name,description

 

516,0,8,4,-1,0x2,3,10,1,no,0,0,0,weapon,0, GS_DESPERADO,Desperado

 

It says it does multiple hits and the number of hits is only 1

 

If i changed to 6 it's not working

 

And if i changed the number of hits to 5 for example, then It'll become 50 hits in total.

 

Now on skill.c

 

skill.c

				case GS_DESPERADO:
					if (rand()%100 < src->val1)
						skill_attack(BF_WEAPON,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
				break;

That's the line where it says it will do random number of hits with a maximum of 10 hits but i don't know where it defines that it does a maximum of 10 hits

 

The other line only defines the Area of Effect formula and the other one is that feature where you can't equip for a short period of time after using the skill.

 

So where do i change desperado's hits?

Edited by Mary Magdalene
Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Content Moderator
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  639
  • Reputation:   597
  • Joined:  11/25/11
  • Last Seen:  

Well, let's me see.
Desperado is not counted as a real 'Multiple Hits' because, as far as I know, it does actually damage in 'Multiple Targets', so, it's correct the 1 on skill_db.

 

This line only defines the Success Rate:

case GS_DESPERADO:
	if (rand()%100 < src->val1)
	    skill_attack(BF_WEAPON,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
	break;

You may comment the If line to get rid of the failure chance.

Well, finally, I believe that the number of Targets is defined on the mysterious Duration field on skill_cast_db.txt.

516,0,1000,1000,1000,0,0

You can try change it to different values, but, If I recall correctly, you will get what you want (5 targets) with 400 or 500.

516,0,1000,1000,500,0,0

It's not reeeally untested, but neither totally tested, tell me if you get any progress.

It's also possible to make the Skill Level to define that.

516,0,1000,1000,100:100:200:200:300:300:400:400:500:500,0,0

I guess that will make Desperado Lv. 9 or 10 to cast the 5 hits, If I'm correct about all of this (you may also try 400...).

Edited by Haziel
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  374
  • Reputation:   46
  • Joined:  03/27/13
  • Last Seen:  

Well, let's me see.

Desperado is not counted as a real 'Multiple Hits' because, as far as I know, it does actually damage in 'Multiple Targets', so, it's correct the 1 on skill_db.

 

This line only defines the Success Rate:

case GS_DESPERADO:
	if (rand()%100 < src->val1)
	    skill_attack(BF_WEAPON,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
	break;

You may comment the If line to get rid of the failure chance.

Well, finally, I believe that the number of Targets is defined on the mysterious Duration field on skill_cast_db.txt.

516,0,1000,1000,1000,0,0

You can try change it to different values, but, If I recall correctly, you will get what you want (5 targets) with 400 or 500.

516,0,1000,1000,500,0,0

It's not reeeally untested, but neither totally tested, tell me if you get any progress.

It's also possible to make the Skill Level to define that.

516,0,1000,1000,100:100:200:200:300:300:400:400:500:500,0,0

I guess that will make Desperado Lv. 9 or 10 to cast the 5 hits, If I'm correct about all of this (you may also try 400...).

 

LOL it worked by changing duration1 from 1000 to 500

 

And i was like " It worked by i don't have any idea how " lol

 

Thank you very much!

Well, finally, I believe that the number of Targets is defined on the mysterious Duration field on skill_cast_db.txt.

516,0,1000,1000,1000,0,0

 

It is really mysterious lol

Edited by Mary Magdalene
Link to comment
Share on other sites


  • Group:  Content Moderator
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  639
  • Reputation:   597
  • Joined:  11/25/11
  • Last Seen:  

Duration fields are used to store data that usually can not be categorized by the default scheme in _db.txt files but is needed to some calculation in the source.

By the way, glad it worked.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  374
  • Reputation:   46
  • Joined:  03/27/13
  • Last Seen:  

Yeah it's just really confusing because it's ' duration ' after all, It's meant for time not for hits so i didn't take a looked on skill_cast_db.

 

Anyways thanks again!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  350
  • Reputation:   43
  • Joined:  09/07/12
  • Last Seen:  

keep in mind that hit count of non magic skill is handled in tick, (more like a frequency /!

Edited by Eat Sleep Dota
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...