Ejemplo n.º 1
0
        public override void Deserialize(JSONObject obj)
        {
            mClassLevel = (int)obj.GetNumber(LEVEL);
            DeserializeKnownSpells(obj);
            DeserializeMainSpells(obj);
            DeserializeExtraSpells(obj);
            mSkills = new DnDSkillModel();
            mSkills.Deserialize(obj.GetObject(SKILLS));
            // spec:
            JSONArray tempArray = obj.GetArray(SPECIALIZATION);

            for (int i = 0; i < tempArray.Length; ++i)
            {
                if (i == 0)                 // first item is the specialization
                {
                    mSpecialization = (DnDMagicSchool)((int)tempArray[i].Number);
                }
                else                 // the other items are the forbidden schools
                {
                    mForbiddenSchools.Add((DnDMagicSchool)((int)tempArray[i].Number));
                }
            }
        }
Ejemplo n.º 2
0
        public override DnDSkillModel CreateSkillModel()
        {
            DnDSkillModel result = new DnDSkillModel();

            result.Appraise          = new DnDSkillField(0, 0, true, false, DnDAbilities.Intelligence);
            result.Balance           = new DnDSkillField(0, 0, true, false, DnDAbilities.Dexterity);
            result.Bluff             = new DnDSkillField(0, 0, true, false, DnDAbilities.Charisma);
            result.Climb             = new DnDSkillField(0, 0, true, false, DnDAbilities.Strength);
            result.Concentration     = new DnDSkillField(0, 0, true, true, DnDAbilities.Constitution);
            result.DecipherScript    = new DnDSkillField(0, 0, false, true, DnDAbilities.Intelligence);
            result.Diplomacy         = new DnDSkillField(0, 0, true, false, DnDAbilities.Charisma);
            result.DisableDevice     = new DnDSkillField(0, 0, false, false, DnDAbilities.Intelligence);
            result.Disguise          = new DnDSkillField(0, 0, true, false, DnDAbilities.Charisma);
            result.EscapeArtist      = new DnDSkillField(0, 0, true, false, DnDAbilities.Dexterity);
            result.Forgery           = new DnDSkillField(0, 0, true, false, DnDAbilities.Intelligence);
            result.GatherInformation = new DnDSkillField(0, 0, true, false, DnDAbilities.Charisma);
            result.HandleAnimal      = new DnDSkillField(0, 0, false, false, DnDAbilities.Charisma);
            result.Heal           = new DnDSkillField(0, 0, true, false, DnDAbilities.Wisdom);
            result.Hide           = new DnDSkillField(0, 0, true, false, DnDAbilities.Dexterity);
            result.Intimidate     = new DnDSkillField(0, 0, true, false, DnDAbilities.Charisma);
            result.Jump           = new DnDSkillField(0, 0, true, false, DnDAbilities.Strength);
            result.Listen         = new DnDSkillField(0, 0, true, false, DnDAbilities.Wisdom);
            result.MoveSilently   = new DnDSkillField(0, 0, true, false, DnDAbilities.Dexterity);
            result.OpenLock       = new DnDSkillField(0, 0, false, false, DnDAbilities.Dexterity);
            result.Ride           = new DnDSkillField(0, 0, true, false, DnDAbilities.Dexterity);
            result.Search         = new DnDSkillField(0, 0, true, false, DnDAbilities.Intelligence);
            result.SenseMotive    = new DnDSkillField(0, 0, true, false, DnDAbilities.Wisdom);
            result.SleightOfHand  = new DnDSkillField(0, 0, false, false, DnDAbilities.Dexterity);
            result.SpellCraft     = new DnDSkillField(0, 0, false, true, DnDAbilities.Intelligence);
            result.Spot           = new DnDSkillField(0, 0, true, false, DnDAbilities.Wisdom);
            result.Survival       = new DnDSkillField(0, 0, true, false, DnDAbilities.Wisdom);
            result.Swim           = new DnDSkillField(0, 0, true, false, DnDAbilities.Strength);
            result.Tumble         = new DnDSkillField(0, 0, false, false, DnDAbilities.Dexterity);
            result.UseMagicDevice = new DnDSkillField(0, 0, false, false, DnDAbilities.Charisma);
            result.UseRope        = new DnDSkillField(0, 0, true, false, DnDAbilities.Dexterity);
            return(result);
        }
Ejemplo n.º 3
0
		public override DnDSkillModel CreateSkillModel()
		{
			DnDSkillModel result = new DnDSkillModel();
			result.Appraise = new DnDSkillField(0, 0, true, false, DnDAbilities.Intelligence);
			result.Balance = new DnDSkillField(0, 0, true, false, DnDAbilities.Dexterity);
			result.Bluff = new DnDSkillField(0, 0, true, false, DnDAbilities.Charisma);
			result.Climb = new DnDSkillField(0, 0, true, false, DnDAbilities.Strength);
			result.Concentration = new DnDSkillField(0, 0, true, true, DnDAbilities.Constitution);
			result.DecipherScript = new DnDSkillField(0, 0, false, true, DnDAbilities.Intelligence);
			result.Diplomacy = new DnDSkillField(0, 0, true, false, DnDAbilities.Charisma);
			result.DisableDevice = new DnDSkillField(0, 0, false, false, DnDAbilities.Intelligence);
			result.Disguise = new DnDSkillField(0, 0, true, false, DnDAbilities.Charisma);
			result.EscapeArtist = new DnDSkillField(0, 0, true, false, DnDAbilities.Dexterity);
			result.Forgery = new DnDSkillField(0, 0, true, false, DnDAbilities.Intelligence);
			result.GatherInformation = new DnDSkillField(0, 0, true, false, DnDAbilities.Charisma);
			result.HandleAnimal = new DnDSkillField(0, 0, false, false, DnDAbilities.Charisma);
			result.Heal = new DnDSkillField(0, 0, true, false, DnDAbilities.Wisdom);
			result.Hide = new DnDSkillField(0, 0, true, false, DnDAbilities.Dexterity);
			result.Intimidate = new DnDSkillField(0, 0, true, false, DnDAbilities.Charisma);
			result.Jump = new DnDSkillField(0, 0, true, false, DnDAbilities.Strength);
			result.Listen = new DnDSkillField(0, 0, true, false, DnDAbilities.Wisdom);
			result.MoveSilently = new DnDSkillField(0, 0, true, false, DnDAbilities.Dexterity);
			result.OpenLock = new DnDSkillField(0, 0, false, false, DnDAbilities.Dexterity);
			result.Ride = new DnDSkillField(0, 0, true, false, DnDAbilities.Dexterity);
			result.Search = new DnDSkillField(0, 0, true, false, DnDAbilities.Intelligence);
			result.SenseMotive = new DnDSkillField(0, 0, true, false, DnDAbilities.Wisdom);
			result.SleightOfHand = new DnDSkillField(0, 0, false, false, DnDAbilities.Dexterity);
			result.SpellCraft = new DnDSkillField(0, 0, false, true, DnDAbilities.Intelligence);
			result.Spot = new DnDSkillField(0, 0, true, false, DnDAbilities.Wisdom);
			result.Survival = new DnDSkillField(0, 0, true, false, DnDAbilities.Wisdom);
			result.Swim = new DnDSkillField(0, 0, true, false, DnDAbilities.Strength);
			result.Tumble = new DnDSkillField(0, 0, false, false, DnDAbilities.Dexterity);
			result.UseMagicDevice = new DnDSkillField(0, 0, false, false, DnDAbilities.Charisma);
			result.UseRope = new DnDSkillField(0, 0, true, false, DnDAbilities.Dexterity);
			return result;
		}
Ejemplo n.º 4
0
		public override void Deserialize(JSONObject obj)
		{
			mClassLevel = (int)obj.GetNumber(LEVEL);
			DeserializeKnownSpells(obj);
			DeserializeMainSpells(obj);
			DeserializeExtraSpells(obj);
			mSkills = new DnDSkillModel();
			mSkills.Deserialize(obj.GetObject(SKILLS));
			// spec:
			JSONArray tempArray = obj.GetArray(SPECIALIZATION);
			for (int i = 0; i < tempArray.Length; ++i)
			{
				if (i == 0) // first item is the specialization
				{
					mSpecialization = (DnDMagicSchool)((int)tempArray[i].Number);
				}
				else // the other items are the forbidden schools
				{
					mForbiddenSchools.Add((DnDMagicSchool)((int)tempArray[i].Number));
				}
			}
		}