Ejemplo n.º 1
0
        public override void Query(object source, StatQuery sq)
        {
            if (ReferenceEquals(source, this))
            {
                switch (sq.Statistic)
                {
                case Statistic.Attack:
                    sq.Result += baseAttack;
                    break;

                case Statistic.Defense:
                    sq.Result += baseDefense;
                    break;

                default:
                    throw new ArgumentOutOfRangeException();
                }
            }
            else
            {
                if (sq.Statistic == Statistic.Defense)
                {
                    sq.Result++;
                }
            }
        }
Ejemplo n.º 2
0
 public override void Query(object source, StatQuery sq)
 {
     if (!ReferenceEquals(source, this) && sq.Statistic == Statistic.Attack)
     {
         sq.Result++; // every goblin gets +1 attack
     }
     else
     {
         base.Query(source, sq);
     }
 }
Ejemplo n.º 3
0
 public abstract void Query(object source, StatQuery sq);