Arcanorum/rogueworld

Adumbral glory during day

Closed this issue · 0 comments

Task description

  • Adumbrals take damage during day, dusk & dawn (i.e. from the light).
  • All nearby players receive a glory reward when a creature dies.

With this functionality, currently it is too easy to cheese adumbrals for their glory reward when killed by just watching them die during day/dusk/dawn instead of actually fighting them.

Adumbral glory should be significantly reduced when they die at any time other than night.

References/notes

Logic for giving glory to nearby players when a mob dies:
https://github.com/Arcanorum/dungeonz/blob/master/server/src/entities/classes/destroyables/movables/characters/mobs/Mob.js#L82

This onAllHitPointsLost method can be overridden on the adumbral classes to then add a check for the current time of day, and if it is not night, then reduce the gloryValue of the mob.

Day phases: https://github.com/Arcanorum/dungeonz/blob/master/server/src/DayPhases.js
The world object that tracks and changes the day phase: https://github.com/Arcanorum/dungeonz/blob/master/server/src/World.js

Something like this for the SmallAdumbral, MediumAdumbral and LargeAdumbral classes:

onAllHitPointsLost() {
    // If during dawn or dusk, reduce glory given slightly.

    
    // If during day, reduce glory given significantly.


    // Still need to continue the method chain.
    super.onAllHitPointsLost();
}

Acceptance criteria

  • When a small, medium or large adumbral mob dies during night, the full glory value amount should be given to all nearby players (current functionality that should not change).
  • When a small, medium or large adumbral mob dies during dusk or dawn, then 66% of the full glory value amount should be given to all nearby players.
  • When a small, medium or large adumbral mob dies during day, then 33% of the full glory value amount should be given to all nearby players.