ScummVM API documentation
attack.h
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 modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (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, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef ULTIMA_ULTIMA1_ACTIONS_ATTACK_H
23 #define ULTIMA_ULTIMA1_ACTIONS_ATTACK_H
24 
25 #include "ultima/ultima1/actions/action.h"
26 #include "ultima/shared/maps/map_widget.h"
27 #include "ultima/shared/engine/messages.h"
28 
29 namespace Ultima {
30 namespace Ultima1 {
31 namespace Actions {
32 
33 using Shared::CCharacterInputMsg;
34 using Shared::CAttackMsg;
35 using Shared::CFireMsg;
36 
40 class AttackFire : public Action {
41  DECLARE_MESSAGE_MAP;
42  bool CharacterInputMsg(CCharacterInputMsg *msg);
43 protected:
47  virtual void doAttack(Shared::Maps::Direction dir) = 0;
48 public:
49  CLASSDEF;
50 
54  AttackFire(TreeItem *parent) : Action(parent) {}
55 
56 };
57 
61 class Attack : public AttackFire {
62  DECLARE_MESSAGE_MAP;
63  bool AttackMsg(CAttackMsg *msg);
64 protected:
68  void doAttack(Shared::Maps::Direction dir) override;
69 public:
70  CLASSDEF;
71 
75  Attack(TreeItem *parent) : AttackFire(parent) {}
76 };
77 
81 class Fire : public AttackFire {
82  DECLARE_MESSAGE_MAP;
83  bool FireMsg(CFireMsg *msg);
84 protected:
88  void doAttack(Shared::Maps::Direction dir) override;
89 public:
90  CLASSDEF;
91 
95  Fire(TreeItem *parent) : AttackFire(parent) {}
96 };
97 
98 } // End of namespace Actions
99 } // End of namespace Ultima1
100 } // End of namespace Ultima
101 
102 #endif
Definition: messages.h:302
Definition: attack.h:81
virtual void doAttack(Shared::Maps::Direction dir)=0
Definition: messages.h:290
Definition: detection.h:27
AttackFire(TreeItem *parent)
Definition: attack.h:54
Attack(TreeItem *parent)
Definition: attack.h:75
Definition: attack.h:61
Definition: messages.h:337
Fire(TreeItem *parent)
Definition: attack.h:95
Definition: action.h:38