From 465ec667607854b3bda2b1edced3fd413d419f93 Mon Sep 17 00:00:00 2001 From: Ammon Smith Date: Mon, 14 Feb 2022 18:06:19 -0500 Subject: [PATCH] Add +1 charge for Orb of Love on Valentine's day. Minor date-based easter egg, small enough to not impact gameplay notably. --- orbs.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/orbs.cpp b/orbs.cpp index df0a4714..091756fc 100644 --- a/orbs.cpp +++ b/orbs.cpp @@ -5,7 +5,9 @@ * \brief Implementation of various Orb effects, and their properties such as default and maximum charges */ +#include #include "hyper.h" + namespace hr { EX bool orbused[ittypes], lastorbused[ittypes]; @@ -1602,6 +1604,12 @@ EX eItem targetRangedOrb(cell *c, orbAction a) { return itNone; } +bool isValentines() { + const time_t now = time(NULL); + const struct tm *datetime = localtime(&now); + return datetime->tm_mon == 1 && datetime->tm_mday == 14; +} + EX int orbcharges(eItem it) { switch(it) { case itRevolver: //pickup-key @@ -1611,6 +1619,7 @@ EX int orbcharges(eItem it) { case itOrbDiscord: return inv::on ? 46 : 23; case itOrbLove: + return isValentines() ? 31 : 30; case itOrbUndeath: case itOrbSpeed: //"pickup-speed"); case itOrbInvis: