Successful combat?

digitrev

Member
Is there a way to tell if a) the last combat was a combat and b) the last combat was successful?

I'm trying to write some tracking for the holo-wrist-puter, since it's apparently deterministic, but I can't figure out a way to do it without it also tracking noncombats and lost fights.
 

digitrev

Member
Never mind. A simple matcher for "You win the fight!" applied to the run_combat() buffer should be sufficient.
 

Veracity

Developer
Staff member
I think there was a proposal that we track whether the fight ended via combat win, combat loss, (free) runaway, banishment, round limit exceeded, what have you. I'd certainly like it if we have a concise line in the session log at the appropriate place to tell you how the combat ended.
 
I use this to determine if you are in a non-combat.
Code:
repeat {
	if (contains_text(fight, "choice.php")) {
		cli_execute("choice-goal");
		fight = visit_url(loc_url); //Check to see if in a choice adventure
	}
} until (!contains_text(fight, "choice.php"));
 

Bale

Minion
I think there was a proposal that we track whether the fight ended via combat win, combat loss, (free) runaway, banishment, round limit exceeded, what have you. I'd certainly like it if we have a concise line in the session log at the appropriate place to tell you how the combat ended.

That would be nice. It could then be stored in a preference like lastAdventure?
 
Top