示例#1
0
        public float MaxSkillRank(DnDSkillField field)
        {
            int max = (int)(Math.PI + ClassLevel);

            if (field.ClassSkill)
            {
                return(max);
            }
            else
            {
                return((float)Math.Round(max / 2.0, 2));
            }
        }
		public float MaxSkillRank(DnDSkillField field)
		{
			int max = (int)(Math.PI + ClassLevel);
			if (field.ClassSkill)
			{
				return max;
			}
			else
			{
				return (float)Math.Round(max / 2.0, 2);
			}
		}
		public override void Deserialize(JSONObject obj)
		{
			JSONObject tempObj = obj.GetObject(cAppraise);
			DnDSkillField tempField = new DnDSkillField();
			tempField.Deserialize(tempObj);
			Appraise = tempField;
			tempObj = obj.GetObject(cBalance);
			tempField = new DnDSkillField();
			tempField.Deserialize(tempObj);
			Balance = tempField;
			tempObj = obj.GetObject(cBluff);
			tempField = new DnDSkillField();
			tempField.Deserialize(tempObj);
			Bluff = tempField;
			tempObj = obj.GetObject(cClimb);
			tempField = new DnDSkillField();
			tempField.Deserialize(tempObj);
			Climb = tempField;
			tempObj = obj.GetObject(cConcentration);
			tempField = new DnDSkillField();
			tempField.Deserialize(tempObj);
			Concentration = tempField;
			tempObj = obj.GetObject(cDecipherScript);
			tempField = new DnDSkillField();
			tempField.Deserialize(tempObj);
			DecipherScript = tempField;
			tempObj = obj.GetObject(cDiplomacy);
			tempField = new DnDSkillField();
			tempField.Deserialize(tempObj);
			Diplomacy = tempField;
			tempObj = obj.GetObject(cDisableDevice);
			tempField = new DnDSkillField();
			tempField.Deserialize(tempObj);
			DisableDevice = tempField;
			tempObj = obj.GetObject(cDisguise);
			tempField = new DnDSkillField();
			tempField.Deserialize(tempObj);
			Disguise = tempField;
			tempObj = obj.GetObject(cEscapeArtist);
			tempField = new DnDSkillField();
			tempField.Deserialize(tempObj);
			EscapeArtist = tempField;
			tempObj = obj.GetObject(cForgery);
			tempField = new DnDSkillField();
			tempField.Deserialize(tempObj);
			Forgery = tempField;
			tempObj = obj.GetObject(cGatherInformation);
			tempField = new DnDSkillField();
			tempField.Deserialize(tempObj);
			GatherInformation = tempField;
			tempObj = obj.GetObject(cHandleAnimal);
			tempField = new DnDSkillField();
			tempField.Deserialize(tempObj);
			HandleAnimal = tempField;
			tempObj = obj.GetObject(cHeal);
			tempField = new DnDSkillField();
			tempField.Deserialize(tempObj);
			Heal = tempField;
			tempObj = obj.GetObject(cHide);
			tempField = new DnDSkillField();
			tempField.Deserialize(tempObj);
			Hide = tempField;
			tempObj = obj.GetObject(cIntimidate);
			tempField = new DnDSkillField();
			tempField.Deserialize(tempObj);
			Intimidate = tempField;
			tempObj = obj.GetObject(cJump);
			tempField = new DnDSkillField();
			tempField.Deserialize(tempObj);
			Jump = tempField;
			tempObj = obj.GetObject(cListen);
			tempField = new DnDSkillField();
			tempField.Deserialize(tempObj);
			Listen = tempField;
			tempObj = obj.GetObject(cMoveSilently);
			tempField = new DnDSkillField();
			tempField.Deserialize(tempObj);
			MoveSilently = tempField;
			tempObj = obj.GetObject(cOpenLock);
			tempField = new DnDSkillField();
			tempField.Deserialize(tempObj);
			OpenLock = tempField;
			tempObj = obj.GetObject(cRide);
			tempField = new DnDSkillField();
			tempField.Deserialize(tempObj);
			Ride  = tempField;
			tempObj = obj.GetObject(cSearch);
			tempField = new DnDSkillField();
			tempField.Deserialize(tempObj);
			Search = tempField;
			tempObj = obj.GetObject(cSenseMotive);
			tempField = new DnDSkillField();
			tempField.Deserialize(tempObj);
			SenseMotive = tempField;
			tempObj = obj.GetObject(cSleightOfHand);
			tempField = new DnDSkillField();
			tempField.Deserialize(tempObj);
			SleightOfHand = tempField;
			tempObj = obj.GetObject(cSpellCraft);
			tempField = new DnDSkillField();
			tempField.Deserialize(tempObj);
			SpellCraft = tempField;
			tempObj = obj.GetObject(cSpot);
			tempField = new DnDSkillField();
			tempField.Deserialize(tempObj);
			Spot = tempField;
			tempObj = obj.GetObject(cSurvival);
			tempField = new DnDSkillField();
			tempField.Deserialize(tempObj);
			Survival = tempField;
			tempObj = obj.GetObject(cSwim);
			tempField = new DnDSkillField();
			tempField.Deserialize(tempObj);
			Swim = tempField;
			tempObj = obj.GetObject(cTumble);
			tempField = new DnDSkillField();
			tempField.Deserialize(tempObj);
			Tumble = tempField;
			tempObj = obj.GetObject(cUseMagicDevice);
			tempField = new DnDSkillField();
			tempField.Deserialize(tempObj);
			UseMagicDevice = tempField;
			tempObj = obj.GetObject(cUseRope);
			tempField = new DnDSkillField();
			tempField.Deserialize(tempObj);
			UseRope = tempField;
		}
示例#4
0
        public override void Deserialize(JSONObject obj)
        {
            JSONObject    tempObj   = obj.GetObject(cAppraise);
            DnDSkillField tempField = new DnDSkillField();

            tempField.Deserialize(tempObj);
            Appraise  = tempField;
            tempObj   = obj.GetObject(cBalance);
            tempField = new DnDSkillField();
            tempField.Deserialize(tempObj);
            Balance   = tempField;
            tempObj   = obj.GetObject(cBluff);
            tempField = new DnDSkillField();
            tempField.Deserialize(tempObj);
            Bluff     = tempField;
            tempObj   = obj.GetObject(cClimb);
            tempField = new DnDSkillField();
            tempField.Deserialize(tempObj);
            Climb     = tempField;
            tempObj   = obj.GetObject(cConcentration);
            tempField = new DnDSkillField();
            tempField.Deserialize(tempObj);
            Concentration = tempField;
            tempObj       = obj.GetObject(cDecipherScript);
            tempField     = new DnDSkillField();
            tempField.Deserialize(tempObj);
            DecipherScript = tempField;
            tempObj        = obj.GetObject(cDiplomacy);
            tempField      = new DnDSkillField();
            tempField.Deserialize(tempObj);
            Diplomacy = tempField;
            tempObj   = obj.GetObject(cDisableDevice);
            tempField = new DnDSkillField();
            tempField.Deserialize(tempObj);
            DisableDevice = tempField;
            tempObj       = obj.GetObject(cDisguise);
            tempField     = new DnDSkillField();
            tempField.Deserialize(tempObj);
            Disguise  = tempField;
            tempObj   = obj.GetObject(cEscapeArtist);
            tempField = new DnDSkillField();
            tempField.Deserialize(tempObj);
            EscapeArtist = tempField;
            tempObj      = obj.GetObject(cForgery);
            tempField    = new DnDSkillField();
            tempField.Deserialize(tempObj);
            Forgery   = tempField;
            tempObj   = obj.GetObject(cGatherInformation);
            tempField = new DnDSkillField();
            tempField.Deserialize(tempObj);
            GatherInformation = tempField;
            tempObj           = obj.GetObject(cHandleAnimal);
            tempField         = new DnDSkillField();
            tempField.Deserialize(tempObj);
            HandleAnimal = tempField;
            tempObj      = obj.GetObject(cHeal);
            tempField    = new DnDSkillField();
            tempField.Deserialize(tempObj);
            Heal      = tempField;
            tempObj   = obj.GetObject(cHide);
            tempField = new DnDSkillField();
            tempField.Deserialize(tempObj);
            Hide      = tempField;
            tempObj   = obj.GetObject(cIntimidate);
            tempField = new DnDSkillField();
            tempField.Deserialize(tempObj);
            Intimidate = tempField;
            tempObj    = obj.GetObject(cJump);
            tempField  = new DnDSkillField();
            tempField.Deserialize(tempObj);
            Jump      = tempField;
            tempObj   = obj.GetObject(cListen);
            tempField = new DnDSkillField();
            tempField.Deserialize(tempObj);
            Listen    = tempField;
            tempObj   = obj.GetObject(cMoveSilently);
            tempField = new DnDSkillField();
            tempField.Deserialize(tempObj);
            MoveSilently = tempField;
            tempObj      = obj.GetObject(cOpenLock);
            tempField    = new DnDSkillField();
            tempField.Deserialize(tempObj);
            OpenLock  = tempField;
            tempObj   = obj.GetObject(cRide);
            tempField = new DnDSkillField();
            tempField.Deserialize(tempObj);
            Ride      = tempField;
            tempObj   = obj.GetObject(cSearch);
            tempField = new DnDSkillField();
            tempField.Deserialize(tempObj);
            Search    = tempField;
            tempObj   = obj.GetObject(cSenseMotive);
            tempField = new DnDSkillField();
            tempField.Deserialize(tempObj);
            SenseMotive = tempField;
            tempObj     = obj.GetObject(cSleightOfHand);
            tempField   = new DnDSkillField();
            tempField.Deserialize(tempObj);
            SleightOfHand = tempField;
            tempObj       = obj.GetObject(cSpellCraft);
            tempField     = new DnDSkillField();
            tempField.Deserialize(tempObj);
            SpellCraft = tempField;
            tempObj    = obj.GetObject(cSpot);
            tempField  = new DnDSkillField();
            tempField.Deserialize(tempObj);
            Spot      = tempField;
            tempObj   = obj.GetObject(cSurvival);
            tempField = new DnDSkillField();
            tempField.Deserialize(tempObj);
            Survival  = tempField;
            tempObj   = obj.GetObject(cSwim);
            tempField = new DnDSkillField();
            tempField.Deserialize(tempObj);
            Swim      = tempField;
            tempObj   = obj.GetObject(cTumble);
            tempField = new DnDSkillField();
            tempField.Deserialize(tempObj);
            Tumble    = tempField;
            tempObj   = obj.GetObject(cUseMagicDevice);
            tempField = new DnDSkillField();
            tempField.Deserialize(tempObj);
            UseMagicDevice = tempField;
            tempObj        = obj.GetObject(cUseRope);
            tempField      = new DnDSkillField();
            tempField.Deserialize(tempObj);
            UseRope = tempField;
        }