jharick Posted July 22, 2012 Group: Members Topic Count: 21 Topics Per Day: 0.00 Content Count: 77 Reputation: 3 Joined: 03/25/12 Last Seen: May 8, 2015 Share Posted July 22, 2012 about this source: skillratio += -50+10*skill_lv; why -50 and 10 is separate in normal computation it can be merge the -50 and 10 so it be 40. like this: skillratio += 40*skill_lv; is anyone can explain how the computation of source works. also this one: md.damage = 1100 + 700 * skill_lv + sstatus->int_; why it needs to be separate? Quote Link to comment Share on other sites More sharing options...
Emistry Posted July 22, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2371 Joined: 10/28/11 Last Seen: 16 hours ago Share Posted July 22, 2012 skillratio += -50+10*skill_lv; suppose to be calculate in this way skillratio = skillratio + ( -50 + ( 10 * skill_lv ) ); not skillratio = skillratio + ( ( -50 + 10 ) * skill_lv ); the calculation is from RIGHT to LEFT hope i am not mistaken about this... Quote Link to comment Share on other sites More sharing options...
Euphy Posted July 22, 2012 Group: Members Topic Count: 72 Topics Per Day: 0.02 Content Count: 2997 Reputation: 1132 Joined: 05/27/12 Last Seen: June 1, 2017 Share Posted July 22, 2012 Order of operations... -50 is a constant, 10*skill_lv is done first. Edit: lol, 3 responses at the same time. xD Quote Link to comment Share on other sites More sharing options...
malufett Posted July 22, 2012 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 554 Reputation: 70 Joined: 04/04/12 Last Seen: November 8, 2013 Share Posted July 22, 2012 because of arithmetic rules such as MDAS(Multiplication Division Addition and Subtraction)... skillratio += -50+10*skill_lv; remember skillratio holds a default value 100 so we need to negate 50 from it before/after processing the other integer.... Quote Link to comment Share on other sites More sharing options...
jharick Posted July 22, 2012 Group: Members Topic Count: 21 Topics Per Day: 0.00 Content Count: 77 Reputation: 3 Joined: 03/25/12 Last Seen: May 8, 2015 Author Share Posted July 22, 2012 so if I try to increase a Skill Damage it better to adjust/increase this 10*skill_lv; from this: skillratio += -50+10*skill_lv; to this: skillratio += -50+20*skill_lv; Quote Link to comment Share on other sites More sharing options...
Emistry Posted July 22, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2371 Joined: 10/28/11 Last Seen: 16 hours ago Share Posted July 22, 2012 any value behind the skillratio += will also affect it... Quote Link to comment Share on other sites More sharing options...
jharick Posted July 22, 2012 Group: Members Topic Count: 21 Topics Per Day: 0.00 Content Count: 77 Reputation: 3 Joined: 03/25/12 Last Seen: May 8, 2015 Author Share Posted July 22, 2012 so its better to adjust both Quote Link to comment Share on other sites More sharing options...
malufett Posted July 22, 2012 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 554 Reputation: 70 Joined: 04/04/12 Last Seen: November 8, 2013 Share Posted July 22, 2012 @Euphy hahaha...exactly... @jharick if your adjustment is greater than 100 @ level 1 there is no need to add -50.. but if you still confuse better use skillratio = X... example skilratio += 20 * skilll_lv = 20% per skill level = 120 @ lvl1, 140 @ lvl2 or skillratio = 100 + 20 * skilll_lv = 20% per skill level = 120 @ lvl1, 140 @ lvl2 Quote Link to comment Share on other sites More sharing options...
jharick Posted July 22, 2012 Group: Members Topic Count: 21 Topics Per Day: 0.00 Content Count: 77 Reputation: 3 Joined: 03/25/12 Last Seen: May 8, 2015 Author Share Posted July 22, 2012 I get it now. thanks to all of you for clearing about my question Quote Link to comment Share on other sites More sharing options...
Question
jharick
about this source:
skillratio += -50+10*skill_lv;
why -50 and 10 is separate
in normal computation it can be merge the -50 and 10 so it be 40.
like this:
skillratio += 40*skill_lv;
is anyone can explain how the computation of source works.
also this one:
md.damage = 1100 + 700 * skill_lv + sstatus->int_;
why it needs to be separate?
Link to comment
Share on other sites
8 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.