Пример #1
0
        //Get the value of a protagonist's social statistic
        public static int GetSocialStat(SocialStats socialStat)
        {
            uint  address = GetSocialStatAddress(socialStat);
            short value   = API.ReadShort(address);

            return(Convert.ToInt16(value));
        }
Пример #2
0
        //Set the value of a protagonist's social statistic
        public static void SetSocialStat(SocialStats socialStat, int socialStatValue)
        {
            uint  address = GetSocialStatAddress(socialStat);
            short value   = (short)socialStatValue;

            API.WriteShort(address, value);
        }
Пример #3
0
    // Use this for initialization
    void Start()
    {
        var dieDic = DieTypes.AttackDie;

        stats       = gameObject.AddComponent <RPGDefaultStats>();
        socialStats = gameObject.GetComponent <SocialStats>();
        health      = stats.GetStat <RPGVital>(RPGStatType.Health);
        willpower   = stats.GetStat <RPGVital>(RPGStatType.Willpower);
        stamina     = stats.GetStat <RPGVital>(RPGStatType.Stamina);
        dex         = stats.GetStat <RPGAttribute>(RPGStatType.Dexterity);
        attackDie   = stats.GetStat <RPGAttribute>(RPGStatType.DieType);
        level       = stats.GetStat <RPGAttribute>(RPGStatType.Level);
        attack      = stats.GetStat <RPGAttribute>(RPGStatType.Attack);
        will        = stats.GetStat <RPGAttribute>(RPGStatType.Will);
        defense     = stats.GetStat <RPGAttribute>(RPGStatType.Defense);
        alive       = stats.GetStat <RPGAttribute>(RPGStatType.Alive);
        speed       = stats.GetStat <RPGAttribute>(RPGStatType.Speed);
        evasion     = stats.GetStat <RPGAttribute>(RPGStatType.Evasion);

        if (gameObject.GetComponent <CurrentState>().inCombat)
        {
            SetPlayerStatusBars();
        }


        ///Modifiy base stats
        ///
        health.StatBaseValue += 10;
        health.SetCurrentValueToMax();
        attackDie.StatBaseValue = DieTypes.GetAttackDie(DieTypes.DieType.D4);
        dex.StatBaseValue       = dex.StatBaseValue + 1;
        dex.UpdateLinkers();
        Debug.Log("Player health is: " + health.StatBaseValue);
        Debug.Log("Extroversion: " + socialStats.GetStat(SocialStats.SocialStatType.Extroversion).StatBaseValue);

        ///Tests
        socialStats.SocialStatChange(socialStats.GetStat(SocialStats.SocialStatType.Extroversion));
        Debug.Log("Extroversion after increment: " + socialStats.GetStat(SocialStats.SocialStatType.Extroversion).StatValue);
    }
Пример #4
0
        public static string SocialStatName(SocialStats socialStat, int socialStatValue)
        {
            int value = socialStatValue;

            if (socialStat == SocialStats.Knowledge)
            {
                if (value <= 33)
                {
                    return("Oblivious");
                }
                else if (value <= 81)
                {
                    return("Learned");
                }
                else if (value <= 125)
                {
                    return("Scholarly");
                }
                else if (value <= 191)
                {
                    return("Encyclopedic");
                }
                else
                {
                    return("Erudite");
                }
            }
            else if (socialStat == SocialStats.Charm)
            {
                if (value <= 5)
                {
                    return("Existent");
                }
                else if (value <= 51)
                {
                    return("Head-Turning");
                }
                else if (value <= 91)
                {
                    return("Suave");
                }
                else if (value <= 131)
                {
                    return("Charismatic");
                }
                else
                {
                    return("Debonair");
                }
            }
            else if (socialStat == SocialStats.Proficiency)
            {
                if (value <= 11)
                {
                    return("Bumbling");
                }
                else if (value <= 33)
                {
                    return("Decent");
                }
                else if (value <= 59)
                {
                    return("Skilled");
                }
                else if (value <= 86)
                {
                    return("Masterful");
                }
                else
                {
                    return("Transcendent");
                }
            }
            else if (socialStat == SocialStats.Guts)
            {
                if (value <= 10)
                {
                    return("Milquetoast");
                }
                else if (value <= 28)
                {
                    return("Bold");
                }
                else if (value <= 56)
                {
                    return("Staunch");
                }
                else if (value <= 112)
                {
                    return("Dauntless");
                }
                else
                {
                    return("Lionhearted");
                }
            }
            else if (socialStat == SocialStats.Kindness)
            {
                if (value <= 13)
                {
                    return("Inoffensive");
                }
                else if (value <= 43)
                {
                    return("Considerate");
                }
                else if (value <= 90)
                {
                    return("Empathetic");
                }
                else if (value <= 135)
                {
                    return("Selfless");
                }
                else
                {
                    return("Angelic");
                }
            }

            return("unknown");
        }
Пример #5
0
 //Returns the address of a protagonist's skill
 public static uint GetSocialStatAddress(SocialStats socialStat)
 {
     return(0x10C1870 + ((uint)socialStat * 0x02));
 }