예제 #1
0
        internal DiplomatSabotage(City enemyCity, Diplomat diplomat) : base(60, 80, 220, 56)
        {
            _enemyCity = enemyCity ?? throw new ArgumentNullException(nameof(enemyCity));
            _diplomat  = diplomat ?? throw new ArgumentNullException(nameof(diplomat));

            IBitmap spyPortrait = Icons.Spy;

            Palette palette = Common.DefaultPalette;

            for (int i = 144; i < 256; i++)
            {
                palette[i] = spyPortrait.Palette[i];
            }
            this.SetPalette(palette);

            DialogBox.AddLayer(spyPortrait, 2, 2);

            DialogBox.DrawText($"Spies Report", 0, 15, 45, 5);
            DialogBox.DrawText(_diplomat.Sabotage(_enemyCity), 0, 15, 45, 5 + Resources.GetFontHeight(FONT_ID));
            DialogBox.DrawText($"in {_enemyCity.Name}", 0, 15, 45, 5 + (2 * Resources.GetFontHeight(FONT_ID)));
        }
예제 #2
0
 private void IndustrialSabotage(object sender, EventArgs args)
 {
     GameTask.Enqueue(Message.Spy("Spies report:", $"{_diplomat.Sabotage(_enemyCity)}", $"in {_enemyCity.Name}"));
     Cancel();
 }