| 02-04-2006, 04:11 PM | #1 |
Question 1) Ok for an RPG map, if a guy if using a Shield, I wanted a % chance to block an attack. But I also wanted each char to have a natural evasion ability depending on their agility. So could I just stack two evasions? If so will it work fine if there I have 60% and 60% evade wont conflict? 2) How could I do a % chance to "evade" a spell or have the spell not work. As far as I know you can only do with war3 items - Block a spell every X seconds - Reduce damage from spells by X% thank you |
| 02-04-2006, 04:35 PM | #2 |
1) Not sure on this, test it or wait for someone who is sure :P 2) You can always revert damage taken with the event response Damage Taken, also, Vex has a good and simple system to check to see what's dealing damage (eg melee vs spell damage) that could be a huge help to you here. |
| 02-04-2006, 04:42 PM | #3 |
1) Hardened skin, has % and set it to 0 min damage, 99999 reduction. Evasion does not stack. 2) For this you could have two abilities - spell block, and a dummy one that does nothing. Everytime an enemy casts an ability on the hero, a trigger takes away the ability it has, and gives it either the dummy or the real one. This won't work on AoEs, but nor does spell block, so it doesn't matter that much. |
| 02-04-2006, 06:05 PM | #4 |
Evasion does stack. Two 60% evasion abilities will give 84% evasion. Total Evasion % = 100 - (100 - %1) * (100 - %2 ) * (100 - %n) Where %n are the chances to evade for each individual ability. EDIT: This is incorrect. See below. |
| 02-04-2006, 08:02 PM | #5 |
Are you sure? And are you sure that that is current? I know that the 33% magic reduction items used to stack, but then stopped stacking. |
| 02-04-2006, 08:50 PM | #6 |
Evasion doesn't stack anymore. |
| 02-04-2006, 09:14 PM | #7 |
This is kind of an issue actually. - First you need to detect damage then make sure the damage was caused by an attack. The method to block damage is based in the fact that the 'takes damage' event happens before the unit loses hp. Save the damage taken as a real. You should start a timer with expiration of 0 seconds. When the timer expires you add hit points equivalent to the damage previously taken to the unit. Problem is that if it was a killing blow the unit would die and you will add hp to the unit once the unit is dead. What I did for those cases was to see if the unit's hp were low enough to make it die, In that case besides of starting the timer, add a life addition ability to the unit and set it to 10000. Then when the timer expires set its hp to the hp the unit had when it took damage. |
| 02-05-2006, 03:54 AM | #8 |
I just ran a test for evasion. It doesn't stack, and only uses the evasion from the ability with the higher chance to evade. |
| 02-05-2006, 07:13 AM | #9 | |
Quote:
QFT |
| 02-05-2006, 08:22 AM | #10 |
Too bad that doesnt block spell damage. |
| 02-05-2006, 08:32 AM | #11 | |
Quote:
This will also stop spell effects. |
