예제 #1
0
    private void Construct(DexID moveID, int currentPP, int ppUpsUsed = 0)
    {
        this.moveID    = moveID;
        this.currentPP = currentPP;

        this.ppUpsUsed = ppUpsUsed;
    }
예제 #2
0
    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;
    }
예제 #3
0
    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);
    }
예제 #4
0
    public override bool Equals(object obj)
    {
        if (!(obj is DexID))
        {
            return(false);
        }

        DexID other = (DexID)obj;

        return(other.nameSpace.Equals(nameSpace) && other.id == id);
    }
예제 #5
0
    //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;
    }
예제 #6
0
    //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;
    }
예제 #7
0
    //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);
    }
예제 #8
0
    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;
    }
예제 #10
0
 public static MovedexEntry GetEntry(DexID id)
 {
     return(dex.GetEntry(id));
 }
예제 #11
0
 public IndividualPokemonMove(DexID moveID)
 {
     //Constructor for having just learned the move
     Construct(moveID, 0);
     RestorePP(maxPP);
 }
예제 #12
0
    //Constructors

    public IndividualPokemonMove(DexID moveID, int currentPP, int ppUpsUsed = 0)
    {
        Construct(moveID, currentPP, ppUpsUsed);
    }
예제 #13
0
 public T GetEntry(DexID id)
 {
     return(entries[id]);
 }
예제 #14
0
 public static SimpleAnimation GetEntry(DexID id)
 {
     return(dex.GetEntry(id));
 }
예제 #15
0
 public static void AddEntry(DexID id, SimpleAnimation animation)
 {
     dex.AddEntry(id, animation);
 }