-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for expressions in the inline chat commands #183
Add support for expressions in the inline chat commands #183
Conversation
Implementing this specifically for inline effects is fine for now, but I think eventually being able to handle dynamic expressions in other places will be beneficial and having a standardized DSL for the entire project would help. |
Oh yeah, I definitely agree with providing a standard API for handling expression evaluation for the DSL in the system. I will go ahead and factor that out into its own class. |
It's been factored out and a bit simpler to reason about now that it's on its own module. |
One last question for the time being is to decide whether to use a different symbol for executing functions (atm It may also be good to think of a symbol for short-hand syntactic sugar for things such as Examples: |
After the latest round of changes I believe it's in a good state. I will await your review. |
…upport for improvised effect
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didnt look too deeply on testing it so if it works it works :)
Adds support for evaluating expressions provided in the
Expressions
module, property referencing and function invocation in the inline chat commands such as@DMG, @HEAL, @GAIN, @LOSS
It adds support for the following:
@item|actor.<property>
$<variable>
: These would be shorthands for very common usages like item level, which would be $il, can also support alias $sl&<macro>
: for custom functions that the system can provide. The most beneficial one to provide would be the one that picks a value based on the character's level. I went with &step(40,50,60) .minor|heavy|massive
effect: Using the level of the actor to calculate the amount