def swamped(env: GameEnvironment): env.mileage = env.mileage - 20 - (20 * random()) env.food -= 15 env.clothes -= 10 steady_print( "Your wagon gets swamped fording a river; you lose food and clothes.\n" )
def hailstorm(env: GameEnvironment): env.mileage = env.mileage - 5 - 10 * random() env.ammo -= 150 env.repairs = env.repairs - 2 - 2 * random() steady_print( "You're caught in a fierce hailstorm; ammo and supplies are damaged.\n" )
def blizzard(env: GameEnvironment): steady_print( "Blizzard in the mountain pass. Going is slow; supplies are lost.\n") env.mileage = env.mileage - 30 - (40 * random()) env.food -= 12 env.ammo -= 200 env.repairs -= 5 if env.clothes < 18 + (2 * random()): illness(env)
def bad_weather(env: GameEnvironment): if env.mileage > 950: # It snows enough_clothing = env.clothes < 11 + (2 * random()) # noinspection SpellCheckingInspection steady_print( f"Cold weather…Brrrrrrr!…You{' do not ' if not enough_clothing else ' '}" f"have enough clothing to keep warm.\n") if not enough_clothing: illness(env) else: # It rains steady_print( "Heavy rains. Traveling is slow in the mud and you break your spare\n" "ox yoke using it to pry your wagon out of the mud. Worse yet, some\n" "of your ammo is damaged by the water.\n") env.mileage = env.mileage - 5 - (10 * random()) env.repairs -= 7 env.ammo -= 400 env.food -= 5
def heavy_fog(env: GameEnvironment): env.mileage = env.mileage - 10 - 5 * random() steady_print( "You lose your way in heavy fog. Time lost regaining the trail.\n")
def no_water(env: GameEnvironment): env.mileage = env.mileage - 2 - (10 * random()) steady_print( "Nothing but contaminated and stagnant water near the trail.\n" "You lose time looking for a clean spring or creek.\n")
def broken_arm(env: GameEnvironment): env.mileage = env.mileage - 5 - (4 * random()) env.repairs = env.repairs - 1 - (2 * random()) steady_print( "Bad luck…your daughter breaks her arm. You must stop and\n" "make a splint and sling with some of your medical supplies.\n")
def wagon_breakdown(env: GameEnvironment): env.mileage = env.mileage - 15 - (5 * random()) env.repairs -= 4 steady_print( "Your wagon breaks down. It costs you time and supplies to fix it.\n")