Beispiel #1
0
    public StatusEffect MakeCurse(Level level, Agent agent)
    {
        var curse = new StatusEffect()
        {
            Name           = $"[color={Globals.TextColorBad}]{Name}'s curse[/color]",
            TurnsRemaining = 25
        };

        Archetype.AddToCurse(this, level, agent, curse);
        foreach (var domain in Domains)
        {
            domain.AddToCurse(this, level, agent, curse);
        }

        foreach (var deity in Globals.Deities)
        {
            if (deity.Likes.Contains(GetShortTitle()))
            {
                if (!deity.FavorPerTeam.ContainsKey(agent.Team))
                {
                    deity.FavorPerTeam[agent.Team] = 0;
                }
                curse.AddEffect($"instant -favor of {deity.Name}",
                                () => deity.FavorPerTeam[agent.Team] -= 3,
                                () => { });
            }
            if (deity.Dislikes.Contains(GetShortTitle()))
            {
                if (!deity.FavorPerTeam.ContainsKey(agent.Team))
                {
                    deity.FavorPerTeam[agent.Team] = 0;
                }
                curse.AddEffect($"instant +favor of {deity.Name}",
                                () => deity.FavorPerTeam[agent.Team] += 3,
                                () => { });
            }
        }

        return(curse);
    }