import random class Events: def __init__(self, game): self.game = game def random_event(self): events = [ ("Economic Boom", "Your country experiences an economic boom. Public support increases by 10%.", 10, 0, 10, 200, -1), ("Scandal", "A scandal erupts involving your campaign. Public support decreases by 15%.", -15, 0, -15, 0, 0), ("Foreign Policy Win", "You achieve a major foreign policy victory. Influence increases by 20%.", 0, 20, 0, 0, 0), ("Natural Disaster", "A natural disaster strikes. You lose $30 in relief efforts.", -30, 0, -10, -100, 1), ("Military Conflict", "A military conflict arises requiring immediate attention.", 0, 0, -20, 0, 0), ("Opponent Friction", "An opponent takes action against you.", 0, 0, -10, 0, 0), ("Foreign Interference", "A foreign country interferes with your campaign.", 0, 0, -10, 0, 0) ] event = random.choice(events) print(f"Random Event: {event[0]}") print(f"{event[1]}") self.game.money += event[2] self.game.influence += event[3] self.game.public_support += event[4] self.game.gdp += event[5] self.game.unemployment_rate += event[6] if event[0] == "Military Conflict": self.game.handle_conflict() elif event[0] == "Opponent Friction": self.game.opponent_friction() elif event[0] == "Foreign Interference": self.game.foreign_interference()