Skip to content

Commit 58b1049

Browse files
committed
Use gender-neutral language in game and decrease accuracy of attack moves
1 parent bfcdfe1 commit 58b1049

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/models.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ void Pokemon::configure_move_set()
3030
if (move.power > 0 && move.accuracy > 0)
3131
{
3232
move.type = MoveType::ATTACK;
33+
move.accuracy = utils::random_range<int>(this->difficulty == Difficulty::EASY ? 5 : (this->difficulty == Difficulty::MODERATE) ? 6 : 7, 10) * 10;
3334
move.power += this->difficulty == Difficulty::EASY ? -20 : (this->difficulty == Difficulty::MODERATE) ? 0 : 20;
3435
move.power = abs(move.power);
3536
move.flavor_text = kt::format_str("{} deals {} points in damage.", move.name, move.power);
@@ -107,30 +108,30 @@ void Pokemon::make_move(Pokemon& pkmn, std::size_t index)
107108
int damage = std::ceil(move.power * (this->atk * 100) / (100 * pkmn.def));
108109
pkmn.hp -= damage;
109110
pkmn.hp = (pkmn.hp < 0) ? 0 : pkmn.hp;
110-
msg = kt::format_str("{} used {} and inflicts {} points in damage!", this->name, move.name, damage);
111+
msg = kt::format_str("{} uses {}! and inflicts {} points in damage!", this->name, move.name, damage);
111112
}
112113
else
113114
{
114-
msg = kt::format_str("{} missed his target!", this->name);
115+
msg = kt::format_str("{} uses {}! The ATTACK missed its target!", this->name, move.name);
115116
}
116117
break;
117118
case MoveType::HEAL:
118119
this->hp += move.power;
119120
this->hp = (this->hp > this->max_hp) ? this->max_hp : this->hp;
120-
msg = kt::format_str("{} increased his HP by {} points", this->name, move.power);
121+
msg = kt::format_str("{} increased its HP by {} points", this->name, move.power);
121122
break;
122123
case MoveType::BOOST_ATK:
123124
this->atk += move.power;
124-
msg = kt::format_str("{} increased his ATTACK by {}%!", this->name, move.power);
125+
msg = kt::format_str("{} increased its ATTACK by {}%!", this->name, move.power);
125126
break;
126127
case MoveType::BOOST_DEF:
127128
this->def += move.power;
128-
msg = kt::format_str("{} increased his DEFENSE by {}%!", this->name, move.power);
129+
msg = kt::format_str("{} increased its DEFENSE by {}%!", this->name, move.power);
129130
break;
130131
default:
131132
break;
132133
}
133134

134-
utils::slow_print(msg, std::chrono::milliseconds{50});
135+
utils::delayed_print(msg, std::chrono::milliseconds{25});
135136
}
136137
} // namespace models

0 commit comments

Comments
 (0)