Feature - Rejected AT buffs active

Is there a way to get which AT buffs are currently active (aside from have_effect()ing all of them)?

I feel this would be a useful tool for ASH considering that one can only have so many running at a time, it'd make it easier to figure out what you need to shrug in order to cast another.
 

Bale

Minion
PHP:
int current_at() {
	int total = 0;
	for song from 6001 to 6040
		if(song.to_skill().to_effect().have_effect() > 0)
			total = total + 1;
	return total;
}
 

Winterbay

Active member
PHP:
int current_at() {
	int total = 0;
	for song from 6001 to 6040
		if(song.to_skill().to_effect().have_effect() > 0)
			total = total + 1;
	return total;
}

Isn't that just doing what bordemstirs wondered if there was a way to avoid?
 

Bale

Minion
Yes, but I thought I'd show him the most efficient method.

It's simple enough that I don't really feel a lack for the feature.
 
Won't that return a number? Because bordemstirs asked for a way to get "which AT buffs are currently active," for the purpose of knowing which to shrug. Now, I think that decision would be awfully hard to build into an ASH script, since one would want to consider the location, skills available, current and ultimate goals, all other active (or even available) effects -- and who-knows-what-else. But that was what was asked. *shrug* I don't know. :)
 

Theraze

Active member
Easy enough... using the code that Bale posted above, converted it to return the actual effects and the turns in a map.
Code:
int[effect] current_at() { 
    int[effect] total; 
    for song from 6001 to 6040 
        if(song.to_skill().to_effect().have_effect() > 0) 
            total[song.to_skill().to_effect()] = song.to_skill().to_effect().have_effect();
    return total; 
}
Example:
> ashq int[effect] current_at() { int[effect] total; for song from 6001 to 6040 if(song.to_skill().to_effect().have_effect() > 0) total[song.to_skill().to_effect()] = song.to_skill().to_effect().have_effect(); return total; } foreach i,c in current_at() print_html(i+" "+c);

Ode to Booze 7
 
Isn't that just doing what bordemstirs wondered if there was a way to avoid?
Indeed. But, using Ther's... Raze's... why is there no good way to shorten her name?
Using Theraze's modification will indeed do the trick. Even though it does exactly what I wanted to avoid :p

As for Storella's claims about the decision to buff being hard to code... while that's true for the most part there are definitely a few buffs that one would want running in certain areas and absolutely not in other areas. Most notable would be Cantata and Sneakiness, but I could see a few others changing based on task.
 
Last edited:
Top