Beispiel #1
0
 void new_phase_started(LOTRGame.GAMEPHASE new_phase)
 {
     Debug.Log("new phase started");
     cur_phase = new_phase;
     foreach (LOTRPlayer player in players)
     {
         ///player.clear_abilities_on_phase_change(cur_phase);
         player.new_phase_started();
     }
 }
Beispiel #2
0
    public void clear_abilities_on_phase_change(LOTRGame.GAMEPHASE new_phase)
    {
        List <int> indicies_to_remove = new List <int>();

        for (var i = 0; i < abilities.Count; i++)
        {
            var ability = abilities[i];
            if (ability.expires_on_phase_change() && !ability.active_on_phase(new_phase))
            {
                indicies_to_remove.Add(i);
            }
        }

        foreach (var index in indicies_to_remove)
        {
            abilities.RemoveAt(index);
        }
    }
Beispiel #3
0
    public int get_willpower_committed(LOTRGame.GAMEPHASE cur_phase)
    {
        var result = 0;

        foreach (var h in heroes)
        {
            if (h.is_committed())
            {
                result += h.get_willpower();
            }
        }

        foreach (var h in ally_cards)
        {
            if (h.is_committed())
            {
                result += h.get_willpower();
            }
        }

        return(result);
    }
Beispiel #4
0
 public bool active_on_phase(LOTRGame.GAMEPHASE phase)
 {
     return(relevant_phase == phase);
 }