282 lines
10 KiB
C#
282 lines
10 KiB
C#
using static GameConstants.EnemySpawning;
|
|
|
|
public static class GameConstants
|
|
{
|
|
public static class PlayerPrefsKeys
|
|
{
|
|
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 const string SunMapUsedKey = "sunMapUsed";
|
|
public const string MoonMapUsedKey = "moonMapUsed";
|
|
|
|
|
|
#region GetKeyMethods
|
|
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;
|
|
}
|
|
public static string GetSunMapUsedKey(string playerName)
|
|
{
|
|
return SunMapUsedKey + "-" + playerName;
|
|
}
|
|
public static string GetMapUsedKeyByHiddenMapZone(string playerName, HiddenMapZone mapZone)
|
|
{
|
|
switch (mapZone)
|
|
{
|
|
case HiddenMapZone.SunMap:
|
|
return SunMapUsedKey + "-" + playerName;
|
|
case HiddenMapZone.MoonMap:
|
|
return MoonMapUsedKey + "-" + playerName;
|
|
default:
|
|
return SunMapUsedKey + "-" + playerName;
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
|
|
}
|
|
|
|
public static class Audio
|
|
{
|
|
|
|
}
|
|
|
|
public static class CharacterStatsBalancing
|
|
{
|
|
public const float CritChanceIncreaseFromAgility = 0.005f; //0.5% agi => critChance (30% +/- tops)
|
|
public const float CritChanceIncreaseFromIntelligence = 0.002f; //0.2% int => critChance (12% +/- tops)
|
|
|
|
public const float CritDamageIncreaseFromStrength = 0.002f; //0.2% str => critDmg
|
|
public const float CritDamageIncreaseFromAgility = 0.002f; //0.2% agi => critDmg
|
|
public const float CritDamageIncreaseFromIntelligence = 0.001f; //0.1% int => critDmg
|
|
|
|
public const float AttackDamageIncreaseFromStrength = 1f; //100% str => AttkDmg
|
|
public const float AttackDamageIncreaseFromAgility = 0.45f; // 45% agi => AttkDmg
|
|
|
|
public const float SpellDamageIncreaseFromIntelligence = 1f; //100% int => SpDmg
|
|
public const float SpellDamageIncreaseFromSpirit = 0.45f; // 45% spi => SpDmg
|
|
|
|
public const float MaxHealthIncreaseFromSpirit = 0.1f; // 10% spi => MaxHP
|
|
public const float MaxHealthIncreaseFromVitality = 1f; //100% vit => MaxHP
|
|
|
|
public const float ArmorIncreaseFromStrength = 0.1f; //10% str => Armor
|
|
public const float ArmorIncreaseFromAgility = 0.1f; // 10% agi => Armor
|
|
public const float ArmorIncreaseFromVitality = 0.3f; //30% vit => Armor
|
|
|
|
public const float MagicResistanceIncreaseFromIntelligence = 0.1f; // 10% int => MagicRess
|
|
public const float MagicResistanceIncreaseFromSpirit = 1f; //100% spi => MagicRes
|
|
public const float MagicResistanceIncreaseFromVitality = 0.2f; //20% vit => MagicRes
|
|
|
|
public const float BaseMaxHealthGrowthPerLevel = 0.2f;
|
|
|
|
public const float VitalityToHealthRate = 10f;
|
|
public const float IntelligenceToManaRate = 2f;
|
|
|
|
public const float BonusStrengthToFlatRegenRate = 0.5f;
|
|
public const float BonusVitalityToPercentRegenRate = 0.01f;
|
|
|
|
public const float BonusSpiritToFlatRegenRate = 0.5f;
|
|
public const float BonusSpiritToPercentRegenRate = 0.01f;
|
|
|
|
public const int StatPointsPerLevel = 1;
|
|
|
|
public const float PercentageStatScaleForMinions = 0.8f;
|
|
}
|
|
|
|
public static class CharacterBalancing
|
|
{
|
|
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 MovementSpeedCap = 15f;
|
|
public const float PercentAngularSpeedCap = 1f;
|
|
public const float PercentAccelerationCap = 1f;
|
|
}
|
|
public static class GameBalancing
|
|
{
|
|
public const float IncreasedCoinDropBasedOnDifficultyMultiplier = 1f;
|
|
public const float IncreasedItemDropBasedOnDifficultyMultiplier = 1f;
|
|
|
|
public const float MinimumFindFishWaitTime = 2.5f;
|
|
public const float MaximumFindFishWaitTime = 4f;
|
|
|
|
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 int DragonGroundAttacksNeededToChangeToFlyingStance = 8;
|
|
public const int DragonFlyingAttacksNeededToChangeToGroundStance = 6;
|
|
|
|
public const float DragonFlyingSpeed = 9f;
|
|
public const float DragonFlyingSightRange = 600f;
|
|
public const float DragonFlyingAttackRange = 600f;
|
|
|
|
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";
|
|
|
|
public static object StrengthSource = "STR";
|
|
public static object AgilitySource = "AGI";
|
|
public static object IntelligenceSource = "INT";
|
|
public static object SpiritSource = "SPI";
|
|
public static object VitalitySource = "VIT";
|
|
|
|
#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 CharacterList = "2-CharacterList";
|
|
|
|
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 const string DragonsLair = "4-DragonsLair";
|
|
public const string RiverAve = "4-RiverAve";
|
|
|
|
|
|
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;
|
|
if (zoneName.Contains("dragon"))
|
|
return DragonsLair;
|
|
if (zoneName.Contains("river"))
|
|
return RiverAve;
|
|
|
|
return HuntersInn;
|
|
}
|
|
}
|
|
} |