survivors: split between base stats, temp stats and effective stats for players

changed the way how stats are increased/decreased
This commit is contained in:
Sheldan
2025-09-09 22:39:14 +02:00
parent 28ef7b9c6f
commit fa477afb9a
7 changed files with 82 additions and 39 deletions

View File

@@ -27,10 +27,10 @@ export abstract class BasicDrop implements Drop {
act() {
let distanceToPlayer = this._position.distanceTo(this.world.player.position);
if(distanceToPlayer < (this.world.player.stats.size + this.size)) {
if(distanceToPlayer < (this.world.player.effectiveStats.size + this.size)) {
this.pickup()
this.world.removeDrop(this)
} else if(distanceToPlayer < this.world.player.stats.pullRange) {
} else if(distanceToPlayer < this.world.player.effectiveStats.pullRange) {
let speedFactor = 125 / distanceToPlayer;
this._position = moveInDirectionOf(this._position, this.world.player.position, speedFactor)
}