Ejemplo n.º 1
0
        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;
                }
            }
        }
Ejemplo n.º 2
0
 public static HealthMod ExtraRecovery(HealthTypes type) => new HealthMod(3, ModTypes.Flat, typeof(Gluttony).Name, type);
Ejemplo n.º 3
0
 public TempHealthMod(float parVal, ModTypes parModType, HealthTypes parHealthType, string parSource, int parDuration)
     : base(parVal, parModType, parSource, parHealthType)
 {
     duration = parDuration;
     DateSystem.NewHourEvent += TickDown;
 }
Ejemplo n.º 4
0
 public HealthMod(float parVal, ModTypes parModType, string parSource, HealthTypes parHealthType) : base(parVal, parModType, parSource)
 {
     this.healthType = parHealthType;
 }