public int GetMapCost(Troop troop, Point position, MilitaryKind kind) { if (base.Scenario.PositionOutOfRange(position)) { return 0xdac; } if (base.Scenario.GetTerrainDetailByPositionNoCheck(position).RoutewayConsumptionRate >= 1) { return 0xdac; } int terrainAdaptability = 0; if (base.Scenario.GetArchitectureByPositionNoCheck(position) == null) { terrainAdaptability = troop.GetTerrainAdaptability((TerrainKind) this.mapData[position.X, position.Y]); } int waterPunishment = 0; if (this.mapData[position.X, position.Y] == 6 && kind.Type != MilitaryType.水军 && base.Scenario.GetArchitectureByPositionNoCheck(position) == null) { waterPunishment = 3; } return ((terrainAdaptability + base.Scenario.GetWaterPositionMapCost(kind.Type, position)) + base.Scenario.GetPositionMapCost(this, position) + waterPunishment); }