ManaPlus
attack.h
Go to the documentation of this file.
1 /*
2  * The ManaPlus Client
3  * Copyright (C) 2004-2009 The Mana World Development Team
4  * Copyright (C) 2009-2010 The Mana Developers
5  * Copyright (C) 2011-2019 The ManaPlus Developers
6  *
7  * This file is part of The ManaPlus Client.
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program. If not, see <http://www.gnu.org/licenses/>.
21  */
22 
23 #ifndef RESOURCES_ATTACK_H
24 #define RESOURCES_ATTACK_H
25 
26 #include "resources/missileinfo.h"
27 
28 struct Attack final
29 {
30  std::string mAction;
31  std::string mSkyAction;
32  std::string mWaterAction;
33  std::string mRideAction;
34  int mEffectId;
39 
40  Attack(const std::string &action,
41  const std::string &skyAction,
42  const std::string &waterAction,
43  const std::string &rideAction,
44  const int effectId,
45  const int hitEffectId,
46  const int criticalHitEffectId,
47  const int missEffectId,
48  const std::string &missileParticle,
49  const float missileZ,
50  const float missileSpeed,
51  const float missileDieDistance,
52  const int missileLifeTime) :
53  mAction(action),
54  mSkyAction(skyAction),
55  mWaterAction(waterAction),
56  mRideAction(rideAction),
57  mEffectId(effectId),
58  mHitEffectId(hitEffectId),
59  mCriticalHitEffectId(criticalHitEffectId),
60  mMissEffectId(missEffectId),
61  mMissile()
62  {
63  mMissile.particle = missileParticle;
64  mMissile.z = missileZ;
65  mMissile.speed = missileSpeed;
66  mMissile.dieDistance = missileDieDistance;
67  mMissile.lifeTime = missileLifeTime;
68  }
69 
71 };
72 
73 #endif // RESOURCES_ATTACK_H
Attack::mSkyAction
std::string mSkyAction
Definition: attack.h:31
Attack::mHitEffectId
int mHitEffectId
Definition: attack.h:35
Attack::mCriticalHitEffectId
int mCriticalHitEffectId
Definition: attack.h:36
A_DELETE_COPY
#define A_DELETE_COPY(func)
Definition: localconsts.h:52
MissileInfo::z
float z
Definition: missileinfo.h:41
Attack::Attack
Attack(const std::string &action, const std::string &skyAction, const std::string &waterAction, const std::string &rideAction, const int effectId, const int hitEffectId, const int criticalHitEffectId, const int missEffectId, const std::string &missileParticle, const float missileZ, const float missileSpeed, const float missileDieDistance, const int missileLifeTime)
Definition: attack.h:40
Attack::mRideAction
std::string mRideAction
Definition: attack.h:33
Attack
Definition: attack.h:28
Attack::mAction
std::string mAction
Definition: attack.h:30
MissileInfo::speed
float speed
Definition: missileinfo.h:42
final
#define final
Definition: localconsts.h:45
Attack::mWaterAction
std::string mWaterAction
Definition: attack.h:32
Attack::mEffectId
int mEffectId
Definition: attack.h:34
MissileInfo::dieDistance
float dieDistance
Definition: missileinfo.h:43
missileinfo.h
MissileInfo
Definition: missileinfo.h:28
MissileInfo::lifeTime
int lifeTime
Definition: missileinfo.h:44
Attack::mMissEffectId
int mMissEffectId
Definition: attack.h:37
MissileInfo::particle
std::string particle
Definition: missileinfo.h:40
Attack::mMissile
MissileInfo mMissile
Definition: attack.h:38