adventures per action?

Bale

Minion
Does anyone know a way to tell how many adventures will be consumed by a given action?

Obviously most actions in the kingdom only consume 1 adventure, but undersea actions cost 2 adventures. Naturally I could simply check the location against all known undersea locations, but more are always being added, so my script would become outdated in short order and it is possible that more locations will be added that cost more than 1 adventure.

Any ideas? Or shall I just put together a line of code to check for all known locations that cost 2 adventures?

I need this information for this.
 

matt.chugg

Moderator
I can't think of a way off the top of my head which doesn't mean a lot, only that I don't know an exact command! My only suggestion is maptofile on adventures.txt (if this is possible) then if its "The Sea" it will be 2 advs which covers 10 locations currently.
 

Bale

Minion
It is possible to use adventures.txt as a mapfile to locate all areas under the sea. Thanks for the idea since that would automatically add more sea zones as mafia adds them.

It's far from ideal so I'm hoping someone else will tell me that there is another way to do it. Hoping, but suspecting I'll be using your idea.
 

matt.chugg

Moderator
minor heads up: probably not a lot of use.

in the mafia source there is public int getAdventuresUsed() {} which I had a quick look at, it appears its only the sea that uses 2 adventures (unless you have a fishy effect)

ALTHOUGH

holidays use 3 adventures. also there seems to be a potential condition where visiting the dessert without being hydrated may also visit the oadis thus consuming 2 adventures.

not sure if i'm supposed to post the source here really, but I can direct you to the function if you need me to.
 

Bale

Minion
There's nothing wrong with posting source. It's not a top secret.

Unfortunately I can't seem to use this function (I just tried) and it isn't in ashref. Are you sure it is public? If so, what am I missing? Please tell me since this would be perfect.
 

matt.chugg

Moderator
its not public, it was just a reference to the point that there were potentially other locations that would use multiple adventures :( in fact I believe its called After the adventure has been consumed anyway.

sorry to get your hopes up. :(
 

StormCrow42

Member
In any event, a CCS isn't going to get called for the shore, so no worries there. And except for the sea, other actions that consume multiple adventures do so outside of the context of the single adventure the CCS is getting called for. Except for perhaps the hydrated desert, I don't know that there's any way to anticipate another means for spending extra adventures.
 

Bale

Minion
Except for perhaps the hydrated desert, I don't know that there's any way to anticipate another means for spending extra adventures.
Oh! Good point. I'd forgotten about that problem. Oasis and the Desert effectively become noncombats for one turn out of six, in addition to the lovely super-unlikelies.
 

jasonharper

Developer
I don't think there's going to be a good solution for this that doesn't involve special cases for each zone that can take multiple adventures. For example, a location in The Sea may indicate a cost of 1 Adventure now, but that doesn't tell you whether there's 1 turn of Fishy left, or 100. And even if you know that Fishy is what needs to be checked, you can't tell whether there's a mood that will auto-extend it.
 

Bale

Minion
I suppose that's true enough. I'll just go with this then:

Code:
float adventure_cost() {
	location locale = my_location();
	switch(locale) {
	case $location[Oasis in the Desert]:
	case $location[Desert (Ultrahydrated)]:
		return 1.2;
	case $location[The Briny Deeps]:
	case $location[The Brinier Deepers]:
	case $location[The Briniest Deepests]:
	case $location[An Octopus's Garden]:
	case $location[The Wreck of the Edgar Fitzsimmons]:
	case $location[Madness Reef]:
	case $location[The Marinara Trench]:
	case $location[Anemone Mine]:
	case $location[The Dive Bar]:
	case $location[The Mer-Kin Outpost]:
		if(have_effect($effect[Fishy]) > 0)
			return 1.0;
		else return 2.0;
	}
	return 1.0;
}

The only flaw is that it needs to be updated with new zones as added, but I feel better about that after you've pointed out that there will always be special cases and new effects in the game.
 
Top