From 3f0f4d3fcc22bb61795389c14639eb84cac3c269 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sun, 18 Aug 2024 15:50:06 +0200 Subject: [PATCH] velocity converter tiles --- rogueviz/nilrider/levels.cpp | 22 ++++++++++++++++++++-- rogueviz/nilrider/timestamp.cpp | 6 ++++++ 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/rogueviz/nilrider/levels.cpp b/rogueviz/nilrider/levels.cpp index 3b6c7a1e..e80c34be 100644 --- a/rogueviz/nilrider/levels.cpp +++ b/rogueviz/nilrider/levels.cpp @@ -337,7 +337,7 @@ map > submaps = { "gh WW gh", "hg WW hg", }}, - {'T', { + {'T', { /* trampoline */ "WWWWWWWWWWWWWWWW", "WYYYYYYYYYYYYYYW", "WYyyyyyyyyyyyyYW", @@ -355,6 +355,24 @@ map > submaps = { "WYYYYYYYYYYYYYYW", "WWWWWWWWWWWWWWWW", }}, + {'V', { /* velocity converter */ + "WWWWWWWWWWWWWWWW", + "WrrrrrrrrrrrrrrW", + "WrbbrbbrrbbrbbrW", + "WrbbrbbrrbbrbbrW", + "WrrrrrrrrrrrrrrW", + "WrbbrbbrrbbrbbrW", + "WrbbrbbrrbbrbbrW", + "WrrrrrrrrrrrrrrW", + "WrrrrrrrrrrrrrrW", + "WrbbrbbrrbbrbbrW", + "WrbbrbbrrbbrbbrW", + "WrrrrrrrrrrrrrrW", + "WrbbrbbrrbbrbbrW", + "WrbbrbbrrbbrbbrW", + "WrrrrrrrrrrrrrrW", + "WWWWWWWWWWWWWWWW", + }}, }; level rotplane( @@ -923,7 +941,7 @@ level flyoff( "gggg|!!!gg|gggg!", "gg--*!!!--*--gg!", "gggg|!!!gg|gggg!", - "gggggggGGgggggg!", + "gggggVVVGgggggg!", "ggggggggggggggg!", "ggggggggggggggg!", "!!!!!!!!!!!!!!!!" diff --git a/rogueviz/nilrider/timestamp.cpp b/rogueviz/nilrider/timestamp.cpp index 82c32d69..ad4a27d3 100644 --- a/rogueviz/nilrider/timestamp.cpp +++ b/rogueviz/nilrider/timestamp.cpp @@ -271,6 +271,12 @@ bool timestamp::check_crashes(level* lev, hyperpoint owhere, hyperpoint oflyvel, tramp_head = heading_angle; } + else if(ch == 'V') { + /* convert velocity on velocity converter */ + vel = hypot_d(3, flyvel); + on_surface = lev; + } + else { /* waste some energy */ flyvel = flyvel - dot_d(3, flyvel, dz) * dz;