Skip to content
Extraits de code Groupes Projets
Valider 9386078b rédigé par ElTata's avatar ElTata :ok_hand:
Parcourir les fichiers

EvilChase fix

fix evilchase which were not happening
add a limitation of only one time out of five
parent 2f125496
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -389,17 +389,18 @@ sub evilchase {
my @opps = ();
for (my $x = $x_pos-3; $x <= $x_pos+3; $x++) {
for (my $y = $y_pos-3; $y <= $y_pos+3; $y++) {
if (exists($positions->{x}{y}) &&
$positions->{x}{y}{user} ne $player) {
push @opps, $positions->{x}{y}{user};
if (exists($positions->{$x}{$y}) &&
$positions->{$x}{$y}{user} ne $player) {
push @opps, $positions->{$x}{$y}{user};
}
}
}
return unless (@opps);
return unless (@opps && rand(5) < 1);
my $opp = $opps[int(rand(@opps))];
Irpg::Irc::chanmsg("$player, full of hatred and disdain for ".
Irpg::Irc::chanmsg(Irpg::Utils::clog(
"$player, full of hatred and disdain for ".
pronoun(2, $rps->{$player}{gender})." kind, has chased ".
"after $opp who passed by.");
"after $opp who passed by."));
collision_action($player, $opp);
}
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter