本文整理汇总了C++中Hero::getLifeUpperVal方法的典型用法代码示例。如果您正苦于以下问题:C++ Hero::getLifeUpperVal方法的具体用法?C++ Hero::getLifeUpperVal怎么用?C++ Hero::getLifeUpperVal使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Hero
的用法示例。
在下文中一共展示了Hero::getLifeUpperVal方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: attactMonsterArrange
//.........这里部分代码省略.........
{
continue;
}
// 已经死亡
if (hitedHero->getLifeVal() <= 0)
{
cout<<"The atked hero is dead when use many atk skill"<<endl;
continue;
}
// 无敌状态
if (hitedHero->skillBuffState & BUFF_INVINCIBLE_STATE)
{
cout<<"The atked hero is invinc for atk"<<endl;
continue;
}
if (relationCheck(owner, hitedHero, mapNow) != 2)
{
// 不是敌人,不能攻击
cout<<"The hero is not your enemy when use many atk skill !!"<<endl;
continue;
}
tempPt = hitedHero->getLocation();
cout<<"really distance is:"<<GET_DISTANCE(tempPt, objPt)<<endl;
cout<<"can hurt range is:"<<range<<endl;
if (IS_OUT_RANGE(tempPt, objPt, range))
{
// 不在作用范围内
cout<<"The atked hero is out of range when use many atk skill!!"<<endl;
continue;
}
// 群体伤害不算攻击后反弹
lifeHurt = countAttValHero(hitedHero, skiHrtRatio, 1);
sprintf(tempMsg + strlen(tempMsg), ",%s,%d,%d,%d,%d,%d,%d", hitedHero->getIdentity(),
JUDGE_WILL_LIFE(hitedHero, lifeHurt), hitedHero->getLifeUpperVal(), hitedHero->getMagicVal(),
hitedHero->getMagicUpperVal(), lifeHurt, 0);
atkNum++;
proc_hero_lose_life(owner, hitedHero, lifeHurt);
}
}
if (oneScr->monsterSet.size() != 0)
{
set<string>::iterator it_monId;
tempSet.clear();
tempSet = oneScr->monsterSet;
for (it_monId = tempSet.begin(); it_monId != tempSet.end(); it_monId++)
{
// cout<<"attack one mon and monId is "<<(*it_monId)<<endl;
if((*it_monId).size()==0) continue; //added by benliao
MonsterBase *mon = mapNow->getMonsterObj((*it_monId).c_str());
if (mon == NULL)
{
continue;
}
if (mon->getLifeVal() <= 0 || !mon->getLifeStation())
{
// 怪物已经死亡
continue;
}
tempPt = mon->getLocation();
if (IS_OUT_RANGE(tempPt, objPt, range))
{
// 不在作用范围内
continue;
}
if (mon->getUnEnemySta())
{