Functions from the auxiliary library, assume the stack has always at least 5 empty slots, add macro ensure_luaL_stack to wrap every such call so that the stack is checked for enough free space beforehand. This will make mandatory to use the latest version of visual studio 2017 as minimum for windows (it was already being required for c++17 support regardless), as it needs the conformant c++ preprocessor option to be used.
Made the function more constexpr friendly, removing the need to perform the switch at runtime.
Also now when a parameter doesn't match the required type, its type will also be printed in the error as well.
Update lua functions to already have the pduel parameter passed inside them, thus not needing to manually retrieve them in the functions.
Add also a yieldk macro that does the same thing but for the yield continuation function, removing the redoundancies
Most of the library functions are used as "class member functions" where the first parameter is always the corresponding lua object, update the LUA_FUNCTION macro so that the functions already have a "self" parameter corresponding to the already parsed lua object.
Added a new LUA_STATIC_FUNCTION macro for functions that are to be called without an associated object
Decouple the summon location from the summon type, also keep track of the sequence and if the card was in a pzone, this allows to use symbolic locations in Card.IsSummonLocation as wel
No longer call the lua funciton ``tostring`` to format the string but use the proper c api function luaL_tolstring, also support passing multiple values, in which case they'll be printed as if multiple Debug.Message calls were made
Due to the way each card object is designed, the __tostring method has to be put in each cXXXXXX table, and cannot be put in the Card table as lua will do a rawget on the metatable to get the metamethods. Use a "wrapper" function as default tostring method to handle when that method is called directly from the metatable itself and not from a card object, that will load a defined Debug.CardToString function if present, otherwise emulates the same tostring behaviour lua uses
Abstract the logic for pzone index checking a bit more and allow the possibility in future to individually toggle the placing of the zones on a per player basis
Remove global duel::strbuffer, this was a leftover from the old message handling, directly pass the string from lua to the callback function, and use local buffers when formatting is needed.