+0.5 Mana/sec per every 10% mana missing

jarekpl12

TH.net Regular
Reaction score
6
Hello... i need some help with passive ability:
[lvl 1] - Resores 0.5 Mana/sec per every 10% mana missing
[lvl 2] - Resores 1 Mana/sec per every 10% mana missing
[lvl 3] - Resores 1.5 Mana/sec per every 10% mana missing
[lvl 4] - Resores 2 Mana/sec per every 10% mana missing
[lvl 5] - Resores 2.5 Mana/sec per every 10% mana missing

[lvl1]
91%-100% mana = 0/sec
81%-90% mana = 0.5/sec
71%-80 mana = 1/sec
[lvl2]
91%-100% mana = 0/sec
81%-90% mana = 1/sec
71%-80 mana = 2/sec
[lvl3]
91%-100% mana = 0/sec
81%-90% mana = 1.5/sec
71%-80 mana = 3/sec
etc...

any simple ideas? thx...
 

Imp Midna

Active Member
Reaction score
52
- Whenever a unit leanrs your skill (Event - A unit learns a Skill, both learning and leveling it will trigger this event), add it to a unitgroup
- in a periodic trigger firering every 0.25, 0.5 or 1 second etc (take the highest one that, in your opinion, still looks like a fluent mana regeneration):
---- pick every unit in the unitgroup from your first trigger
---- get (100% - current mana percentage) / 10
---- cast that value to an integer and back to a real to get rid of the annoying fractional digits (in the GUI, it would look like: "Real( Integer( thatValue ) )") to get the mana step
----- set mana of the picked unit to (mana of the picked unit + (mana step * (level of ur ability * 0.5)))
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top