13 static const String TXT_HARMFUL;
14 static const String TXT_BENEFICIAL;
15 static const String TXT_YES;
16 static const String TXT_NO;
17 static const String TXT_R_U_SURE_DRINK;
18 static const String TXT_R_U_SURE_THROW;
20 static const float TIME_TO_DRINK;
24 static std::vector<String> potions;
27 static std::vector<String> colors;
30 static std::vector<int> images;
39 static void save(Bundle* bundle);
40 static void restore(Bundle* bundle);
43 virtual void execute(
Hero* hero, std::string action);
59 std::string(
"This flask contains a swirling ") + color + (
" liquid. ") +
60 std::string(
"Who knows what it will do when drunk or thrown?");
69 return handler->known;
72 return handler->unknown();
75 return handler->known.size() == potions.size();
97 "An elixir that will instantly return you to full health and cure poison.";
114 String(
"The storied experiences of multitudes of battles reduced to liquid form, ") +
115 String(
"this draught will instantly raise your experience level.");
130 virtual void shatter(
int cell);
134 String(
"Uncorking or shattering this pressurized glass will cause ") +
135 String(
"its contents to explode into a deadly cloud of toxic green gas. ") +
136 String(
"You might choose to fling this potion at distant enemies ") +
137 String(
"instead of uncorking it by hand.");
150 virtual void shatter(
int cell);
153 String(
"This flask contains an unstable compound which will burst ") +
154 String(
"violently into flame upon exposure to open air.");
169 String(
"This powerful liquid will course through your muscles, ") +
170 String(
"permanently increasing your strength by one point.");
185 virtual void shatter(
int cell);
189 String(
"Upon exposure to open air, the liquid in this flask will vaporize ") +
190 String(
"into a numbing yellow haze. Anyone who inhales the cloud will be paralyzed ") +
191 String(
"instantly, unable to move for some time after the cloud dissipates. This ") +
192 String(
"item can be thrown at distant enemies to catch them within the effect of the gas.");
207 String(
"Drinking this curious liquid will cause you to hover in the air, ") +
208 String(
"able to drift effortlessly over traps. Flames and gases ") +
209 String(
"fill the air, however, and cannot be bypassed while airborne.");
226 String(
"After drinking this, your mind will become attuned to the psychic signature ") +
227 String(
"of distant creatures, enabling you to sense biological presences through walls. ") +
228 String(
"Also this potion will permit you to see through nearby walls and doors.");
239 static const String TXT_FRESHNESS;
240 static const String TXT_NO_SMELL;
242 static const int DISTANCE = 2;
248 virtual void shatter(
int cell);
251 String(
"This reagent will quickly neutralize all harmful gases in the area of effect. ") +
252 String(
"Drinking it will give you a temporary immunity to such gases.");
263 static const float ALPHA;
271 String(
"Drinking this potion will render you temporarily invisible. While invisible, ") +
272 String(
"enemies will be unable to see you. Attacking an enemy, as well as using a wand or a scroll ") +
273 String(
"before enemy's eyes, will dispel the effect.");
292 String(
"This powerful liquid will course through your muscles, permanently ") +
293 String(
"increasing your strength by one point and health by five points.");
304 static const int DISTANCE = 2;
311 virtual void shatter(
int cell);
314 String(
"Upon exposure to open air, this chemical will evaporate into a freezing cloud, causing ") +
315 String(
"any creature that contacts it to be frozen in place, unable to act and move.");
Item()
Definition item.cpp:65
std::string name
Definition item.h:48
int quantity
Definition item.h:62
virtual std::string desc()
Definition item.h:93
Definition itemstatushandler.h:10
virtual void apply(Hero *hero)
Definition potion.cpp:216
virtual String Name()
Definition potion.h:53
Potion()
Definition potion.cpp:73
virtual std::string getClassName()
Definition potion.h:11
virtual Item * identify()
Definition potion.h:49
virtual void actions(Hero *hero, std::vector< std::string > &actions)
Definition potion.cpp:97
virtual boolean isIdentified()
Definition potion.h:62
static boolean allKnown()
Definition potion.h:74
static const String AC_DRINK
Definition potion.h:9
virtual String info()
Definition potion.h:56
boolean isKnown()
Definition potion.cpp:171
virtual void shatter(int cell)
Definition potion.cpp:162
virtual void doThrow(Hero *hero)
Definition potion.cpp:134
String Color()
Definition potion.h:84
void splash(int cell)
Definition potion.cpp:221
static std::set< std::string > getKnown()
Definition potion.h:68
static void save(Bundle *bundle)
Definition potion.cpp:87
static void initColors()
Definition potion.cpp:82
static std::set< std::string > getUnknown()
Definition potion.h:71
virtual void onThrow(int cell)
Definition potion.cpp:198
void setKnown()
Definition potion.cpp:176
static void restore(Bundle *bundle)
Definition potion.cpp:92
virtual boolean isUpgradable()
Definition potion.h:65
virtual void execute(Hero *hero, std::string action)
Definition potion.cpp:103
virtual int price()
Definition potion.h:77
void drink(Hero *hero)
Definition potion.cpp:185
virtual std::string getClassName()
Definition potion.h:109
virtual int price()
Definition potion.h:117
static Item * Create()
Definition potion.h:110
virtual void apply(Hero *hero)
Definition potion.cpp:256
PotionOfExperience()
Definition potion.cpp:251
virtual String desc()
Definition potion.h:112
virtual void shatter(int cell)
Definition potion.cpp:500
virtual std::string getClassName()
Definition potion.h:308
virtual String desc()
Definition potion.h:312
static Item * Create()
Definition potion.h:309
PotionOfFrost()
Definition potion.cpp:495
virtual int price()
Definition potion.h:317
static Item * Create()
Definition potion.h:92
PotionOfHealing()
Definition potion.cpp:228
virtual int price()
Definition potion.h:99
virtual String desc()
Definition potion.h:95
static void heal(Hero *hero)
Definition potion.cpp:233
virtual void apply(Hero *hero)
Definition potion.cpp:244
virtual std::string getClassName()
Definition potion.h:91
static void melt(Char *ch)
Definition potion.cpp:455
virtual String desc()
Definition potion.h:269
PotionOfInvisibility()
Definition potion.cpp:450
virtual int price()
Definition potion.h:275
virtual std::string getClassName()
Definition potion.h:266
virtual void apply(Hero *hero)
Definition potion.cpp:467
static Item * Create()
Definition potion.h:267
PotionOfLevitation()
Definition potion.cpp:335
static Item * Create()
Definition potion.h:203
virtual int price()
Definition potion.h:211
virtual void apply(Hero *hero)
Definition potion.cpp:340
virtual String desc()
Definition potion.h:205
virtual std::string getClassName()
Definition potion.h:202
virtual String desc()
Definition potion.h:151
virtual std::string getClassName()
Definition potion.h:147
virtual int price()
Definition potion.h:156
static Item * Create()
Definition potion.h:148
PotionOfLiquidFlame()
Definition potion.cpp:281
virtual void shatter(int cell)
Definition potion.cpp:287
virtual int price()
Definition potion.h:295
static Item * Create()
Definition potion.h:288
virtual String desc()
Definition potion.h:290
virtual void apply(Hero *hero)
Definition potion.cpp:480
PotionOfMight()
Definition potion.cpp:475
virtual std::string getClassName()
Definition potion.h:287
static Item * Create()
Definition potion.h:222
virtual void apply(Hero *hero)
Definition potion.cpp:353
virtual String desc()
Definition potion.h:224
virtual std::string getClassName()
Definition potion.h:221
virtual int price()
Definition potion.h:230
PotionOfMindVision()
Definition potion.cpp:347
virtual std::string getClassName()
Definition potion.h:182
static Item * Create()
Definition potion.h:183
virtual String desc()
Definition potion.h:187
virtual int price()
Definition potion.h:194
virtual void shatter(int cell)
Definition potion.cpp:323
PotionOfParalyticGas()
Definition potion.cpp:318
PotionOfPurity()
Definition potion.cpp:371
virtual int price()
Definition potion.h:254
virtual void shatter(int cell)
Definition potion.cpp:376
virtual std::string getClassName()
Definition potion.h:245
static Item * Create()
Definition potion.h:246
virtual String desc()
Definition potion.h:249
virtual void apply(Hero *hero)
Definition potion.cpp:442
PotionOfStrength()
Definition potion.cpp:300
static Item * Create()
Definition potion.h:165
virtual int price()
Definition potion.h:172
virtual std::string getClassName()
Definition potion.h:164
virtual String desc()
Definition potion.h:167
virtual void apply(Hero *hero)
Definition potion.cpp:305
virtual int price()
Definition potion.h:139
static Item * Create()
Definition potion.h:128
virtual std::string getClassName()
Definition potion.h:127
virtual void shatter(int cell)
Definition potion.cpp:269
virtual String desc()
Definition potion.h:132
PotionOfToxicGas()
Definition potion.cpp:264
std::string String
Definition typedefine.h:8