Abilities in command card from item

keychup

Active Member
Reaction score
34
Effect: A hero can obtain abilities by buying these tomes called "Books of Arts". When it picks up the tome it is put into their inventory in off mode. When it is turned on the ability will be available for use in the command card. You can upgrade the ability up to the 5 levels by talking to the "Book Keeper". The tome in question here is the "Book of Fire Arts I" which allows you to use the spell "Fireball", a basic spell that has a similar effect to "Firebolt" except it also has a 15% chance to burn the target.

Problem: I have decided to add an item called "Master's Medallion", which is based off "Engineering Upgrade" and turns the "Fireball" into a more powerful version called "Master Fireball". The problem here is when I turn the ability off, then on again while holding the "Master's Medallion", the "Master's Fireball" ability is not being set to the current research level of "Fireball Upgrade".

Components:
Abilities: Fireball, Fireball (Upgrade)
Items: Book of Fire Arts I (Off), Book of Fire Arts I (On), Master's Medallion
Upgrades: Fireball Upgrade

Trigger:
  • activate
    • Events
      • Unit - A unit Uses an item
    • Conditions
    • Actions
      • -------- fireball --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to Book of Fire (Off)
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Item carried by (Buying unit) of type Master's Medallion) is owned) Equal to True
            • Then - Actions
              • Unit - Add Fireball (Upgrade) to (Hero manipulating item)
              • Unit - Set level of Fireball (Upgrade) for (Hero manipulating item) to (Current research level of Fireball Upgrade for (Owner of (Hero manipulating item)))
            • Else - Actions
              • Unit - Add Fireball to (Hero manipulating item)
              • Unit - Set level of Fireball for (Hero manipulating item) to (Current research level of Fireball Upgrade for (Owner of (Hero manipulating item)))
          • Hero - Drop (Item carried by (Hero manipulating item) of type Book of Fire Arts I (Off)) from (Hero manipulating item)
          • Item - Remove (Last dropped item)
          • Hero - Create Book of Fire Arts I (On) and give it to (Hero manipulating item)
        • Else - Actions
 

educator

New Member
Reaction score
9
umm, im not 100% on how engineering upgrade works but i would recomend using triggers to do the effect instead, eg. unit aquires item, if has ability then remove it and add new ability, and if unit uses book thing item and has amulet in inventory then add new ability, and if unit loses amulet and unit has ability then remove it and add weaker one
 
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