From 6eb299af153fd3515e52acfcac794f77791f24c8 Mon Sep 17 00:00:00 2001 From: Piegames <14054505+piegamesde@users.noreply.github.com> Date: Tue, 24 Apr 2018 02:25:29 +0200 Subject: [PATCH] Balancing #2 --- Assets/Scripts/Generation/DungeonGenerator.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Assets/Scripts/Generation/DungeonGenerator.cs b/Assets/Scripts/Generation/DungeonGenerator.cs index e3de152..80dc53e 100644 --- a/Assets/Scripts/Generation/DungeonGenerator.cs +++ b/Assets/Scripts/Generation/DungeonGenerator.cs @@ -457,7 +457,7 @@ public class DungeonGenerator { case 0: { // Scorpion Attack!!!!: List lg = new List(); - int count = UnityEngine.Random.Range(1, ( int ) Math.Min(Mathf.Floor(r.GetSpawnpoints().Count), 5)); + int count = Math.Min(UnityEngine.Random.Range(1, ( int ) Mathf.Floor(r.GetSpawnpoints().Count)), 5); for ( int c = 0; c < count; c++ ) { lg.Add(enemyPrefabs[Entity.Entities.SCORPION]); } @@ -468,7 +468,7 @@ public class DungeonGenerator { case 1: { // Bug Attack!!!!: List lg = new List(); - int count = UnityEngine.Random.Range(1, ( int ) Math.Min(Mathf.Floor(r.GetSpawnpoints().Count), 10)); + int count = Math.Min(UnityEngine.Random.Range(1, ( int ) Mathf.Floor(r.GetSpawnpoints().Count)), 10); for ( int c = 0; c < count; c++ ) { lg.Add(enemyPrefabs[Entity.Entities.BUG]); } @@ -479,7 +479,7 @@ public class DungeonGenerator { case 2: { // Coins!!!!: List lg = new List(); - int count = UnityEngine.Random.Range(1, (int) Math.Min(Mathf.Floor(r.GetSpawnpoints().Count), 20)); + int count = Math.Min(UnityEngine.Random.Range(1, (int) Mathf.Floor(r.GetSpawnpoints().Count)), 20); for ( int c = 0; c < count; c++ ) { lg.Add(enemyPrefabs[Entity.Entities.COIN]); }