本文整理汇总了C++中BS::inflictDamage方法的典型用法代码示例。如果您正苦于以下问题:C++ BS::inflictDamage方法的具体用法?C++ BS::inflictDamage怎么用?C++ BS::inflictDamage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BS
的用法示例。
在下文中一共展示了BS::inflictDamage方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: et
static void et(int s, int, BS &b) {
if (b.hasWorkingAbility(s, Ability::MagicGuard))
return;
b.sendItemMessage(29,s,0);
b.inflictDamage(s, b.poke(s).totalLifePoints()/8,s);
}
示例2: uodr
static void uodr(int s, int t, BS &b) {
//Magic Guard
if (turn(b,t)["Category"].toInt() != poke(b,s)["ItemArg"].toInt() || b.koed(t) || b.hasWorkingAbility(t, Ability::MagicGuard)) {
return;
}
b.eatBerry(s);
b.sendBerryMessage(12,s,0,t);
b.inflictDamage(t, b.poke(t).lifePoints()/8,s,false);
}
示例3: upa
static void upa( int s, int t, BS &b) {
if (!b.koed(t) && !b.hasWorkingAbility(t, Ability::MagicGuard)) {
b.sendItemMessage(34,s,0,t);
b.inflictDamage(t,b.poke(t).totalLifePoints()/6,s,false);
/* In VGC 2011, the one with the rugged helmet wins */
if (b.koed(t)) {
b.selfKoer() = t;
}
}
}
示例4: uodr
static void uodr(int s, int t, BS &b) {
if (!b.attacking()) {
return;
}
//Magic Guard
if (tmove(b,t).category != poke(b,s)["ItemArg"].toInt() || b.koed(t) || b.hasWorkingAbility(t, Ability::MagicGuard)) {
return;
}
b.eatBerry(s);
b.sendBerryMessage(12,s,0,t);
b.inflictDamage(t, b.poke(t).totalLife()/8,s,false);
}
示例5: et
static void et(int s, int, BS &b) {
if(b.koed(s) || b.hasWorkingAbility(s, Ability::MagicGuard)) {
return;
}
if(b.hasType(s, Pokemon::Poison)) {
if (!b.poke(s).isFull()) {
b.sendItemMessage(16,s,0);
b.healLife(s, b.poke(s).totalLifePoints()/16);
}
} else if (!b.hasType(s, Pokemon::Steel)) {
b.sendItemMessage(16,s,1);
b.inflictDamage(s, b.poke(s).totalLifePoints()/8,s);
}
}
示例6: atl
static void atl(int s, int, BS &b) {
if (turn(b,s).value("ActivateLifeOrb").toBool() && !turn(b,s).value("NoLifeOrbActivation").toBool() && !turn(b,s).value("EncourageBug").toBool()
&& !b.hasWorkingAbility(s, Ability::MagicGuard)) {
if (b.gen() >= 5)
b.sendItemMessage(21,s);
b.inflictDamage(s,b.poke(s).totalLifePoints()/10,s);
turn(b,s)["NoLifeOrbActivation"] = true;
/* Self KO Clause */
if (b.koed(s)) {
/* In VGC 2011 (gen 5), the user of the Life Orb wins instead of losing with the Self KO Clause */
if (b.gen() <= 4)
b.selfKoer() = s;
else
b.selfKoer() = turn(b,s).value("LOTarget").toInt();
}
}
}
示例7: atl
static void atl(int s, int, BS &b) {
if (turn(b,s).value("ActivateLifeOrb").toBool() && !b.hasWorkingAbility(s, Ability::MagicGuard)) {
//b.sendItemMessage(21,s);
b.inflictDamage(s,b.poke(s).totalLifePoints()/10,s);
}
}