- Adding a generic "ueot" effect. This will be initially confusing, but the ultimate goal is to get rid of all the particular cases we handled with "until end of turn" effects. this "ueot " works like "may " and "choice ", it has to be at the very beginning of the ability(ies) it targets. The reason is to avoid conflicts with the existing "ueot" we have all over the place. I have only tested it with transforms and loseabilities for now (see "ovinize") but hopefully this will become the new norm. This should also reduce the code inside the parser, long term.
- Adding "Ovinize" as an example of this new keyword. - moved "parseBetween" in utils as I am using it in other files for wome work in Progress.
This commit is contained in:
@@ -87,6 +87,17 @@ std::string join(vector<string>& v, string delim = " ");
|
||||
|
||||
std::vector<std::string>& split(const std::string& s, char delim, std::vector<std::string>& elems);
|
||||
std::vector<std::string> split(const std::string& s, char delim); //splits a string with "delim" and returns a vector of strings.
|
||||
|
||||
// A simple parsing function
|
||||
// splits string s by finding the first occurence of start, and the first occurence of stop, and returning
|
||||
// a vector of 3 strings. The first string is everything before the first occurence of start, the second string is everything between start and stop
|
||||
// the third string is everything after stop.
|
||||
// for example, parseBetween ("this is a function(foo) call", "function(", ")") will return: ["this is a ", "foo", " call"];
|
||||
//If an error occurs, returns an empty vector.
|
||||
// if "stopRequired" is set to false, the function will return a vector of 3 strings even if "stop" is not found in the string.
|
||||
std::vector<std::string>& parseBetween(const std::string& s, string start, string stop, bool stopRequired, std::vector<std::string>& elems);
|
||||
std::vector<std::string> parseBetween(const std::string& s, string start, string stop, bool stopRequired = true);
|
||||
|
||||
std::string wordWrap(const std::string& s, float width, int fontId);
|
||||
|
||||
int loadRandValues(string s);
|
||||
|
||||
Reference in New Issue
Block a user