latest raw and a fix for the battle royal points
This commit is contained in:
parent
e150e0ca8a
commit
0b75181002
@ -186,6 +186,8 @@ class Match(models.Model):
|
||||
losers = []
|
||||
title_teams = {}
|
||||
team_count = 0
|
||||
battle_royal = False
|
||||
|
||||
for team in self.teams.all():
|
||||
for star in team.members.all():
|
||||
points[star.id] = 0
|
||||
@ -218,6 +220,7 @@ class Match(models.Model):
|
||||
elif team_count > 6:
|
||||
base_points = team_count / 2
|
||||
allies = 0 # no allies in a rumble
|
||||
battle_royal = True
|
||||
else:
|
||||
# normal wins are worth 2
|
||||
allies = winner_count - 1
|
||||
@ -245,7 +248,7 @@ class Match(models.Model):
|
||||
for star in title_teams[self.title_at_stake
|
||||
].members.all():
|
||||
points[star.id] += 1
|
||||
else:
|
||||
elif not battle_royal:
|
||||
# look over titles in match, to score a title-nondefense
|
||||
for title, title_team in title_teams.iteritems():
|
||||
# beat someone w/ title in a non-defense
|
||||
|
16
league.py
16
league.py
@ -218,3 +218,19 @@ event.add_match(['jimmyuso', 'jeyuso'], ['titusoneil', 'darrenyoung'],
|
||||
event.add_match('sheamus', 'dolphziggler', winner='sheamus',
|
||||
outcome='normal')
|
||||
league.score_event(event)
|
||||
|
||||
|
||||
event = Event.objects.create(name='RAW', date='2012-06-25')
|
||||
event.add_match('kane', 'cmpunk', 'danielbryan', winner='danielbryan',
|
||||
outcome='normal')
|
||||
event.add_match('brodusclay', 'bigshow', winner='bigshow', outcome='normal')
|
||||
event.add_match('santinomarella', 'jackswagger', winner='santinomarella',
|
||||
title_at_stake='us', outcome='normal')
|
||||
event.add_match('dolphziggler', 'albertodelrio', notes='botched?')
|
||||
event.add_match('bethphoenix', 'aliciafox', 'kaitlyn', 'maxine', 'rosamendes',
|
||||
'nobody1', 'vickieguerrero', 'aj', 'natalya', 'layla',
|
||||
winner='aj', notes='beach battle royal')
|
||||
event.add_match('johncena', 'chrisjericho', outcome='dq', winner='johncena',
|
||||
notes='big show interferes')
|
||||
league.score_event(event)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user