summaryrefslogtreecommitdiffstats
path: root/example/scripts/main.lua
Commit message (Collapse)AuthorAgeFilesLines
* Readded Entity:damage as lua functionabilitiesErik Schilling2013-05-121-0/+3
|
* Added a first very basic monster ai versionErik Schilling2013-05-121-0/+2
| | | | | | The ai is similar to the old c++ version. Only the target searching is executed every 10 ticks only now to prevent performance issues with too many lua calls.
* [Abilities] Renamed specials to abilitiesErik Schilling2013-05-081-1/+1
|
* Removed loading of script files using the statusmanagerErik Schilling2013-02-211-0/+3
| | | | | They are now required via the main.lua. Also made Harmony giving you the plague in order to allow testing.
* Moved attribute (re)calculation to the scriptsErik Schilling2013-02-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | This introduces two callbacks: - on_update_derived_attribute -> Called to recalculate other derived attributes. - on_recalculate_base_attribute -> Called to recalculate a base attribute (only called for characters. However the function passed as callback can be useful for recalculating the derived attributes as well) Monsters no longer block recalculation of attributes except HP and Speed. I saw no sense to keep this. Fixed constant value in libmana-constants.lua Dropped bool type of the recalculation functions. It would be difficult to keep it while pushing all to the script engine and it was unused anyway. All in all this adds a LOT more flexibillity to projects since they can now adapt all attributes in the way they want.
* Use callbacks for items, monsters and status effectsThorbjørn Lindeijer2012-03-031-0/+3
| | | | | | | | | | | | | Previously, global function names were defined in the respective XML definitions of items, monsters and status effects. This was reasonable when they all had the same state, but now they're sharing the single global Lua state. Now the Lua API provides access to the ItemClass, MonsterClass and StatusEffect instances, on which callbacks for both standard and custom events can be explicitly set. Reviewed-by: Erik Schilling
* A bunch of cleanups to example Lua scriptsThorbjørn Lindeijer2012-03-021-11/+5
| | | | | | | Mostly removed bulky copyright headers and fixed indentation and line length. Reviewed-by: Yohann Ferreira Reviewed-by: Erik Schilling
* Merged the example client and server dataThorbjørn Lindeijer2012-02-251-0/+17
It's easier to just talk about world data and to modify it as a whole. If there is really a need to separate it, a project can still choose to do that (and in whatever suitable way). There is no need to enforce this separation or to do it in our example. Reviewed-by: Erik Schilling