Commits

David Stone committed 0ffa3d8

Removed state that represents priority and just calculate it directly.

Comments (0)

Files changed (2)

source/move/move.cpp

 	cached_accuracy(move),
 	cached_base_power(get_base_power(move)),
 	cached_type(get_type(move)),
-	cached_priority(move),
 	cached_classification(move) {
 }
 
 }
 
 Priority Move::priority() const {
-	return cached_priority;
+	return Priority(name);
 }
 
 bool Move::is_struggle_or_switch () const {

source/move/move.hpp

 		Moves name;
 		Pp pp;
 		Disable disable;
+	private:
 		// Move times_used up to ActivePokemon when it will reduce the size of Move.
-	private:
 		TimesUsed times_used;
 		Accuracy cached_accuracy;
 		// Hidden Power makes this hard to replace with just a function
 		uint8_t cached_base_power;
 		Type cached_type;
 		// Replace this with a function when it will reduce the size of Move.
-		Priority cached_priority;
-		// Replace this with a function when it will reduce the size of Move.
 		Classification cached_classification;
 };