Feature - Implemented Modifiers.txt and expression bloat

Darzil

Developer
Currently Modifiers.txt has only single capital letters for things to use in expressions. As more class or skill dependant modifiers come along, we're currently having to either add to that list or add to an override. I can see two ways out, either to add longer valid names (as is done in Monsters.txt), or to add functions like class(className), skill(skillName) and equipped(item) which evaluate to 0 or 1 depending on whether they are true or not. On the whole I prefer the clarity of monsters.txt to the shortness of modifiers.txt, and can see class and skill could make modifier lines long, especially as we could handle things like Patriot Shield in modifiers.txt rather than code as we do now.

At present it'd mean we can potentially remove N, R, and the override code for Inner Sauce, Blood Sauce Sugar Magic, Patriot Shield. I'd also mean we'd not have to add (to support restores.txt), Dyspepsi-cola Canteen equipped, Adventurer of Leisure and maybe others.

Thoughts? It wouldn't be too difficult to change, but I'd want to change it in a way all feel happy with.
 
Last edited:

Darzil

Developer
r13290 adds skill(name) and class(name) for modifiers.txt (also equipped(name) which will be used with restores.txt).
Inner Sauce and Blood Sugar Sauce Magic now use this, as do Accordions.
Haven't touched Operation Patriot Shield as I think we need the override anyway for Accordion Thief.
Haven't touched Potion Duration, though R could be replaced by [5*(1+skill(Impetuous Sauciness)+class(Sauceror))].
 

Fluxxdog

Active member
Got this on logging in.
Code:
Visiting The Gnomish Micromicrobrewery...
Menu retrieved.
Expression     syntax errors for 'calavera concertina':
'N' is not valid in this     context
Initializing chat interface...
 
Top