本文整理汇总了C++中Pokemon::GamHP1方法的典型用法代码示例。如果您正苦于以下问题:C++ Pokemon::GamHP1方法的具体用法?C++ Pokemon::GamHP1怎么用?C++ Pokemon::GamHP1使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pokemon
的用法示例。
在下文中一共展示了Pokemon::GamHP1方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Play2
void Play2(Pokemon& Tail,Pokemon& Volt, Graphics test1, int posMo2, int& CurrHP1, int& CurrHP2){
int HP1 = Tail.HP(), HP2 = Volt.HP();
setStage(test1, HP1, CurrHP1, HP2, CurrHP2);
if (Volt.useMove(posMo2) == 0){
mvprintw(31,61,"Miss Hit");
}else if (Volt.useMove(posMo2) > 0){
setStage(test1, HP1, CurrHP1, HP2, CurrHP2);
if (Tail.effectiveness(Volt.ATKDMGT(posMo2)) == 1){
Tail.defend(Volt, posMo2);
CurrHP1 = Tail.GamHP1();
mvprintw(31,61,"Super Effective!");
}else if (Tail.effectiveness(Volt.ATKDMGT(posMo2)) == 2){
Tail.defend(Volt, posMo2);
CurrHP1 = Tail.GamHP1();
mvprintw(31,61,"Not very Effective!");
}else if (Tail.effectiveness(Volt.ATKDMGT(posMo2)) == 3){
Tail.defend(Volt, posMo2);
CurrHP1 = Tail.GamHP1();
mvprintw(31,61,"Doesn't affect opponent");
}else{
mvprintw(31,61,"It Hit!");
Tail.defend(Volt, posMo2);
CurrHP1 = Tail.GamHP1();
}
setStage(test1, HP1, CurrHP1, HP2, CurrHP2);
getch();
}else{
Tail.defend(Volt, posMo2);
CurrHP1 = Tail.GamHP1();
Tail.setState(Volt.useMove(posMo2));
mvprintw(31,61,"Status Given");
}
}