Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
Having trained to successfully negate all damage that comes to mind, he is able to withstand any kind of damage that he receives and put it on hold for later time. After the effect wears off, the damage will be dealt to the caster and will disperse it to surrounding enemies. Damage is lessen for dispersion damage to nearby enemies. If the self-damage is fatal, the caster will gain health and get stunned.
[Level 1] - Delaying damage for up to 5 seconds, health is set to 100 if lethal, 2 second self-stun, 20% dispersion damage.
[Level 2] - Delaying damage for up to 6 seconds, health is set to 200 if lethal, 1.5 second self-stun, 30% dispersion damage.
[Level 3] - Delaying damage for up to 7 seconds, health is set to 300 if lethal, 1 second self-stun, 40% dispersion damage.
[Level 4] - Delaying damage for up to 8 seconds, health is set to 400 if lethal, 0.5 second self-stun, 50% dispersion damage.
MT Setup
Events
Map initialization
Conditions
Actions
Set MT_DurationSetup[1] = 5.00
Set MT_DurationSetup[2] = 6.00
Set MT_DurationSetup[3] = 7.00
Set MT_DurationSetup[4] = 8.00
Set MT_AOE_Setup[1] = 300.00
Set MT_AOE_Setup[2] = 400.00
Set MT_AOE_Setup[3] = 500.00
Set MT_AOE_Setup[4] = 600.00
Set MT_DamageDisperseSetup[1] = 0.20
Set MT_DamageDisperseSetup[2] = 0.30
Set MT_DamageDisperseSetup[3] = 0.40
Set MT_DamageDisperseSetup[4] = 0.50
Set MT_FatalHealSetup[1] = 100.00
Set MT_FatalHealSetup[2] = 200.00
Set MT_FatalHealSetup[3] = 300.00
Set MT_FatalHealSetup[4] = 400.00
Set MT_onHitEffect = Abilities\Spells\Undead\DeathandDecay\DeathandDecayDamage.mdl
Set MT_onDisperseEffect = Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
Set MT_onActivateEffect = Abilities\Spells\Undead\DeathPact\DeathPactTarget.mdl
Set MT_onDamageEffect = Abilities\Spells\Undead\DeathCoil\DeathCoilSpecialArt.mdl
Set MT_onFatalHealEffect = Abilities\Spells\Demon\DarkPortal\DarkPortalTarget.mdl
Set MT_Ability = Mind Tolerance
Set MT_DummyCaster = Mind Tolerance (Dummy Caster)
Set MT_StunAbility = Mind Tolerance (Stun)
MT Cast
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to MT_Ability
Actions
Set TempU = (Triggering unit)
Set TempInt = (Level of MT_Ability for TempU)
Set MT_Key = (Custom value of TempU)
Set MT_Duration[MT_Key] = MT_DurationSetup[TempInt]
Set MT_AOE[MT_Key] = MT_AOE_Setup[TempInt]
Set MT_DamageDisperse[MT_Key] = MT_DamageDisperseSetup[TempInt]
Set MT_FatalHeal[MT_Key] = MT_FatalHealSetup[TempInt]
Unit Group - Add TempU to MT_Group
Special Effect - Create a special effect attached to the overhead of TempU using MT_onActivateEffect
Special Effect - Destroy (Last created special effect)
Trigger - Turn on MT Loop <gen>
MT Loop
Events
Time - Every 0.03 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(MT_Group is empty) Equal to True
Then - Actions
Trigger - Turn off (This trigger)
Else - Actions
Unit Group - Pick every unit in MT_Group and do (Actions)
Loop - Actions
Set TempU = (Picked unit)
Set MT_Key = (Custom value of TempU)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
MT_Duration[MT_Key] Greater than 0.00
Then - Actions
Set MT_Duration[MT_Key] = (MT_Duration[MT_Key] - 0.03)
Else - Actions
Set TempLoc = (Position of TempU)
Custom script: set bj_wantDestroyGroup = true
Unit Group - Pick every unit in (Units within MT_AOE[MT_Key] of TempLoc matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) is Mechanical) Equal to False) and ((((Matching unit) is alive) Equal to True) a and do (Actions)
Loop - Actions
Set TempU2 = (Picked unit)
Set TempReal = (MT_DamageHold[MT_Key] x MT_DamageDisperse[MT_Key])
Floating Text - Create floating text that reads (- + (String((Integer(TempReal))))) above TempU2 with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
Set TempText = (Last created floating text)
Floating Text - Set the velocity of TempText to 64.00 towards 315.00 degrees
Floating Text - Change TempText: Disable permanence
Floating Text - Change the lifespan of TempText to 1.50 seconds
Floating Text - Change the fading age of TempText to 0.75 seconds
Special Effect - Create a special effect attached to the overhead of TempU2 using MT_onDamageEffect
Special Effect - Destroy (Last created special effect)
Unit - Cause TempU to damage TempU2, dealing TempReal damage of attack type Chaos and damage type Universal
Set TempReal = (Life of TempU)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(TempReal - MT_DamageHold[MT_Key]) Less than or equal to 1.00
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
TempReal Less than or equal to MT_FatalHeal[MT_Key]
Then - Actions
Unit - Set life of TempU to MT_FatalHeal[MT_Key]
Else - Actions
Unit - Create 1 MT_DummyCaster for (Owner of TempU) at TempLoc facing Default building facing degrees
Set TempU2 = (Last created unit)
Unit - Add a 0.50 second Generic expiration timer to TempU2
Unit - Set level of MT_StunAbility for TempU2 to (Level of MT_Ability for TempU)
Unit - Order TempU2 to Human Mountain King - Storm Bolt TempU
Special Effect - Create a special effect attached to the origin of TempU using MT_onFatalHealEffect
Special Effect - Destroy (Last created special effect)
Else - Actions
Unit - Set life of TempU to ((Life of TempU) - MT_DamageHold[MT_Key])
Special Effect - Create a special effect attached to the origin of TempU using MT_onDisperseEffect
Special Effect - Destroy (Last created special effect)
Floating Text - Create floating text that reads (- + (String((Integer(MT_DamageHold[MT_Key]))))) above TempU with Z offset 0.00, using font size 10.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
Set TempText = (Last created floating text)
Floating Text - Set the velocity of TempText to 64.00 towards 315.00 degrees
Floating Text - Change TempText: Disable permanence
Floating Text - Change the lifespan of TempText to 1.50 seconds
Floating Text - Change the fading age of TempText to 0.75 seconds
Custom script: call RemoveLocation(udg_TempLoc)
Unit Group - Remove TempU from MT_Group
Set MT_DamageHold[MT_Key] = 0.00
MT Before Hit
Events
Game - DamageModifierEvent becomes Equal to 1.00
Conditions
(DamageEventTarget is in MT_Group) Equal to True
Actions
Set MT_Key = (Custom value of DamageEventTarget)
Set MT_DamageHold[MT_Key] = (MT_DamageHold[MT_Key] + DamageEventAmount)
Set DamageEventAmount = 0.00
Special Effect - Create a special effect attached to the body of DamageEventTarget using MT_onHitEffect
Special Effect - Destroy (Last created special effect)
MT Hit
Events
Game - DamageEvent becomes Equal to 1.00
Conditions
(DamageEventTarget is in MT_Group) Equal to True
Actions
Special Effect - Create a special effect attached to the overhead of DamageEventTarget using MT_onHitEffect
Special Effect - Destroy (Last created special effect)
12th Dec 2015
IcemanBo: For long time as NeedsFix. Rejected.
04:32, 7th Jan 2015
IcemanBo:
http://www.hiveworkshop.com/forums/spells-569/mind-tolerance-v1-0-a-259474/#post2636910
Reserved~
There are some hidden mechanics for this spell, but it doesn't show in the tooltips (because no more space).
The mechanic is that, if you take a fatal damage, it would set your HP to a certain fixed amount, right ?
But if your currentHP > fatalHeal, the set life won't occur.
Example 1:
You take fatal damage, and it will set your HP to 400, but your current HP right now is 500, therefore, no setLife action occurs.
Example 2:
You take fatal damage, and it will set your HP to 400, but your current HP right now is 200, therefore, setLife action occurs which results in your HP to become 400.
Comments and Feedback are much appreciated, because I'm a long-time spell/system maker, maybe there are obsolete technique in the making of these triggers, please do tell
Maybe you could change the floatings as optional in a further update. As their amount is limited, I can imagine a user could have want to have it disabled.
As optimization you could use one global dummy, and just always change the ownership. This way you can reduce heavy unit creation operations.
Following line is pretty long and quite unreadable:
Unit Group - Pick every unit in (Units within MT_AOE[MT_Key] of TempLoc matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) is Mechanical) Equal to False) and ((((Matching unit) is alive) Equal to True) a and do (Actions)
Using an If/Then/Else to check all the conditions would better, and then you can use the variable instead of refering to "MatchingUnit" each time.
The check, to turn off the periodic trigger should be done when the effect of an instance ends.
Also using an own integer as counter would be more efficient than checking if a group is empty.
Could be configurable:
- Attack-, and Damagtype
- Attachmentpoints
What condition exactly has to match for fatal damage?
Maybe you could change the floatings as optional in a further update. As their amount is limited, I can imagine a user could have want to have it disabled.
As optimization you could use one global dummy, and just always change the ownership. This way you can reduce heavy unit creation operations.
Following line is pretty long and quite unreadable:
Unit Group - Pick every unit in (Units within MT_AOE[MT_Key] of TempLoc matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) is Mechanical) Equal to False) and ((((Matching unit) is alive) Equal to True) a and do (Actions)
Using an If/Then/Else to check all the conditions would better, and then you can use the variable instead of refering to "MatchingUnit" each time.
The check, to turn off the periodic trigger should be done when the effect of an instance ends.
Also using an own integer as counter would be more efficient than checking if a group is empty.
Could be configurable:
- Attack-, and Damagtype
- Attachmentpoints
What condition exactly has to match for fatal damage?
1. The Floating Text configurable would be in the next update
2. I was thinking about using Dummy Caster system, but was too lazy at the moment to import it, maybe I'll do it later on
3. I agree with the unreadable part for the (Matching unit) comparison, will do line by line
4. I was thinking of using custom integer to keep track of instances, but this is a Hashtable-method, not Indexing, so... I kinda need to perform extra if operation, because it doesn't allow "Stacking", whenever same unit cast the ability within intended duration, it will refresh the timer, but won't "add" to the IntegerCount. Perhaps I would do this in the next update.
5. DmgType and AttachmentPoint for configurable would be in the next update.
6. The condition for "fatal" is that, fatalDamage > currentHealth.
bjwantDestroyGroup is present so I doubt it's that line. Anyways, I agree about using ITE inside the periodic loop to filter units while avoiding extra FCs.
You mean for the Dispersion Damage ?
It does check, but the condition is too long, that's what Iceman suggested, to do the conditions by line, it would make it more readable.
The unit group line should be taken and made into an ITE. to sort out the picked units. This will be much easier to edit and much more efficient than using all of those Matching unit cases.
For my suggestion, call DestroyGroup() is better than set bj_wantDestroyGroup = true
Unit Group - Pick every unit in (Units within MT_AOE[MT_Key] of TempLoc matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) is Mechanical) Equal to False) and ((((Matching unit) is alive) Equal to True) a and do (Actions)
For DestroyGroup(), first you need a group variable, later an operation to be called to save all unit inside the Unit Group.
See ?
That has already takes time.
Also, this group is meant to be temporary, doesn't even need to waste a variable just for a temporary group (Temporary Variables like Real, Int, is different, because this requires reference/calculations to multiple other results)
The way I see it, it serves the same purpose with same efficiency.
Like I said, only to pick unit within range, that's it.
Doesn't even need a variable to waste the storage.
This is not true. All GUI unit group actions check to see if the unit group should be destroyed. Thus the boolean value bj_wantDestroyGroup. If bj_wantDestroyGroup is true it then calls DestroyGroup(). So it can't be better.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.