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 #31

Closed
github-actions bot opened this issue Dec 22, 2021 · 2 comments
Closed

use the Try[part] instead of the #31

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

Comments

@github-actions
Copy link

use the Try[part] instead of the

partToModify

@return

Source text.

* 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]] = ???
}

d992fe2617a2fbd18b994ffb4afaf835336adbd2

@github-actions github-actions bot added the todo label Dec 22, 2021
@adarro
Copy link
Owner

adarro commented Sep 8, 2023

duplicate of #34

@adarro
Copy link
Owner

adarro commented Sep 8, 2023

closed as duplicate of #34

@adarro adarro closed this as completed Sep 8, 2023
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

1 participant