I have made a trigger for catching pokemon in my map. Here's the trigger:
The trigger should move the pokemon to party (region) if player has more than 6 pokemon, and to box if player has less. Instead it moves the pokemon to party, no matter how many pokemon the player has and doesn't change owner. How could I fix that? The victory trigger is run as it should.
Code:
Catch
Events
Unit - A unit Starts the effect of an ability
Conditions
Or - Any (Conditions) are true
Conditions
(Number of units in (Units in Party <gen>)) Less than 6
(Number of units in (Units in Box <gen>)) Less than 100
(Owner of (Target unit of ability being cast)) Equal to Neutral Hostile
Actions
Wait 0.10 seconds
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Ability being cast) Equal to Catch (poke)
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Random real number between 0.00 and ((Life of (Target unit of ability being cast)) + ((Max life of (Target unit of ability being cast)) / 5.00))) Less than or equal to 25.00
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in (Units in Party <gen>)) Less than 6
Then - Actions
Unit - Move (Target unit of ability being cast) instantly to (Center of Party <gen>)
Unit - Change ownership of (Target unit of ability being cast) to Player 1 (Red) and Change color
Else - Actions
Unit - Move (Target unit of ability being cast) instantly to (Center of Box <gen>)
Unit - Change ownership of (Target unit of ability being cast) to Neutral Passive and Change color
Trigger - Run Victory <gen> (ignoring conditions)
Else - Actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Ability being cast) Equal to Catch (Great)
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Random real number between 0.00 and ((Life of (Target unit of ability being cast)) + ((Max life of (Target unit of ability being cast)) / 5.00))) Less than or equal to 50.00
Then - Actions
Trigger - Run Victory <gen> (ignoring conditions)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in (Units in Party <gen>)) Less than 6
Then - Actions
Unit - Move (Target unit of ability being cast) instantly to (Center of Party <gen>)
Unit - Change ownership of (Target unit of ability being cast) to Player 1 (Red) and Change color
Else - Actions
Unit - Move (Target unit of ability being cast) instantly to (Center of Box <gen>)
Unit - Change ownership of (Target unit of ability being cast) to Neutral Passive and Change color
Else - Actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Ability being cast) Equal to Catch (Ultra)
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Random real number between 0.00 and ((Life of (Target unit of ability being cast)) + ((Max life of (Target unit of ability being cast)) / 5.00))) Less than or equal to 100.00
Then - Actions
Trigger - Run Victory <gen> (ignoring conditions)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in (Units in Party <gen>)) Less than 6
Then - Actions
Unit - Move (Target unit of ability being cast) instantly to (Center of Party <gen>)
Unit - Change ownership of (Target unit of ability being cast) to Player 1 (Red) and Change color
Else - Actions
Unit - Move (Target unit of ability being cast) instantly to (Center of Box <gen>)
Unit - Change ownership of (Target unit of ability being cast) to Neutral Passive and Change color
Else - Actions
Else - Actions