Implement acquiring cards. Thunderstorm acquires Lightning Strikes.

This commit is contained in:
henriquenakashima 2020-09-19 17:26:14 -04:00
parent 60afd791dd
commit 1e8d3bb068
12 changed files with 121 additions and 5 deletions

View 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();
}
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 5af4ea0aedc362d428d86ff87d50d648
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -10,7 +10,7 @@ public class IncreaseMaxEnergyEffect : IBattleEffect
this.delta = delta;
}
public void Apply(IBattleEffectResolver bc) {
bc.IncreaseMaxEnergy(this.delta);
public void Apply(IBattleEffectResolver resolver) {
resolver.IncreaseHeroMaxEnergy(this.delta);
}
}