本文整理汇总了C++中Armor::setArmorValue方法的典型用法代码示例。如果您正苦于以下问题:C++ Armor::setArmorValue方法的具体用法?C++ Armor::setArmorValue怎么用?C++ Armor::setArmorValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Armor
的用法示例。
在下文中一共展示了Armor::setArmorValue方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
//make output file
ofstream output;
bool creatureOccupied;
bool wallOccupied;
int tempX = 0;
int tempY = 0;
int thingTempX = 0;
int thingTempY = 0;
int playerX = 0;
int playerY = 0;
Player * pPlayer = new Player();
Weapon * punch = new Weapon();
Weapon * keys = new Weapon();
Armor * TrashCanLid = new Armor();
keys->setDamage(5);
keys->setAccuracy(2);
keys->setWeaponType("keychain");
keys->setName("Car Keys");
keys->setDisplayChar('x');
pPlayer->setWeapon(punch);
punch->setDamage(5);
punch->setAccuracy(5);
punch->setWeaponType("flesh");
TrashCanLid->setArmorValue(3);
TrashCanLid->setArmorType("trashlid");
TrashCanLid->setName("Trash Can Lid");
TrashCanLid->setDisplayChar('t');
pPlayer->setInventory(TrashCanLid);
pPlayer->setInventory(keys);
pPlayer->setExperience(0);
string sMove;
int dNum = 0;
int iNum = 0;
vector<DungeonLevel*> vDL;
vector<vector<Creature*>> vvCreatures;
vector<vector<vector<Item*>>> vvvItems;
bool nextFloor = true;
bool sameFloor = false;
bool prevFloor = false;
bool creatureTurn;
int monsterHP = 0;
int HP = 0;
int attack = 0;
int moveCount = 0;
bool bWeapon = true;
initscr();
noecho();
while(true)
{
clear();