potion of mana bugs

aredee

New Member
Reaction score
2
here, i make potion of mana item in my map using the default potion of mana and i make healing potion and greater healing potion using default potion of healing and potion of greater healing, I only change the ammount of hit point/mana (for potion of mana) regain

when i test the map i use some trigger that make potion of mana and healing potion are able to stack in one inventory slot up to 5 charge (1 charge every purchase), and greater healing potion and potion of greater mana are able to stack up to 3 charges

and this is the problem, if i purchase the greater healing potion (no matter how much i buy it) and some (no matter how much is it, again) potion of mana or potion of greater mana, and then i use the potion of mana while the hero's hit point is not full and it's mana doesn't full too, it will increase hero's hit point greatly, greater than the ammount of hp that healed by greater healing potion, and i never set the ammount of hp healed this way

still, this problem doesn't occures if i only buy the mana potion and not buying any healing potion

anyone know why it is happen? and how to solve it?
 

denmax

You can change this now in User CP.
Reaction score
155
May I see your charge system? Possibly the problem is in there.
 

aredee

New Member
Reaction score
2
okay, here it is, even i'm not so sure the problem is here

Code:
event
Unit - A unit Sells an item (from shop)
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
        (Item-type of (Sold Item)) Equal to Potion of Greater Healing
        (Charges remaining in (Item carried by (Buying unit) of type Potion of  Greater Healing)) Not equal to 3
        (Charges remaining in (Item carried by (Buying unit) of type Potion of Greater Healing)) Greater than 0
    Then - Actions
        Item - Remove (Sold Item)
        Item - Set charges remaining in (Item carried by (Buying unit) of type Potion of Greater Healing) to ((Charges remaining in (Item carried by (Buying unit) of type Potion of Greater Healing)) + 1)
    Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
        (Item-type of (Sold Item)) Equal to Potion of Greater Mana
        (Charges remaining in (Item carried by (Buying unit) of type Potion of Greater Mana)) Not equal to 3
        (Charges remaining in (Item carried by (Buying unit) of type Potion of Greater Mana)) Greater than 0
    Then - Actions
        Item - Remove (Sold Item)
        Item - Set charges remaining in (Item carried by (Buying unit) of type Potion of Greater Mana) to ((Charges remaining in (Item carried by (Buying unit) of type Potion of Greater Mana)) + 1)
    Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
        (Item-type of (Sold Item)) Equal to Potion of Healing
        (Charges remaining in (Item carried by (Buying unit) of type Potion of Healing)) Not equal to 5
        (Charges remaining in (Item carried by (Buying unit) of type Potion of Healing)) Greater than 0
    Then - Actions
        Item - Remove (Sold Item)
        Item - Set charges remaining in (Item carried by (Buying unit) of type Potion of Healing) to ((Charges remaining in (Item carried by (Buying unit) of type Potion of Healing)) + 1)
    Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
        (Item-type of (Sold Item)) Equal to Potion of Mana
        (Charges remaining in (Item carried by (Buying unit) of type Potion of Mana)) Not equal to 5
        (Charges remaining in (Item carried by (Buying unit) of type Potion of Mana)) Greater than 0
    Then - Actions
        Item - Remove (Sold Item)
        Item - Set charges remaining in (Item carried by (Buying unit) of type Potion of Mana) to ((Charges remaining in (Item carried by (Buying unit) of type Potion of Mana)) + 1)
    Else - Actions

that's it
 
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