MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame^] | 1 | inherit "/std/unit"; |
| 2 | |
| 3 | #include "./path.h" |
| 4 | #include <properties.h> |
| 5 | #include <class.h> |
| 6 | |
| 7 | void create() { |
| 8 | if (!clonep(this_object())) return; |
| 9 | ::create(); |
| 10 | |
| 11 | SetProp(P_NAME, ({"Pfeil", "Pfeile"}) ); |
| 12 | SetProp(P_LONG, break_string( |
| 13 | "Ein paar einfache Holzpfeile.", 78)); |
| 14 | SetProp(P_GENDER, MALE); |
| 15 | SetProp(P_AMOUNT, 1); |
| 16 | SetProp(P_SHOOTING_WC, 40); |
| 17 | SetProp(P_DAM_TYPE, ({DT_PIERCE})); |
| 18 | SetProp(P_WEAPON_TYPE, WT_AMMU); |
| 19 | SetProp(P_MATERIAL, MAT_MISC_WOOD); |
| 20 | |
| 21 | SetGramsPerUnits(120,1); |
| 22 | SetCoinsPerUnits(25,1); |
| 23 | |
| 24 | AddId(MUN_ARROW); |
| 25 | AddSingularId("pfeil"); |
| 26 | AddPluralId("pfeile"); |
| 27 | AddClass(CL_AMMUNITION); |
| 28 | |
| 29 | SetProp(P_HIT_FUNC, this_object()); |
| 30 | } |
| 31 | |
| 32 | int HitFunc(object enemy) { |
| 33 | if(!random(5)) { |
| 34 | tell_object(environment(), break_string( |
| 35 | "Der Pfeil schnurrt vom Bogen und dabei splittert das Holz " |
| 36 | "etwas. Gratiswiderhaken, das ist ja toll!", 78)); |
| 37 | return 20; |
| 38 | } |
| 39 | |
| 40 | return 0; |
| 41 | } |