public static void CheckBoss(BaseCreature bc, ref int budget) { for (var i = 0; i < Entries.Count; i++) { BossEntry entry = Entries[i]; Type first = null; for (var index = 0; index < entry.List.Count; index++) { var t = entry.List[index]; if (t == bc.GetType() || bc.GetType().IsSubclassOf(t)) { first = t; break; } } if (first != null) { budget += entry.Bonus; return; } } }
public static int GetDifficultyFor(BaseCreature bc) { if (bc == null) { return(0); } int fame = bc.Fame; if (fame > 0) { int budget = Math.Min(MaxBaseBudget, GetBaseBudget(bc)); BossEntry.CheckBoss(bc, ref budget); return(Math.Max(MinBaseBudget, budget)); } return(0); }