The general idea what I am trying to acheive is to have 8 shop slots and each slot rolls invidually. I have set up charge gold and lumber abilities in OE with unit icons.
Now I wouldn't like to have infinite number of If/Then/Else calls since there will be many units available.
In addition, would it be better for the rarities to have
1. Multiple copies of the different rarity abilities in the roll system or
2. First roll the shop slot via trigger for common, uncommon, rare, epic, legendary and then roll the units from the rarity.
At least this system works, but it will be too bloated if I run it with this. So how could I simplify this?
Now I wouldn't like to have infinite number of If/Then/Else calls since there will be many units available.
In addition, would it be better for the rarities to have
1. Multiple copies of the different rarity abilities in the roll system or
2. First roll the shop slot via trigger for common, uncommon, rare, epic, legendary and then roll the units from the rarity.
At least this system works, but it will be too bloated if I run it with this. So how could I simplify this?
-
Melee Initialization
-
Events
-
Map initialization
-
-
Conditions
-
Actions
-
-------- SETTING UP SLOT 1 UNITS --------
-
Set VariableSet Slot1Units[1] = Footman (Slot 1)
-
Set VariableSet Slot1Units[2] = Rifleman (Slot 1)
-
-------- SETTING UP SLOT 2 UNITS --------
-
Set VariableSet Slot2Units[1] = Footman (Slot 2)
-
Set VariableSet Slot2Units[2] = Rifleman (Slot 2)
-
-------- SETTING UP SLOT 3 UNITS --------
-
Set VariableSet Slot3Units[1] = Footman (Slot 3)
-
Set VariableSet Slot3Units[2] = Rifleman (Slot 3)
-
-------- SETTING UP SLOT 4 UNITS --------
-
Set VariableSet Slot4Units[1] = Footman (Slot 4)
-
Set VariableSet Slot4Units[2] = Rifleman (Slot 4)
-
-------- SETTING UP SLOT 5 UNITS --------
-
Set VariableSet Slot5Units[1] = Footman (Slot 5)
-
Set VariableSet Slot5Units[2] = Rifleman (Slot 5)
-
-------- SETTING UP SLOT 6 UNITS --------
-
Set VariableSet Slot6Units[1] = Footman (Slot 6)
-
Set VariableSet Slot6Units[2] = Rifleman (Slot 6)
-
-------- SETTING UP SLOT 7 UNITS --------
-
Set VariableSet Slot7Units[1] = Footman (Slot 7)
-
Set VariableSet Slot7Units[2] = Rifleman (Slot 7)
-
-------- SETTING UP SLOT 8 UNITS --------
-
Set VariableSet Slot8Units[1] = Footman (Slot 8)
-
Set VariableSet Slot8Units[2] = Rifleman (Slot 8)
-
Set VariableSet MaxShopUnits = 2
-
-
-
Shop Reroll
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Reroll
-
-
Actions
-
Unit - Create 1 Shop for Player 1 (Red) at (Position of Town Hall 0000 <gen>) facing Default building facing degrees
-
Set VariableSet Shop = (Last created unit)
-
Set VariableSet ShopRoll[1] = (Random integer number between 1 and MaxShopUnits)
-
Set VariableSet ShopRoll[2] = (Random integer number between 1 and MaxShopUnits)
-
Set VariableSet ShopRoll[3] = (Random integer number between 1 and MaxShopUnits)
-
Set VariableSet ShopRoll[4] = (Random integer number between 1 and MaxShopUnits)
-
Set VariableSet ShopRoll[5] = (Random integer number between 1 and MaxShopUnits)
-
Set VariableSet ShopRoll[6] = (Random integer number between 1 and MaxShopUnits)
-
Set VariableSet ShopRoll[7] = (Random integer number between 1 and MaxShopUnits)
-
Set VariableSet ShopRoll[8] = (Random integer number between 1 and MaxShopUnits)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
ShopRoll[1] Equal to 1
-
-
Then - Actions
-
Unit - Add Footman (Slot 1) to Shop
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
ShopRoll[1] Equal to 2
-
-
Then - Actions
-
Unit - Add Rifleman (Slot 1) to Shop
-
-
Else - Actions
-
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
ShopRoll[2] Equal to 1
-
-
Then - Actions
-
Unit - Add Footman (Slot 2) to Shop
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
ShopRoll[2] Equal to 2
-
-
Then - Actions
-
Unit - Add Rifleman (Slot 2) to Shop
-
-
Else - Actions
-
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
ShopRoll[3] Equal to 1
-
-
Then - Actions
-
Unit - Add Footman (Slot 3) to Shop
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
ShopRoll[3] Equal to 2
-
-
Then - Actions
-
Unit - Add Rifleman (Slot 3) to Shop
-
-
Else - Actions
-
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
ShopRoll[4] Equal to 1
-
-
Then - Actions
-
Unit - Add Footman (Slot 4) to Shop
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
ShopRoll[4] Equal to 2
-
-
Then - Actions
-
Unit - Add Rifleman (Slot 4) to Shop
-
-
Else - Actions
-
-
-
-
-------- ETC UNTIL WE REACH SHOPROLL 8 --------
-
Selection - Select Shop for (Owner of (Triggering unit))
-
Unit - Add a 10.00 second Generic expiration timer to Shop
-
-