예제 #1
0
    public StatusEffect MakeBlessing(Level level, Agent agent)
    {
        var blessing = new StatusEffect()
        {
            Name           = $"[color={Globals.TextColorGood}]{Name}'s blessing[/color]",
            TurnsRemaining = 25
        };

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

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

        return(blessing);
    }