Beispiel #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++;
                }
            }
        }
Beispiel #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
     }
     base.Query(source, sq);
 }
Beispiel #3
0
 public abstract void Query(object source, StatQuery sq);