I need a combat system for my ORPG map... I've already tried to make it by myself, but as i don't know JASS at all i got stuck.
The system should get the attack type of the attacking unit, the armor type, armor amount of the attacked unit and make changes to the amount of damage done. My map mainly uses 3 attack types (Magic, Melee, Pierce) and 3 defense types (Light, Normal, Heavy). Melee damage beats Normal armor, Pierce damage beats Light armor, Magic damage beats Heavy armor. If a unit with melee damage would attack another unit with light armor the system should reduce damage by xx%. Reduction should be:
Melee against Light 20% Pierce against Light 0% Magic against Light 10%
Melee against Heavy 10% Pierce against Heavy 20% Magic against Heavy 0%
Melee against Normal 0% Pierce against Normal 10% Magic against Normal 20%
So the formula for melee against light should be:
Damage - Amount of armor - 20%
So if anyone would do this for me i would be very thankful and would add you to the credits of the map.
Btw i know that it's hard to understand what i want and it's all thanks to my bad english...
The system should get the attack type of the attacking unit, the armor type, armor amount of the attacked unit and make changes to the amount of damage done. My map mainly uses 3 attack types (Magic, Melee, Pierce) and 3 defense types (Light, Normal, Heavy). Melee damage beats Normal armor, Pierce damage beats Light armor, Magic damage beats Heavy armor. If a unit with melee damage would attack another unit with light armor the system should reduce damage by xx%. Reduction should be:
Melee against Light 20% Pierce against Light 0% Magic against Light 10%
Melee against Heavy 10% Pierce against Heavy 20% Magic against Heavy 0%
Melee against Normal 0% Pierce against Normal 10% Magic against Normal 20%
So the formula for melee against light should be:
Damage - Amount of armor - 20%
So if anyone would do this for me i would be very thankful and would add you to the credits of the map.
Btw i know that it's hard to understand what i want and it's all thanks to my bad english...