Skip to content
Snippets Groups Projects
Commit d2a53103 authored by Doppelreiter, Markus's avatar Doppelreiter, Markus
Browse files

added

parents
Branches master
No related tags found
No related merge requests found
//------------------------------------------------------------------------------
// CratureCard.cpp
//
// Group: Group 8.7, study assistant Michael Hancianu
//
// Authors: Gerald Gattringer 01617517
// Markus Doppelreiter 01535331
// Markus Meierhofer 51800273
//------------------------------------------------------------------------------
//
#include "CreatureCard.hpp"
using Oop::CreatureCard;
CreatureCard::CreatureCard(const std::string name, int mana_cost,
const int damage_points, const int life_points,
const bool shield, bool mana_drain, bool speedy) :
Card(name, mana_cost, CREATURE),damage_points_(damage_points),
life_points_(life_points), shield_(shield),
mana_drain_(mana_drain), speedy_(speedy)
{}
int CreatureCard::getLifePoints() const
{
return life_points_;
}
int CreatureCard::getDamagePoints() const
{
return damage_points_;
}
bool CreatureCard::getManaDrain() const
{
return mana_drain_;
}
bool CreatureCard::getShield() const
{
return shield_;
}
int CreatureCard::getCurrentLifePoints() const
{
return current_life_points_;
}
bool CreatureCard::getReadyToFight() const
{
return ready_to_fight_;
}
bool CreatureCard::getAlreadyAttacked() const
{
return already_attacked_;
}
bool CreatureCard::getSpeedy() const
{
return speedy_;
}
\ No newline at end of file
//------------------------------------------------------------------------------
// CreatureCard.hpp
//
// Group: Group 8.7, study assistant Michael Hancianu
//
// Authors: Gerald Gattringer 01617517
// Markus Doppelreiter 01535331
// Markus Meierhofer 51800273
//------------------------------------------------------------------------------
//
#ifndef TUCG_CREATURECARD_HPP
#define TUCG_CREATURECARD_HPP
#include "Card.hpp"
namespace Oop
{
class Game;
//------------------------------------------------------------------------
// Creature Card Class
// Class defining the creator cards in the game
//
class CreatureCard : public Card
{
public:
//------------------------------------------------------------------------
// Constructor
//
CreatureCard(const std::string name, int mana_cost,
const int damage_points, const int life_points,
const bool shield, bool mana_drain,
bool speedy);
//------------------------------------------------------------------------
// Getter Methods
//
int getLifePoints() const;
int getDamagePoints() const;
bool getManaDrain() const;
bool getShield() const;
int getCurrentLifePoints() const;
bool getReadyToFight() const;
bool getAlreadyAttacked() const;
bool getSpeedy() const;
private:
//------------------------------------------------------------------------
// damage dealt by this creature when attacked
//
const int damage_points_;
//------------------------------------------------------------------------
// total life points of the kreatur, when playing the card
//
const int life_points_;
//------------------------------------------------------------------------
// current life points of the kreatur
//
int current_life_points_;
//------------------------------------------------------------------------
// gives information, about the shield property
//
const bool shield_;
//------------------------------------------------------------------------
// gives information, about mana drain or not
//
bool mana_drain_;
//------------------------------------------------------------------------
// gives information, about ready to fight
//
bool ready_to_fight_;
//------------------------------------------------------------------------
// each creature can in one round just attack on times
//
bool already_attacked_;
//------------------------------------------------------------------------
// true: attack in the first round ar possible
//
bool speedy_;
};
}
#endif //TUCG_CREATURECARD_HPP
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment