added localized invisibility field

This commit is contained in:
landgreen
2019-09-19 05:57:22 -07:00
parent 2168de12d5
commit cc34e23555
4 changed files with 53 additions and 25 deletions

View File

@@ -98,10 +98,12 @@ const mobs = {
},
seePlayerFreq: 20 + Math.round(Math.random() * 20), //how often NPC checks to see where player is, lower numbers have better vision
foundPlayer() {
this.locatePlayer();
if (!this.seePlayer.yes) {
this.alertNearByMobs();
this.seePlayer.yes = true;
if (!mech.isStealth) {
this.locatePlayer();
if (!this.seePlayer.yes) {
this.alertNearByMobs();
this.seePlayer.yes = true;
}
}
},
lostPlayer() {