Percent damage using DDS to mana help

Accname

2D-Graphics enthusiast
Reaction score
1,463
Well, check that the unit has > mana burned as current mana, and if not add whatever's left. Surely?

If the mana burn burns 100 points of mana, the unit currently has 51 and is hit, mana burn will burn 51 points of mana.
How are you gonna detect now when the mana is 0 and was already burnt how much mana the unit had previously? Did it have 51? Or maybe only 7? Maybe even 100. You cant know.
 

Smitty

Member
Reaction score
20
Unit is attacked, attacking unit has buff X, set Integer=mana of attacked unit

Seperate trigger, detect damage, check for buff, add 15% of int to damaging unit. This is straight off the top of my head, would need refining.
 

Accname

2D-Graphics enthusiast
Reaction score
1,463
Would still not work in all cases, between the "is attacked" and the "takes damage" event is a (more or less) slight delay the duration of the attacking units damage point and, if the attacker is a ranged unit, the distance and travel speed of its missle.
You also have to consider if there was a splash attack with mana drain (although i am not quite sure whether feedback works in combination with splash damage).
There might also be a mana shield on the defending unit.
 

Smitty

Member
Reaction score
20
Like I say, it needs work, but it's an option. Sure it's flawed in about a million ways, but it's an option :)
 

Inflicted

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

I believe that he wants a % of the damage dealt to affect mana. Mana Burn has no relation with the damage dealt.
Rather just trigger it using the DDS.
 

Accname

2D-Graphics enthusiast
Reaction score
1,463
I believe that he wants a % of the damage dealt to affect mana. Mana Burn has no relation with the damage dealt.
Rather just trigger it using the DDS.

That was the best solution to the original problem so far.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
If only the OP could clarify whether this was the desired effect. It seems impossibly ambiguous as of now.
 

Inflicted

Currently inactive
Reaction score
63
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.

Okay I think I understand better now what he wants.
It's not a % of the damage dealt, but a % of the mana removed.
Eh, like mentioned above it would be easier to almost "cheat" this with set amounts. (eg it drains 20/40/60 and you want 50%, just restore 10/20/30 mana on every attack)
But if you really want to do like a "proper" detection of the amount of mana reduced, it might be slightly more difficult. As observed many times above.
 

denmax

You can change this now in User CP.
Reaction score
155
Here's a solution. Don't use Feedback and we'll try to create a trigger that would imitate it

Example, a unit receives damage w/ condition that damage source has passive skill (in essence does nothing). Set current mana of target into a variable. Make it so that it removes mana MANUALLY and deals magical damage (if you want, you can create a Dummy unit to cast Mana Burn - but that will make the in-game text appear every time). Use variable to add mana to damage source.

I haven't entered WCEdit in 3 years. Can't remember how it is typed, but I'm hoping you got the idea
 

Inflicted

Currently inactive
Reaction score
63
Here's a solution. Don't use Feedback and we'll try to create a trigger that would imitate it

Example, a unit receives damage w/ condition that damage source has passive skill (in essence does nothing). Set current mana of target into a variable. Make it so that it removes mana MANUALLY and deals magical damage (if you want, you can create a Dummy unit to cast Mana Burn - but that will make the in-game text appear every time). Use variable to add mana to damage source.

I haven't entered WCEdit in 3 years. Can't remember how it is typed, but I'm hoping you got the idea

Actually, that's a really good idea.
You'd want it to look something like this:

Eg:
Drains 50/100/150 mana per attack.
Restores 30% of mana drained back to the attacker.

Trigger:
  • Untitled Trigger 001
    • Events
      • Game - GDD_Event becomes Equal to 0.00
    • Conditions
    • Actions
      • Set Temp_Real = (Mana of GDD_DamagedUnit)
      • Set Temp_Number = ((Level of Mana Burn for GDD_DamageSource) x 50)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Temp_Real Greater than or equal to (Real(Temp_Number))
        • Then - Actions
          • Unit - Set mana of GDD_DamagedUnit to (Temp_Real - (Real(Temp_Number)))
          • Unit - Set mana of GDD_DamageSource to ((Mana of GDD_DamageSource) + ((Real(Temp_Number)) x 0.30))
        • Else - Actions
          • Unit - Set mana of GDD_DamagedUnit to 0.00
          • Unit - Set mana of GDD_DamageSource to ((Mana of GDD_DamageSource) + (Temp_Real x 0.30))


Temp_Number - Global Integer
Temp_Real - Global Real

Using a dummy icon inplace of the actual Mana Burn ability.
 

Smitty

Member
Reaction score
20
That means spells will burn mana too. Use the attack detector in the snippets section maybe.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top