O Ilusionista
Captain 100K
I was doing some tests here and I discovered one thing - you can use more than one DEFENSE value at the same time (as long as they are of different types). Which is fantastic.
Explaining:
In my project, I use ATTACK12 for slashing/cutting attacks. With this, I control how much damage the characters receive depending on their constitution.
One of the characters in the game needs to be 25% (0.75) more resistance to all types of attacks - thanks to their constitution - but must have 75% (0.25) of resistance to sharp attacks, for having a protection.
The information I had is that if you put two DEFENSE, the second would override the first - that is, all other attacks other than ATTACK12 would not have their values reduced. This would make me write several lines of defense (because I should use a 10 or more types of attack in the game, such as cutting, mental damage, poison, burning, freezing, etc.). This is how I control, for example, that Emma Frost's attack that paralyzes humans but not robots.
But that's not true. I did some calculations here using a debug function and found that both are active at the same time.
Just follow two rules:
[list type=decimal]
[*]1- It is necessary that they are DIFFERENT types of attack. Or the second value overwrites the first.
[*]2- If you use the ALL type, it should come BEFORE the others. Or you will overwrite it all over again.
[/list]
This is one of the things I love about this engine
Explaining:
In my project, I use ATTACK12 for slashing/cutting attacks. With this, I control how much damage the characters receive depending on their constitution.
- unprotected enemies receive 25% more damage;
- enemies with some armor receive normal damage;
- Enemies with heavy armor receive 25 less damage.
One of the characters in the game needs to be 25% (0.75) more resistance to all types of attacks - thanks to their constitution - but must have 75% (0.25) of resistance to sharp attacks, for having a protection.
Code:
defense all 0.75
defense normal12 0.25
The information I had is that if you put two DEFENSE, the second would override the first - that is, all other attacks other than ATTACK12 would not have their values reduced. This would make me write several lines of defense (because I should use a 10 or more types of attack in the game, such as cutting, mental damage, poison, burning, freezing, etc.). This is how I control, for example, that Emma Frost's attack that paralyzes humans but not robots.
But that's not true. I did some calculations here using a debug function and found that both are active at the same time.
Just follow two rules:
[list type=decimal]
[*]1- It is necessary that they are DIFFERENT types of attack. Or the second value overwrites the first.
[*]2- If you use the ALL type, it should come BEFORE the others. Or you will overwrite it all over again.
[/list]
This is one of the things I love about this engine