Scylla Posted September 9, 2015 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
Stolao Posted September 10, 2015 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
Scylla Posted September 10, 2015 Author 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
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!
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.