private SacrificeBonus(int tier, int luck) : base("", "") { mWhichBonus = Random.Range(0, 2); switch (mWhichBonus) { case 0: mBoonType = BoonType.SACRIFICE_BONUS_XP; mAmount = 5 * (1 + tier + luck); mName = "Knowledge Inheritance"; mDescription = "Each sacrifice gives " + mAmount + " xp to a random person"; mIcon = "+XP"; break; case 1: mBoonType = BoonType.SACRIFICE_BONUS_HEALING; mAmount = 10 * (1 + tier + luck); mName = "Lifeforce Inheritance"; mDescription = "Each sacrifice restores " + mAmount + " lifeforce to a random person"; mIcon = "HEALING"; break; } }
private CombatVictoryReward(int tier, int luck) : base("Spoils of War: ", "") { int whichReward = Random.Range(0, 2); switch (whichReward) { case 0: mAmount = Mathf.Min(100, 10 * (tier * 2) + Random.Range(1, 3) * luck); mName += "Lifeforce"; mDescription = "Combat victories restore " + mAmount + " lifeforce to a random person"; mIcon = "HEALING"; mBoon = BoonType.COMBAT_VICTORY_BONUS_HEALING; break; case 1: mAmount = 10 * (tier + luck); mName += "Experience"; mDescription = "Combat victories give a random person +" + mAmount + "xp"; mIcon = "+XP"; mBoon = BoonType.COMBAT_VICTORY_BONUS_XP; break; } }
public static int GetBoonValue(BoonType boon) { return(sGameState.mBoons[(int)boon]); }
public static void SetBoon(BoonType boon, int value) { sGameState.mBoons[(int)boon] = value; }
public static void SetBoon(BoonType boon, bool has) { sGameState.mBoons[(int)boon] = has ? 1 : 0; }
public static bool HasBoon(BoonType boon) { return(sGameState.mBoons[(int)boon] > 0); }