Ejemplo n.º 1
0
 public ForNumberOfTurns(Effect effect, int duration, bool isDebuff)
 {
     _effect            = effect;
     _remainingDuration = duration;
     _isDebuff          = isDebuff;
     BattleEvent.Subscribe <TurnEnd>((turnEnd) => AdvanceTurn(), this);
 }
Ejemplo n.º 2
0
 public void Apply(Member source, Target target)
 {
     new QueueEffect(_effect).Apply(source, target);
     BattleEvent.Subscribe <FeedCardResolutionStarted>(
         (msg) =>
     {
         if (_feedType.ToString().Equals(msg.CardFeedType))
         {
             _effect.Apply(source, target);
         }
         BattleEvent.Unsubscribe(this);
     },
         this);
 }
Ejemplo n.º 3
0
    public void Apply(Member source, Target target)
    {
        Effect effect = new UnqueueAfterExceuteEffect(_effect);

        BattleEvent.Publish(new AddEffectToQueue(effect));
        BattleEvent.Subscribe <EffectApplied>(
            (msg) => {
            if (msg.Effect.Equals(_effect))
            {
                BattleEvent.Publish(new RemoveEffectFromQueue(msg.Effect));
                BattleEvent.Unsubscribe(this);
            }
        },
            this);
    }
Ejemplo n.º 4
0
 public OnNextCardEffect(Effect effect)
 {
     _effect = effect;
     _active = false;
     BattleEvent.Subscribe <CardResolutionStarted>((resolutionEnded) => NextCard(), this);
 }
Ejemplo n.º 5
0
 void Effect.Apply(Member source, Target target)
 {
     _performer    = source;
     _effectTarget = target;
     BattleEvent.Subscribe <AttackPerformed>(attackPerformed => Execute(attackPerformed.Attack), this);
 }
Ejemplo n.º 6
0
 void OnEnable()
 {
     BattleEvent.Subscribe <ReplayLastCard>(_ => cardResolutionZone.LastPlayed.Perform(), this);
 }
Ejemplo n.º 7
0
 public OnNextTurnEffect(Effect effect)
 {
     _effect = effect;
     BattleEvent.Subscribe <TurnEnd>((turnEnd) => AdvanceTurn(), this);
 }
Ejemplo n.º 8
0
 void OnEnable()
 {
     BattleEvent.Subscribe <AddEffectToQueue>((msg) => battleState.QueuedEffects.Add(msg.Effect), this);
 }
Ejemplo n.º 9
0
 private void OnEnable()
 {
     BattleEvent.Subscribe <MemberUnconscious>(ResolveUnconscious, this);
     setupAfter.Subscribe(Setup, this);
 }
Ejemplo n.º 10
0
 private void OnEnable() => BattleEvent.Subscribe <T>(Execute, this);
Ejemplo n.º 11
0
 private void OnEnable() => BattleEvent.Subscribe <MemberUnconscious>(ResolveUnconscious, this);
Ejemplo n.º 12
0
 void OnEnable()
 {
     BattleEvent.Subscribe <RemoveEffectFromQueue>((msg) => battleState.QueuedEffects.Remove(msg.Effect), this);
 }
Ejemplo n.º 13
0
 public void Apply(Member source, Target target)
 {
     _effectTarget = target;
     BattleEvent.Subscribe <AttackToPerform>(attackToPerform => Execute(attackToPerform.Attack), this);
 }
Ejemplo n.º 14
0
 public void Apply(Member source, Target target)
 {
     BattleEvent.Subscribe <TurnStart>(_ => Execute(source, target), this);
 }