MAction.h
00001 #ifndef MACTION_H 00002 #define MACTION_H 00003 00004 00005 enum ACTION_TYPE { 00006 ACTION_TYPE_ONCE, // 한번수행후 Turn에서 제외 00007 ACTION_TYPE_REPEAT // 매Turn 반복 00008 }; 00009 00010 00011 class MTurn; 00012 class MActParam; 00013 class MObject; 00014 00015 00016 class MAction { 00017 protected: 00018 int m_nID; 00019 ACTION_TYPE m_nType; 00020 00021 public: 00022 MAction() {} 00023 virtual ~MAction() {} 00024 00025 int GetID() { return m_nID; } 00026 void SetID(int nID) { m_nID = nID; } 00027 ACTION_TYPE GetType() { return m_nType; } 00028 void SetType(ACTION_TYPE nType) { m_nType = nType; } 00029 00030 virtual bool Run(int nTime, MObject* pActor, MActParam* pActParam) = 0; 00031 }; 00032 00033 00034 enum ACTION_ID { 00035 ACTION_ID_WARNING, 00036 ACTION_ID_ATTACK, 00037 ACTION_ID_INVOKEDEFENSE, 00038 ACTION_ID_DEFENSE, 00039 ACTION_ID_SKILL 00040 }; 00041 00042 00043 class MActionAttack : public MAction { 00044 public: 00045 MActionAttack() { SetID(ACTION_ID_ATTACK); SetType(ACTION_TYPE_REPEAT); } 00046 virtual bool Run(int nTime, MObject* pActor, MActParam* pActParam); 00047 }; 00048 00049 class MActionDefense : public MAction { 00050 public: 00051 MActionDefense() { SetID(ACTION_ID_DEFENSE); SetType(ACTION_TYPE_REPEAT); } 00052 virtual bool Run(int nTime, MObject* pActor, MActParam* pActParam); 00053 }; 00054 00055 class MActionSkill : public MAction { 00056 public: 00057 MActionSkill() { SetID(ACTION_ID_SKILL); SetType(ACTION_TYPE_REPEAT); } 00058 virtual bool Run(int nTime, MObject* pActor, MActParam* pActParam); 00059 }; 00060 00061 00062 #endif
MAIET entertainment