Пример #1
0
    public Hero GenerateWizard()
    {
        _minHPRange = 4;
        _maxHPRange = 8;

        this.HeroType           = HeroTypes.wizard;
        this.Name               = HeroType.ToString();
        this.HitPoints          = Random.Range(4, 8);
        this.AttackDamage       = Random.Range(10, 25);
        this.TimeBetweenAttacks = 30f;

        SetHP();

        return(this);
    }
Пример #2
0
    public Hero GenerateArcher()
    {
        _minHPRange = 8;
        _maxHPRange = 20;

        this.HeroType           = HeroTypes.archer;
        this.Name               = HeroType.ToString();
        this.HitPoints          = Random.Range(8, 20);
        this.AttackDamage       = Random.Range(6, 15);
        this.TimeBetweenAttacks = 20f;

        SetHP();

        return(this);
    }
Пример #3
0
        public override string ToString()
        {
            switch (Type)
            {
            case HeroTypes.None:
                return("");

            case HeroTypes.Enum:
                return(Id == null ? "enum" : Id.ToString());

            case HeroTypes.List:
                return(Values == null ? "list" : "list of " + Values);

            case HeroTypes.LookupList:
                if (Indexer == null && Values == null)
                {
                    return("lookuplist");
                }

                if (Indexer != null && Values == null)
                {
                    return("lookuplist indexed by " + Indexer);
                }

                if (Indexer == null && Values != null)
                {
                    return("lookuplist of " + Values);
                }

                return("lookuplist indexed by " + Indexer + " of " + Values);

            case HeroTypes.Class:
                return(Id == null ? "class" : Id.ToString());

            case HeroTypes.NodeRef:
                if ((long)Id.Id == 0L)
                {
                    return("noderef");
                }

                return("noderef of " + Id);

            default:
                return(Type.ToString());
            }
        }
Пример #4
0
    public Hero GenerateKnight()
    {
        _minHPRange = 10;
        _maxHPRange = 25;

        this.HeroType           = HeroTypes.knight;
        this.Name               = HeroType.ToString();
        this.AttackDamage       = Random.Range(6, 18);
        this.TimeBetweenAttacks = 3f;

        this.Attacks = new Attack[] {
            new Attack("Low Swipe", 0, 0, "Attack"),
            new Attack("Quick Attack", 1, 0, "Attack2"),
            new Attack("Spin Attack", 2, 1, "Attack3"),
            new Attack("Power Spin", 5, 2, "Attack4"),
            new Attack("Battle Cry", 2, 1, "BattleCry", true)
        };


        SetHP();

        return(this);
    }