示例#1
0
 //public PokeBattle_Move_132(Battle battle, Attack.Move move) : base(battle, move) { }
 public override int pbEffect(Pokemon attacker, Pokemon opponent, int hitnum = 0, int[] alltargets = null, bool showanimation = true)
 {
     if (this.Battle.sides[0].Reflect > 0 ||
         this.Battle.sides[1].Reflect > 0 ||
         this.Battle.sides[0].LightScreen > 0 ||
         this.Battle.sides[1].LightScreen > 0 ||
         this.Battle.sides[0].Safeguard > 0 ||
         this.Battle.sides[1].Safeguard > 0)
     {
         pbShowAnimation(MoveId, attacker, null, hitnum, alltargets, showanimation);
         this.Battle.sides[0].Reflect     = 0;
         this.Battle.sides[1].Reflect     = 0;
         this.Battle.sides[0].LightScreen = 0;
         this.Battle.sides[1].LightScreen = 0;
         this.Battle.sides[0].Safeguard   = 0;
         this.Battle.sides[1].Safeguard   = 0;
         this.Battle.pbDisplay(Game._INTL("It broke all barriers!"));
         attacker.pbHyperMode();
         return(0);
     }
     else
     {
         this.Battle.pbDisplay(Game._INTL("But it failed!"));
         return(-1);
     }
 }
示例#2
0
        //public PokeBattle_Move_129(Battle battle, Attack.Move move) : base(battle, move) { }
        public override int pbEffect(Pokemon attacker, Pokemon opponent, int hitnum = 0, int[] alltargets = null, bool showanimation = true)
        {
            int ret = base.pbEffect(attacker, opponent, hitnum, alltargets, showanimation);

            if (ret >= 0)
            {
                attacker.pbHyperMode();
            }
            return(ret);
        }
示例#3
0
        //public PokeBattle_Move_12C(Battle battle, Attack.Move move) : base(battle, move) { }
        public override int pbEffect(Pokemon attacker, Pokemon opponent, int hitnum = 0, int[] alltargets = null, bool showanimation = true)
        {
            if (!opponent.pbCanReduceStatStage(Stats.EVASION, attacker, true, this))
            {
                return(-1);
            }
            pbShowAnimation(MoveId, attacker, opponent, hitnum, alltargets, showanimation);
            bool ret = opponent.pbReduceStat(Stats.EVASION, increment: 2, attacker: attacker, showMessages: false);

            if (ret)
            {
                attacker.pbHyperMode();
            }
            return(ret ? 0 : -1);
        }