80 Creature::Creature(std::map<
TAG, boost::shared_ptr<Species>>::iterator speciesIt) : GameInstance(), HaveSymbol(), HaveHp(), HaveGameTime(), HavePosition(), HaveInventory(), HaveSize()
83 SetSpeciesData(&(*speciesIt->second));
86 Creature::Creature(std::map<
TAG, boost::shared_ptr<Species>>::iterator speciesIt,
ID FieldID, Coordinates *coordinates) : GameInstance(), HaveSymbol(), HaveHp(), HaveGameTime(), HavePosition(fieldID, coordinates), HaveInventory(), HaveSize()
89 SetSpeciesData(&(*speciesIt->second));
92 Creature::Creature(std::map<
TAG, boost::shared_ptr<Species>>::iterator speciesIt,
ID FieldID,
int x,
int y) : GameInstance(), HaveSymbol(), HaveHp(), HaveGameTime(), HavePosition(fieldID, x, y), HaveInventory(), HaveSize()
95 SetSpeciesData(&(*speciesIt->second));
98 Creature::Creature(
void)
103 Creature::‾Creature(
void)
107 void Creature::SetSpeciesData(Species *speciesPtr)
111 this->
name = speciesPtr->GetName();
112 this->
symbol = speciesPtr->GetSymbol();
115 this->
currentFeed = speciesPtr->GetBaseFeed() * 3 / 4;
116 this->
maxFeed = speciesPtr->GetBaseFeed();
117 this->
weight = distWeight(Dice::mt);
118 this->
height = distHeight(Dice::mt);
120 this->
firstRace = speciesPtr->GetFirstRaceTag();
121 this->
secondRace = speciesPtr->GetSecondtRaceTag();
124 void Creature::WipeData(
void)
161 bool Creature::IsAlive(
void)
166 bool Creature::TakeEffect(Effect *effectPtr,
POWER amount)
168 if(effectPtr) this->CalcHP(-amount);
172 void Creature::die(
void)
176 void Creature::calcHPTable(
void)
179 HP hitDice = this->GetSize();
183 if(hitDice <= 0) hitDice = 1;
187 this->
hpTable[0] = hitDice + Dice::Cast(3, hitDice);
190 this->
hpTable[lev + 1] = this->
hpTable[lev] + Dice::Rand1(hitDice);
196 void Creature::calcMP(
MP amount)
203 void Creature::setMP(
MP amount)
210 LEVEL Creature::GetLevel(
void)
222 HP Creature::GetNorMaxHP(
void)
224 return this->
hpTable[this->GetLevel()];
227 MP Creature::GetCurMP(
void)
232 MP Creature::GetMaxMP(
void)
237 MP Creature::GetNorMaxMP(
void)
242 AC Creature::GetArmorSaving(
void)
244 return this->
savings.GetArmor();
247 EV Creature::GetEvasionSaving(
void)
249 return this->
savings.GetEvasion();
252 VO Creature::GetVolitionSaving(
void)
254 return this->
savings.GetVolition();
257 SOUL Creature::GetCurrentSoul(
void)
262 SOUL Creature::GetMaxSoul(
void)
292 void Creature::GainSoul(
SOUL amount)
295 if(this->currentSoul < this->
maxSoul)
300 this->maxSoul += diff / 20;
301 this->currentSoul = this->
maxSoul;
306 this->maxSoul += amount / 20;
307 this->currentSoul += amount;
311 this->currentSoul += amount;
312 this->maxSoul += amount;
315 void Creature::LostSoul(
SOUL amount)
318 this->maxSoul -= amount / 20;
322 LEVEL Creature::GetDivineLevel(
void)
327 FEED Creature::GetCurrentFeedPoint(
void)
332 FEED Creature::GetMaxFeedPoint(
void)
337 void Creature::TurnProcess(
void)
341 void Creature::TimeProcess(
void)
346 TURN Creature::GetTurn(
void)
357 TAG Creature::GetCampTag(
void)
368 bool Creature::Melee(Creature *targerPtr)
373 bool Creature::PickUpItem(std::map<
ID, boost::shared_ptr<Item>>::iterator itemIt)
378 bool Creature::DropItem(std::map<
ID, boost::shared_ptr<Item>>::iterator itemIt)
383 bool Creature::EatItem(std::map<
ID, boost::shared_ptr<Item>>::iterator itemIt)
388 bool Creature::QuaffItem(std::map<
ID, boost::shared_ptr<Item>>::iterator itemIt)
393 bool Creature::ActivateItem(std::map<
ID, boost::shared_ptr<Item>>::iterator itemIt)
398 bool Creature::ThrowItem(std::map<
ID, boost::shared_ptr<Item>>::iterator itemIt)
403 bool Creature::ReadItem(std::map<
ID, boost::shared_ptr<Item>>::iterator itemIt)
408 void Creature::XMLSave(std::string filename)
410 std::ofstream ofs(filename);
412 boost::archive::xml_oarchive oa(ofs);
413 oa << boost::serialization::make_nvp(
"Creature", *
this);
Discipline currentDiscipilne
現在の修養値
CREATURE_STATUS
クリーチャーの基礎能力値6種の列挙体
std::string TAG
ゲーム要素文字列ID
HP hpTable[CREATURE_MAX_LEVEL]
ヒットダイスに基づき生成されたレベル毎の基本HP
virtual void GameInstance::WipeData(void)
ダミーデータによる初期化
std::map< TAG, SKILL_EXP > skillExpList
スキル経験値リスト
void HaveSize::WipeData(void)
HaveSizeクラスのデータ消去
BaseStatusTable maxMaxStatus
限界のステータス
int DISCIPLINE_POINT
修養値の変数型
static SOUL soulLevel[CREATURE_MAX_LEVEL]
必要ソウルレベルテーブル
標準のシステム インクルード ファイルのインクルード ファイル、または 参照回数が多く、かつあまり変更さ...
#define TAG_VARIABLE
要素可変タグ
#define CREATURE_MAX_LEVEL
神格込み最大レベル
BaseStatusTable maxStatus
通常のステータス
void HaveSymbol::WipeData(void)
HaveSymbolデータ初期化
static double WeightStandardDeviation
static Coordinates DirectionVector[]
方角ベクトルの定義
BaseStatusTable currentStatus
現在のステータス
static double HeightStandardDeviation