Adds a versatile function that will return a given current and maximum value as a "health bar" rendered with ANSI or xterm256 background color codes. This function has many options, such as being able to specify the length of the bar, its colors (including changing color depending on how full the bar is), what text is included inside the bar and how the text is justified within it.
This was an attempt to try to fix some strange 'unhandled error in
deffered' results while unit testing the contrib folder. It didn't
work, but it's probably good to do anyway.
I almost forgot - distance_inc is actually used by both
'approach' and 'withdraw', since approaching an object
might put you farther away from others. So, I moved it back
to its own function.
Other utility functions, such as caller.msg(), don't require adding
newline because newlines are added implicitly. This change modifies the
multimatch string parameter to also not require newline, but add one
implicitly.
There seems to be an issue with adding an empty column (i.e. a column
with empty data) to an EvTable that has already been set up. It seems
that the column with empty data is added with one extra row than the
rest of the table, and when a new call to add_rows() is made to EvTable,
the data in the column that was added previously is offset by 1.
This change fixes that by calculating the size of the new column to take
into account the headers BEFORE making the calculation on whether to
expand the column to match the table's size or not.
Adds a system for range and movement to the 'turnbattle' contrib. This is based on the abstract movement and positioning system I made for 'The World of Cool Battles', my learning project - fighters' absolute positions are not tracked, only their relative distance to each other and other objects. Commands for movement as well as distinction between melee and ranged attacks are included.