Esempio n. 1
0
        public void ShowTip(World world, int regID, IWin32Window window, int x, int y)
        {
            Region   = world.Region[regID];
            Faction  = world.Faction[Region.Faction];
            Resource = world.Resource[Region.Resource];
            Religion = world.Religion[Region.DominantReligion];
            Biome    = world.Biome[Region.Biome];

            Show("Faction: " + Faction.Name + "\n" +
                 "Troops: " + Faction.UnitsCount + "\n" +
                 "Relations: " + NarivianClass.RelationsToString(world.relations[world.Player, Faction.ID]) + "\n" +
                 "Regions: " + Faction.RegionCount + "\n" +
                 "Resource: " + Resource.Name + "\n" +
                 "Biome: " + Biome.Name, window, x, y);
        }
Esempio n. 2
0
        private void BuildingListItem_Click(object sender, EventArgs e)
        {
            Building building = ((BuildingListItem)sender).Building;

            Game.Region region    = frmGame.World.Region[frmGame.selectedRegion];
            int         cultureID = frmGame.World.Faction[frmGame.Player].Culture;

            if (pnlBuilding.Visible == false)
            {
                pnlBuilding.Visible = true;
            }

            BuildingID = building.ID;

            lblBuildingName.Text = building.Name;
            lblPrice.Text        = building.Price.ToString();

            pbIcon.Image    = building.Icon[cultureID];
            lblDetails.Text = building.Description + "\n\n";

            lblDetails.Text += "Maintenance: " + building.Maintenance;

            if (building.Income != 0)
            {
                lblDetails.Text += "\nIncome: " + building.Income;
            }
            if (building.AttackBonus != 0)
            {
                lblDetails.Text += "\nAttack Bonus: " + building.AttackBonus;
            }
            if (building.DefenceBonus != 0)
            {
                lblDetails.Text += "\nDefence Bonus: " + building.DefenceBonus;
            }
            if (building.RecruitmentBonus != 0)
            {
                lblDetails.Text += "\nRecruitment Bonus: " + building.RecruitmentBonus;
            }
            if (building.ReligionInfluence != 0)
            {
                lblDetails.Text += "\nReligion Influence: " + building.ReligionInfluence;
            }
        }