freg  0.3
Free-Roaming Elementary Game
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Weapons.h
Go to the documentation of this file.
1  /* freg, Free-Roaming Elementary Game with open and interactive world
2  * Copyright (C) 2012-2014 Alexander 'mmaulwurff' Kromm
3  * mmaulwurff@gmail.com
4  *
5  * This file is part of FREG.
6  *
7  * FREG 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  * FREG 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 FREG. If not, see <http://www.gnu.org/licenses/>. */
19 
20 #ifndef WEAPONS_H
21 #define WEAPONS_H
22 
23 #include "blocks/Active.h"
24 
25 class Weapon : public Falling {
26  /** \class Weapon Weapons.h
27  * \brief Weapon class represents simple weapons as sticks, pebbles and
28  * so on.
29  * Also is used as base class for more special weapons.
30  * Weapon of SKY substance is abyss block, everything that touches abyss
31  * will be destroyed. */
32 public:
33  using Falling::Falling;
34 
35  int DamageKind() const override;
36  int DamageLevel() const override;
37  int Weight() const override;
38  QString FullName() const override;
39  wearable Wearable() const override;
40  push_reaction PushResult(dirs) const override;
41 };
42 
43 class Pick : public Weapon {
44 public:
45  using Weapon::Weapon;
46 
47  int DamageKind() const override;
48  QString FullName() const override;
49 };
50 
51 class Shovel : public Weapon {
52 public:
53  using Weapon::Weapon;
54 
55  int DamageKind() const override;
56  QString FullName() const override;
57 };
58 
59 class Hammer : public Weapon {
60 public:
61  using Weapon::Weapon;
62 
63  int DamageKind() const override;
64  QString FullName() const override;
65 };
66 
67 class Axe : public Weapon {
68 public:
69  using Weapon::Weapon;
70 
71  int DamageKind() const override;
72  QString FullName() const override;
73 };
74 
75 #endif // WEAPONS_H
Definition: Weapons.h:43
push_reaction
Definition: header.h:95
int DamageKind() const override
Definition: Weapons.cpp:76
QString FullName() const override
Definition: Weapons.cpp:78
QString FullName() const override
Definition: Weapons.cpp:64
wearable Wearable() const override
Definition: Weapons.cpp:38
int DamageKind() const override
Definition: Weapons.cpp:83
int DamageKind() const override
Definition: Weapons.cpp:62
int DamageLevel() const override
Definition: Weapons.cpp:41
int Weight() const override
Definition: Weapons.cpp:37
QString FullName() const override
Definition: Weapons.cpp:85
QString FullName() const override
Definition: Weapons.cpp:71
push_reaction PushResult(dirs) const override
Definition: Weapons.cpp:39
wearable
Definition: Block.h:28
dirs
Definition: header.h:85
QString FullName() const override
Definition: Weapons.cpp:26
Definition: Weapons.h:67
int DamageKind() const override
Definition: Weapons.cpp:53
Falling(int sub, int id, int transp=UNDEF)
Definition: Active.cpp:232
Definition: Weapons.h:59
Weapon class represents simple weapons as sticks, pebbles and so on. Also is used as base class for m...
Definition: Weapons.h:25
int DamageKind() const override
Definition: Weapons.cpp:69
Definition: Weapons.h:51