blob: f7a4333439d2456ca588fe478b6881cae11bb99f [file] [log] [blame]
MG Mud User88f12472016-06-24 23:31:02 +02001#pragma strong_types,save_types
2
3#include <defines.h>
4#include <moving.h>
5#include <properties.h>
6#include <language.h>
7
8private nosave object pl;
9
10void create()
11{
12 if( IS_BLUE(ME) ) return;
13 shadow( PL, 1);
14 pl = PL;
15}
16
17int
18AddExp(int ep)
19{
20 object block;
21 int diff, lim;
22
23 block = present("\n block", pl);
24 lim = 30 + random(10);
25
26 if ( ep > lim && // Mindestwert
27 previous_object() &&
28 ( previous_object() == pl || // zB. GiveQuest()
29 ( living(previous_object()) && // Oder NPCs
30 !query_once_interactive(previous_object())
31 )
32 )
33 )
34 {
35 diff = block->Gutschreiben(ep-lim);
36 return pl->AddExp(lim+diff);
37 }
38 return pl->AddExp(ep);
39}
40
41void
42SeherHatGenug()
43{
44 unshadow();
45 destruct(this_object());
46}
47