Beispiel #1
0
 public bool Dodge()
 {
     if (RollHandler.AgRoll(+1, this))
     {
         return(true);
     }
     else
     {
         Console.WriteLine("dodge failed");
         Prone();
         TurnHandler.turnOver = true;
         return(false);
     }
 }
Beispiel #2
0
 public bool Pickup(Ball ball)
 {
     if (RollHandler.AgRoll(+1, this))
     {
         HoldingBall = ball;
         PitchHandler.pitch[posX, posY].ballOnTile = null;
         return(true);
     }
     else
     {
         RollHandler.ScatterBall(1, false, ball, false);
         TurnHandler.turnOver = true;
         return(false);
     }
 }
Beispiel #3
0
 public void PickUp(Player player)
 {
     if (player.posX == PositionX && player.posY == PositionY)
     {
         if (RollHandler.AgRoll(+1, player))
         {
             PitchHandler.pitch[PositionX, PositionY].playerOnThisTile.HoldingBall = this;
             PitchHandler.pitch[PositionX, PositionY].ballOnTile = null;
         }
         Console.WriteLine("Ball picked up");
         Console.ReadKey();
     }
     else
     {
         TurnHandler.turnOver = true;
         RollHandler.ScatterBall(1, false, this, false);
     }
 }
Beispiel #4
0
        public bool Catch(Ball ball, string type)
        {
            int modifier = 0;

            if (type == "scatter")
            {
                modifier = -1;
            }
            else if (type == "quick pass")
            {
                modifier = +1;
            }
            else if (type == "handover")
            {
                modifier = +1;
            }
            else if (type == "long pass")
            {
                modifier = -1;
            }
            else if (type == "long bomb")
            {
                modifier = -1;
            }

            if (RollHandler.AgRoll(+1 + modifier, this))
            {
                HoldingBall = ball;
                PitchHandler.pitch[posX, posY].ballOnTile = null;
                return(true);
            }
            else
            {
                RollHandler.ScatterBall(1, false, ball, false);
                TurnHandler.turnOver = true;
                return(false);
            }
        }