1 #pragma once
2 // Description:
3 //   All kinds of Weapons.
4 //
5 // Copyright (C) 2001 Frank Becker
6 //
7 // This program is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU General Public License as published by the Free Software
9 // Foundation;  either version 2 of the License,  or (at your option) any  later
10 // version.
11 //
12 // This program is distributed in the hope that it will be useful,  but  WITHOUT
13 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
15 //
16 
17 #include <string>
18 
19 class Model;
20 
21 const std::string WeaponTRIPPLEPHASER="TripplePhaser";
22 const std::string WeaponWINGPHASER="WingPhaser";
23 const std::string WeaponICESPRAY="IceSpray";
24 const std::string WeaponFLANKBURST="FlankBurst";
25 const std::string WeaponSTINGER="HeroStinger";
26 const std::string WeaponDOG="GuardDog";
27 
28 class Weapon
29 {
30 public:
31     Weapon( float energyRequired, float reloadTime, std::string name, std::string desc);
32     virtual ~Weapon();
33 
34     float energyRequired( void);
35     float reloadTime( void);
36     virtual void launch( float x, float y, float z) = 0;
37 
38     void setDamageMultiplier( float damageMultiplier);
39 
name(void)40     const std::string& name( void){ return _name;}
description(void)41     const std::string& description( void){ return _description;}
42 
draw(void)43     virtual void draw( void) {}
44 
45 protected:
46     float _energyRequired;
47     float _reloadTime;
48     float _damageMultiplier;
49     const std::string _name;
50     const std::string _description;
51 };
52 
53 class GuardDog: public Weapon
54 {
55 public:
56     GuardDog( void);
57     virtual ~GuardDog();
58 
59     virtual void launch( float x, float y, float z);
60 };
61 
62 class Stinger: public Weapon
63 {
64 public:
65     Stinger( void);
66     virtual ~Stinger();
67 
68     virtual void launch( float x, float y, float z);
69     virtual void draw( void);
70 private:
71     Model *_stinger;
72 };
73 
74 class FlankBurster: public Weapon
75 {
76 public:
77     FlankBurster( void);
78     virtual ~FlankBurster();
79 
80     virtual void launch( float x, float y, float z);
81     virtual void draw( void);
82 private:
83     Model *_flankBurster;
84 };
85 
86 class IceSpray: public Weapon
87 {
88 public:
89     IceSpray( void);
90     virtual ~IceSpray();
91 
92     virtual void launch( float x, float y, float z);
93     virtual void draw( void);
94 private:
95     Model *_iceSpray;
96     Model *_iceSprayPierce;
97 };
98 
99 class WingPhaser: public Weapon
100 {
101 public:
102     WingPhaser( void);
103     virtual ~WingPhaser();
104 
105     virtual void launch( float x, float y, float z);
106     virtual void draw( void);
107 private:
108     Model *_wingPhaser;
109     Model *_wingPhaserPierce;
110 };
111 
112 
113 class TripplePhaser: public Weapon
114 {
115 public:
116     TripplePhaser( void);
117     virtual ~TripplePhaser();
118 
119     virtual void launch( float x, float y, float z);
120     virtual void draw( void);
121 private:
122     Model *_tripplePhaser;
123 };
124 
125