1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-06-25 22:52:49 +00:00

ru:: color thet flaming dagger correctly on screen

This commit is contained in:
Zeno Rogue 2025-05-24 17:16:04 +02:00
parent 299a3b64c6
commit 5610629037
2 changed files with 6 additions and 1 deletions

View File

@ -167,4 +167,6 @@ void revert_all(revert_stack& s);
string parse_markup(string s);
struct power& find_power(string name);
}

View File

@ -247,10 +247,13 @@ void man::draw() {
if(t < 50) {
auto af = attack_facing * (1 - t * 0.01);
auto ds = dsiz();
auto col = find_power("dagger").get_color();
auto& alpha = part(col, 0);
alpha = max<int> (0, alpha - 5 * t);
asciiletter(
where.x + af * ds.x - ds.x/2, where.y - ds.y/2,
where.x + af * ds.x + ds.x/2, where.y + ds.y/2,
attack_facing == -1 ? "(" : ")", 0xFFFFFF00 + (255 - t * 5)
attack_facing == -1 ? "(" : ")", col
);
}
}