MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame^] | 1 | // (c) by Padreic (Padreic@mg.mud.de) |
| 2 | |
| 3 | #include "../files.h" |
| 4 | #include <combat.h> |
| 5 | #include <new_skills.h> |
| 6 | #include "/p/zauberer/zauberer.h" |
| 7 | |
| 8 | inherit NPC("stdnpc"); |
| 9 | |
| 10 | void create() |
| 11 | { |
| 12 | ::create(); |
| 13 | SetProp(P_SHORT, "Arina die Waldfee"); |
| 14 | SetProp(P_LONG, |
| 15 | "Vor Dir steht Arina die weise Waldfee. Sie ist die Lehrerin des Waldes und\n" |
| 16 | +"unterrichtet die Pixies. In ihrer Hand haelt sie einen kleinen Zeigestock mit\n" |
| 17 | +"dem sie alles moegliche erklaert und Buchstaben in den Sand zeichnet. Auch\n" |
| 18 | +"Arina ist, genauso wie ihre Schwesten, bildhuebsch, doch ihr gestrenger Blick\n" |
| 19 | +"floesst jedem in ihrer Naehe grossen Respekt ein.\n"); |
| 20 | SetProp(P_NAME, "Arina"); |
| 21 | SetProp(P_ARTICLE, 0); |
| 22 | SetProp(P_GENDER, FEMALE); |
| 23 | SetProp(P_LEVEL, 80); |
| 24 | SetProp(P_ATTRIBUTES, (["int":80,"con":40,"str":16,"dex":50]) ); |
| 25 | SetProp(P_DISABLE_ATTACK, -10000); // is nich :) |
| 26 | SetProp(P_BODY, 80); |
| 27 | SetProp(P_MAX_SP, 2000); |
| 28 | SetProp(P_SP, 2000); |
| 29 | SetProp(P_MAX_HP, 700); |
| 30 | SetProp(P_HP, 700); |
| 31 | SetProp(P_ALIGN, 400); |
| 32 | SetProp(P_RACE, "Fee"); |
| 33 | SetProp(P_SIZE, 160+random(16)); |
| 34 | SetProp(P_ALCOHOL, 0); |
| 35 | SetProp(P_CORPSE, OBJ("feenleiche")); |
| 36 | SetProp(P_MAX_ALCOHOL, 0); // kein rauschen :) |
| 37 | AddAdjective("wunderschoen"); |
| 38 | AddId(({"arina", "fee", "waldfee", WALDID("fee")})); |
| 39 | SetProp(P_HANDS, ({" mit ihren zarten Haenden", 150, DT_BLUDGEON}) ); |
| 40 | SetProp(P_SKILL_ATTRIBUTE_OFFSETS, ([SA_SPELL_PENETRATION: 200])); |
| 41 | SetProp(P_XP, 800*200*5*2); |
| 42 | SetProp(P_GUILD, "zauberer"); |
| 43 | SetProp(P_Z_NO_MATERIAL, 1); |
| 44 | SetProp(P_DEFAULT_INFO, "schweigt und laechelt Dich einfach nur freundlich an.\n"); |
| 45 | ModifySkill("verletze", |
| 46 | ([SI_SKILLABILITY:9000, SI_SPELLCOST:0, |
| 47 | SI_SPELLFATIGUE:0, SI_NO_CONSEQUENCES:10000, |
| 48 | SI_SKILLRESTR_USE:([P_GUILD_LEVEL:0,SR_FREE_HANDS:0]), |
| 49 | SI_ARMOUR_RESTR:0]),0,"zauberer"); |
| 50 | SetProp(P_GUILD, 0); |
| 51 | SetProp(P_RESISTANCE_STRENGTHS, |
| 52 | ([DT_POISON: 0.15, |
| 53 | DT_MAGIC: -0.3 ]) ); |
| 54 | AddItem(OBJ("stock"), CLONE_WIELD); |
| 55 | AddItem(OBJ("kleid"), CLONE_WEAR); |
| 56 | if (file_size(SAECKCHEN)>0) AddItem(SAECKCHEN, CLONE_NEW); |
| 57 | } |
| 58 | |
| 59 | void Attack(object enemy) |
| 60 | { |
| 61 | int normal_speed; |
| 62 | normal_speed=(enemy->QueryProp(P_SKILL_ATTRIBUTE_OFFSETS)||([]))[SA_SPEED]||100; |
| 63 | if (enemy && enemy->QuerySkillAttribute(SA_SPEED) > normal_speed) { |
| 64 | write("Die Fee macht eine beruhigende Handbewegung und ploetzlich fuehlst Du Dich\n" |
| 65 | +"ruhig und Du merkst wie Du allmaehlich wieder langsamer wirst...\n"); |
| 66 | enemy->ModifySkillAttribute(SA_SPEED, -20, 180); |
| 67 | } |
| 68 | if (enemy) ::Attack(enemy); |
| 69 | SetProp(P_GUILD, "zauberer"); |
| 70 | command("verletze mit "+({"feuer", "magie", "eis", "wasser", "wind"})[random(5)] ); |
| 71 | SetProp(P_GUILD, 0); |
| 72 | } |
| 73 | |
| 74 | int Defend(int dam, mixed dts, mixed spell, object enemy) |
| 75 | { |
| 76 | int normal_speed; |
| 77 | normal_speed=(enemy->QueryProp(P_SKILL_ATTRIBUTE_OFFSETS)||([]))[SA_SPEED]||100; |
| 78 | if (enemy && enemy->QuerySkillAttribute(SA_SPEED) > normal_speed) { |
| 79 | write(Name(WER)+" macht eine beruhigende Handbewegung und ploetzlich fuehlst Du Dich\n" |
| 80 | +"ruhig und Du merkst wie Du allmaehlich wieder langsamer wirst...\n"); |
| 81 | enemy->ModifySkillAttribute(SA_SPEED, -20, 180); |
| 82 | } |
| 83 | |
| 84 | if ((!spell || (mappingp(spell) && spell[SP_PHYSICAL_ATTACK])) && !random(3)) { |
| 85 | tell_room(environment(), Name(WER)+" weicht schnell einen Schritt zurueck und weicht Deinem Angriff aus.\n"); |
| 86 | dam=0; |
| 87 | } |
| 88 | return (int)::Defend(dam, dts, spell, enemy); |
| 89 | } |
| 90 | |
| 91 | void NotifyPlayerDeath(object who, object killer, object lost_exp) |
| 92 | { |
| 93 | if (!who || killer!=ME) return; // uninteressant |
| 94 | log_file("padreic/kill", ctime(time())+" "+capitalize(getuid(who))+" getoetet von /zauberwald/arina\n"); |
| 95 | } |
| 96 | |
| 97 | void die() |
| 98 | { |
| 99 | log_file("padreic/kill", ctime(time())+" Arina wurde von "+get_killer()+" getoetet.\n"); |
| 100 | ::die(); |
| 101 | } |