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


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

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


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

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

示例2: os

 static void os(int s, int, BS &b) {
     b.sendItemMessage(40, s, 0);
     b.sendItemMessage(40, s, 1);
     b.inflictStatMod(s, Attack, 2, s, false);
     b.inflictConfused(s,s);
     b.disposeItem(s);
 }
开发者ID:Ramiel123,项目名称:pokemon-online,代码行数:7,代码来源:items.cpp

示例3: uodr

 static void uodr(int s, int t, BS &b) {
     if (fturn(b,t).typeMod > 0 && !b.koed(s)) {
         b.sendItemMessage(43, s);
         b.disposeItem(s);
         b.inflictStatMod(s, Attack, 2, s);
         b.inflictStatMod(s, SpAttack, 2, s);
     }
 }
开发者ID:Ramiel123,项目名称:pokemon-online,代码行数:8,代码来源:items.cpp

示例4: uodr

    static void uodr(int s, int t, BS &b) {
        if (b.koed(s))
	    return;
        if (turn(b,s).contains("CannotBeKoedBy") && turn(b,s)["CannotBeKoedBy"].toInt() == t && b.poke(s).lifePoints() == 1) {
	    b.sendItemMessage(5, s);
	    b.disposeItem(s);
	}
    }
开发者ID:edrex,项目名称:pokemon-online,代码行数:8,代码来源:items.cpp

示例5: uss

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

        b.sendItemMessage(5, s);
        b.disposeItem(s);

        turn(b,s)["SurviveReason"] = true;
    }
开发者ID:Ramiel123,项目名称:pokemon-online,代码行数:9,代码来源:items.cpp

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

示例7: ubh

 static void ubh(int s, int t, BS &b) {
     int tp = poke(b,s)["ItemArg"].toString().section('_', 0, 0).toInt();
     if (!b.koed(s) && type(b,t) == tp) {
         int stat = poke(b,s)["ItemArg"].toString().section('_', 1).toInt();
         if (b.hasMaximalStatMod(s, stat))
             return;
         b.sendItemMessage(36, s, 0, t, b.poke(s).item(), stat);
         b.disposeItem(s);
         b.inflictStatMod(s, stat, 1, s, false);
     }
 }
开发者ID:Ramiel123,项目名称:pokemon-online,代码行数:11,代码来源:items.cpp

示例8: as

    static void as(int s, int, BS &b) {
	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) {
		b.sendItemMessage(7,s);
		removeFunction(poke(b,s), "DetermineAttackPossible", "Attract");
		poke(b,s).remove("AttractedTo");
		b.disposeItem(s);
	    }
	}
    }
开发者ID:edrex,项目名称:pokemon-online,代码行数:11,代码来源:items.cpp

示例9: uodr

    static void uodr(int s, int t, BS &b) {
        if (forbidden_moves.contains(move(b,t)))
            return;

        if (fturn(b,t).typeMod > 0 && !b.koed(s)) {
            b.sendItemMessage(43, s);
            b.disposeItem(s);
            b.inflictStatMod(s, Attack, 2, s);
            b.inflictStatMod(s, SpAttack, 2, s);
        }
    }
开发者ID:Komari,项目名称:pokemon-online,代码行数:11,代码来源:items.cpp

示例10: as

 static void as(int s, int, BS &b) {
     bool act = false;
     for (int i = 1; i <= 7; i++) {
         if (fpoke(b,s).boosts[i] < 0) {
             act = true;
             fpoke(b,s).boosts[i] = 0;
         }
     }
     if (act) {
         b.sendItemMessage(3,s);
         b.disposeItem(s);
     }
 }
开发者ID:Ramiel123,项目名称:pokemon-online,代码行数:13,代码来源:items.cpp

示例11: os

    static void os(int s, int, BS &b) {
        b.sendItemMessage(40, s, 0);
        b.sendItemMessage(40, s, 1);
        b.inflictStatMod(s, Attack, 2, s, false);
        b.inflictConfused(s,s);
        b.disposeItem(s);

        /* in GSC cart mechanics, infinite confusion */
        if (b.isConfused(s)) {
            if (b.gen() == Gen::GoldSilver || b.gen() == Gen::Crystal) {
                poke(b,s)["ConfusedCount"] = 255;
            }
        }
    }
开发者ID:Komari,项目名称:pokemon-online,代码行数:14,代码来源:items.cpp

示例12: aaf

    static void aaf(int, int, BS &b) {
        std::vector<int> speeds = b.sortedBySpeed();

        for (unsigned i = 0; i < speeds.size(); i++) {
            int p = speeds[i];
            if (!b.hasWorkingItem(p, Item::EscapeButton))
                continue;
            if (!turn(b,p).contains("EscapeButtonActivated"))
                continue;
            if (turn(b,p)["EscapeButtonCount"] != slot(b,p)["SwitchCount"])
                continue;

            b.sendItemMessage(39, p, 0);
            b.disposeItem(p);
            b.requestSwitch(p);
        }
    }
开发者ID:Ramiel123,项目名称:pokemon-online,代码行数:17,代码来源:items.cpp

示例13: ubh

 static void ubh(int s, int t, BS &b) {
     if (!b.koed(s) && type(b,t) == poke(b,s)["ItemArg"].toInt()) {
         int stat;
         if (b.poke(s).item() == Item::RechargeableBattery) {
             if (b.hasMaximalStatMod(s, Attack))
                 return;
             stat = Attack;
         } else {
             if (b.hasMaximalStatMod(s, SpAttack))
                 return;
             stat = SpAttack;
         }
         b.sendItemMessage(36, s, 0, t, b.poke(s).item(), stat);
         b.disposeItem(s);
         b.inflictStatMod(s, stat, 1, s, false);
     }
 }
开发者ID:ElementsPO,项目名称:pokemon-online,代码行数:17,代码来源:items.cpp

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

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


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