Ejemplo n.º 1
0
 public MilitaryPlane(string model, int maxSpeed, int maxFlightDistance, int maxLoadCapacity, MilitaryType militaryType, ClassificationLevel classificationLevel, ExperimentalTypes experimentalTypes)
     : base(model, maxSpeed, maxFlightDistance, maxLoadCapacity)
 {
     this.militaryType        = militaryType;
     this.classificationLevel = classificationLevel;
     this.experimentalTypes   = experimentalTypes;
 }
Ejemplo n.º 2
0
        public ShipFactoryBase getShipFactory(MilitaryType militaryType)
        {
            if (militaryType == MilitaryType.army)
            {
                return(new ArmyShipFactory());
            }

            throw new NotImplementedException();
        }
Ejemplo n.º 3
0
 public MilitaryPlane(string model, int maximumSpeed, int maxFlightDistance, int maxLoadCapacity, MilitaryType type)
     : base(model, maximumSpeed, maxFlightDistance, maxLoadCapacity)
 {
     militaryType = type;
 }
Ejemplo n.º 4
0
 public MilitaryList GetShelledMilitaryList(MilitaryType militaryType)
 {
     this.ShelledMilitaryList.Clear();
     foreach (Military military in this.Militaries)
     {
         if (((military.Quantity > 0) && (military.Morale > 0)) && (military.Kind.Type != militaryType))
         {
             this.ShelledMilitaryList.AddMilitary(military);
         }
     }
     return this.ShelledMilitaryList;
 }
Ejemplo n.º 5
0
 public MilitaryPlane(string model, int maxSpeed, int maxFlightDistance, int maxLoadCapacity, MilitaryType militaryType)
     : base(model, maxSpeed, maxFlightDistance, maxLoadCapacity)
 {
     this.militaryType = militaryType;
 }
Ejemplo n.º 6
0
 public int MilitaryTypeStuntMerit(MilitaryType kind)
 {
     int result = 0;
     foreach (Stunt stunt in this.Stunts.Stunts.Values)
     {
         if ((stunt.MilitaryTypeOnly == kind || stunt.MilitaryTypeOnly == MilitaryType.其他))
         {
             result += 30;
         }
     }
     return result;
 }
Ejemplo n.º 7
0
 public int MilitaryTypeSkillMerit(MilitaryType kind)
 {
     int result = 0;
     foreach (Skill skill in this.Skills.Skills.Values)
     {
         if (skill.Combat && (skill.MilitaryTypeOnly == kind || skill.MilitaryTypeOnly == MilitaryType.其他))
         {
             result += 5 * skill.Level;
         }
     }
     return result;
 }
Ejemplo n.º 8
0
 public bool MilitaryTypePersonalTitle(MilitaryType kind)
 {
     if (this.PersonalTitle == null) return false;
     if (this.PersonalTitle.Combat && (this.PersonalTitle.MilitaryTypeOnly == kind || this.PersonalTitle.MilitaryTypeOnly == MilitaryType.其他))
     {
         return true;
     }
     return false;
 }
Ejemplo n.º 9
0
 public bool IsFireVaild(Point position, bool typevalid, MilitaryType type)
 {
     if (this.GetArchitectureByPosition(position) != null)
     {
         return false;
     }
     TerrainKind terrainKindByPosition = this.GetTerrainKindByPosition(position);
     return (((typevalid && (type == MilitaryType.水军)) && (terrainKindByPosition == TerrainKind.水域)) || ((((terrainKindByPosition == TerrainKind.平原) || (terrainKindByPosition == TerrainKind.草原)) || (terrainKindByPosition == TerrainKind.森林)) || (terrainKindByPosition == TerrainKind.山地)));
 }
Ejemplo n.º 10
0
 public int GetWaterPositionMapCost(MilitaryType militaryType, Point position)
 {
     if (GlobalVariables.LandArmyCanGoDownWater)
     {
         return 0;
     }
     if (this.ScenarioMap.MapData[position.X, position.Y] == 6)
     {
         if (this.GetArchitectureByPositionNoCheck(position) != null)
         {
             return 0;
         }
         if (militaryType == MilitaryType.水军)
         {
             return 0;
         }
         int num = 0;
         Point point = new Point(position.X - 1, position.Y);
         if (!(this.PositionOutOfRange(point) || (this.ScenarioMap.MapData[point.X, point.Y] != 6)))
         {
             num++;
         }
         Point point2 = new Point(position.X, position.Y - 1);
         if (!(this.PositionOutOfRange(point2) || (this.ScenarioMap.MapData[point2.X, point2.Y] != 6)))
         {
             num++;
         }
         Point point3 = new Point(position.X + 1, position.Y);
         if (!(this.PositionOutOfRange(point3) || (this.ScenarioMap.MapData[point3.X, point3.Y] != 6)))
         {
             num++;
         }
         if (num > 2)
         {
             return 0xdac;
         }
         Point point4 = new Point(position.X, position.Y + 1);
         if (!(this.PositionOutOfRange(point4) || (this.ScenarioMap.MapData[point4.X, point4.Y] != 6)))
         {
             num++;
         }
         if (num > 2)
         {
             return 0xdac;
         }
     }
     return 0;
 }
Ejemplo n.º 11
0
 private bool ThisTypeMilitaryPlaneIsHere(List <MilitaryPlane> militaryPlanes, MilitaryType type)
 {
     foreach (MilitaryPlane militaryPlane in militaryPlanes)
     {
         if ((militaryPlane.PlaneTypeIs() == MilitaryType.TRANSPORT))
         {
             return(true);
         }
     }
     return(false);
 }
Ejemplo n.º 12
0
 public List <MilitaryPlane> GetMilitaryPlanesWithEnteredMilitaryType(MilitaryType militaryType)
 {
     return(GetMilitaryPlanes().Where(p => p.GetMilitaryType() == militaryType).ToList());
 }
Ejemplo n.º 13
0
 public bool HasMilitaryTypeTitle(MilitaryType kind)
 {
     foreach (Title t in this.Titles)
     {
         if (t.MilitaryTypeOnly == kind || t.MilitaryTypeOnly == MilitaryType.其他)
         {
             return true;
         }
     }
     return false;
 }