Percent damage using DDS to mana help

Nosticus

New Member
Reaction score
0
Ok, so here is what I am trying to make
I want a unit with the feedback ability to return a percent of the mana drained to its own mana pool, or alternatively because that sounds hard I want a unit with the freedback ability to restore a percent of damage it deals as mana.

Here is what I have now, and it gives all damage back as mana...

Feedback mana return
Events
Game - GDD_Event becomes Equal to 0.00
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Chaotic Feedback for GDD_DamageSource) Equal to 1
Then - Actions
Unit - Set mana of GDD_DamageSource to ((Mana of GDD_DamageSource) + GDD_Damage)
Game - Display to (All players) for 3.00 seconds the text: (((Name of GDD_DamageSource) + Restored) + ((String(GDD_Damage)) + Mana))
Else - Actions
Do nothing
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
So what is your problem besides using the "Do nothing" action which does actually nothing but waste performance and memory?
 

Nosticus

New Member
Reaction score
0
The "problem" as you called it is I want to to return a percent of damage delt by hero or mana drained from feedback to go to the heros mana. and I do not have any performance Issues
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
I still dont get what you want us to tell you.
You want to return a certain percentage to the mana, you already do, 100%.
just adjust it to the percentage you have in mind.
Do you need a formula for this?
 

Nosticus

New Member
Reaction score
0
I'm sorry if I am not being clear, but how do it make it so instead of a 100% I can only take 15% of the mana drained or 15% of all damage done?
 

Smitty

Member
Reaction score
20
Do Nothing causes performance issues? What's the better alternative, leave it blank?

EDIT: uh, change mana given back to (3*GDD_Damage)/20
 

Nosticus

New Member
Reaction score
0
Thank you Smitty, you've been the most help, now how would I get it to only take 15% of the mana drained by feedback?
 

Nosticus

New Member
Reaction score
0
Do Nothing causes performance issues? What's the better alternative, leave it blank?

EDIT: uh, change mana given back to (3*GDD_Damage)/20
Can you explain that calculation please? :p?

Nevermind I got it :p Just need help with the trigger.

I tried this

Feedback mana return
Events
Game - GDD_Event becomes Equal to 0.00
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Chaotic Feedback for GDD_DamageSource) Equal to 1
Then - Actions
Unit - Set mana of GDD_DamageSource to (3.00 x (GDD_Damage / 8.50))
Else - Actions
Do nothing

and his mana keeps going down when he is hit, it goes to 80 mana, every time he is hit :/
 

keychup

Active Member
Reaction score
34
If you want %damage received to restore %mana make it (((Damage/Maximum Health)*100)*Maximum Mana)

If you want %damage received to restore mana make it (15% for example): ((15/100)*Damage Received)
 

tommerbob

Minecraft. :D
Reaction score
110
Or just use a decimal?

Trigger:
  • Unit - Set mana of GDD_DamageSource to (Current Mana of GDD_DamageSource + (GDD_Damage * 0.15))


@Smitty: Yes, the "Do Nothing" action calls a function that...literally does nothing. Just leave it blank.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
The problem with your trigger is that it SETS the mana instead of INCREASING it. Try this:
Trigger:
  • Unit - Set mana of GDD_DamageSource to ((Mana of GDD_DamageSource) + (0.15 x GDD_Damage))

Use the Arithmetic and Unit - Property functions.
 

Smitty

Member
Reaction score
20
Haha, good call KaerfNomekop, forgot to explain that part. 3/20=15/100 btw for those who might have been wondering. Although I suppose that it'd make more sense to use /100 if you're using different values, if only to keep it simple. Also, remind me bow feedback works? It drains a set amount of mana per hit, right? What're your values?
 

keychup

Active Member
Reaction score
34
Feedback is a passive Mana Burn. It removes X mana and deals damage equal to how much mana was removed per attack.
 

Smitty

Member
Reaction score
20
So replace GDD_Damage in your equation with the amount of mana burned, job done surely Oo
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
Uh, don't you set those values in the field editor?

you can set the max values for that, but you dont know if mana was actually burned, you dont know how much mana the unit initially had before it got hit by the mana burn.
 

Smitty

Member
Reaction score
20
Well, check that the unit has > mana burned as current mana, and if not add whatever's left. Surely?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top