Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Player
- {
- public:
- using Bag = std::vector<CoinHandle>;
- // // - - -> log message , scale
- using FightLog = std::map<Stage, std::vector<std::pair<std::string, float>>>;
- public:
- constexpr static HealthAmount MaxHealth = 10;
- constexpr static CoinAmount CoinsPerRound = 3;
- constexpr static CoinAmount CoinsInAction = 3;
- constexpr static CoinAmount CoinsInHand = 5;
- public:
- Player(const std::string& name);
- public:
- const std::string& name() const;
- public:
- void initializeRound(); // TODO: move to Fight.h
- void calculate();
- bool isAlive() const;
- HealthAmount getHealth() const;
- void takeDefence(DefenceAmount amount);
- AttackAmount attackTaken() const;
- DefenceAmount defenceTaken() const;
- AttackAmount attackGiven() const;
- void takeAttack(AttackAmount amount);
- void recordAttack(AttackAmount amount); // TODO: recordAttack - find better name
- void addStatusEffect(const EffectHandle& effect);
- public:
- HealthAmount getMaxHealth() const;
- CoinAmount getCoinsPerRound();
- CoinAmount getCoinsInHand();
- CoinAmount getCoinsInActionLimit();
- public:
- void discardCoinsInStatusEffect();
- void discardCoinsInAction();
- void blockCoinsBy(CoinAmount amount);
- const CoinHandle& randomCoin() const;
- CoinHandle removeRandomCoinFromBag();
- CoinHandle removeMaxDamageCoin();
- void removeCoin(const CoinHandle& target);
- void fillHand();
- public:
- void moveSelectedCoin();
- CoinHandle selectedCoin() const;
- Hand selectedCoinPlace() const;
- void setSelectedCoin(const CoinHandle& targetCoin);
- public:
- const Coins& getCoinsInStatusEffect();
- const Bag& getBag() const; // TODO: getBag - rename to getDeckCoins()
- const Coins& getHoldCoins() const;
- const Coins& getActionCoins() const;
- CoinAmount countCoinsInBag(const std::string& targetName) const;
- void addCoinToBag(const CoinHandle& newCoin);
- void removeCoinFromBagByName(const std::string& targetName);
- void moveCoinToHand(const CoinHandle& target);
- void moveCoinToAction(const CoinHandle& target);
- void dropToHold(const CoinHandle& target);
- void dropToAction(const CoinHandle& target);
- public:
- void clearFightLog();
- const FightLog& getFightLog() const;
- void appendToFightLog(Stage stage, const std::string& action);
- void appendToFightLog(Stage stage, float scale, const std::string& action);
- private:
- std::string m_name;
- HealthAmount m_health;
- AttackAmount m_attackGet;
- DefenceAmount m_defenceGet;
- AttackAmount m_attackGive;
- CoinAmount m_coinsBlocked;
- Coins m_actionCoins;
- Coins m_holdCoins;
- Coins m_statusEffectCoins;
- CoinHandle m_selectedCoin;
- Hand m_selectedCoinInHand;
- Bag m_bag;
- FightLog m_fightLog;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement