fn battle_modifier_message(who: &str, stat: &'static str, amount: StatModifierType,
	current: StatModifierType, min: StatModifierType, max: StatModifierType)
{
	let difference =
	{
		if current == min && amount < 0
		{
			"won't go any lower"
		}
		else if current == max && amount > 0
		{
			"won't go any higher"
		}
		else
		{
			match amount
			{
				-3 => "severely fell",
				-2 => "harshly fell",
				-1 => "fell",
				1  => "rose",
				2  => "rose sharply",
				3  => "rose drastically",
				_  => unreachable!(),
			}
		}
	};
	println!("{}'s {} {}!", who, stat, difference);
}
/// Displays a message for the given stat modifier.
Displays a message for the given stat modifier.
Displays a message for the given stat modifier .
fn battle_modifier_message(who: &str, stat: &'static str, amount: StatModifierType,
	current: StatModifierType, min: StatModifierType, max: StatModifierType)
{
	let difference =
	{
		if current == min && amount < 0
		{
			"won't go any lower"
		}
		else if current == max && amount > 0
		{
			"won't go any higher"
		}
		else
		{
			match amount
			{
				-3 => "severely fell",
				-2 => "harshly fell",
				-1 => "fell",
				1  => "rose",
				2  => "rose sharply",
				3  => "rose drastically",
				_  => unreachable!(),
			}
		}
	};
	println!("{}'s {} {}!", who, stat, difference);
}
fn battle_modifier_message ( who : & str , stat : & ' static str , amount : StatModifierType , current : StatModifierType , min : StatModifierType , max : StatModifierType ) { let difference = { if current == min && amount < 0 { " " } else if current == max && amount > 0 { " " } else { match amount { - 3 => " " , - 2 => " " , - 1 => " " , 1 => " " , 2 => " " , 3 => " " , _ => unreachable ! ( ) , } } } ; println ! ( " " who stat difference ) ; }
Displays a message for the given stat modifier.
Displays a message for the given stat modifier .
who
&str
stat
&'static str
amount
StatModifierType
current
StatModifierType
min
StatModifierType
max
StatModifierType
who
&str
stat
&'static str
amount
StatModifierType
current
StatModifierType
min
StatModifierType
max
StatModifierType