My Project
 
Loading...
Searching...
No Matches
key.h
Go to the documentation of this file.
1#pragma once
2
3#include "item.h"
4#include "bpt.h"
5
6class Key :public Item{
7public:
8 static const float TIME_TO_UNLOCK;
9 int depth;
10
11 Key();
12
13 virtual void storeInBundle(Bundle* bundle);
14 virtual void restoreFromBundle(Bundle* bundle);
15
16 virtual boolean isUpgradable() {
17 return false;
18 }
19 virtual boolean isIdentified() {
20 return true;
21 }
22 virtual String status();
23private:
24 static const String DEPTH;
25};
26
27class SkeletonKey :public Key{
28public:
31 virtual String info() {
32 return BPT::getText("lang.skeletonkey_info");
33 }
34};
35
36class GoldenKey :public Key{
37public:
38 GoldenKey();
39
41
42 virtual String info() {
43 return BPT::getText("lang.GoldenKey_Info");
44 //std::string("The notches on this golden key are tiny and intricate. ") +
45 //std::string("Maybe it can open some chest lock?");
46 }
47};
48
49class IronKey :public Key{
50private:
51 static const String TXT_FROM_DEPTH;
52public:
53 static int curDepthQuantity;
54 IronKey();
55
57 virtual boolean collect(Bag* bag);
58 virtual void onDetach();
59 virtual String toString();
60 virtual String info() {
61 return BPT::getText("lang.IronKey_Info");
62 //"The notches on this ancient iron key are well worn; its leather lanyard " +
63 //"is battered by age. What door might it open?";
64 }
65};
static std::string getText(const std::string &key)
Definition bpt.cpp:26
Definition bag.h:9
CLASSNAME(GoldenKey)
virtual String info()
Definition key.h:42
GoldenKey()
Definition key.cpp:42
virtual void onDetach()
Definition key.cpp:63
virtual String info()
Definition key.h:60
IronKey()
Definition key.cpp:48
CLASSNAME(IronKey)
virtual boolean collect(Bag *bag)
Definition key.cpp:54
static int curDepthQuantity
Definition key.h:53
virtual String toString()
Definition key.cpp:70
Item()
Definition item.cpp:65
virtual boolean isUpgradable()
Definition key.h:16
Key()
Definition key.cpp:16
virtual void restoreFromBundle(Bundle *bundle)
Definition key.cpp:29
virtual String status()
Definition key.cpp:35
int depth
Definition key.h:9
virtual boolean isIdentified()
Definition key.h:19
virtual void storeInBundle(Bundle *bundle)
Definition key.cpp:23
static const float TIME_TO_UNLOCK
Definition key.h:8
SkeletonKey()
Definition key.cpp:8
virtual String info()
Definition key.h:31
CLASSNAME(SkeletonKey)
std::string String
Definition typedefine.h:8