RiftMayhem/Assets/Scripts/Game/GameConstants.cs
Pedro Gomes 2dce047470 New zone, New Character(WIP), refactor enemy spawning continued
- Vamp's Den playable zone (dev level design), pls send help artists
- Vampire playable character class (WIP)
- Bugfixing & changes to enemy spawning system
2024-07-28 19:00:32 +01:00

187 lines
6.0 KiB
C#

using static GameConstants.EnemySpawning;
public static class GameConstants
{
public static class PlayerPrefsKeys
{
#region PlayerPrefs Keys
public static string PlayerAccountDataKey = "playerAccountData";
public static string CharacterDataKey = "characterData";
public static string CharacterInventoryDataKey = "characterInventoryData";
public static string CharacterEquipmentDataKey = "characterEquipmentData";
public static string PlayerCoinKey = "playerCoin";
public static string GetPlayerAccountDataKey(string playerName)
{
return PlayerAccountDataKey + "-" + playerName;
}
public static string GetCharacterDataKey(string playerName, string characterName)
{
return CharacterDataKey + "-" + playerName + "-" + characterName;
}
public static string GetCharacterInventoryDataKey(string playerName, string characterName)
{
return CharacterInventoryDataKey + "-" + playerName + "-" + characterName;
}
public static string GetCharacterEquipmentDataKey(string playerName, string characterName)
{
return CharacterEquipmentDataKey + "-" + playerName + "-" + characterName;
}
public static string GetPlayerCoinKey(string playerName)
{
return PlayerCoinKey + "-" + playerName;
}
#endregion
}
public static class CharacterBalancing
{
public const int StatPointsPerLevel = 1;
public const float SoloCheatDeathHealthPercent = 0.5f;
public const float SoloCheatDeathInvulnerabilityDuration = 3f;
public const float GroupBleedOutDuration = 30f;
public const float ReviveTriggerRadius = 3f;
public const float ReviveSpeed = 1f;
public const float ReviveTime = 5f;
public const float ReviveHealthPercent = 0.5f;
public const float PercentageStatScaleForMinions = 0.8f;
}
public static class GameBalancing
{
public const int HealthIntoExperienceMultiplier = 1;
public const int MinimumNumberOfWavesPerRift = 2;
public const int MaximumNumberOfWavesPerRift = 3;
public const int MinimumQuantityAngrySkelly = 1;
public const int MaximumQuantityAngrySkelly = 4;
public const int MinimumQuantitySkellyMage = 1;
public const int MaximumQuantitySkellyMage = 4;
public const int MinimumQuantityVineGolem = 1;
public const int MaximumQuantityVineGolem = 4;
public const int MinimumQuantityPolygonGolem = 1;
public const int MaximumQuantityPolygonGolem = 4;
public const int MinimumQuantityLich = 1;
public const int MaximumQuantityLich = 4;
public const float RiftStartSpawningDelay = 1.5f;
public const float RiftDelayBetweenSpawns = 1f;
public const float BossTargetLockInPhaseDuration = 6f;
public const float BossSearchForNewTargetLockInDuration = 6f;
public const float PermaDeathInfoTime = 2f;
public static int GetMinimumQuantityByEnemyID(EnemyID id)
{
return id switch
{
EnemyID.AngrySkelly => MinimumQuantityAngrySkelly,
EnemyID.SkellyMage => MinimumQuantitySkellyMage,
EnemyID.VineGolem => MinimumQuantityVineGolem,
EnemyID.PolygonGolem => MinimumQuantityPolygonGolem,
EnemyID.Lich => MinimumQuantityLich,
EnemyID.Count => 0,
_ => 0,
};
}
public static int GetMaximumQuantityByEnemyID(EnemyID id)
{
return id switch
{
EnemyID.AngrySkelly => MaximumQuantityAngrySkelly,
EnemyID.SkellyMage => MaximumQuantitySkellyMage,
EnemyID.VineGolem => MaximumQuantityVineGolem,
EnemyID.PolygonGolem => MaximumQuantityPolygonGolem,
EnemyID.Lich => MaximumQuantityLich,
EnemyID.Count => 0,
_ => 0,
};
}
}
[System.Serializable]
public static class EnemySpawning
{
[System.Serializable]
public enum EnemyID
{
AngrySkelly = 0,
SkellyMage = 1,
VineGolem = 2,
PolygonGolem = 3,
Lich = 4,
Count
}
}
public static class ObjectSources
{
#region Object Sources (example stat increase source)
public static object AllocatedSource = "Allocated";
public static object LevelSource = "Level";
#endregion
}
public static class NetworkEventCodes
{
#region Network Event Codes
public const byte JobSelection = 112;
public const byte CancelChangeLevelVoted = 114;
public const byte ChangeLevelVoted = 115;
public const byte LoadLevelStarting = 116;
#endregion
}
public static class NetworkPropertyKeys
{
public const string AvailableJobsKey = "availableJobs";
}
public static class Sizes
{
public const int TotalEquipmentSlots = 6;
public const int TotalInventorySlots = 18;
}
public static class Scenes
{
public const string HuntersInn = "4-RiftHuntersInn";
public const string Skellyard = "4-Skellyard";
public const string Dayard = "4-Dayard";
public const string VampsDen = "4-VampsDen";
public static string GetSceneNameByZoneName(string zoneName)
{
zoneName = zoneName.ToLower();
if (zoneName.Contains("huntersinn"))
return HuntersInn;
if (zoneName.Contains("skellyard"))
return Skellyard;
if (zoneName.Contains("dayard"))
return Dayard;
if (zoneName.Contains("vamp"))
return VampsDen;
return HuntersInn;
}
}
}