/// <summary> /// Different implementation of pbCanChooseMove, ignores Imprison/Torment/Taunt/Disable/Encore /// </summary> /// <param name="idxPokemon"></param> /// <param name="idxMove"></param> /// <returns></returns> public bool pbCanChooseMovePartial(int idxPokemon, int idxMove) { Pokemon thispkmn = @battlers[idxPokemon]; Attack.Move thismove = thispkmn.moves[idxMove]; if (!thismove.IsNotNullOrNone() || thismove.MoveId == 0) { return(false); } if (thismove.PP <= 0) { return(false); } if (thispkmn.effects.ChoiceBand >= 0 && thismove.MoveId != thispkmn.effects.ChoiceBand && thispkmn.hasWorkingItem(Items.CHOICE_BAND)) { return(false); } // though incorrect, just for convenience (actually checks Torment later) if (thispkmn.effects.Torment) { if (thismove.MoveId == thispkmn.lastMoveUsed) { return(false); } } return(true); }
/// <summary> /// If action you're choosing to take is to Attack with a Move /// </summary> /// <param name="action"></param> /// <param name="move"></param> /// <param name="target"></param> //ToDo: Attack.Move <= (Implicit/Explicit) => Battle.Move public Choice(ChoiceAction action, int moveIndex, Attack.Move move, int target = -1) { Action = action; Index = moveIndex; Move = null; //(Move)move; Target = target; }
public int pbMoveCategory(Attack.Move move) { /*if (Game.MoveData[move.MoveId].Target==0x10 || move.Effect==0xD4) { // Bide * return 1; * } else if (move.Power==0 || move.Effect==0x71 || // Counter * move.Effect==0x72) { // Mirror Coat * return 2; * } * else { * return 0; * }*/ return(0); }