View Source Kalevala.Verb (kalevala v0.1.0)
A verb is a discrete action that the player may perform
Things like picking up or dropping items, stealing, etc.
Link to this section Summary
Functions
Check if a list of verbs contains a verb that matches the context
Check if the location condition matches the context
Check if a verb matches the context
Link to this section Functions
Check if a list of verbs contains a verb that matches the context
Check if the location condition matches the context
No location condition == all locations are good
iex> Verb.matches_location?(%{location: ["room"]}, %{location: "room"})
true
iex> Verb.matches_location?(%{location: ["inventory/self"]}, %{location: "inventory/self"})
true
iex> Verb.matches_location?(%{location: ["inventory"]}, %{location: "inventory/self"})
true
Check if a verb matches the context