1 | // define event types by enumerating them here |
|
|
2 | |
|
|
3 | // global events |
|
|
4 | def (GLOBAL, CLOCK) // NYI |
1 | def (GLOBAL, CLOCK) // ( ) |
5 | |
|
|
6 | // per-player |
|
|
7 | def (PLAYER, REATTACH) // (pl) |
2 | def (PLAYER, REATTACH) // (player) |
8 | def (PLAYER, BIRTH) // (pl) called as very first thing after creating a player |
3 | def (PLAYER, BIRTH) // (player) |
9 | def (PLAYER, QUIT) // (pl) called after logout |
4 | def (PLAYER, QUIT) // (player) |
10 | def (PLAYER, LOAD) |
5 | def (PLAYER, LOAD) // (player) |
11 | def (PLAYER, SAVE) |
6 | def (PLAYER, SAVE) // (player) |
12 | def (PLAYER, LOGIN) |
7 | def (PLAYER, LOGIN) // (player) |
13 | def (PLAYER, LOGOUT) |
8 | def (PLAYER, LOGOUT) // (player) |
14 | def (PLAYER, DEATH) |
9 | def (PLAYER, DEATH) // (player) |
15 | def (PLAYER, MAP_CHANGE) // (pl oldmap newmap) |
10 | def (PLAYER, MAP_CHANGE) // (player oldmap newmap) |
16 | def (PLAYER, USE_SKILL) |
|
|
17 | def (PLAYER, EXTCMD) // (pl string) |
11 | def (PLAYER, EXTCMD) // (player string) |
18 | def (PLAYER, PRAY_ALTAR) |
12 | def (PLAYER, PRAY_ALTAR) // (player altar skill -- ) |
19 | def (PLAYER, TELL) //NYI |
13 | def (PLAYER, TELL) // (player -- ) |
20 | def (PLAYER, SAY) //NYI |
14 | def (PLAYER, SAY) // (player --) |
21 | def (PLAYER, SHOUT) //NYI |
15 | def (PLAYER, SHOUT) // (player --) |
22 | |
16 | def (OBJECT, INSTANTIATE) // (object init-args...) |
23 | // plug-in attachment |
17 | def (OBJECT, REATTACH) // (object) |
24 | def (OBJECT, INSTANTIATE) // (object) an archetype was instantiated into an object |
18 | def (OBJECT, CLONE) // (object destination) |
25 | def (OBJECT, REATTACH) // (object) an object was loaded _and_ had extensions |
|
|
26 | def (OBJECT, CLONE) // (object destination) an object with _attached extension_ is cloned |
|
|
27 | |
|
|
28 | // per-object events |
|
|
29 | def (OBJECT, TICK) |
19 | def (OBJECT, TICK) // (object) |
30 | def (OBJECT, KILL) |
20 | def (OBJECT, KILL) // (object hitter -- ) |
31 | def (OBJECT, APPLY) // (object who -- applytype) |
21 | def (OBJECT, APPLY) // (object who -- applytype) |
32 | // 0: player or monster can't apply objects of that type |
22 | def (OBJECT, USE_SKILL) // (skill who part direction strignarg -- ) |
33 | // 1: has been applied, or there was an error applying the object |
23 | def (OBJECT, CAST_SPELL) // (spell casting_object owner direction stringarg -- ) |
34 | // 2: objects of that type can't be applied if not in inventory |
24 | def (OBJECT, DROP) // (object who -- ) |
35 | def (OBJECT, USE_SKILL) |
25 | def (OBJECT, DROP_ON) // (floor object who -- ) |
36 | def (OBJECT, CAST_SPELL) |
|
|
37 | def (OBJECT, DROP) // (object who -- ) an item gets dropped |
|
|
38 | def (OBJECT, DROP_ON) // (floor object who -- ) something was dropped on the floor |
|
|
39 | def (OBJECT, LISTEN) //NYI |
26 | def (OBJECT, LISTEN) // |
40 | def (OBJECT, MOVE) // (object enemy -- ) called when a monster tries to move |
27 | def (OBJECT, MOVE) // (monster enemy -- ) |
41 | def (OBJECT, ATTACK) // (object hitter -- damage) object gets attacked |
28 | def (OBJECT, ATTACK) // (object hitter -- damage) |
42 | def (OBJECT, ATTACKS) // (weapon hitter, victim) object gets used as weapon |
29 | def (OBJECT, ATTACKS) // (weapon hitter victim) |
43 | def (OBJECT, INSCRIBE_NOTE) // (book pl message skill -- ) inscribe a note into a book |
30 | def (OBJECT, INSCRIBE_NOTE) // (book pl message skill -- ) |
44 | def (OBJECT, TRIGGER) // (object activator -- ) an object was triggered |
31 | def (OBJECT, TRIGGER) // (object who -- ) |
45 | def (OBJECT, MOVE_TRIGGER) // (object victim originator -- ) a trap-like object was triggered |
32 | def (OBJECT, MOVE_TRIGGER) // (object victim originator -- ) |
46 | def (OBJECT, CLOSE) // (container -- ) close a container |
33 | def (OBJECT, CLOSE) // (container -- ) |
47 | |
|
|
48 | // per-map |
|
|
49 | def (MAP, REATTACH) // (map) |
34 | def (MAP, REATTACH) // (map) |
50 | def (MAP, LOAD) // (map) Original map has been loaded |
35 | def (MAP, LOAD) // (map) |
51 | def (MAP, SWAPIN) // (map) Temporary map has been swapped in |
36 | def (MAP, SWAPIN) // (map) |
52 | def (MAP, SWAPOUT) // (map) Map has been swapped out |
37 | def (MAP, SWAPOUT) // (map) |
53 | def (MAP, RESET) // (map) A map is resetting |
38 | def (MAP, RESET) // (map) |
54 | def (MAP, CLEAN) // (map) Temporary map will be deleted |
39 | def (MAP, CLEAN) // (map) |
55 | def (MAP, ENTER) // (map pl) |
40 | def (MAP, ENTER) // (map player) |
56 | def (MAP, LEAVE) // (map pl) |
41 | def (MAP, LEAVE) // (map player) |
57 | def (MAP, UPGRADE) // temporary, map gets upgraded form old event system |
42 | def (MAP, UPGRADE) // (map) |
58 | |
|
|