Untitled

mail@pastecode.io avatar
unknown
csharp
a year ago
2.5 kB
2
Indexable
Never
for (int i = 0; i < 2; i++)
            {
                Modifier tmpModifier;

                if (i == 0)
                    tmpModifier = modifier.positiveModifier;
                else
                    tmpModifier = modifier.negativeModifier;

                switch (tmpModifier.modifierName)
                {
                    case "Hoard": manager.equipmentChestDrops += (int)tmpModifier.value; break;
                    case "Treasure": manager.chanceToGenerateChest += (int)tmpModifier.value; break;
                    case "Rich": manager.coinBonus += tmpModifier.value; break;
                    case "Haunted": manager.soulBonus += (int)tmpModifier.value; break;
                    case "Journey": manager.artifactBonus += tmpModifier.value; break;
                    case "Afterlife": manager.afterlife = true; break;
                    case "Healing": manager.healing += tmpModifier.value; break;
                    case "Furious": manager.enemyDmgBonus += tmpModifier.value; break;
                    case "Swift": manager.enemySpdBonus += tmpModifier.value; break;
                    case "Locked": manager.locked = true; break;
                    case "Clumsy": manager.clumsy = true; break;
                    case "Inert": manager.inert = true; break;

                    case "Strong": 
                    case "Weak": manager.dmgBonus += tmpModifier.value; break;

                    case "Speedy": 
                    case "Slowed": manager.spdBonus += tmpModifier.value; break;

                    case "Extended": 
                    case "Endless": 
                    case "Fast": 
                    case "Rush": manager.dungeonTime += tmpModifier.value; break;

                    case "Silent": 
                    case "Crowded": manager.enemySpawning += (int)tmpModifier.value; break;

                    case "Simple": 
                    case "Easy": 
                    case "Hard": 
                    case "Challenging": manager.dungeonDifficulty += (int)tmpModifier.value; break;

                    case "Lucky": 
                    case "Unlucky": manager.luck += (int)tmpModifier.value; break;

                    case "Reinforced":
                    case "Fragile": manager.durabilityMultiplier += tmpModifier.value; break;

                    default: Debug.LogError("Fallthrough case detected!"); break;
                }
            }