本文整理汇总了C++中BS::attacking方法的典型用法代码示例。如果您正苦于以下问题:C++ BS::attacking方法的具体用法?C++ BS::attacking怎么用?C++ BS::attacking使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BS
的用法示例。
在下文中一共展示了BS::attacking方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: turn
static void m3b(int s, int t, BS &b) {
if (!b.attacking()) {
return;
}
if (!b.hasSubstitute(s) && fturn(b,t).typeMod > 0 && tmove(b,t).type == poke(b,s)["ItemArg"].toInt()) {
b.sendBerryMessage(4,s,0,t,b.poke(s).item(),move(b,t));
b.eatBerry(s,false);
turn(b,t)["Mod3Berry"] = -5;
}
}
示例2: 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);
}
示例3: bpm
static void bpm(int s, int t, BS &b) {
if (s == t)
return;
/* Doom Desire & Future sight don't have their gem attacking right away,
only when it hits, and then b.attacking() is false */
if (tmove(b,s).attack == Move::FutureSight || tmove(b,s).attack == Move::DoomDesire) {
if (b.attacking())
return;
}
if (tmove(b,s).power <= 1) {
return;
}
if (tmove(b,s).type != poke(b,s)["ItemArg"].toInt() || tmove(b,s).attack == Move::FirePledge || tmove(b,s).attack == Move::GrassPledge || tmove(b,s).attack == Move::WaterPledge )
return;
b.sendItemMessage(37, s, 0, 0, b.poke(s).item(), move(b,s));
turn(b,s)["GemActivated"] = true;
b.disposeItem(s);
}
示例4: bpm
static void bpm(int s, int t, BS &b) {
if (s == t)
return;
/* Doom Desire & Future sight don't have their jewel attacking right away,
only when it hits, and then b.attacking() is false */
if (tmove(b,s).attack == Move::FutureSight || tmove(b,s).attack == Move::DoomDesire) {
if (b.attacking())
return;
}
if (tmove(b,s).power <= 1) {
return;
}
if (tmove(b,s).type != poke(b,s)["ItemArg"].toInt())
return;
b.sendItemMessage(37, s, 0, 0, b.poke(s).item(), move(b,s));
turn(b,s)["BasePowerItemModifier"] = 5;
b.disposeItem(s);
}