Pharaoh_
The epic journey will soon begin... Prepare!
- Reaction score
- 136
Hm, time to get things kinda hard. I need a formula, which seems to be difficult.
So, what i want:
A unit casts a skill on an enemy.
The system will count the Intelligence of the units.
So, we have INT1 (as of Intelligence of casting unit) and INT2 (as of Intelligence of target unit). The system will also count the level of the casting unit (let's name it z1) and the level of the target unit (let's name it z2). If their difference is a positive number, it means that z1>z2, but if we get a negative number, it means that z2>z1, so, the target unit has higher level than the casting unit.
The more INT the casting unit has (INT1), the greater the chance for the skill to have an actual effect on the target unit. But, the more INT the target unit has (INT2), the less the chance it becomes. Also, the levels: z1-z2. If this returns a positive value, the higher the value is, the greater the chance for the skill to work, but, if it returns a negative value, the greater the negative value, the less chance to work.
Now, those are the basic stuff. In order for the casted skill to work on the target unit, we get an x% chance to work.
The thing is i cannot combine those 3 factors: z1-z2, INT1, INT2 to finally make up the x% chance. I told you what are the factors and how they should work.
I have tried many methods, e.g. [(INT1/INT2) + (z1 - z2)] * 10, but, what happens is that the "x"(%) returns a greater value, when it comes to high-leveld units and low value when it comes to low-leveld units, even if the analogies are the same (e.g. 2 levels difference); it should for example work like:
Wrong result:
(Unit1) (Unit2)
INT 72 170
LVL 10 20
With the formula above ([(INT1/INT2) + (z1-z2)] * 10), it should become: (72/170) + (-10) = -95.76% chance. Well, it shouldn't have this result, cause the formula itself is wrong. But have a look for the same formula, with lower leveled units and of course, lower INT values.
Wrong result2:
(Unit1) (Unit2)
INT 23 69
LVL 1 10
Again, [(23/69) + (1-10)] * 10 = -86,6% chance. Oh well, how come? Because i have lower numbers, i get lower x%. I want the formula to have analogy!
Ideas on how to combine the factors needed or the formula itself! +Rep to helpful answers.
So, what i want:
A unit casts a skill on an enemy.
The system will count the Intelligence of the units.
So, we have INT1 (as of Intelligence of casting unit) and INT2 (as of Intelligence of target unit). The system will also count the level of the casting unit (let's name it z1) and the level of the target unit (let's name it z2). If their difference is a positive number, it means that z1>z2, but if we get a negative number, it means that z2>z1, so, the target unit has higher level than the casting unit.
The more INT the casting unit has (INT1), the greater the chance for the skill to have an actual effect on the target unit. But, the more INT the target unit has (INT2), the less the chance it becomes. Also, the levels: z1-z2. If this returns a positive value, the higher the value is, the greater the chance for the skill to work, but, if it returns a negative value, the greater the negative value, the less chance to work.
Now, those are the basic stuff. In order for the casted skill to work on the target unit, we get an x% chance to work.
The thing is i cannot combine those 3 factors: z1-z2, INT1, INT2 to finally make up the x% chance. I told you what are the factors and how they should work.
I have tried many methods, e.g. [(INT1/INT2) + (z1 - z2)] * 10, but, what happens is that the "x"(%) returns a greater value, when it comes to high-leveld units and low value when it comes to low-leveld units, even if the analogies are the same (e.g. 2 levels difference); it should for example work like:
Wrong result:
(Unit1) (Unit2)
INT 72 170
LVL 10 20
With the formula above ([(INT1/INT2) + (z1-z2)] * 10), it should become: (72/170) + (-10) = -95.76% chance. Well, it shouldn't have this result, cause the formula itself is wrong. But have a look for the same formula, with lower leveled units and of course, lower INT values.
Wrong result2:
(Unit1) (Unit2)
INT 23 69
LVL 1 10
Again, [(23/69) + (1-10)] * 10 = -86,6% chance. Oh well, how come? Because i have lower numbers, i get lower x%. I want the formula to have analogy!
Ideas on how to combine the factors needed or the formula itself! +Rep to helpful answers.