Exemple #1
0
        // Will keep rolling until it finds a diffrent stand
        public Stand GetNewRandom(TBARPlayer player)
        {
            Stand stand = player.PlayerStand;

            Stand resultStand = GetRandom();

            bool bruhMoment = stand != null && stand.GetType() == resultStand.GetType();

            if (bruhMoment || !resultStand.CanAcquire(player))
            {
                return(GetNewRandom(player));
            }

            return(resultStand);
        }
Exemple #2
0
        public Stand Get(string name)
        {
            if (name == "None")
            {
                return(null);
            }

            Stand attempt = Stands.Find(x => x.StandName == name);

            if (attempt != null)
            {
                return((Stand)Activator.CreateInstance(attempt.GetType()));
            }

            foreach (Stand s in Stands)
            {
                if (s.GetType().Name == name)
                {
                    return((Stand)Activator.CreateInstance(s.GetType()));
                }
            }

            return(null);
        }