Exemple #1
0
        public void AttackGladiator(BattleTile attacker, BattleTile defender, RichTextBox rtbBattleMonitor)
        {
            attacker.gladiator.HasMoved = true;
            rtbBattleMonitor.Text      += attacker.gladiator.Name + " attacks " + defender.gladiator.Name + "." + Environment.NewLine;
            rtbBattleMonitor.Refresh();
            int damage = GladiatorDamageCalculator(attacker.gladiator, defender.gladiator);

            rtbBattleMonitor.Text += damage + " damage is dealt." + Environment.NewLine;
            rtbBattleMonitor.Refresh();
            if (defender.gladiator.CurrentHP <= 0)
            {
                rtbBattleMonitor.Text           += defender.gladiator.Name + " has fainted." + Environment.NewLine + Environment.NewLine;
                attacker.gladiator.potentialEXP += defender.gladiator.RewardEXP;
                rtbBattleMonitor.Refresh();
                defender.gladiator.State = State.dead;
                SelectedTile             = null;
                defender.gladiator       = null;
                defender.ShowTileIsOccupied();
            }
            else
            {
                rtbBattleMonitor.Text += Environment.NewLine;
                SelectedTile           = null;
            }
        }
Exemple #2
0
 public void MoveGladiator(BattleTile targetTile)
 {
     targetTile.gladiator             = SelectedTile.gladiator;
     targetTile.gladiator.X           = targetTile.X;
     targetTile.gladiator.Y           = targetTile.Y;
     targetTile.gladiator.CurrentTile = targetTile;
     SelectedTile.gladiator.HasMoved  = true;
     SelectedTile.gladiator           = null;
     SelectedTile.Button.Text         = "";
     SelectedTile = null;
     targetTile.ShowTileIsOccupied();
 }