Implement statuses, GolemCharge, GolemBerserk, stun
This commit is contained in:
parent
caf782c884
commit
ef9ec43c8a
16 changed files with 260 additions and 38 deletions
|
|
@ -1,28 +1,41 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
public class AcquireCardsEffect : IBattleEffect
|
||||
{
|
||||
private CardId[] cardIds;
|
||||
private int[] cardIds;
|
||||
private BattleZone zone;
|
||||
private BattleParticipant participant;
|
||||
|
||||
public AcquireCardsEffect(CardId cardId, BattleZone zone, BattleParticipant participant) {
|
||||
Initialize(new int[1] {(int) cardId}, zone, participant);
|
||||
}
|
||||
|
||||
public AcquireCardsEffect(CardId[] cardIds, BattleZone zone, BattleParticipant participant) {
|
||||
Initialize(cardIds.Cast<int>().ToArray(), zone, participant);
|
||||
}
|
||||
|
||||
public AcquireCardsEffect(MCardId mCardId, BattleZone zone, BattleParticipant participant) {
|
||||
Initialize(new int[1] {(int) mCardId}, zone, participant);
|
||||
}
|
||||
|
||||
public AcquireCardsEffect(MCardId[] mCardIds, BattleZone zone, BattleParticipant participant) {
|
||||
Initialize(mCardIds.Cast<int>().ToArray(), zone, participant);
|
||||
}
|
||||
|
||||
private void Initialize(int[] 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);
|
||||
} else {
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
resolver.AcquireCards(this);
|
||||
}
|
||||
|
||||
public CardId[] CardIds {get => this.cardIds;}
|
||||
public int[] CardIds {get => this.cardIds;}
|
||||
public BattleZone Zone {get => this.zone;}
|
||||
public BattleParticipant Participant {get => this.participant;}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue