So the title doesnt gives the complete picture so ill give a short intro of the cinda trigger i wanna make.
So a player has this 1 ability what he can use to get 1 RANDOM ability of a total of 10.
I created this ability variable with an array of 10:
1 = Avatar
2 = blizzard
and so on, all these variables are linked to a random number so 1 = avatar is linked to random number 1, 2 = blizzard is linked to blizzard and so on.
The trigger is as follow:
Untitled Trigger 001
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Random Ability
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Random integer number between 1 and 10) Equal to 1
Then - Actions
Unit - Add Avatar to Paladin 0003 <gen>
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Random integer number between 1 and 10) Equal to 2
Then - Actions
Unit - Add Blizzard to Paladin 0003 <gen>
Else - Actions
And so on
The problem is that when the unit gets a random ability lets say: avatar, he shouldnt be able to get the ability again. Tho whenever the player uses the random ability he must get atleast 1 new ability of the 10. So the only way for the player to get no ability is when he already have gotten the 10 abilities.
This means i need some kind of action or condition in my trigger that deletes the ability variable if he already has had that ability, and he still must get 1 of the other abilities. In this situation the player will not get the ability if he already has it but the trigger will simply do nothing so it also wont random again and give him a other ability.
I thought of something like reducing the random number if the unit already has gotten a ability. So the unit already has avatar then the random count is reduced to 1- 9 instead of 1 - 10, the problem with this however is that every ability is linked to a specific random number.
So my final question: anyone has an idea how to create a system like this or how to make it work?
Thank you in advance
So a player has this 1 ability what he can use to get 1 RANDOM ability of a total of 10.
I created this ability variable with an array of 10:
1 = Avatar
2 = blizzard
and so on, all these variables are linked to a random number so 1 = avatar is linked to random number 1, 2 = blizzard is linked to blizzard and so on.
The trigger is as follow:
Untitled Trigger 001
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Random Ability
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Random integer number between 1 and 10) Equal to 1
Then - Actions
Unit - Add Avatar to Paladin 0003 <gen>
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Random integer number between 1 and 10) Equal to 2
Then - Actions
Unit - Add Blizzard to Paladin 0003 <gen>
Else - Actions
And so on
The problem is that when the unit gets a random ability lets say: avatar, he shouldnt be able to get the ability again. Tho whenever the player uses the random ability he must get atleast 1 new ability of the 10. So the only way for the player to get no ability is when he already have gotten the 10 abilities.
This means i need some kind of action or condition in my trigger that deletes the ability variable if he already has had that ability, and he still must get 1 of the other abilities. In this situation the player will not get the ability if he already has it but the trigger will simply do nothing so it also wont random again and give him a other ability.
I thought of something like reducing the random number if the unit already has gotten a ability. So the unit already has avatar then the random count is reduced to 1- 9 instead of 1 - 10, the problem with this however is that every ability is linked to a specific random number.
So my final question: anyone has an idea how to create a system like this or how to make it work?
Thank you in advance