Example #1
0
        public void AddModifier(Affect.Apply type, int amount)
        {
            AffectApplyType apply = new AffectApplyType();

            apply.Location = type;
            apply.Amount   = amount;
            if (_modifiers == null)
            {
                _modifiers = new List <AffectApplyType>();
            }
            _modifiers.Add(apply);
        }
Example #2
0
        /// <summary>
        /// Returns the text _name of an affect location.  We use this for printable strings
        /// because the ToString() for the enum has ugly things like underscores.
        /// </summary>
        /// <param name="location"></param>
        /// <returns></returns>
        public static string AffectApplyString(Affect.Apply location)
        {
            switch (location)
            {
            case Affect.Apply.none:
                return("none");

            case Affect.Apply.strength:
                return("strength");

            case Affect.Apply.dexterity:
                return("dexterity");

            case Affect.Apply.intelligence:
                return("intelligence");

            case Affect.Apply.wisdom:
                return("wisdom");

            case Affect.Apply.constitution:
                return("constitution");

            case Affect.Apply.sex:
                return("sex");

            case Affect.Apply.age:
                return("age");

            case Affect.Apply.height:
                return("height");

            case Affect.Apply.weight:
                return("weight");

            case Affect.Apply.size:
                return("size");

            case Affect.Apply.mana:
                return("mana");

            case Affect.Apply.hitpoints:
                return("hp");

            case Affect.Apply.move:
                return("moves");

            case Affect.Apply.ac:
                return("armor class");

            case Affect.Apply.hitroll:
                return("hit roll");

            case Affect.Apply.damroll:
                return("damage roll");

            case Affect.Apply.save_paralysis:
                return("save vs paralysis");

            case Affect.Apply.save_poison:
                return("save vs poison");

            case Affect.Apply.save_petrification:
                return("save vs petrification");

            case Affect.Apply.save_breath:
                return("save vs breath");

            case Affect.Apply.save_spell:
                return("save vs spell");

            case Affect.Apply.fire_protection:
                return("fire protection");

            case Affect.Apply.agility:
                return("agility");

            case Affect.Apply.charisma:
                return("charisma");

            case Affect.Apply.power:
                return("power");

            case Affect.Apply.luck:
                return("luck");

            case Affect.Apply.max_strength:
                return("max strength");

            case Affect.Apply.max_dexterity:
                return("max dexterity");

            case Affect.Apply.max_intelligence:
                return("max intelligence");

            case Affect.Apply.max_wisdom:
                return("max wisdom");

            case Affect.Apply.max_constitution:
                return("max constitution");

            case Affect.Apply.max_agility:
                return("max agility");

            case Affect.Apply.max_power:
                return("max power");

            case Affect.Apply.max_charisma:
                return("max charisma");

            case Affect.Apply.max_luck:
                return("max luck");

            case Affect.Apply.race_strength:
                return("racial strength");

            case Affect.Apply.race_dexterity:
                return("racial dexterity");

            case Affect.Apply.race_intelligence:
                return("racial intelligence");

            case Affect.Apply.race_wisdom:
                return("racial wisdom");

            case Affect.Apply.race_constitution:
                return("racial constitution");

            case Affect.Apply.race_agility:
                return("racial agility");

            case Affect.Apply.race_power:
                return("racial power");

            case Affect.Apply.race_charisma:
                return("racial charisma");

            case Affect.Apply.race_luck:
                return("racial luck");

            case Affect.Apply.curse:
                return("curse");

            case Affect.Apply.resistant:
                return("resistant");

            case Affect.Apply.immune:
                return("immune");

            case Affect.Apply.susceptible:
                return("susceptible");

            case Affect.Apply.vulnerable:
                return("vulnerable");

            case Affect.Apply.race:
                return("race");
            }

            Log.Error("Affect_location_name: unknown location {0}.", location);
            return("(unknown)");
        }