Charge Gold/Lumber + Requirement bug?

Chocobo

White-Flower
Reaction score
409
I have a problem on giving/removing a requirement to Charge Gold and Lumber.

I have 1 upgrade called "Counter +1" that costs 3g and has the requirement to have the dummy unit "Upgrade - Counter Maxed" alive (the dummy unit is created at map init).

Code:
For each (Integer A) from 1 to 10, do (Actions)
    Loop - Actions
.................
                Unit - Create 1 Upgrade - Counter Maxed for Player[(Integer A)] at TempPoints[0] facing Default building facing (270.0) degrees
                Set UpgradeCounter[(Integer A)] = (Last created unit)

Player is an player array variable with values Player 1~12 on indexes 1~12.


The Charge Gold and Lumber is used by a unit called "Upgrade".

Code:
Upgrade Counter
    Events
[events are added through another trigger]
    Conditions
        (Ability being cast) Equal to Upgrade - Counter +1 [All]
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Hero[(Player number of (Owner of (Triggering unit)))] is alive) Equal to True
            Then - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Level of Upgrade - Counter Bonus  for Hero[(Player number of (Owner of (Triggering unit)))]) Equal to 0
                    Then - Actions
                        Unit - Add Upgrade - Counter Bonus  to Hero[(Player number of (Owner of (Triggering unit)))]
                    Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Level of Upgrade - Counter Bonus  for Hero[(Player number of (Owner of (Triggering unit)))]) Equal to 99
                            Then - Actions
                                Unit - Remove UpgradeCounter[(Player number of (Owner of (Triggering unit)))] from the game
                            Else - Actions
                Unit - Increase level of Upgrade - Counter Bonus  for Hero[(Player number of (Owner of (Triggering unit)))]
            Else - Actions

The spell is supposed to be only usable 100 times (having Counter Bonus at Lv100), then it removes the dummy unit however the ability Charge Gold and Lumber stills usable.

How to remove the requirement for Charge Gold and Lumber so it is not castable anymore after a certain point using a dummy unit requirement?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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