- Joined
- Jun 20, 2017
- Messages
- 380
Hey,
I'm trying to increase this trigger five times, but the problem is that it does not calculate correctly! sometimes it works! but mostly not!
I'm trying to increase this trigger five times, but the problem is that it does not calculate correctly! sometimes it works! but mostly not!
-
King Upgrades
-
Events
-
Unit - A unit Sells a unit
-
-
Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
(Unit-type of (Sold unit)) Equal to Upgrade King Attack
-
(Unit-type of (Sold unit)) Equal to Upgrade King Hit Points
-
(Unit-type of (Sold unit)) Equal to Upgrade King Regeneration
-
-
-
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Owner of (Selling unit)) is an ally of Player 23 (Emerald).) Equal to True
-
-
Then - Actions
-
Set VariableSet Player_King = Player 23 (Emerald)
-
Set VariableSet Unit_King = West King 0448 <gen>
-
-
Else - Actions
-
Set VariableSet Player_King = Player 24 (Peanut)
-
Set VariableSet Unit_King = East King 0447 <gen>
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Unit-type of (Sold unit)) Equal to Upgrade King Attack
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Current research level of King Attack Damage for Player_King) Less than (Max research level of King Attack Damage for Player_King)
-
-
Then - Actions
-
Player Group - Pick every player in (All allies of Player_King.) and do (Actions)
-
Loop - Actions
-
Player - Set the current research level of King Attack Damage to ((Current research level of King Attack Damage for (Picked player)) + 1) for (Picked player)
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Level of [Upgrade] King Attack Damage for Unit_King) Equal to 0
-
-
Then - Actions
-
Unit - Add [Upgrade] King Attack Damage to Unit_King
-
-
Else - Actions
-
Unit - Set level of [Upgrade] King Attack Damage for Unit_King to ((Level of [Upgrade] King Attack Damage for Unit_King) + 1)
-
-
-
Game - Display to (All allies of Player_King.) for 10.00 seconds the text: (((Strings_PlayersColor[(Player number of (Owner of (Selling unit)))] + (Name of (Owner of (Selling unit)))) + |r upgraded your team King's attack to level |cffffcc00) + ((String((Current research level of King Attack Damage for Player_King))) + |r))
-
Set VariableSet Integers_KingUpgradesBought[(Player number of (Owner of (Selling unit)))] = (Integers_KingUpgradesBought[(Player number of (Owner of (Selling unit)))] + 1)
-
-------- --------
-
-------- Income --------
-
Set VariableSet Integers_Income[(Player number of (Owner of (Selling unit)))] = (Integers_Income[(Player number of (Owner of (Selling unit)))] + 3)
-
-
Else - Actions
-
Player - Make Upgrade King Attack Unavailable for training/construction by (Owner of (Selling unit))
-
Player - Add 80 to (Owner of (Selling unit)).Current lumber
-
Player - Add -80 to (Owner of (Selling unit)).Total lumber gathered
-
Game - Display to (Player group((Owner of (Selling unit)))) for 10.00 seconds the text: This upgrade is alr...
-
-
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Unit-type of (Sold unit)) Equal to Upgrade King Hit Points
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Current research level of King Hit Point for Player_King) Less than (Max research level of King Hit Point for Player_King)
-
-
Then - Actions
-
Player Group - Pick every player in (All allies of Player_King.) and do (Actions)
-
Loop - Actions
-
Player - Set the current research level of King Hit Point to ((Current research level of King Hit Point for (Picked player)) + 1) for (Picked player)
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Level of King Hit Points [Upgrade] for Unit_King) Equal to 0
-
-
Then - Actions
-
Unit - Add [Upgrade] King Hit Points to Unit_King
-
Unit - Set level of [Upgrade] King Hit Points for Unit_King to ((Current research level of King Hit Point for (Owner of Unit_King)) + 1)
-
Unit - Remove [Upgrade] King Hit Points from Unit_King
-
-
Else - Actions
-
-
Game - Display to (All allies of Player_King.) for 10.00 seconds the text: (((Strings_PlayersColor[(Player number of (Owner of (Selling unit)))] + (Name of (Owner of (Selling unit)))) + |r upgraded your team King's hit points to level |cffffcc00) + ((String((Current research level of King Hit Point for Player_King))) + |r))
-
Set VariableSet Integers_KingUpgradesBought[(Player number of (Owner of (Selling unit)))] = (Integers_KingUpgradesBought[(Player number of (Owner of (Selling unit)))] + 1)
-
-------- --------
-
-------- Income --------
-
Set VariableSet Integers_Income[(Player number of (Owner of (Selling unit)))] = (Integers_Income[(Player number of (Owner of (Selling unit)))] + 3)
-
-
Else - Actions
-
Player - Make Upgrade King Hit Points Unavailable for training/construction by (Owner of (Selling unit))
-
Player - Add 80 to (Owner of (Selling unit)).Current lumber
-
Player - Add -80 to (Owner of (Selling unit)).Total lumber gathered
-
Game - Display to (Player group((Owner of (Selling unit)))) for 10.00 seconds the text: This upgrade is alr...
-
-
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Unit-type of (Sold unit)) Equal to Upgrade King Regeneration
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Current research level of King Regeneration for Player_King) Less than (Max research level of King Regeneration for Player_King)
-
-
Then - Actions
-
Player Group - Pick every player in (All allies of Player_King.) and do (Actions)
-
Loop - Actions
-
Player - Set the current research level of King Regeneration to ((Current research level of King Regeneration for (Picked player)) + 1) for (Picked player)
-
-
-
Game - Display to (All allies of Player_King.) for 10.00 seconds the text: (((Strings_PlayersColor[(Player number of (Owner of (Selling unit)))] + (Name of (Owner of (Selling unit)))) + |r upgraded your team King's regeneration to level |cffffcc00) + ((String((Current research level of King Regeneration for Player_King))) + |r))
-
Set VariableSet Integers_KingUpgradesBought[(Player number of (Owner of (Selling unit)))] = (Integers_KingUpgradesBought[(Player number of (Owner of (Selling unit)))] + 1)
-
-------- --------
-
-------- Income --------
-
Set VariableSet Integers_Income[(Player number of (Owner of (Selling unit)))] = (Integers_Income[(Player number of (Owner of (Selling unit)))] + 3)
-
-
Else - Actions
-
Player - Make Upgrade King Regeneration Unavailable for training/construction by (Owner of (Selling unit))
-
Player - Add 80 to (Owner of (Selling unit)).Current lumber
-
Player - Add -80 to (Owner of (Selling unit)).Total lumber gathered
-
Game - Display to (Player group((Owner of (Selling unit)))) for 10.00 seconds the text: This upgrade is alr...
-
-
-
-
Else - Actions
-
-
-------- --------
-
For each (Integer A) from 1 to 12, do (Actions)
-
Loop - Actions
-
Floating Text - Change text of FloatingTexts_KingUpgrades[(Integer A)] to ((|cffff0000Damage:|r + ((String((Current research level of King Attack Damage for (Owner of (Selling unit))))) + |n)) + ((|cff8080ffHit Point:|r + ((String((Current research level of King Hit Point for (Owner of (Selling unit))))) + |n)) + (|cffffcc00Reg using font size 10.00
-
-
-
-------- --------
-
Trigger - Run Update Income <gen> (ignoring conditions)
-
Unit - Remove (Sold unit) from the game
-
-------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Player_King Equal to Player 23 (Emerald)
-
-
Then - Actions
-
Special Effect - Create a special effect attached to the origin of West King 0448 <gen> using Abilities\Spells\Items\AIlm\AIlmTarget.mdl
-
Special Effect - Destroy (Last created special effect)
-
-
Else - Actions
-
Special Effect - Create a special effect attached to the origin of East King 0447 <gen> using Abilities\Spells\Items\AIlm\AIlmTarget.mdl
-
Special Effect - Destroy (Last created special effect)
-
-
-
-
-
King Upgrades x5
-
Events
-
Unit - A unit Sells a unit
-
-
Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
(Unit-type of (Sold unit)) Equal to Upgrade King Attack x5
-
(Unit-type of (Sold unit)) Equal to Upgrade King Hit Points x5
-
(Unit-type of (Sold unit)) Equal to Upgrade King Regeneration x5
-
-
-
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Owner of (Selling unit)) is an ally of Player 23 (Emerald).) Equal to True
-
-
Then - Actions
-
Set VariableSet Player_King = Player 23 (Emerald)
-
Set VariableSet Unit_King = West King 0448 <gen>
-
-
Else - Actions
-
Set VariableSet Player_King = Player 24 (Peanut)
-
Set VariableSet Unit_King = East King 0447 <gen>
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Unit-type of (Sold unit)) Equal to Upgrade King Attack x5
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Current research level of King Attack Damage for Player_King) Less than (Max research level of King Attack Damage for Player_King)
-
-
Then - Actions
-
Player Group - Pick every player in (All allies of Player_King.) and do (Actions)
-
Loop - Actions
-
Player - Set the current research level of King Attack Damage to ((Current research level of King Attack Damage for (Picked player)) + 5) for (Picked player)
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Level of [Upgrade] King Attack Damage for Unit_King) Equal to 0
-
-
Then - Actions
-
Unit - Add [Upgrade] King Attack Damage to Unit_King
-
-
Else - Actions
-
Unit - Set level of [Upgrade] King Attack Damage for Unit_King to ((Level of [Upgrade] King Attack Damage for Unit_King) + 5)
-
-
-
Game - Display to (All allies of Player_King.) for 10.00 seconds the text: (((Strings_PlayersColor[(Player number of (Owner of (Selling unit)))] + (Name of (Owner of (Selling unit)))) + |r upgraded your team King's attack to level |cffffcc00) + ((String((Current research level of King Attack Damage for Player_King))) + |r))
-
Set VariableSet Integers_KingUpgradesBought[(Player number of (Owner of (Selling unit)))] = (Integers_KingUpgradesBought[(Player number of (Owner of (Selling unit)))] + 5)
-
-------- --------
-
-------- Income --------
-
Set VariableSet Integers_Income[(Player number of (Owner of (Selling unit)))] = (Integers_Income[(Player number of (Owner of (Selling unit)))] + 15)
-
-
Else - Actions
-
Player - Make Upgrade King Attack Unavailable for training/construction by (Owner of (Selling unit))
-
Player - Add 400 to (Owner of (Selling unit)).Current lumber
-
Player - Add -400 to (Owner of (Selling unit)).Total lumber gathered
-
Game - Display to (Player group((Owner of (Selling unit)))) for 10.00 seconds the text: This upgrade is alr...
-
-
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Unit-type of (Sold unit)) Equal to Upgrade King Hit Points x5
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Current research level of King Hit Point for Player_King) Less than (Max research level of King Hit Point for Player_King)
-
-
Then - Actions
-
Player Group - Pick every player in (All allies of Player_King.) and do (Actions)
-
Loop - Actions
-
Player - Set the current research level of King Hit Point to ((Current research level of King Hit Point for (Picked player)) + 5) for (Picked player)
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Level of King Hit Points [Upgrade] for Unit_King) Equal to 0
-
-
Then - Actions
-
Unit - Add [Upgrade] King Hit Points to Unit_King
-
Unit - Set level of [Upgrade] King Hit Points for Unit_King to ((Current research level of King Hit Point for (Owner of Unit_King)) + 5)
-
Unit - Remove [Upgrade] King Hit Points from Unit_King
-
-
Else - Actions
-
-
Game - Display to (All allies of Player_King.) for 10.00 seconds the text: (((Strings_PlayersColor[(Player number of (Owner of (Selling unit)))] + (Name of (Owner of (Selling unit)))) + |r upgraded your team King's hit points to level |cffffcc00) + ((String((Current research level of King Hit Point for Player_King))) + |r))
-
Set VariableSet Integers_KingUpgradesBought[(Player number of (Owner of (Selling unit)))] = (Integers_KingUpgradesBought[(Player number of (Owner of (Selling unit)))] + 5)
-
-------- --------
-
-------- Income --------
-
Set VariableSet Integers_Income[(Player number of (Owner of (Selling unit)))] = (Integers_Income[(Player number of (Owner of (Selling unit)))] + 15)
-
-
Else - Actions
-
Player - Make Upgrade King Hit Points Unavailable for training/construction by (Owner of (Selling unit))
-
Player - Add 400 to (Owner of (Selling unit)).Current lumber
-
Player - Add -400 to (Owner of (Selling unit)).Total lumber gathered
-
Game - Display to (Player group((Owner of (Selling unit)))) for 10.00 seconds the text: This upgrade is alr...
-
-
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Unit-type of (Sold unit)) Equal to Upgrade King Regeneration x5
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Current research level of King Regeneration for Player_King) Less than (Max research level of King Regeneration for Player_King)
-
-
Then - Actions
-
Player Group - Pick every player in (All allies of Player_King.) and do (Actions)
-
Loop - Actions
-
Player - Set the current research level of King Regeneration to ((Current research level of King Regeneration for (Picked player)) + 5) for (Picked player)
-
-
-
Game - Display to (All allies of Player_King.) for 10.00 seconds the text: (((Strings_PlayersColor[(Player number of (Owner of (Selling unit)))] + (Name of (Owner of (Selling unit)))) + |r upgraded your team King's regeneration to level |cffffcc00) + ((String((Current research level of King Regeneration for Player_King))) + |r))
-
Set VariableSet Integers_KingUpgradesBought[(Player number of (Owner of (Selling unit)))] = (Integers_KingUpgradesBought[(Player number of (Owner of (Selling unit)))] + 5)
-
-------- --------
-
-------- Income --------
-
Set VariableSet Integers_Income[(Player number of (Owner of (Selling unit)))] = (Integers_Income[(Player number of (Owner of (Selling unit)))] + 15)
-
-
Else - Actions
-
Player - Make Upgrade King Regeneration Unavailable for training/construction by (Owner of (Selling unit))
-
Player - Add 400 to (Owner of (Selling unit)).Current lumber
-
Player - Add -400 to (Owner of (Selling unit)).Total lumber gathered
-
Game - Display to (Player group((Owner of (Selling unit)))) for 10.00 seconds the text: This upgrade is alr...
-
-
-
-
Else - Actions
-
-
-------- --------
-
For each (Integer A) from 1 to 12, do (Actions)
-
Loop - Actions
-
Floating Text - Change text of FloatingTexts_KingUpgrades[(Integer A)] to ((|cffff0000Damage:|r + ((String((Current research level of King Attack Damage for (Owner of (Selling unit))))) + |n)) + ((|cff8080ffHit Point:|r + ((String((Current research level of King Hit Point for (Owner of (Selling unit))))) + |n)) + (|cffffcc00Reg using font size 10.00
-
-
-
-------- --------
-
Trigger - Run Update Income <gen> (ignoring conditions)
-
Unit - Remove (Sold unit) from the game
-
-------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Player_King Equal to Player 23 (Emerald)
-
-
Then - Actions
-
Special Effect - Create a special effect attached to the origin of West King 0448 <gen> using Abilities\Spells\Items\AIlm\AIlmTarget.mdl
-
Special Effect - Destroy (Last created special effect)
-
-
Else - Actions
-
Special Effect - Create a special effect attached to the origin of East King 0447 <gen> using Abilities\Spells\Items\AIlm\AIlmTarget.mdl
-
Special Effect - Destroy (Last created special effect)
-
-
-
-