22 #include "BattlescapeGame.h" 28 class SavedBattleGame;
44 std::vector<Position> _trajectory;
50 int _vaporColor, _vaporDensity, _vaporProbability;
51 void applyAccuracy(
Position origin,
Position *target,
double accuracy,
bool keepRange,
bool extendLine);
int getParticle(int i) const
Gets a particle from the particle array.
Definition: Projectile.cpp:457
void addVaporCloud()
adds a cloud of particles at the projectile's location
Definition: Projectile.cpp:529
Position getOrigin() const
Gets the Position of origin for the projectile.
Definition: Projectile.cpp:499
Definition: BattlescapeGame.h:43
bool isReversed() const
Is this projectile being drawn back-to-front or front-to-back?
Definition: Projectile.cpp:521
void skipTrajectory()
Skips the bullet flight.
Definition: Projectile.cpp:490
A class that represents a projectile.
Definition: Projectile.h:37
Position getPosition(int offset=0) const
Gets the current position in voxel space.
Definition: Projectile.cpp:443
Contains all the game-specific static data that never changes throughout the game, like rulesets and resources.
Definition: Mod.h:87
int calculateThrow(double accuracy)
Calculates the trajectory for a curved path.
Definition: Projectile.cpp:216
int calculateTrajectory(double accuracy)
Calculates the trajectory for a straight path.
Definition: Projectile.cpp:114
bool move()
Moves the projectile one step in its trajectory.
Definition: Projectile.cpp:420
Represents a single item in the battlescape.
Definition: BattleItem.h:37
BattleItem * getItem() const
Gets the item.
Definition: Projectile.cpp:470
~Projectile()
Cleans up the Projectile.
Definition: Projectile.cpp:103
Projectile(Mod *mod, SavedBattleGame *save, BattleAction action, Position origin, Position target, BattleItem *ammo)
Creates a new Projectile.
Definition: Projectile.cpp:49
Element that is blit (rendered) onto the screen.
Definition: Surface.h:38
The battlescape data that gets written to disk when the game is saved.
Definition: SavedBattleGame.h:47
Position getTarget() const
Gets the targetted tile for the projectile.
Definition: Projectile.cpp:512
Surface * getSprite() const
Gets the sprite.
Definition: Projectile.cpp:482
Easy handling of X-Y-Z coordinates.
Definition: Position.h:28
Definition: BaseInfoState.cpp:40