예제 #1
0
 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);
     }
 }
예제 #2
0
    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);
        }
    }
예제 #3
0
    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;
        }
    }
예제 #4
0
 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);
     }
 }
예제 #5
0
 static void btl(int s, int, BS &b) {
     if (fturn(b,s).contains(TM::NoChoice)) {
         /* multiple turn move */
         return;
     }
     int count = poke(b,s)["IMMetroCount"].toInt();
     int lslot = poke(b,s)["IMLastMoveSlot"].toInt();
     int slot = fpoke(b,s).lastMoveSlot;
     bool act = poke(b,s)["IMMetroActivating"].toBool();
     poke(b,s)["IMLastMoveSlot"] = slot;
     poke(b,s)["IMMetroActivating"] = true;
     if (slot != lslot) {
         poke(b,s)["IMMetroCount"] = 0;
         return;
     }
     if (tmove(b,s).power == 0) {
         return;
     }
     if (act) {
         poke(b,s)["IMMetroCount"] = std::min(10, count+1);
     }
 }
예제 #6
0
 static void sm(int s, int t, BS &b) {
     if (fturn(b,t).contains(TM::HasMoved)) {
         turn(b,s)["Stat6ItemModifier"] = 4;
     }
 }