MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame^] | 1 | // MorgenGrauen MUDlib |
| 2 | // |
| 3 | // living/life.h -- living life header |
| 4 | // |
| 5 | // $Id: life.h 9048 2015-01-11 18:21:32Z Zesstra $ |
| 6 | |
| 7 | #ifndef __LIVING_LIFE_H__ |
| 8 | #define __LIVING_LIFE_H__ |
| 9 | |
| 10 | // properties |
| 11 | |
| 12 | #define P_AGE "age" |
| 13 | #define P_ALIGN "align" |
| 14 | |
| 15 | #define P_DEADS "deads" |
| 16 | #define P_GHOST "ghost" |
| 17 | #define P_FROG "frog" |
| 18 | |
| 19 | #define P_FOOD "food" |
| 20 | #define P_MAX_FOOD "max_food" |
| 21 | #define P_DRINK "drink" |
| 22 | #define P_MAX_DRINK "max_drink" |
| 23 | #define P_ALCOHOL "alcohol" |
| 24 | #define P_MAX_ALCOHOL "max_alcohol" |
| 25 | |
| 26 | #define P_HP "hp" |
| 27 | #define P_MAX_HP "max_hp" |
| 28 | #define P_SP "sp" |
| 29 | #define P_MAX_SP "max_sp" |
| 30 | #define P_XP "xp" |
| 31 | #define P_NO_XP "no_xp" |
| 32 | #define P_LAST_XP "last_xp" |
| 33 | |
| 34 | #define P_FOOD_DELAY "food_delay" |
| 35 | #define P_DRINK_DELAY "drink_delay" |
| 36 | #define P_ALCOHOL_DELAY "alcohol_delay" |
| 37 | #define P_HP_DELAY "hp_delay" |
| 38 | #define P_SP_DELAY "sp_delay" |
| 39 | #define P_POISON_DELAY "poison_delay" |
| 40 | |
| 41 | #define P_POISON "poison" |
| 42 | #define P_MAX_POISON "max_poison" |
| 43 | |
| 44 | #define P_NO_REGENERATION "no_regeneration" |
| 45 | |
| 46 | #define P_ENEMY_DAMAGE "enemy_damage" |
| 47 | #define P_TIMING_MAP "timing_map" |
| 48 | #define P_LAST_DEATH_TIME "last_death_time" |
| 49 | #define P_LAST_DEATH_PROPS "last_death_props" |
| 50 | #define P_CORPSE_DECAY_TIME "corpse_decay" |
| 51 | |
| 52 | // ----- Definitionen fuer Beeinflussung der Gesundheit durch consume ----- |
| 53 | |
| 54 | // H_EFFECTS - Zu aendernde Properties fuer den Effekt |
| 55 | #define H_EFFECTS "effects" |
| 56 | // H_CONDITIONS - Zu pruefende Properties für den Effekt (Saettigung, ...) |
| 57 | #define H_CONDITIONS "conditions" |
| 58 | // H_DISTRIBUTION - Wie die Aenderung an HP/SP austeilen, sofort, zeitlich |
| 59 | // versetzt, ... |
| 60 | #define H_DISTRIBUTION "distribution" |
| 61 | // H_INGREDIENTS - Bestandteile, die die Aenderung verursachen |
| 62 | #define H_INGREDIENTS "ingredients" |
| 63 | |
| 64 | // Verteilungen, |
| 65 | // 0 Sofortwirkung |
| 66 | // 1-50 gleichverteilte Pufferung mit angegebener Rate fuer SP/HP |
| 67 | // >= 51 spezielle Verteilungen (TODO) |
| 68 | #define HD_INSTANT 0 |
| 69 | #define HD_STANDARD 5 |
| 70 | |
| 71 | #define H_ALLOWED_CONDITIONS ({P_FOOD, P_DRINK, P_ALCOHOL}) |
| 72 | #define H_ALLOWED_EFFECTS ({P_SP, P_HP, P_POISON}) |
| 73 | |
| 74 | #define HC_MAX_FOOD_REACHED 1 |
| 75 | #define HC_MAX_DRINK_REACHED 2 |
| 76 | #define HC_MAX_ALCOHOL_REACHED 4 |
| 77 | #define HC_HOOK_CANCELLATION 8 |
| 78 | |
| 79 | // ------------------------------------------------------------------------- |
| 80 | |
| 81 | #endif // __LIVING_LIFE_H__ |
| 82 | |
| 83 | #ifdef NEED_PROTOTYPES |
| 84 | |
| 85 | #ifndef __LIVING_LIFE_H_PROTO__ |
| 86 | #define __LIVING_LIFE_H_PROTO__ |
| 87 | |
| 88 | // prototypes |
| 89 | |
| 90 | // ----- zentrale Funktion, um die Gesundheit des Lebewesens zu beeinflussen ----- |
| 91 | public varargs int consume(mapping cinfo, int testonly); |
| 92 | // ------------------------------------------------------------------------- |
| 93 | |
| 94 | public int do_damage(int dam, object enemy); |
| 95 | public int reduce_hit_points(int dam); |
| 96 | public int restore_hit_points(int heal); |
| 97 | |
| 98 | public int reduce_hit_point(int dam); //Nur als Uebergansloesung (Rikus) |
| 99 | |
| 100 | public void restore_spell_points(int h); |
| 101 | public void reduce_spell_points(int h); |
| 102 | |
| 103 | public void heal_self(int h); |
| 104 | |
| 105 | public varargs void die( int poisondeath, int extern ); |
| 106 | |
| 107 | public varargs void transfer_all_to( string|object dest, int check ); |
| 108 | |
| 109 | public varargs int drink_alcohol(int strength, int testonly, string mytext); |
| 110 | public varargs int drink_soft(int strength, int testonly, string mytext); |
| 111 | public varargs int eat_food(int strength, int testonly, string mytext); |
| 112 | |
| 113 | public int buffer_hp(int val,int rate); |
| 114 | public int buffer_sp(int val,int rate); |
| 115 | |
| 116 | public void show_age(); |
| 117 | |
| 118 | public int AddExp(int e); |
| 119 | |
| 120 | // internal |
| 121 | protected void ResetEnemyDamage(); |
| 122 | |
| 123 | #endif // __LIVING_LIFE_H_PROTO__ |
| 124 | |
| 125 | #endif // NEED_PROTOYPES |