MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame^] | 1 | // MorgenGrauen MUDlib |
| 2 | // |
| 3 | // FileName.c -- Beschreibung |
| 4 | // |
| 5 | // $Id$ |
| 6 | |
| 7 | #ifndef __SKILL_ATTRIBUTES_H__ |
| 8 | #define __SKILL_ATTRIBUTES_H__ |
| 9 | |
| 10 | // ===== Properties fuer Skill-Attribute: ===== |
| 11 | |
| 12 | #define P_SKILL_ATTRIBUTES "skill_attr" |
| 13 | #define P_SKILL_ATTRIBUTE_OFFSETS "skill_attr_offsets" |
| 14 | |
| 15 | // ===== Skill Attribute: ===== |
| 16 | // Allgemeine Qualitaet |
| 17 | #define SA_QUALITY "sa_qual" |
| 18 | |
| 19 | // Schaden |
| 20 | #define SA_DAMAGE "sa_dam" |
| 21 | |
| 22 | // Geschwindigkeit |
| 23 | #define SA_SPEED "sa_speed" |
| 24 | |
| 25 | // Dauer |
| 26 | #define SA_DURATION "sa_dur" |
| 27 | |
| 28 | // Ausdehnung |
| 29 | #define SA_EXTENSION "sa_ext" |
| 30 | |
| 31 | // Reichweite |
| 32 | #define SA_RANGE "sa_range" |
| 33 | |
| 34 | // Je hoeher, desto groesser die Chance, dass nen vom Lebewesen gecasteter |
| 35 | // Spell durch das gegnerische P_NOMAGIC durchschlaegt. |
| 36 | // (SA_ENEMY_SAVE obsolet!) |
| 37 | #define SA_ENEMY_SAVE "sa_save" |
| 38 | #define SA_SPELL_PENETRATION "sa_save" |
| 39 | |
| 40 | // welche Skill-Attribute gibt es? |
| 41 | #define VALID_SKILL_ATTRIBUTES ({ SA_QUALITY, SA_DAMAGE, SA_SPEED,\ |
| 42 | SA_DURATION, SA_EXTENSION, SA_RANGE,\ |
| 43 | SA_ENEMY_SAVE }) |
| 44 | |
| 45 | // Indizes fuer die Verwaltung der Skill-Attribute |
| 46 | #define SAM_CACHE 0 |
| 47 | #define SAM_STATIC 1 |
| 48 | #define SAM_DYNAMIC 2 |
| 49 | |
| 50 | #define SAM_SUM 0 |
| 51 | #define SAM_CACHE_TIMEOUT 1 |
| 52 | #define SAM_COUNT 2 |
| 53 | |
| 54 | #define SAM_DURATION 0 |
| 55 | #define SAM_VALUE 1 |
| 56 | |
| 57 | |
| 58 | // einige Konstanten |
| 59 | #define SAM_MAX_MODS 5 |
| 60 | #define SAM_MAX_CACHE_TIMEOUT 60 |
| 61 | |
| 62 | // rueckgabewerte der Verwaltungsfunktionen: |
| 63 | #define SA_MOD_OK 1 |
| 64 | #define SA_MOD_REMOVED 1 |
| 65 | #define SA_TOO_MANY_MODS -1 |
| 66 | #define SA_MOD_TOO_SMALL -2 |
| 67 | #define SA_MOD_TOO_BIG -3 |
| 68 | #define SA_MOD_INVALID_ATTR -4 |
| 69 | #define SA_MOD_INVALID_OBJECT -5 |
| 70 | #define SA_MOD_NOT_FOUND -6 |
| 71 | #define SA_MOD_INVALID_VALUE -7 |
| 72 | |
| 73 | // Statistik? |
| 74 | #define SASTATD "/p/daemon/sastatd" |
| 75 | |
| 76 | #endif // __SKILL_ATTRIBUTES_H__ |
| 77 | |
| 78 | |
| 79 | #ifdef NEED_PROTOTYPES |
| 80 | |
| 81 | #ifndef __SKILL_ATTRIBUTES_H_PROTO__ |
| 82 | #define __SKILL_ATTRIBUTES_H_PROTO__ |
| 83 | |
| 84 | // prototypes |
| 85 | |
| 86 | public int ModifySkillAttribute(string atrname, mixed value, |
| 87 | int duration); |
| 88 | public int RemoveSkillAttributeModifier(object caster, string attrname); |
| 89 | public int QuerySkillAttribute(string attr); |
| 90 | public varargs mapping QuerySkillAttributeModifier(object caster, |
| 91 | string *attr); |
| 92 | |
| 93 | // Kompatibilitaetsfunktion mit altem Interface. |
| 94 | public int ModifySkillAttributeOld(object caster, string atrname, int value, |
| 95 | int duration, mixed fun); |
| 96 | |
| 97 | #endif // __SKILL_ATTRIBUTES_H_PROTO__ |
| 98 | |
| 99 | #endif // NEED_PROTOYPES |
| 100 | |