Implement acquiring cards. Thunderstorm acquires Lightning Strikes.
This commit is contained in:
parent
60afd791dd
commit
1e8d3bb068
12 changed files with 121 additions and 5 deletions
24
Assets/Battle/Effects/AcquireCardsEffect.cs
Normal file
24
Assets/Battle/Effects/AcquireCardsEffect.cs
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class AcquireCardsEffect : IBattleEffect
|
||||
{
|
||||
private CardId[] cardIds;
|
||||
private BattleZone zone;
|
||||
private BattleParticipant participant;
|
||||
|
||||
public AcquireCardsEffect(CardId[] cardIds, BattleZone zone, BattleParticipant participant) {
|
||||
this.cardIds = cardIds;
|
||||
this.zone = zone;
|
||||
this.participant = participant;
|
||||
}
|
||||
|
||||
public void Apply(IBattleEffectResolver resolver) {
|
||||
if (this.participant.IsHero()) {
|
||||
resolver.AcquireHeroCards(this.cardIds, this.zone, (BattleHero) this.participant);
|
||||
} else {
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue