Ejemplo n.º 1
0
    public static void east_bight_patrol_shadow(EventArgs args)
    {
        GameArgs  game_args         = (GameArgs)args;
        bool?     attack_undefended = game_args.attack_undefended;
        EnemyCard the_enemy         = (EnemyCard)game_args.secondary_card;
        Action    the_action        = () =>
        {
            LOTRAbility.ABILITY_FLAGS flag = LOTRAbility.ABILITY_FLAGS.PLUS_ONE_ATTACK_ENEMY;
            if (attack_undefended != null && attack_undefended.Value)
            {
                game.get_cur_player().increase_threat(3);
            }

            the_enemy.add_flag(flag);
        };

        game.execute_action(the_action);
        //game_args.what_to_do_after_event_or_if_no_response();
    }
Ejemplo n.º 2
0
    public static void dol_guldur_orcs_shadow(EventArgs args)
    {
        GameArgs  game_args         = (GameArgs)args;
        bool?     attack_undefended = game_args.attack_undefended;
        EnemyCard the_enemy         = (EnemyCard)game_args.secondary_card;
        Action    the_action        = () =>
        {
            LOTRAbility.ABILITY_FLAGS flag = LOTRAbility.ABILITY_FLAGS.PLUS_ONE_ATTACK_ENEMY;
            if (attack_undefended != null && attack_undefended.Value)
            {
                flag = LOTRAbility.ABILITY_FLAGS.PLUS_THREE_ATTACK_ENEMY;
            }

            the_enemy.add_flag(flag);
        };

        game.execute_action(the_action);
        //game_args.what_to_do_after_event_or_if_no_response();
    }
Ejemplo n.º 3
0
 public void remove_flag(LOTRAbility.ABILITY_FLAGS flag, bool all = false)
 {
     if (has_flag(flag))
     {
         List <LOTRAbility.ABILITY_FLAGS> new_flags = new List <LOTRAbility.ABILITY_FLAGS>();
         bool removed = false;
         foreach (var f in my_flags)
         {
             if (f != flag)
             {
                 new_flags.Add(f);
             }
             else if (!removed)
             {
                 removed = true;
             }
             else if (!all)
             {
                 new_flags.Add(f);
             }
         }
         my_flags = new_flags;
     }
 }
Ejemplo n.º 4
0
 public bool has_flag(LOTRAbility.ABILITY_FLAGS flag)
 {
     return(my_flags.Contains(flag));
 }
Ejemplo n.º 5
0
 public void add_flag(LOTRAbility.ABILITY_FLAGS flag)
 {
     my_flags.Add(flag);
 }