3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-24 03:33:06 +01:00

Spinach: Prevent lie-hunting for truth

This commit is contained in:
Pragmatic Software 2018-02-27 19:50:30 -08:00
parent e2f850a170
commit 30768c6b1d

View File

@ -680,15 +680,15 @@ sub spinach_cmd {
}
}
if (not $found_truth and ++$player->{lie_count} > 2) {
return "/msg $nick You cannot change your lie again this round.";
}
if ($found_truth) {
$self->send_message($self->{channel}, "$color{yellow}$nick has found the truth!$color{reset}");
return "$nick: Your lie is too similar to the truth! Please submit a different lie.";
}
if (++$player->{lie_count} > 2) {
return "/msg $nick You cannot change your lie again this round.";
}
my $changed = exists $player->{lie};
$player->{lie} = $arguments;
@ -1406,7 +1406,7 @@ sub choosecategory {
push @choices, $cat;
}
last if @choices == 8;
last if @choices == 6;
}
push @choices, 'RANDOM CATEGORY';
@ -1447,7 +1447,7 @@ sub choosecategory {
if (exists $state->{random_category}) {
delete $state->{random_category};
my $category = $state->{category_options}->[rand (@{$state->{category_options}} - 1)];
my $category = $state->{category_options}->[rand (@{$state->{category_options}} - 2)];
$self->send_message($self->{channel}, "Category: $category!");
$state->{current_category} = $category;
return 'next';