1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20  *
21  */
22 
23 #ifndef ULTIMA_ULTIMA1_U1DIALOGS_KILL_MAGIC_MISSILE_H
24 #define ULTIMA_ULTIMA1_U1DIALOGS_KILL_MAGIC_MISSILE_H
25 
26 #include "ultima/ultima1/spells/spell.h"
27 #include "ultima/shared/engine/messages.h"
28 
29 namespace Ultima {
30 namespace Ultima1 {
31 namespace Spells {
32 
33 using Shared::CCharacterInputMsg;
34 
35 /**
36  * Common intermediate base class for both the Kill and Magic Missile spells
37  */
38 class KillMagicMIssile : public Spell {
39 	DECLARE_MESSAGE_MAP;
40 	bool CharacterInputMsg(CCharacterInputMsg *msg);
41 public:
42 	CLASSDEF;
43 
44 	/**
45 	 * Constructor
46 	 */
KillMagicMIssile(Ultima1Game * game,Character * c,SpellId spellId)47 	KillMagicMIssile(Ultima1Game *game, Character *c, SpellId spellId) : Spell(game, c, spellId) {}
48 
49 	/**
50 	 * Cast the spell outside a dungeon
51 	 */
52 	void cast(Maps::MapBase *map) override;
53 };
54 
55 /**
56  * Kill spell
57  */
58 class Kill : public KillMagicMIssile {
59 public:
60 	/**
61 	 * Constructor
62 	 */
63 	Kill(Ultima1Game *game, Character *c);
64 
65 	/**
66 	 * Cast the spell within dungeons
67 	 */
68 	void dungeonCast(Maps::MapDungeon *map) override;
69 };
70 
71 /**
72  * Magic Missile spell
73  */
74 class MagicMissile : public KillMagicMIssile {
75 public:
76 	/**
77 	 * Constructor
78 	 */
79 	MagicMissile(Ultima1Game *game, Character *c);
80 
81 	/**
82 	 * Cast the spell within dungeons
83 	 */
84 	void dungeonCast(Maps::MapDungeon *map) override;
85 };
86 
87 } // End of  namespace U1Dialogs
88 } // End of namespace Ultima1
89 } // End of namespace Ultima
90 
91 #endif
92