private static void drink( Player player, int amount_min, int amount_max, int[] extra_possibilities, boolean tavern, double gas_chance) { int amount = Random.integer_from(amount_min, amount_max); for (int i = 0; i < amount; i++) { Type.delay(".", 1100); } System.out.println(); boolean overdrinking_weaken = false; Type.delay("💧: "); if (player.wetness + amount < player.quenched) Type.delay_line( Random.text_of( new String[] { "You could drink some more.", "You are still thirsty.", "Your throat is still somewhat dry." })); else if (player.wetness + amount == player.quenched) Type.delay_line( Random.text_of( new String[] { "You have drunk enough.", "You have quenched your thirst.", "You are no longer thirsty." })); else { if (player.wetness == player.quenched) { Type.delay_line( Random.text_of(new String[] {"You have overdrunk.", "You feel waterlogged."})); overdrinking_weaken = true; if (gas_chance + .65 <= .9) gas_chance += .65; else gas_chance = .9; } else Type.delay_line( Random.text_of( new String[] { "You have drunk enough.", "You have quenched your thirst.", "You are no longer thirsty." })); amount = player.quenched - player.wetness; } player.wetness += amount; player.display_wetnessbar(); if (overdrinking_weaken) player.weaken(1); if (player.wetness >= player.quenched - 1) extra(player, extra_possibilities, tavern); gas(gas_chance); }