コード例 #1
0
    public void TakeMentality(Creature caster, MentalityType mt)
    {
        MentalityType prev = m_mentality;

        m_mentality = mt;

        if (OnMentalityChange != null)
        {
            OnMentalityChange(caster, prev, mt);
        }
    }
コード例 #2
0
ファイル: District.cs プロジェクト: p-svacha/TheWorldGame
 private bool HasMentality(MentalityType t)
 {
     return(MentalityTypes.Contains(t));
 }
コード例 #3
0
ファイル: Creature.cs プロジェクト: drawpixel/DHunter
    public void TakeMentality(Creature caster, MentalityType mt)
    {
        MentalityType prev = m_mentality;
        m_mentality = mt;

        if (OnMentalityChange != null)
        {
            OnMentalityChange(caster, prev, mt);
        }
    }
コード例 #4
0
        public Mentality(MentalityType type)
        {
            Type = type;

            switch (type)
            {
            case MentalityType.Undecided:
                Name        = "Undecided";
                Description = "Parties have a very high\nbase chance of being voted for.";
                break;

            case MentalityType.Decided:
                Name        = "Decided";
                Description = "Parties have a very low base chance of being voted for.";
                break;

            case MentalityType.Religious:
                Name        = "Religious";
                Description = "Religion policy effectiveness in this district is doubled.";
                break;

            case MentalityType.Secular:
                Name        = "Secular";
                Description = "Religion policy effectiveness in this district is halved.";
                break;

            case MentalityType.Linguistic:
                Name        = "Linguistic";
                Description = "Language policy effectiveness in this district is doubled.";
                break;

            case MentalityType.Nonlinguistic:
                Name        = "Non-Linguistic";
                Description = "Language policy effectiveness in this district is halved.";
                break;

            case MentalityType.HighVoterTurnout:
                Name        = "High Voter Turnout";
                Description = "A big portion of the population in this district will cast their vote.";
                break;

            case MentalityType.LowVoterTurnout:
                Name        = "Low Voter Turnout";
                Description = "A low portion of the population in this district will cast their vote.";
                break;

            case MentalityType.Rebellious:
                Name        = "Rebellious";
                Description = "The party that won the last election will get a malus for the next one";
                break;

            case MentalityType.Stable:
                Name        = "Stable";
                Description = "The party that won the last election will get a bonus for the next one";
                break;

            case MentalityType.Revolutionary:
                Name        = "Revolutionary";
                Description = "The party that won the last election will be excluded for the next one";
                break;

            case MentalityType.Predictable:
                Name        = "Predictable";
                Description = "Election results reflect the popularity of the parties very well which will lead to very consistent and non-random results.";
                break;

            case MentalityType.Unpredictable:
                Name        = "Unpredictable";
                Description = "Election results reflect the popularity of the parties poorly which can lead to inconsistent and random results.";
                break;

            default:
                throw new System.Exception("MentalityType not handled for Mentality Name & Description");
            }
        }