private void Construct(DexID moveID, int currentPP, int ppUpsUsed = 0) { this.moveID = moveID; this.currentPP = currentPP; this.ppUpsUsed = ppUpsUsed; }
public PokedexEntry(DexID id, string speciesName, PokemonStats baseStats, PokemonType typeA, PokemonType typeB = PokemonType.none) { this.id = id; this.speciesName = speciesName; this.baseStats = baseStats; this.typeA = typeA; this.typeB = typeB; }
public void AddEntry(DexID id, T entry) { //Throw an exception if there's a duplicate id if (entries.ContainsKey(id)) { throw new DuplicateIDException(); } //Add it entries.Add(id, entry); }
public override bool Equals(object obj) { if (!(obj is DexID)) { return(false); } DexID other = (DexID)obj; return(other.nameSpace.Equals(nameSpace) && other.id == id); }
//Constructors public MovedexEntry(DexID id, string moveName, string moveDescription, DexID genericAnimationID, PokemonType type, MoveCategory moveCategory, int basePP) { this.id = id; this.moveName = moveName; this.moveDescription = moveDescription; this.genericAnimationID = genericAnimationID; this.type = type; this.moveCategory = moveCategory; this.basePP = basePP; }
//Constructors public IndividualPokemon(DexID species, PokemonStats individualValues, List <IndividualPokemonMove> knownMoves, int level) { //Basic constructor for a pokemon encountered in the wild this.species = species; this.individualValues = individualValues; this.knownMoves = knownMoves; this.level = level; effortValues = new PokemonStats(); exp = 0; currentHP = CalculateStat(PokemonStatID.maxHP); currentCondition = StatusCondition.none; }
//Moves public void LearnMove(DexID moveID) { //Learns a move //Throw an error if too many moves if (knownMoves.Count >= MAX_KNOWN_MOVES) { throw new TooManyMovesException(); } //Learn the move IndividualPokemonMove indMove = new IndividualPokemonMove(moveID, 0); knownMoves.Add(indMove); }
public float GenericMoveAnimation(DexID animID) { //TODO: Start one of the generic animations //Returns the animation's early finish length //TODO: Decide which animation to start based on animID SimpleAnimation anim = TestAnimations.tackle; anim = BattleAnimationDex.GetEntry(animID); //Start the animation animPlayer.PlayAnimation(anim); return(anim.earlyFinishLen); }
public int accuracy; //For reference, most moves have 100 accuracy public StandardAttackMove(DexID id, string moveName, string moveDescription, DexID genericAnimationID, PokemonType type, MoveCategory moveCategory, int basePP, int power, int accuracy) : base(id, moveName, moveDescription, genericAnimationID, type, moveCategory, basePP) { this.power = power; this.accuracy = accuracy; }
public static MovedexEntry GetEntry(DexID id) { return(dex.GetEntry(id)); }
public IndividualPokemonMove(DexID moveID) { //Constructor for having just learned the move Construct(moveID, 0); RestorePP(maxPP); }
//Constructors public IndividualPokemonMove(DexID moveID, int currentPP, int ppUpsUsed = 0) { Construct(moveID, currentPP, ppUpsUsed); }
public T GetEntry(DexID id) { return(entries[id]); }
public static SimpleAnimation GetEntry(DexID id) { return(dex.GetEntry(id)); }
public static void AddEntry(DexID id, SimpleAnimation animation) { dex.AddEntry(id, animation); }