manabrew_engine/keyword/
amplify.rs1use super::keyword_instance::Keyword;
6use super::keyword_with_amount::KeywordWithAmount;
7
8#[derive(Debug, Clone)]
11pub struct Amplify {
12 pub inner: KeywordWithAmount,
13}
14
15impl Amplify {
16 pub fn new(original: String) -> Self {
18 Self {
19 inner: KeywordWithAmount::new(Keyword::Amplify, original),
20 }
21 }
22
23 pub fn parse(&mut self, details: &str) {
25 self.inner.parse(details);
26 }
27
28 pub fn format_reminder_text(&self, reminder_text: &str) -> String {
31 let type_desc = "creature"; reminder_text
33 .replace("%d", &self.inner.amount.to_string())
34 .replace("%1$d", &self.inner.amount.to_string())
35 .replace("%s", type_desc)
36 }
37}