all repos — RPG @ 600326a2970450d00cdb49c7829765d373c55c3f

Fully functional 3D turn based role playing game coded in C# and base Unity.

Assets/Scripts/Battle/Fighters/Brady.cs (view raw)

 1using System.Collections;
 2using System.Collections.Generic;
 3using UnityEngine;
 4
 5public class Brady : BadGuy
 6{
 7    public Brady()
 8    {
 9        stats = new Stats("Brady");
10        description = "Son of the dark lord, he's not too bad.";
11
12        goldDrop = 150;
13        itemsDrop = new Inventory();
14        itemsDrop.generateItem(new ItemInfo(new BottledBlessing(), 1));
15
16        dead = defending = false;
17    }
18    
19    public override string Combat_AI()
20    {
21        //attack a random goodGuy
22        Fighter[] ggs = GameObject.Find("BattleManager").GetComponent<BattleManager>().getGuys(false);
23        List<Ability> abs = stats.GetAbilities();
24        bool output;
25        string str;
26        do
27        {
28            str = AbilityDB.Process(this, abs[Random.Range(0, abs.Count)], ggs[Random.Range(0, ggs.Length)], true, out output);
29        } while (output == false);
30        return str;
31    }
32
33}