本文整理汇总了C++中BS::counters方法的典型用法代码示例。如果您正苦于以下问题:C++ BS::counters方法的具体用法?C++ BS::counters怎么用?C++ BS::counters使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BS
的用法示例。
在下文中一共展示了BS::counters方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: as
static void as(int s, int, BS &b) {
bool used = false;
if (poke(b,s).contains("AttractedTo")) {
int seducer = poke(b,s)["AttractedTo"].toInt();
if (poke(b,seducer).contains("Attracted") && poke(b,seducer)["Attracted"].toInt() == s) {
removeFunction(poke(b,s), "DetermineAttackPossible", "Attract");
poke(b,s).remove("AttractedTo");
used = true;
}
}
if (b.gen() >= 5) {
if (poke(b,s).contains("Tormented")) {
removeFunction(poke(b,s), "MovesPossible", "Torment");
poke(b,s).remove("Tormented");
used = true;
}
if (b.counters(s).hasCounter(BC::Taunt)) {
removeFunction(poke(b,s), "MovesPossible", "Taunt");
removeFunction(poke(b,s), "MovePossible", "Taunt");
b.removeEndTurnEffect(BS::PokeEffect, s, "Taunt");
used = true;
}
if (b.counters(s).hasCounter(BC::Encore)) {
removeFunction(poke(b,s), "MovesPossible", "Encore");
b.removeEndTurnEffect(BS::PokeEffect, s, "Encore");
used = true;
}
if (b.counters(s).hasCounter(BC::Disable)) {
removeFunction(poke(b,s), "MovesPossible", "Disable");
removeFunction(poke(b,s), "MovePossible", "Disable");
b.removeEndTurnEffect(BS::PokeEffect, s, "Disable");
used = true;
}
b.counters(s).clear();
}
if (used) {
b.sendItemMessage(7,s);
b.disposeItem(s);
}
}