Fix mage class damage and improve mage snowball throw logic

Updated Mage health regeneration from 3 to 1 and adjusted snowball velocity randomness for better gameplay balance. Fixed comparison in SnowballEvent to use `equals` and corrected parameter assignment in `consumer.apply`. Incremented build number to reflect the changes.
This commit is contained in:
Teriuihi 2025-03-01 00:45:07 +01:00
parent 18b211f681
commit 6008378258
4 changed files with 8 additions and 8 deletions

View File

@ -150,10 +150,10 @@ public class SnowballEvent implements Listener {
return;
}
if (teamPlayerHit.get().getTeam().getId() == teamPlayerShooter.get().getTeam().getId()) {
if (teamPlayerHit.get().getTeam().getId().equals(teamPlayerShooter.get().getTeam().getId())) {
log.debug("The shooter hit a member of their own team");
return;
}
consumer.apply(hitPlayer, shooter, teamPlayerHit.get(), snowball);
consumer.apply(hitPlayer, shooter, teamPlayerShooter.get(), snowball);
}
}

View File

@ -26,7 +26,7 @@ public class MageCreator {
@Contract("_ -> new")
public static @NotNull GameClass createMage(@NotNull TeamColor teamColor) {
return new Mage(getArmor(), getTools(teamColor), getDisplayItem(teamColor),
20, 100, 3);
20, 100, 1);
}
@Contract(value = " -> new", pure = true)

View File

@ -50,9 +50,9 @@ public class Mage extends GameClass {
snowball.setShooter(shooter);
double velocityChangeX = (Math.random() - 0.5) * 0.2;
double velocityChangeY = (Math.random() - 0.5) * 0.2;
double velocityChangeZ = (Math.random() - 0.5) * 0.2;
double velocityChangeX = (Math.random() - 0.5) * 0.5;
double velocityChangeY = (Math.random() - 0.5) * 0.5;
double velocityChangeZ = (Math.random() - 0.5) * 0.5;
Vector newVelocity = velocity.clone().add(new Vector(velocityChangeX, velocityChangeY, velocityChangeZ));

View File

@ -1,3 +1,3 @@
#Sat Mar 01 00:23:05 CET 2025
buildNumber=86
#Sat Mar 01 00:39:55 CET 2025
buildNumber=91
version=0.1