private void ExecMove(PokemonWrapper source, Move move, PokemonWrapper target) { eventCreator.UsingMove(source, move); calculator.Init(source, move, target); DoDamage(target); HandleEfficiency(target); CheckIfCritical(); HandleStatusConditionChange(target); }
public void Init(IBattlePokemon source, Move move, IBattlePokemon target) { this.source = source; this.move = move; this.target = target; CalculateHit(); CalculateCritical(); CalculateTypeModifier(); CalculateDamage(); if (Damage > target.HP) StatusCondition = StatusCondition.KO; else StatusCondition = StatusCondition.Normal; }
public virtual void SetMove(ClientIdentifier id, ClientIdentifier target, Move move) { throw new InvalidOperationException("Wong operation"); }
public void SetMove(ClientIdentifier id, ClientIdentifier target, Move move) { CurrentState.SetMove(id, target, move); }
public float CalculateBaseDamage(IBattlePokemon source, IBattlePokemon target, Move move) { return 1.0f; }
public float SameTypeAttackBonus(IBattlePokemon source, Move move) { return 1.0f; }
public float GetTypeModifier(IBattlePokemon source, IBattlePokemon target, Move move) { return 1.0f; }
public float GetHitChance(IBattlePokemon source, IBattlePokemon target, Move move) { return 0.95f; }
public void Init(IBattlePokemon source, Move move, IBattlePokemon target) { }
public MoveUsedEventArgs(Move move, PokemonWrapper source) { Move = move; Source = source; }
public MoveCommand(ClientIdentifier source, ClientIdentifier target, Move move) { this.Move = move; this.Source = source; this.Target = target; }
public void SetMove(ClientIdentifier id, ClientIdentifier target, Move move) { ValidateInput(id, move, "move"); commands[id] = new MoveCommand(id, target, move); clientCnt--; }
public void UsingMove(PokemonWrapper source, Move move) { MoveUsed(this, new MoveUsedEventArgs(move, source)); }
public void RaiseMoveUsed() { var move = new Move(new MoveData(){Name = "Name"}); MoveUsed(this, new MoveUsedEventArgs(move, pokemon)); }
public float GetCriticalHitChance(Move move) { return 0.15f; }
public void UsingMove(PokemonWrapper source, Move move) { throw new NotImplementedException(); }
public void SetIndexer_SomeValue_ThrowsExecption() { var model = MoveModelTestFactory.CreateModel(3); Assert.Throws<InvalidOperationException>(delegate { model[2, 0] = new Move(new MoveData()); }); }