mirror of
https://github.com/exituser/Brewery.git
synced 2026-09-17 05:28:59 +00:00
Potion Effects have different durations now
This commit is contained in:
@@ -469,11 +469,14 @@ public class BPlayer {
|
||||
public void drunkEffects(Player player) {
|
||||
int duration = 10 - getQuality();
|
||||
duration += drunkeness / 2;
|
||||
duration *= 20;
|
||||
if (duration > 960) {
|
||||
duration *= 5;
|
||||
if (duration > 240) {
|
||||
duration *= 5;
|
||||
} else if (duration < 460) {
|
||||
duration = 460;
|
||||
} else if (duration < 115) {
|
||||
duration = 115;
|
||||
}
|
||||
if (!P.use1_14) {
|
||||
duration *= 4;
|
||||
}
|
||||
PotionEffectType.CONFUSION.createEffect(duration, 0).apply(player);
|
||||
}
|
||||
@@ -481,15 +484,18 @@ public class BPlayer {
|
||||
public static void addQualityEffects(int quality, int brewAlc, Player player) {
|
||||
int duration = 7 - quality;
|
||||
if (quality == 0) {
|
||||
duration *= 500;
|
||||
duration *= 125;
|
||||
} else if (quality <= 5) {
|
||||
duration *= 250;
|
||||
duration *= 62;
|
||||
} else {
|
||||
duration = 100;
|
||||
duration = 25;
|
||||
if (brewAlc <= 10) {
|
||||
duration = 0;
|
||||
}
|
||||
}
|
||||
if (!P.use1_14) {
|
||||
duration *= 4;
|
||||
}
|
||||
if (duration > 0) {
|
||||
PotionEffectType.POISON.createEffect(duration, 0).apply(player);
|
||||
}
|
||||
@@ -498,9 +504,12 @@ public class BPlayer {
|
||||
if (quality <= 5) {
|
||||
duration = 10 - quality;
|
||||
duration += brewAlc;
|
||||
duration *= 60;
|
||||
duration *= 15;
|
||||
} else {
|
||||
duration = 120;
|
||||
duration = 30;
|
||||
}
|
||||
if (!P.use1_14) {
|
||||
duration *= 4;
|
||||
}
|
||||
PotionEffectType.BLINDNESS.createEffect(duration, 0).apply(player);
|
||||
}
|
||||
@@ -516,7 +525,10 @@ public class BPlayer {
|
||||
}
|
||||
|
||||
public void hangoverEffects(final Player player) {
|
||||
int duration = offlineDrunk * 50 * getHangoverQuality();
|
||||
int duration = offlineDrunk * 25 * getHangoverQuality();
|
||||
if (!P.use1_14) {
|
||||
duration *= 2;
|
||||
}
|
||||
int amplifier = getHangoverQuality() / 3;
|
||||
|
||||
PotionEffectType.SLOW.createEffect(duration, amplifier).apply(player);
|
||||
|
||||
Reference in New Issue
Block a user