mirror of
https://github.com/Sheldan/canvas.git
synced 2026-04-14 19:56:28 +00:00
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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user