Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use the Try[part] instead of the #30

Open
github-actions bot opened this issue Dec 22, 2021 · 0 comments
Open

use the Try[part] instead of the #30

github-actions bot opened this issue Dec 22, 2021 · 0 comments
Labels

Comments

@github-actions
Copy link

use the Try[part] instead of the

* Sets or maps the source text for the DisplayName. // TODO: use the Try[part] instead of the

 * @tparam E
 *   Entry ID / Enumeration used to qualify which part is being modified.
 */
trait PartModifier[V, E <: EnumEntry] extends Feature[V] with DisplayName {
  self: UsingSearchPrefix =>
  /**
   * The current Seaerch-Fu is weak. Override this default function.
   */
  override lazy val part: Try[EffectPart] =
    EffectPart.tryFindByPattern(partToModify.entryName, Option(withPrefix))
  override lazy val parameters: Seq[Try[EffectParameter]] = effectParameters.map(_.parameter)
// FIXME add UsingSearchPrefix to type constraint
  override val withPrefix: String = s"$searchPrefix$nameSource"
  protected[this] val partToModify: E

  protected[this] def effectParameters: Seq[ParameterModifier[_]] = ???

  /**
   * Sets or maps the source text for the DisplayName. // TODO: use the Try[part] instead of the
   * partToModify
   *
   * @return
   *   Source text.
   */
  override protected def nameSource: String = partToModify.entryName
}

trait FeatModifier[T, E <: Feat] extends PartModifier[T, E] {
  self: UsingSearchPrefix =>

}

/**
 * A parameter that SHOULD be found in EffectParameter used for validation / stacking
 * @tparam E
 *   Enum of the parameter type being used, such as A Bonus Type of 'Action Boost'
 */
trait ParameterModifier[E <: EnumEntry] {

  lazy val parameter: Try[EffectParameter] =
    EffectParameter.tryFindByPattern(parameterToModify.entryName, None)
  protected[this] val parameterToModify: E
}

case class EffectFeature[T](
  parameter: Try[EffectParameter],
  override val part: Try[EffectPart],
  override val source: SourceInfo,
  override val categories: Seq[String],
  override val value: T,
  override val generalDescription: String,
  effectDetail: DetailedEffect)
  extends Feature[T] {
  override def parameters: Seq[Try[EffectParameter]] = ???
}

4086695ce8083c05f43414d28b0b86c6cb60742b

@github-actions github-actions bot added the todo label Dec 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

0 participants