示例#1
0
 public void prepForBattle(Battlefield bf)
 {
     this.bf = bf;
     targets = new List <BattleThreat>();
     foreach (BattleTarget bt in bf.party)
     {
         BattleThreat newThreat = new BattleThreat(bt);
         targets.Add(newThreat);
     }
 }
示例#2
0
    public BattleThreat getHighestThreat()
    {
        BattleThreat highest = null;

        foreach (BattleThreat bt in targets)
        {
            if (highest == null)
            {
                highest = bt;
            }
            else if (highest != null)
            {
                if (bt.threat > highest.threat)
                {
                    highest = bt;
                }
            }
        }
        return(highest);
    }