hi,
is it possible to change the stats or add an ability of an item with a Trigger?
I want, that a Hero is able to buy a base item with like +1 int and +2 str and if he buys a dummy foliant the stats of this item should be changing to +2 int and +4 str.
I was trying to do it with this, but it wont work
In this trigger the str is not added, the int is not changing and the text is also not changing.
I have tryed it with dropping the item and just changing the stats of the item in the inventory of the Hero.
I now i could just create a simular item to the base item and if he buyes the dummy foliant take the old item and add a new one. But that would too much work to do...creating hundrets of items and more abilities.
is it possible to change the stats or add an ability of an item with a Trigger?
I want, that a Hero is able to buy a base item with like +1 int and +2 str and if he buys a dummy foliant the stats of this item should be changing to +2 int and +4 str.
I was trying to do it with this, but it wont work
-
Test
-
Events
- 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
-
And - All (Conditions) are true
-
Conditions
- (Item-type of (Sold Item)) Equal to Cape of Mistweaver +1
- (Item-type of (Item carried by (Buying unit) of type Cape of Mistweaver (Level 1))) Equal to Cape of Mistweaver (Level 1)
-
Conditions
-
And - All (Conditions) are true
-
Then - Actions
- Hero - Drop (Item carried by (Buying unit) of type Cape of Mistweaver (Level 1)) from (Buying unit).
- Item - For Item: (Last dropped item), Add Ability: Ge: Str (+1)
- Item - Set Name of (Last dropped item) to Cape of Mistweaver (Level 2)
- Item - Set Tooltip of (Last dropped item) to ...new tooltip...
- Set VariableSet Int_Test = (Int_Test + 1)
- Ability - Set Ability: (Item: (Last dropped item)'s Ability with Ability Code: Ge: int (+3))'s Integer Level Field: Intelligence Bonus ('Iint') of Level: 0 to Int_Test
- Hero - Give (Last dropped item) to (Buying unit)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
In this trigger the str is not added, the int is not changing and the text is also not changing.
I have tryed it with dropping the item and just changing the stats of the item in the inventory of the Hero.
I now i could just create a simular item to the base item and if he buyes the dummy foliant take the old item and add a new one. But that would too much work to do...creating hundrets of items and more abilities.