76 lines
2.1 KiB
C#
76 lines
2.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using Continentis.MainGame.Card;
|
|
using SLSFramework.General;
|
|
using UnityEngine;
|
|
using UnityEngine.Events;
|
|
|
|
namespace Continentis.MainGame.Character
|
|
{
|
|
public class IntentionSubmodule : SubmoduleBase<CharacterBase>
|
|
{
|
|
public List<IntentionBase> allIntentions;
|
|
public IntentionBase currentIntention;
|
|
public UnityAction getIntendedCards;
|
|
|
|
public List<IntendedCard> intendedCards;
|
|
|
|
public IntentionSubmodule(CharacterBase owner) : base(owner)
|
|
{
|
|
allIntentions = new List<IntentionBase>();
|
|
currentIntention = new IntentionBase(this);
|
|
getIntendedCards = owner.GetIntendedCards;
|
|
intendedCards = new List<IntendedCard>();
|
|
}
|
|
}
|
|
|
|
public class IntendedCard
|
|
{
|
|
public CardInstance cardInstance;
|
|
public List<CharacterBase> targets;
|
|
|
|
public IntendedCard(CardInstance cardInstance, List<CharacterBase> targets)
|
|
{
|
|
this.cardInstance = cardInstance;
|
|
this.targets = targets;
|
|
}
|
|
}
|
|
|
|
public class IntentionBase : IPrioritized
|
|
{
|
|
public IntentionSubmodule intentionSubmodule;
|
|
public CharacterBase character => intentionSubmodule.owner;
|
|
public DeckSubmodule characterDeck => character.deckSubmodule;
|
|
public RecordSubmodule characterRecord => character.recordSubmodule;
|
|
public int Priority { get; protected set; }
|
|
public int guaranteedStamina;
|
|
public int guaranteedMana;
|
|
public int maxCardCount;
|
|
|
|
public IntentionBase(IntentionSubmodule intentionSubmodule)
|
|
{
|
|
this.intentionSubmodule = intentionSubmodule;
|
|
this.Priority = 0;
|
|
this.guaranteedStamina = 0;
|
|
this.guaranteedMana = 0;
|
|
this.maxCardCount = 999;
|
|
}
|
|
|
|
public virtual bool Condition()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public virtual void RefreshCardWeights()
|
|
{
|
|
|
|
}
|
|
|
|
public virtual void RefreshTargets()
|
|
{
|
|
|
|
}
|
|
|
|
|
|
}
|
|
} |