Implement OilOfSharpness
This commit is contained in:
parent
2190070fee
commit
31cb8fe4c0
45 changed files with 604 additions and 21 deletions
|
|
@ -10,10 +10,12 @@ public class PlayArea
|
|||
|
||||
private List<BaseCard> heroPermanents;
|
||||
private List<BaseCard> monsterPermanents;
|
||||
private DefaultsManager mDefaultsManager;
|
||||
|
||||
public PlayArea() {
|
||||
this.heroPermanents = new List<BaseCard>();
|
||||
this.monsterPermanents = new List<BaseCard>();
|
||||
mDefaultsManager = new DefaultsManager();
|
||||
}
|
||||
|
||||
public List<BaseCard> GetHeroPermanents() {
|
||||
|
|
@ -40,6 +42,24 @@ public class PlayArea
|
|||
TriggerPlayAreaChanged();
|
||||
}
|
||||
|
||||
public DefaultHeroCard SetupDefault(DefaultEffect effect) {
|
||||
DefaultHeroCard previousDefault = mDefaultsManager.Setup(effect);
|
||||
if (previousDefault != null) {
|
||||
RemoveHeroPermanent(previousDefault);
|
||||
}
|
||||
|
||||
AddPlayedHeroPermanent(effect.Card);
|
||||
|
||||
TriggerPlayAreaChanged();
|
||||
return previousDefault;
|
||||
}
|
||||
|
||||
public IEnumerator UseHeroDefaults(
|
||||
BattleHero[] heroes, ParticipantActivity activity,
|
||||
DefaultsManager.UseDefaultAction useDefaultAction) {
|
||||
yield return mDefaultsManager.UseHeroDefaults(heroes, activity, useDefaultAction);
|
||||
}
|
||||
|
||||
private void TriggerPlayAreaChanged() {
|
||||
if (OnPlayAreaChanged != null) OnPlayAreaChanged();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue