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


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

本文整理汇总了C++中BS::healLife方法的典型用法代码示例。如果您正苦于以下问题:C++ BS::healLife方法的具体用法?C++ BS::healLife怎么用?C++ BS::healLife使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BS的用法示例。


在下文中一共展示了BS::healLife方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: tp

    static void tp(int s, int, BS &b) {
        if (!testpinch(s, s, b,2))
            return;

        b.sendBerryMessage(3,s,0);
        int arg = poke(b,s)["ItemArg"].toInt();
        if (arg == 10) /* oran berry */
            b.healLife(s, 10);
        else /* Sitrus Berry */
            b.healLife(s, b.poke(s).totalLifePoints()/4);
    }
开发者ID:edrex,项目名称:pokemon-online,代码行数:11,代码来源:berries.cpp

示例2: et

    static void et(int s, int, BS &b) {
        if (!b.canHeal(s))
            return;

        b.sendItemMessage(12,s);
        b.healLife(s, b.poke(s).totalLifePoints()/16);
    }
开发者ID:Ramiel123,项目名称:pokemon-online,代码行数:7,代码来源:items.cpp

示例3: ahpc

 static void ahpc(int s, int, BS &b) {
     if (!b.koed(s) && b.poke(s).lifePercent() <= 50) {
         b.disposeItem(s);
         b.sendItemMessage(18,s,0);
         b.healLife(s, 20);
     }
 }
开发者ID:ElementsPO,项目名称:pokemon-online,代码行数:7,代码来源:items.cpp

示例4: udi

    static void udi(int s, int t, BS &b) {
	if (s==t)
	    return;
	if (b.koed(s))
	    return;

	b.sendItemMessage(24, s);
	b.healLife(s, turn(b,s)["DamageInflicted"].toInt()/8);
    }
开发者ID:edrex,项目名称:pokemon-online,代码行数:9,代码来源:items.cpp

示例5: ahpc

    static void ahpc(int s, int, BS &b) {
        if (!b.canHeal(s))
            return;

        if (b.poke(s).lifePercent() <= 50) {
            b.disposeItem(s);
            b.sendItemMessage(18,s,0);
            b.healLife(s, 20);
        }
    }
开发者ID:Ramiel123,项目名称:pokemon-online,代码行数:10,代码来源:items.cpp

示例6: tp

    static void tp(int p, int s, BS &b) {
        if (b.koed(s) || b.poke(s).isFull())
            return;

        if (!testpinch(p, s, b, 2, true))
            return;

        b.sendBerryMessage(3,s,0);
        int arg = poke(b,p)["ItemArg"].toInt();
        if (arg == 10) /* oran berry */
            b.healLife(s, 10);
        else /* Sitrus Berry */
        {
            if (b.gen() >= 4)
                b.healLife(s, b.poke(s).totalLifePoints()/4);
            else
                b.healLife(s, 30);
        }
    }
开发者ID:RedJoker25,项目名称:pokemon-online,代码行数:19,代码来源:berries.cpp

示例7: uodr

 static void uodr(int s, int t, BS &b) {
     if (b.koed(s))
         return;
     if (turn(b,t)["TypeMod"].toInt() <= 4)
         return;
     if (b.poke(s).isFull())
         return;
     b.eatBerry(s);
     b.sendBerryMessage(6,s,0);
     b.healLife(s, b.poke(s).totalLifePoints()/5);
 }
开发者ID:edrex,项目名称:pokemon-online,代码行数:11,代码来源:berries.cpp

示例8: ti

    static void ti(int p, int s, BS &b) {
        if (b.poke(s).isFull()) {
            return;
        }
        b.sendBerryMessage(3,s,0);
        int arg = poke(b,p).value("ItemArg").toInt();

        if (arg == 0) {
            arg = b.poke(s).totalLifePoints();
        }

        b.healLife(s, arg);
    }
开发者ID:Ramiel123,项目名称:pokemon-online,代码行数:13,代码来源:items.cpp

示例9: udi

    static void udi(int s, int t, BS &b) {
        if (s==t)
            return;

        if (!b.canHeal(s) || turn(b,s).value("EncourageBug").toBool())
            return;

        int damage = turn(b,s)["DamageInflicted"].toInt();

        if (damage > 0) {
            b.sendItemMessage(24, s);
            b.healLife(s, damage/8);
        }
    }
开发者ID:Ramiel123,项目名称:pokemon-online,代码行数:14,代码来源:items.cpp

示例10: uodr

 static void uodr(int s, int, BS &b) {
     if (!b.attacking()) {
         return;
     }
     if (b.attacker() == s)
         return;
     if (fturn(b,b.attacker()).typeMod <= 0)
         return;
     if (b.canHeal(s,BS::HealByItem,b.poke(s).item())) {
         b.eatBerry(s);
         b.sendBerryMessage(6,s,0);
         b.healLife(s, b.poke(s).totalLifePoints()/5);
     }
 }
开发者ID:RedJoker25,项目名称:pokemon-online,代码行数:14,代码来源:berries.cpp

示例11: 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

示例12: udi

    static void udi(int s, int t, BS &b) {
        if (s==t)
            return;
        if (b.koed(s) || b.hasWorkingAbility(s, Ability::Encourage))
            return;

        if (b.poke(s).lifePoints() == b.poke(s).totalLifePoints()) {
            // Don't heal if at full health already
            return;
        }

        int damage = turn(b,s)["DamageInflicted"].toInt();

        if (damage > 0) {
            b.sendItemMessage(24, s);
            b.healLife(s, damage/8);
        }
    }
开发者ID:ElementsPO,项目名称:pokemon-online,代码行数:18,代码来源:items.cpp

示例13: et

 static void et(int s, int, BS &b) {
     if (!b.poke(s).isFull()) {
         b.sendItemMessage(12,s);
         b.healLife(s, b.poke(s).totalLifePoints()/16);
     }
 }
开发者ID:ElementsPO,项目名称:pokemon-online,代码行数:6,代码来源:items.cpp


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