OSDN Git Service

Add turn count to Creature class.
authorDeskull <deskull@users.sourceforge.jp>
Sun, 16 Mar 2014 03:15:03 +0000 (12:15 +0900)
committerDeskull <deskull@users.sourceforge.jp>
Sun, 16 Mar 2014 03:15:03 +0000 (12:15 +0900)
Deeangband/Creature.cpp
Deeangband/Creature.h
Deeangband/GameWorld.h

index afb43a8..9c97fc6 100644 (file)
@@ -125,6 +125,8 @@ void Creature::SetDammyData(void)
 
        this->calcHPTable();
        currentHp = max_hp = this->GetNorMaxHP();
+
+       this->turn = 0;
 }
 
 bool Creature::IsAlive(void)
@@ -367,3 +369,8 @@ void Creature::TimeProcess(void)
 {
        this->currentFeed -= 10;
 }
+
+TURN Creature::GetTurn(void)
+{
+       return this->turn;
+}
index fa93959..41a85f1 100644 (file)
@@ -44,21 +44,24 @@ private:
        FEED currentFeed; //!< \8c»\8dÝ\8e \97{\92l
        FEED maxFeed;     //!< \8dÅ\91å\8e \97{\92l
 
-       Discipline currentDiscipilne; /*!< \8c»\8dÝ\82Ì\8fC\97{\92l */
-       LEVEL divineLevel; //!< \90_\90«\83\8c\83x\83\8b
+       Discipline currentDiscipilne; //!< \8c»\8dÝ\82Ì\8fC\97{\92l
+       LEVEL divineLevel;            //!< \90_\90«\83\8c\83x\83\8b
 
-       BaseStatusTable currentStatus; /*!< \8c»\8dÝ\82Ì\83X\83e\81[\83^\83X */
-       BaseStatusTable maxStatus;     /*!< \92Ê\8fí\82Ì\83X\83e\81[\83^\83X */
-       BaseStatusTable maxMaxStatus;  /*!< \8cÀ\8aE\82Ì\83X\83e\81[\83^\83X */
+       BaseStatusTable currentStatus; //!< \8c»\8dÝ\82Ì\83X\83e\81[\83^\83X
+       BaseStatusTable maxStatus;     //!< \92Ê\8fí\82Ì\83X\83e\81[\83^\83X
+       BaseStatusTable maxMaxStatus;  //!< \8cÀ\8aE\82Ì\83X\83e\81[\83^\83X
 
-       SavingTable savings; /*!< \83Z\81[\83r\83\93\83O */
+       SavingTable savings; //!< \83Z\81[\83r\83\93\83O
 
-       ID floorID; /*!< \8c»\8dÝ\82¢\82é\83t\83\8d\83AID */
-       Coordinates position; /*!< \8c»\8dÀ\95W */
-       map<ID, TAG, Item> itemList; /*!< \8f\8a\8e\9d\83A\83C\83e\83\80\83\8a\83X\83g */
-       char symbol; /*!< \83V\83\93\83{\83\8b\83L\83\83\83\89 */
-       Color symbolColor; /*!< \83V\83\93\83{\83\8b\83J\83\89\81[ */
-       ID tileID ;/*!< \83^\83C\83\8bID */
+       ID floorID;           //!< \8c»\8dÝ\82¢\82é\83t\83\8d\83AID
+       Coordinates position; //!< \8c»\8dÀ\95W
+       map<ID, TAG, Item> itemList; //!< \8f\8a\8e\9d\83A\83C\83e\83\80\83\8a\83X\83g
+
+       char symbol;       //!< \83V\83\93\83{\83\8b\83L\83\83\83\89
+       Color symbolColor; //!< \83V\83\93\83{\83\8b\83J\83\89\81[
+       ID tileID;         //!< \83^\83C\83\8bID
+
+       TURN turn; //!< \91\8d\83^\81[\83\93\90\94
 
        HP hpTable[CREATURE_MAX_LEVEL]; //!< \83q\83b\83g\83_\83C\83X\82É\8aî\82Ã\82«\90\90¬\82³\82ê\82½\83\8c\83x\83\8b\96\88\82Ì\8aî\96{HP
 
@@ -359,5 +362,11 @@ public:
         */
        void Creature::TimeProcess(void);
 
+       /*!
+        * @brief \83N\83\8a\81[\83`\83\83\81[\82Ì\8co\89ß\91\8d\83^\81[\83\93\90\94\82ð\95Ô\82·
+        * @return \91\8d\83^\81[\83\93\90\94
+        */
+       TURN Creature::GetTurn(void);
+
 };
 
index 3dde457..747f664 100644 (file)
@@ -67,6 +67,7 @@ private:
        map<ID, shared_ptr<Trap>> trapList;                    /*!<\91S\83g\83\89\83b\83v\83\8a\83X\83g*/
 
        GAME_TIME gameTime; //!<\83Q\81[\83\80\8e\9e\8aÔ
+
 public:
 
        /*!