Manual of Mana?

C0mput3r

New Member
Reaction score
20
I've got a way to make a unit's max HP based on this formula.

{[(Strength of unit + Level of unit) / 10] + base life}

the trigger is like this:

Code:
HP Bonus LevelUP
    Events
        Unit - A unit Gains a level
    Conditions
        LevelUPskip[(Player number of (Triggering player))] Equal to False
    Actions
        Unit - Set life of (Triggering unit) to 100.00%
        Unit - Set mana of (Triggering unit) to 100.00%
        Set LevelUPIntConversion[(Player number of (Owner of (Triggering unit)))] = (Real((((Hero level of (Triggering unit)) + (Strength of Player_Heros[(Player number of (Owner of (Triggering unit)))] (Include bonuses))) / 10)))
        Set LevelUPInt[(Player number of (Owner of (Triggering unit)))] = (Integer(LevelUPIntConversion[(Player number of (Owner of (Triggering unit)))]))
        Hero - Drop the item from slot 1 of Player_Heros[(Player number of (Owner of (Triggering unit)))]
        Set TempItem[(Player number of (Owner of (Triggering unit)))] = (Last dropped item)
        For each (Integer A) from 1 to LevelUPInt[(Player number of (Owner of (Triggering unit)))], do (Actions)
            Loop - Actions
                Hero - Create HP Bonus and give it to (Triggering unit)
                Hero - Order Player_Heros[(Player number of (Owner of (Triggering unit)))] to use (Last created item)
        Hero - Give TempItem[(Player number of (Owner of (Triggering unit)))] to (Triggering unit)
        Set TempItem[(Player number of (Owner of (Triggering unit)))] = No item
        Set LevelUPInt[(Player number of (Owner of (Triggering unit)))] = 0
        Set LevelUPIntConversion[(Player number of (Owner of (Triggering unit)))] = 0.00


Now to get to the point. (I bet you're gonna kill me for giving other info 1st but I assure you it'll help you understand what i'm trying to do:p)

I used a Manual of Life that adds 1 life and a Loop-Actions to add it mutiple times. There's no ability for it and it doesn't take up inv space.

Now for the question. (I know, so long... i mean finally!!!)
Is there a Permenant Max Mana Increase?

Thanks in advance for helping, but most importantly for reading the whole thing, it IS very long...
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
889
Not really....
There is a passive ability that increases maximum mana, but it doesn't work exactly the same way.
 

FhelZone

Have a drink of a nice cold mellowberry juice!
Reaction score
103
use a skill + mana any would do as long as it is a permanent mana bonus and for the item set it up like a power up. I'm not really sure of this but I do adding stats in triggers.
 

Pyrogasm

There are some who would use any excuse to ban me.
Reaction score
134
If wc3campaigns.net was up I could link you to the resource, but I would suggest this simple script by Blade.dk
JASS:
//**************************************************************************
//                        SetUnitMaxState System                           *
//**************************************************************************
constant function MaxStateModifierId takes unitstate u returns integer
    if u == UNIT_STATE_MAX_LIFE then
        return 'A000' // Rawcode of the Max Life Modifier ability.
    elseif u == UNIT_STATE_MAX_MANA then
        return 'A001' // Rawcode of the Max Mana Modifier ability.
    endif
    return 0
endfunction

function SetUnitMaxState takes unit whichUnit, unitstate whichUnitState, integer newVal returns boolean
    local integer c = newVal-R2I(GetUnitState(whichUnit, whichUnitState))
    local integer i = MaxStateModifierId(whichUnitState)
    if i == 0 then
        return false
    endif
    if c > 0 then
        loop
            exitwhen c == 0
            call UnitAddAbility(whichUnit, i)
            if c >= 100 then
                set c = c - 100
                call SetUnitAbilityLevel(whichUnit, i, 4)
            elseif c >= 10 then
                set c = c - 10
                call SetUnitAbilityLevel(whichUnit, i, 3)
            else
                set c = c - 1
                call SetUnitAbilityLevel(whichUnit, i, 2)
            endif
            call UnitRemoveAbility(whichUnit, i)
        endloop
    elseif c < 0 then
        set c = -c
        loop
            exitwhen c == 0
            call UnitAddAbility(whichUnit, i)
            if c >= 100 then
                set c = c - 100
                call SetUnitAbilityLevel(whichUnit, i, 7)
            elseif c >= 10 then
                set c = c - 10
                call SetUnitAbilityLevel(whichUnit, i, 6)
            else
                set c = c - 1
                call SetUnitAbilityLevel(whichUnit, i, 5)
            endif
            call UnitRemoveAbility(whichUnit, i)
        endloop
    endif
    return true
endfunction
//**************************************************************************
//                            End of System                                *
//**************************************************************************


To set this up, you'll need to create two abilities with 7 levels each. The first should be based off of the "Life Bonus (Item)" ability and should give bonuses of this amount for each level respectively: 0, -1, -10, -100, 1, 10, 100. (Yes, the first value is 0)

The second ability should be set up exactly the same way except it should be based off of the passive item mana bonus ability instead.

After you've done that, set up the configuration function with the spells' rawcodes and then use it like so:
Code:
    Set LevelUPIntConversion[(Player number of (Owner of (Triggering unit)))] = ((Max Life of (Triggering Unit)) + (Real((((Hero level of (Triggering unit)) + (Strength of Player_Heros[(Player number of (Owner of (Triggering unit)))] (Include bonuses))) / 10)))
    Set LevelUPInt[(Player number of (Owner of (Triggering unit)))] = (Integer(LevelUPIntConversion[(Player number of (Owner of (Triggering unit)))]))
    Custom script: call SetUnitMaxState(GetTriggerUnit(), udg_LevelUPInt[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))]
And the same for mana, etc.
 
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

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top