def statusbar_generate(pl: Character): statusbar = "[HP: {0}][Location{1}][Weapon: {2}][Armor: {3}][Ammo: {4}][Press \'h\' for help]".format( str(pl.Hp), str(pl.Pos), str(pl.Current_Gun.Name if pl.Current_Gun is not None else pl.take_any_gun()), str(pl.Armor.Name if pl.Armor is not None else None), str(pl.Current_Gun.Ammo if pl.Current_Armor is not None else None) ) return statusbar
def attack(pl: Character, world: World, target): damage = pl.fire(target, pl.Current_Gun if pl.Current_Gun is not None else pl.take_any_gun())