Feature - Implemented Expose full Water Depth to user

Bale

Minion
When I ask mafia for numeric_modifier("Water Level") it responds with the bonus applied by Personal Thundercloud and The Rain In Loathing. That's nice, but it would be much more useful if it also included the base water level for the location.

I could write a subroutine that checked my_location().environment and added 2 or 4 and then checked my_location().recommended_stat and compared that to 40. Then it would add that number to the number I get from numeric_modifier, but honestly I feel that is a lot of work to expose a number that mafia already possesses.

I'm just trying to write a script that tells me the effective ML at a location. Since numeric_modifier("Monster Level") doesn't include water depth I need to find current depth, multiply by 10 and add it on.
 

Darzil

Developer
r14453 adds location proxy record water_level. This is the water_level associated with the location, not including numeric_modifier("Water Level").

I hope just adding them together is simpler code? Including the water level adjustment as a property of the location irked me. This also let me move the location code to the adventure database, which seemed the place for it to me.
 

Bale

Minion
Thanks it'll be much simpler to just do...

Code:
ML = (my_location().water_level + numeric_modifier("Water Level")) * 10 + numeric_modifier("Monster Level");

Much easier!
 

Darzil

Developer
Actually that's not quite right, unless you are only using that calculation in Heavy Rains. The heavy duty umbrella is not a -20 ML item outside Heavy Rains, nor are the buffs +20 ML if you have them running after the prism.
 

Bale

Minion
I know. I added in an if(my_path() == "Heavy Rains") that I didn't bother to include above.
 

Bale

Minion
Oh dear. I just figured out that monster_level_adjustment() accounts for the Water Level bonus to +ML.

Darzil, thanks for adding this feature since it is helpful to me to see Water Level in the Location Details, but it turns out that mafia already had the function that I was looking for.
 
Top