1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2026-05-31 09:52:11 +00:00

ru:: 'effect' are now more general, not only attacks

This commit is contained in:
Zeno Rogue
2026-03-15 16:55:30 +01:00
parent b455587e11
commit e4dc58b61f
4 changed files with 19 additions and 11 deletions
+5 -5
View File
@@ -250,16 +250,16 @@ void man::draw() {
auto efs = effects.begin();
for(auto& e: effects) {
ld t = gframeid - e.attack_when;
if(t < 50) {
ld t = gframeid - e.when;
if(t < e.length) {
auto col = e.p->get_color();
auto& alpha = part(col, 0);
alpha = max<int> (0, alpha - 5 * t);
e.cf(col, t);
auto box = e.f(t);
asciiletter(
box.minx, box.miny, // where.x + af * ds.x - ds.x/2, where.y - ds.y/2,
box.maxx, box.maxy, // where.x + af * ds.x + ds.x/2, where.y + ds.y/2,
e.attack_facing == -1 ? "(" : ")", col
(e.p->flags & ARMOR) ? ( e.facing == -1 ? "[" : "]" ) :
e.facing == -1 ? "(" : ")", col
);
*(efs++) = e;
}