• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Combat System request

Status
Not open for further replies.
Level 2
Joined
Mar 28, 2008
Messages
6
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...
 
Level 2
Joined
Jul 24, 2007
Messages
199
You must understand that when you say "+20%", it is not plus, it is multiply (by 1.2), and the same thing with minus. Does your formula mean, "(Damage - Amount of armor) * 0.8", or it means "(Damage * 0.8) - Amount of Armor"? The standard scheme (needs no JASS) is that:

Damage is decreased by the Hardened Skin factor (100 damage - 20 HS = 80), then it is decreased by the armor and tabular coefficient (80 damage - 20% = 64). The tabular coefficients can be defined through Game Constants -> Combat -> table of extra damage, here you input your values in all combinations, this needs no JASS and even no triggers, and use Hardened Skin instead of armor (if you want to define HS factor directly, increase its level number to 100, right-click on the Data level 1, select Auto-fill and input in base value 1 and in const factor 1, and then ok, and then just set the level of ability to needed).
 
Level 2
Joined
Mar 28, 2008
Messages
6
Thanks i really didn't know that you can make changes like that trough gameplay constants. +rep ^^
 
Status
Not open for further replies.
Top