public Unit(int x, int y, int level) : base(x, y)
    {
        brain          = new SimpleAI(this);
        Map_position_x = x;
        Map_position_y = y;

        if (level < 0)
        {
            level = 0;
        }

        Max_Health = level - ((float)level) / 1.2f + 1;
        if (Max_Health < 0)
        {
            Max_Health = 1;
        }
        Health = Max_Health;
        Money  = level / 2;
        if (Money < 1)
        {
            Money = 12;
        }
        name = MainColour.ToString() + " unit";

        MainSpell = SpellGenerator.GetInstance().GetClosestSingleSpell(level / 4);
        Debug.Log("enemy hp: " + Max_Health + MainSpell.ToString());
    }
 public Deck()
 {
     for (int i = 0; i < 3; i++)
     {
         this.Add(SpellGenerator.GetInstance().GetClosestSpell(5));
         size++;
     }
 }
Example #3
0
    public Player() : base()
    {
        spellIndicator      = new SpellIndicator(40);
        PlayerCastIndicator = new CastRangeIndicator();
        spellIndicator.link(PlayerCastIndicator);

        SpellGenerator.GetInstance().PrintAllSpells();
        GameTools.Player = this;
        Money            = 20;
    }
Example #4
0
    public void RefreshStock(Player p)
    {
        int   playerrating = p.CalculateLevel();
        float playermoney  = p.Money;

        SpellStock = new List <Spell>();
        for (int i = 0; i < SpellStockMaxLevel; i++)
        {
            SpellStock.Add(SpellGenerator.GetInstance().GetClosestSpell(playerrating + (i * 2) + ((int)(playermoney / 3.0f))));
        }
    }