Feature - Implemented property or function to detect when in a casual ascension

Malibu Stacey

Active member
As title. It's just gone, doesn't even list at all in prefref. If it's been deprecated I can't find anything in ashref that would replace it.

See below.
 
Last edited:

lostcalpolydude

Developer
Staff member
I have no recollection of that setting ever existing. A forum search only turns up this thread.

Perhaps a script was creating that setting?
 

MCroft

Developer
Staff member
It’s not in the oldest copy of source on my system (Nov 20). In other news, 7 months ago I checked everything out into the wrong directory.
 

Malibu Stacey

Active member
I have no recollection of that setting ever existing. A forum search only turns up this thread.

Perhaps a script was creating that setting?
It's eminently possible that Cheesecookie had some sort of wrapper he used to call cc_ascend which set it by parsing api.php which he never made public but cc_ascend's source calls get_property on it and expects it to be set to the return value of my_ascensions().

If it has never existed and is but a figment of Cheesecookie's imagination, how does one check for being in a casual run? Is this not exposed in any way at all in mafia? api.php certainly shows it e.g.


Code:
> ash visit_url("api.php?what=status&for=4", false);

Returned: {"playerid":"6942069","name":"Player Two","hardcore":"0","ascensions":"69","path":"0","sign":"Platypus","roninleft":"0","casual":"1",
 

lostcalpolydude

Developer
Staff member
That value is not even checked by mafia. In general, can_interact() should be equivalent. No one has previously expressed an interest in knowing whether an ascension started out as Casual. Seems like it only matters if you're planning to do a 1-day casual and then a non-casual ascension in the same day, or if you are doing competitive PvP and need to spend 1500 turns?
 

Crowther

Active member
I think your 1-day casual idea might be right, because why would the property start with an underscore?
 

Malibu Stacey

Active member
In general, can_interact() should be equivalent.
can_interact() returns true when you've broken ronin. Yes that is approximately the same thing but I want to know if the user is in a Casual ascension so I can have autoscend autosell all their items and abort warn them that they're in unsupported territory.

Since in_hardcore() exists and simply checks that api.php page for the hardcore property being 1, could we have an almost identical in_casual()? I can do this myself in ASH by calling contains_text() on the return value from visit_url I pasted in my earlier reply and checking for the string "casual":"1" but that'll require extra (unnecessary) server hits.
 

lostcalpolydude

Developer
Staff member
can_interact() returns true when you've broken ronin. Yes that is approximately the same thing but I want to know if the user is in a Casual ascension so I can have autoscend autosell all their items and abort warn them that they're in unsupported territory.
Does that mean you don't want to provide the same warning to someone who (foolishly) spends 1000 turns in The Noob Cave to break ronin and then runs autoscend?
 
I think your 1-day casual idea might be right, because why would the property start with an underscore?
The underscore is/was there because once you hit day 2, a casual ascension was just aftercore as far as any of my scripts should have been concerned.

I assume I did it by looking at the link at ascension time, Valhalla manager?

I believe can_interact was not usable because it doesn't work on your first ascension properly? It has been a long time but I know I had reasons for casual script to work on brand new accounts.
 

Malibu Stacey

Active member
Does that mean you don't want to provide the same warning to someone who (foolishly) spends 1000 turns in The Noob Cave to break ronin and then runs autoscend?
I mean I'd like to have a warning for people who do stupid things in general but unfortunately I don't have the time to write checks for absolutely every stupid thing someone can do before running autoscend and basically if they do stupid stuff manually then run autoscend (like the person who spent one turn manually on mobile KoL in the desert and then got upset because autoscend spent 50 extra adventures trying to finish the desert) and it then goes and does stupid stuff, I frankly don't care.
 
Top