def log_skill(self, amount, target, old_value, new_value): # coloring if self.caster in self.world.yourteam: color = utils.color_green else: color = utils.color_red description_low = [ "punches", "kicks", "throws a pebble at" ] description_mid = [ "lands a blow on", "hits", "swings at" ] description_high = [ "lands a powerful blow on", "injures", "maims" ] _ratio = amount / old_value if _ratio < 0.1: description = description_low elif 0.1 <= _ratio < 0.25: description = description_mid else: description = description_high utils.slow_type("%s: %s %s dealing %s dmg. (%d -> %d)\n" % ( utils.bold(color(self.caster.name)), random.choice(description), target.name, utils.bold(str(amount)), old_value, new_value))
def log_skill(self, amount, target, old_value, new_value): utils.slow_type( "%s: [%s] on %s dealing %s dmg. (%d -> %d)\n" % ( utils.bold(utils.color_red(self.caster.name)), utils.color_yellow(str(self)), target.name, utils.bold(str(amount)), old_value, new_value))
def battle_loop(self): utils.slow_type(self.intro) # Execute start-of-battle while True: win = self.check_for_win() if win is not None: break choices = self.generate_choices(self) self.display_choice(choices) combo = self.generate_combo() self.execute_step(combo, choices) for h in self.yourteam: h.mp += 20 # execute end-of-turn self.turn += 1 print(self.outro(win)) input() return win
def log_skill(self, amount, target, old_value, new_value): utils.slow_type( "%s: [%s] absorbed mp of %s\n" % ( utils.bold(utils.color_red(self.caster.name)), utils.color_yellow(str(self)), target.name ))
def closing_words(self): self.caster.ATK *= 1.35 utils.slow_type( "%s: [%s] on himself increasing ATK.\n" % ( utils.bold(utils.color_red(self.caster.name)), utils.color_yellow(str(self))))
def opening_words(self): utils.slow_type("The Owner's here, and he's not happy!!!\n")
def log_skill(self, amount, target, old_value, new_value): utils.slow_type("%s: [%s] on %s increases ATK.\n" % ( utils.bold(utils.color_red(self.caster.name)), utils.color_yellow(str(self)), target.name))
def log_skill(self, amount, target, old_value, new_value): utils.slow_type( "%s: [%s] on %s restoring MP.\n" % ( utils.bold(utils.color_green(self.caster.name)), utils.color_yellow(str(self)), target.name))
def log_skill(self, amount, target, old_value, new_value): utils.slow_type( "%s: [%s] on self increase ATK and DEF.\n" % ( utils.bold(utils.color_green(self.caster.name)), utils.color_yellow(str(self))))