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();
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/Battle/Effects/AcquireCardsEffect.cs.meta
Normal file
11
Assets/Battle/Effects/AcquireCardsEffect.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 5af4ea0aedc362d428d86ff87d50d648
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue