Пример #1
0
def clan_additional_score(c, owner):
  additional = 0
  query.audit_flush_clan(c, owner)

  combo_pos = query.clan_combo_pos(c, owner)
  additional += log_temp_clan_points( c, owner,
                                      'clan_combo_scores_Nth:%d' % (combo_pos + 1),
                                      get_points(
                                              combo_pos,
                                              200, 100, 50 ) )

  uscore_pos = query.clan_unique_pos(c, owner)
  additional += log_temp_clan_points( c, owner,
                                      'clan_top_unique_killer:%d' % (uscore_pos + 1),
                                      get_points(
                                              uscore_pos,
                                              100, 50, 20 ) )

  zig_depth = int((query.clan_zig_depth(c, owner) + 1)/2)
  additional += log_temp_clan_points( c, owner,
                                      'zig_dive:%d' % zig_depth,
                                      5 * zig_depth)

# Now we give race/class points to clans.
  for g in query.clan_race_wins(c, owner):
    key = 'species_win:' + g[0]
    points = query.clan_max_points(c, owner, key)
    additional += log_temp_clan_points(c, owner, key, points)
  for g in query.clan_class_wins(c, owner):
    key = 'class_win:' + g[0]
    points = query.clan_max_points(c, owner, key)
    additional += log_temp_clan_points(c, owner, key, points)
  for g in query.clan_god_wins(c, owner):
    banner_god = g[0].lower().replace(' ', '_')
    key = 'god_win:' + banner_god
    points = query.clan_max_points(c, owner, key)
    additional += log_temp_clan_points(c, owner, key, points)

  query.set_clan_points(c, owner, additional)
  # A clan-based banner.
  for player in query.get_saints(c, owner):
    banner.award_banner(c, player, 'beogh', 1, temp=True)
Пример #2
0
 def do_saint(r, prestige):
   for player in query.get_saints(c, r[0]):
     award_banner(c, player, 'beogh', prestige, temp=True)