Feature Can we still identify Semi-rare window if a semi-rare is missed ?

Darzil

Developer
I often miss my last semi-rare in a run, due to it occurring too late to save me a turn. However, I often in aftercore want a semi-rare (say that nice 50 turns of Fishy one), so I'll pop a distention pill and eat a cookie. Now, with maths you can often pin down which counter is right, but mafia cannot, currently.

I think the logic to set the counters would go something like this : (clearly the first line in each section is the same logic as at present)

No semi-rare seen :
On turns <=80 : Expected start 70, expected end 80.
On turns >80 & <=280 : Expected start 230, expected end 280.
On turns >280 & <=480 : Expected start 390, expected end 480.
On turns >480 & <=680 : Expected start 550, expected end 680.
On turns >680 & <=710 : Expected start 710

Semi-rare seen :
<=200 turns since SR seen : Expected start 160, expected end 200.
>200 & <=400 turns since SR seen : Expected start 320, expected end 400.
>400 & <=600 turns since SR seen : Expected start 480, expected end 600.
>600 & <=640 turns since SR seen : Expected start 640

Clearly you could also count out some if you spent turns in a SR area without encountering them, but that's getting far too complicated.

Thoughts? It's clearly extra code, but wouldn't involve extra counters or extra server hits.
 

heeheehee

Developer
Staff member
Alternative, in pseudocode:
Code:
when (expires(start)) {
    setTimer(start, 160);
}
when (expires(end)) {
    setTimer(end, 200);
}
when (findSemirare) {
    setTimer(start, 160);
    setTimer(end, 200);
}

This would probably require keeping track of the start/end semirare counters or looping through all the counters and checking name (and possibly image).

edit: of course, this wouldn't be useful if end - start >= 200.
 
Last edited:

Fluxxdog

Active member
I actually have ASH code for that.
Code:
boolean semirare_aware(int check){ //Detects active semirare countdown.
	if(semirare_blind() && prop_count("semirareCounter")!=0){
		debug_print("Unknown semirare window!");
		int prophecy=my_turncount()-prop_count("semirareCounter");
		switch {
		case prophecy<200: if(prophecy<160) cli_execute("counters add "+(160-prophecy)+" Semirare window begin lparen.gif");
			cli_execute("counters add "+(200-prophecy)+" Semirare window end rparen.gif"); break;
		case prophecy<400: if(prophecy<320) cli_execute("counters add "+(320-prophecy)+" Semirare window begin lparen.gif");
			cli_execute("counters add "+(400-prophecy)+" Semirare window end rparen.gif"); break;
		case prophecy<600: if(prophecy<480) cli_execute("counters add "+(480-prophecy)+" Semirare window begin lparen.gif");
			cli_execute("counters add "+(600-prophecy)+" Semirare window end rparen.gif"); break;
		case prophecy<800: if(prophecy<640) cli_execute("counters add "+(640-prophecy)+" Semirare window begin lparen.gif");
			cli_execute("counters add "+(800-prophecy)+" Semirare window end rparen.gif"); break;}
		if(counter_active("Semirare window end")) notice_print("Semirare possibility found!");}
	return countdown("Semirare window begin")<=check ? counter_active("Semirare window end") : counter_detonated("Fortune Cookie");}
boolean semirare_aware(){ return semirare_aware(0);}
Without breaking down all my script, if I miss Mafia's standard semirare counter, I can put one of my own in. Because it mimics mafia's counters, other scripts can use them as is when reading counters. The only thing that's really different is mafia will warn you about a semirare with their counter, and with this, it'll just say the counter is expired. Mafia could certainly streamline it. I think mafia will also autostop with my counters, but not their semirare counter. That's a feature to be sure ^^
 

lostcalpolydude

Developer
Staff member
I think mafia will also autostop with my counters, but not their semirare counter. That's a feature to be sure ^^

All stopping and not stopping for the current counters that mafia makes is intentional. Just because I accidentally picked up an inhaler while castle farming doesn't mean I want automation to be aborted 160 turns later. If you wanted to make counters that don't abort, you would add location=* to the name of the counter, and that is exactly what mafia does to intentionally create counters that don't stop automation.
 

Theraze

Active member
I think this is something best met by using a script such as the one posted above, and not added to mafia, since after 600 turns since your last missed semirare, you have a 100% window. Personally, if I miss my semi-rare, it's because I wanted to. :) But hey, that's me. Heh.
 

Fluxxdog

Active member
All stopping and not stopping for the current counters that mafia makes is intentional. Just because I accidentally picked up an inhaler while castle farming doesn't mean I want automation to be aborted 160 turns later. If you wanted to make counters that don't abort, you would add location=* to the name of the counter, and that is exactly what mafia does to intentionally create counters that don't stop automation.
Really? Nice! Thanks for the heads up ^^
 
There are some situations where you miss SRs by accident, if I'm not mistaken. Bees and Boris mobs override them, for instance.
 
Top