Exemplo n.º 1
0
		public Attr GetAttr(MultiAttr mattr) {
			switch (mattr) {
				case MultiAttr.HealthFlat:
				case MultiAttr.HealthPercent:
				case MultiAttr.AttackFlat:
				case MultiAttr.AttackPercent:
				case MultiAttr.DefenseFlat:
				case MultiAttr.DefensePercent:
				case MultiAttr.SpeedPercent:
				case MultiAttr.Speed:
				case MultiAttr.CritRate:
				case MultiAttr.CritDamage:
				case MultiAttr.Resistance:
				case MultiAttr.Accuracy:
					return (Attr)key;
				case MultiAttr.Neg:
				case MultiAttr.Null:
				case MultiAttr.PercentOfAlliesAlive:
				case MultiAttr.TargetSpeed:
				case MultiAttr.TargetHealth:
				case MultiAttr.CurrentHealthPercent:
				case MultiAttr.TargetHealthPercent:
				case MultiAttr.MonsterLevel:
				case MultiAttr.DiceAverage:
				case MultiAttr.DiceAverageTwoMin:
				default:
					return RuneOptim.swar.Attr.Null;
				case MultiAttr.MissingHealth:
				case MultiAttr.CurrentHealth:
					return (Attr)(-1 * (int)RuneOptim.swar.Attr.HealthFlat);
			}
		}
Exemplo n.º 2
0
        public double GetAttrValue(MultiAttr mattr)
        {
            switch (mattr)
            {
            case MultiAttr.Neg:
            case MultiAttr.Null:
                return(1);

            case MultiAttr.HealthFlat:
            case MultiAttr.HealthPercent:
            case MultiAttr.AttackFlat:
            case MultiAttr.AttackPercent:
            case MultiAttr.DefenseFlat:
            case MultiAttr.DefensePercent:
            case MultiAttr.SpeedPercent:
            case MultiAttr.Speed:
            case MultiAttr.CritRate:
            case MultiAttr.CritDamage:
            case MultiAttr.Resistance:
            case MultiAttr.Accuracy:
                return(0);

            case MultiAttr.PercentOfAlliesAlive:
                return(0.75);

            case MultiAttr.TargetSpeed:
                return(200);

            case MultiAttr.TargetHealth:
                return(200000);    // If you're max-healthing, probably Giants/Dragon/Water dungeon

            case MultiAttr.MissingHealth:
                return(0.66);

            case MultiAttr.CurrentHealth:
                return(0.66);

            case MultiAttr.CurrentHealthPercent:
                return(0.66);

            case MultiAttr.TargetHealthPercent:
                return(0.75);

            case MultiAttr.MonsterLevel:
                return(40);

            case MultiAttr.DiceAverage:
                return(3.5);

            case MultiAttr.DiceAverageTwoMin:
                return(2.5);

            default:
                break;
            }
            throw new Exception();
        }
Exemplo n.º 3
0
		public MultiplierValue(MultiAttr a, MultiplierOperator o = MultiplierOperator.End) {
			key = a;
			op = o;
		}