Jump to content
  • 0

Damage depending on range


Question

2 answers to this question

Recommended Posts

Posted (edited)

think this already exist in KN_CHARGEATK

 

unit.c

		case KN_CHARGEATK: {
			unsigned int k = (distance_bl(src,target)-1)/3; // +100% every 3 cells of distance

			if( k > 2 )
				k = 2; // ...but hard-limited to 300%.

			casttime += casttime * k;
		}

battle.c

		case KN_CHARGEATK: { // +100% every 3 cells of distance but hard-limited to 500%
				unsigned int k = wd.miscflag / 3;

				if (k < 2)
					k = 0;
				else if (k > 1 && k < 3)
					k = 1;
				else if (k > 2 && k < 4)
					k = 2;
				else if (k > 3 && k < 5)
					k = 3;
				else
					k = 4;
				skillratio += 100 * k;
			}
			break;
Edited by Stolao
  • Upvote 1
Posted

 

think this already exist in KN_CHARGEATK

 

unit.c

		case KN_CHARGEATK: {
			unsigned int k = (distance_bl(src,target)-1)/3; // +100% every 3 cells of distance

			if( k > 2 )
				k = 2; // ...but hard-limited to 300%.

			casttime += casttime * k;
		}

battle.c

		case KN_CHARGEATK: { // +100% every 3 cells of distance but hard-limited to 500%
				unsigned int k = wd.miscflag / 3;

				if (k < 2)
					k = 0;
				else if (k > 1 && k < 3)
					k = 1;
				else if (k > 2 && k < 4)
					k = 2;
				else if (k > 3 && k < 5)
					k = 3;
				else
					k = 4;
				skillratio += 100 * k;
			}
			break;

 

Oh hey thank you very much for the reply! 

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...