Is there a way to check if the last adventure was a non-combat and what non-combat it was?
string lastEncounter = get_property("lastEncounter");
if(to_monster(lastEncounter) == last_monster()) {
print("True");
# lastEncounter was a combat
}
else {
print("False");
# lastEncounter was a non-combat
}
I started typing up a response earlier, but my first test happened to fail with that code.
"the X-32-F Combat Training Snowman" does not evaluate to the monster "X-32-F Combat Training Snowman".
Possibly the same with anything that starts with "the"?
string LastAdvTxt() {
string lastlog = session_logs(1)[0];
int nowmark = max(last_index_of(lastlog,"["+my_turncount()+"]"),last_index_of(lastlog,"["+(my_turncount()+1)+"]"));
return substring(lastlog,nowmark);
}
if (!contains_text(LastAdvTxt(),"Round 1")) {
//this is not a combat
}