Scylla Posted September 9, 2015 Group: Members Topic Count: 47 Topics Per Day: 0.01 Content Count: 374 Reputation: 47 Joined: 03/27/13 Last Seen: April 27 Share Posted September 9, 2015 Hello, i would like to ask if there's a function / way to define damage that depends on its range to the target Thank you! Quote Link to comment Share on other sites More sharing options...
Stolao Posted September 10, 2015 Group: Developer Topic Count: 48 Topics Per Day: 0.01 Content Count: 1443 Reputation: 344 Joined: 10/17/12 Last Seen: April 25 Share Posted September 10, 2015 (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 September 10, 2015 by Stolao 1 Quote Link to comment Share on other sites More sharing options...
Scylla Posted September 10, 2015 Group: Members Topic Count: 47 Topics Per Day: 0.01 Content Count: 374 Reputation: 47 Joined: 03/27/13 Last Seen: April 27 Author Share Posted September 10, 2015 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! Quote Link to comment Share on other sites More sharing options...
Question
Scylla
Hello, i would like to ask if there's a function / way to define damage that depends on its range to the target
Thank you!
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.