From c41c80c5764307457caf28b4b264a1e51734f25e Mon Sep 17 00:00:00 2001 From: ElTata <eltata@firemail.cc> Date: Tue, 1 Sep 2020 11:44:49 +0200 Subject: [PATCH] fix: goodness event gain of 2nd player is fixed --- Irpg/Event.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Irpg/Event.pm b/Irpg/Event.pm index a781d8e..df73576 100644 --- a/Irpg/Event.pm +++ b/Irpg/Event.pm @@ -417,10 +417,10 @@ sub goodness { "evil men poison them. Together have they prayed to their ". "God, and it is his light that now shines upon them. $gain\% ". "of their time is removed from their clocks.")); - $gain = int(($gain/100)*$rps->{$players[0]}{next}); - $rps->{$players[0]}{next} += int($rps->{$players[0]}{class}->real_gain(-$gain)); - $gain = int(($gain/100)*$rps->{$players[1]}{next}); - $rps->{$players[1]}{next} += int($rps->{$players[1]}{class}->real_gain(-$gain)); + my $gain_pl = int(($gain/100)*$rps->{$players[0]}{next}); + $rps->{$players[0]}{next} += int($rps->{$players[0]}{class}->real_gain(-$gain_pl)); + $gain_pl = int(($gain/100)*$rps->{$players[1]}{next}); + $rps->{$players[1]}{next} += int($rps->{$players[1]}{class}->real_gain(-$gain_pl)); Irpg::Irc::chanmsg("$players[0] reaches next level in ". duration($rps->{$players[0]}{next})."."); Irpg::Irc::chanmsg("$players[1] reaches next level in ". -- GitLab