当前位置: 首页>>代码示例>>C++>>正文


C++ BS::inflictDamage方法代码示例

本文整理汇总了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);
    }
开发者ID:Ramiel123,项目名称:pokemon-online,代码行数:7,代码来源:items.cpp

示例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);
 }
开发者ID:edrex,项目名称:pokemon-online,代码行数:9,代码来源:berries.cpp

示例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;
            }
        }
    }
开发者ID:Ramiel123,项目名称:pokemon-online,代码行数:11,代码来源:items.cpp

示例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);
 }
开发者ID:RedJoker25,项目名称:pokemon-online,代码行数:12,代码来源:berries.cpp

示例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);
	}
    }
开发者ID:edrex,项目名称:pokemon-online,代码行数:14,代码来源:items.cpp

示例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();
            }
        }
    }
开发者ID:Ramiel123,项目名称:pokemon-online,代码行数:19,代码来源:items.cpp

示例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);
     }
 }
开发者ID:edrex,项目名称:pokemon-online,代码行数:6,代码来源:items.cpp


注:本文中的BS::inflictDamage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。