private void AdjustCounters(Action <IList <Thing>, Thing> change, int increment, IEnumerable <MapLocation> locations) { foreach (var mapLocation in locations) { foreach (var mapLocationThing in mapLocation.Things) { if (bossTypes.Contains(mapLocationThing.Type)) { change(Bosses, mapLocationThing); } if (enemyTypes.Contains(mapLocationThing.Type)) { change(Enemies, mapLocationThing); } if (WeaponTypes.Contains(mapLocationThing.Type)) { change(Weapons, mapLocationThing); } if (mapLocationThing.Type == Actor.Clip.ClassName) { Ammo += increment; } if (TreasureTypes.Contains(mapLocationThing.Type)) { change(Treasure, mapLocationThing); } if (HealthTypes.Contains(mapLocationThing.Type)) { change(Health, mapLocationThing); } if (mapLocationThing.Type == Actor.OneUp.ClassName) { Lives += increment; } if (mapLocationThing.Type == Actor.GoldKey.ClassName || mapLocationThing.Type == Actor.Hans.ClassName || mapLocationThing.Type == Actor.Gretel.ClassName) { goldKeys += increment; } if (mapLocationThing.Type == Actor.SilverKey.ClassName) { silverKeys += increment; } } if (mapLocation.Tile == null && !mapLocation.Things.Any()) { BoringTiles += increment; } } }
public static HealthMod ExtraRecovery(HealthTypes type) => new HealthMod(3, ModTypes.Flat, typeof(Gluttony).Name, type);
public TempHealthMod(float parVal, ModTypes parModType, HealthTypes parHealthType, string parSource, int parDuration) : base(parVal, parModType, parSource, parHealthType) { duration = parDuration; DateSystem.NewHourEvent += TickDown; }
public HealthMod(float parVal, ModTypes parModType, string parSource, HealthTypes parHealthType) : base(parVal, parModType, parSource) { this.healthType = parHealthType; }