Unlearning Upgrades

Dmshu

New Member
Reaction score
9
So I have this spell based on immolation and if their life is above 50% they are stronger and in under 50% they get regeneration bonuses.

Code:
Mana Empowered Group
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Mana Empowerment 
    Actions
        Game - Display to (All players) the text: added to group
        Unit Group - Add (Triggering unit) to ManaEmpowered
Code:
Mana Empowerment
    Events
        Time - Every 1.00 seconds of game time
    Conditions
        (Number of units in ManaEmpowered) Greater than 0
    Actions
        Unit Group - Pick every unit in ManaEmpowered and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) has buff Mana Empowerment ) Equal to False
                    Then - Actions
                        Game - Display to (All players) the text: not in group
                        Player - Set the current research level of Mana Empowerment Offensive  to 0 for (Owner of (Picked unit))
                        Player - Set the current research level of Mana Empowerment Defense  to 0 for (Owner of (Picked unit))
                        Unit Group - Remove (Picked unit) from ManaEmpowered
                    Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Percentage life of (Picked unit)) Greater than or equal to 50.00
                            Then - Actions
                                Game - Display to (All players) the text: offensive buff
                                Player - Set the current research level of Mana Empowerment Offensive  to (Level of Mana Empowerment  for (Picked unit)) for (Owner of (Picked unit))
                                Player - Set the current research level of Mana Empowerment Defense  to 0 for (Owner of (Picked unit))
                            Else - Actions
                                Game - Display to (All players) the text: defensive buff
                                Player - Set the current research level of Mana Empowerment Defense  to (Level of Mana Empowerment  for (Picked unit)) for (Owner of (Picked unit))
                                Player - Set the current research level of Mana Empowerment Offensive  to 0 for (Owner of (Picked unit))

So it works well and good for giving them the bonuses, but the problem is that setting the upgrade level to 0 via triggers doesn't unlearn the upgrade.

Anyone know how to unlearn/nulify an upgrade or have another idea of how to do this spell without using dummy units to cast buffs every second?
 
You can't unlearn upgrades. Can't you use passive abilities to get the offensive and defensive boosts you want? Or you could make another upgrade that cancels out the effects of the first one, and increase the level of that one.
 
Well I was trying to stick to upgrades as I think it would impact performace less then adding/setting level/removing the passive abilities every second.

So I tried to null the upgrades by applying upgrades that decrease base attack speed by the same % and regen by the same 0% but then the unit is stuck at it's normal regen and attack speed...

So unless you had a different idea of nullifying upgrades I think I am stuck to adding/removing/setting level of a passive ability in their spellbook...
 
Well the only method to cancel out upgrades is to make a negative upgrade. If that doesn't work for you the the only option is abilities.
 
Sry for the question but...

So I tried to null the upgrades by applying upgrades that decrease base attack speed by the same % and regen by the same 0% but then the unit is stuck at it's normal regen and attack speed...

Isn't that exactly what you want or am I not getting something here?


Cheers
 
Sry for the question but...



Isn't that exactly what you want or am I not getting something here?


Cheers

It is and it isn't. It was canceling out the previous upgrade but then when I reactivate the ability they get no bonus because it have already been upgraded and I would have to make another different upgrade to give the bonus again but then I'd have to make another to null that and it wouldn't end. So I think unless I'm going at it the wrong way I am going to go with 3 more abilities: a spell book, an offensive passive, and a defensive passive and have a trigger add, level, and remove them accordingly.
 
Hm, ok I get your point. Well I'd also stick with abilities rather than upgrades. More flexible.

Sry that we couldn't help...


Cheers
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    It is weird seeing a way more realistic users online number
  • The Helper The Helper:
    Happy Tuesday Night!
    +1
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:

      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