MinicraftPlus / minicraft-plus-revived

Minicraft+, an extension of Notch's original minicraft project, with tons more features.
GNU General Public License v3.0
466 stars 93 forks source link

God Potion #619

Open Goblin464 opened 7 months ago

Goblin464 commented 7 months ago

I Think it would be a good idea to have a "God Potion" for the end game. It might look like this:

God(Color.get(0, 5, 100, 0), 6000){

    public boolean toggleEffect(Player player, boolean addEffect) {
        player.moveSpeed += (double)( addEffect ? 1 : (player.moveSpeed > 1 ? -1 : 0) ); //SPEED
        //return true;

     //HEAL
        if (addEffect) player.heal(5);
        //return true;

    //ESCAPE
        if (addEffect) {
            int playerDepth = player.getLevel().depth;

            if (playerDepth == 0) {
                // player is in overworld
                Game.notifications.add("You can't escape from here!");
                return false;
            }

            int depthDiff = playerDepth > 0 ? -1 : 1;

            World.scheduleLevelChange(depthDiff, () -> {
                Level plevel = World.levels[World.lvlIdx(playerDepth + depthDiff)];
                if (plevel != null && !plevel.getTile(player.x >> 4, player.y >> 4).mayPass(plevel, player.x >> 4, player.y >> 4, player))
                    player.findStartPos(plevel, false);
            });
        }
        return true;
    }`
Litorom commented 7 months ago
  1. Interesting concept
  2. Escape potion!? That’s to make it so the player escapes the floor back to the surface.
  3. I’ll let other devs decide their opinions before we act on this.
BenCheung0422 commented 7 months ago

It looks like a hybrid potion. Also, I think it might not be suitable to have a player instant large effect (escape) to be hybridized together with time-lasting effects.