grimreaper / wolf

Automatically exported from code.google.com/p/wolf
0 stars 0 forks source link

Last night automation #68

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
So you have a 5 player game.
You start, one dies, you lynch the wrong one.

By any logical analysis, the game is over.

if ( night \
  && len(roles['wolves']) \
     >= ( (len(roles['all'])-len(roles['wolves'])) - possibleKills ) ):

  wolf.kill(roles['seer'][0])
  while ( possibleKills = possibleKills - 1 ): # supposed to resolve False once the statement reaches 0. -1 is also False
    wolf.kill( random.choice( roles['all'] which are not in roles['wolves'] )

This will end the night and cause the daytime message of 'same number of wolves 
and villagers' to be very immediate.

This could be bad for 1 or 2 reasons. Wolves can always "forget" they're wolf, 
or they could be AFK and the players could have another chance. Just my 
thoughts; This is not very good to leave in a game where the players are called 
wolves. Why a wolf would miss a meal, I don't know.

Original issue reported on code.google.com by Codebrea...@gmail.com on 7 Oct 2011 at 7:27

GoogleCodeExporter commented 9 years ago
Also, killing the seer above the while loop isn't a good idea.
Seer could already be dead. And a 10 second timer for wolves to choose who to 
kill themselves isn't a bad idea.

Just that the end of a game shouldn't take 2 minutes for an AFK, lucky wolf.

Original comment by Codebrea...@gmail.com on 7 Oct 2011 at 7:30

GoogleCodeExporter commented 9 years ago
Would need to make sure that there are no harlots or guardian angels in the 
game. Otherwise, the wolf could target the Harlot or the GA could save the 
chosen player.

Perhaps some logic on it. Like, if the situation happens and the Harlot visits 
a wolf or the GA is targeted for mauling, the game insta-ends in the middle of 
night.

Original comment by Rainboy...@gmail.com on 13 Oct 2011 at 5:37

GoogleCodeExporter commented 9 years ago
Hmm. I didn't think this through very well.
I can't recommend this idea anymore if the logic is that hairy and specific.

Original comment by Codebrea...@gmail.com on 14 Oct 2011 at 1:49

GoogleCodeExporter commented 9 years ago
It might make sense to have a general fast-end if and only if the logic is 
simple. The waiting of 1.5 seconds to end the game otherwise is an okay 
tradeoff for code simplicity

Original comment by eitan@eitanadler.com on 14 Oct 2011 at 3:10