public virtual void Use(IBattle battle, UseMove useMoveAction) { if (!DamageType.HasValue) { return; } Battle.IMove move = useMoveAction.Slot.Pokemon.Moves.Find(this); InflictMoveDamage message = new InflictMoveDamage(battle, move, useMoveAction.Slot, useMoveAction.HitTargets); battle.MessageQueue.AddFirst(message); // Maybe Enqueue? }
public void Receive(UseMove useMoveAction) { if (useMoveAction.Slot.Pokemon.HasFainted()) { return; } UseMoveEventArgs useMoveEventArgs = new UseMoveEventArgs(this, useMoveAction); OnUseMove?.Invoke(this, useMoveEventArgs); useMoveAction.Move.Use(this, useMoveAction); MoveUsedEventArgs moveUsedEventArgs = new MoveUsedEventArgs(this, useMoveAction); OnMoveUsed?.Invoke(this, moveUsedEventArgs); }
public void Use(IBattle battle, UseMove useMoveAction) { Base.Use(battle, useMoveAction); }
public override void Use(IBattle battle, UseMove useMoveAction) { ShiftStatStage shift = new ShiftStatStage(useMoveAction.Targets[0].Pokemon, PokemonEngine.Model.Battle.Statistic.Attack, -1); battle.MessageQueue.AddFirst(shift); }
public MoveUsedEventArgs(IBattle battle, UseMove action) : base(battle) { Action = action; }