scrom / Experiments

a NodeJS text adventure - deliberately coded badly to re-experience the pain of legacy code
http://mvta.herokuapp.com/
2 stars 0 forks source link

if creatures have beenwaiting in a location for > 4 ticks and player enters, all creatures leave #451

Closed scrom closed 8 years ago

scrom commented 8 years ago

The intent was that if a creature had been in the same location as the player with no interaction for 4 ticks, they would wander off. It does say it overrides any existing delays but it's not quite right.

When a player enters the room, a delay around the player being there should start and run for ~4 ticks. (probably more than 4 now time has been rebalanced.

The problematic code is in creature.calculateAndUpdateDelay

scrom commented 8 years ago

tested and working