MCPcopy Create free account
hub / github.com/candybox2/candybox2.github.io / moveWormsLike

Method moveWormsLike

code/main/Player.ts:303–312  ·  view source on GitHub ↗
(pos: Pos)

Source from the content-addressed store, hash-verified

301 }
302
303 public moveWormsLike(pos: Pos): boolean{
304 // Position
305 var posToUse: Pos = pos.copy();
306
307 // If we are wearing the boots of introspection and we would collide by going below, we don't move horizontally
308 if(posToUse.x != 0 && this.game.isEquipped("boots", "eqItemBootsBootsOfIntrospection") && this.checkCollision(new Pos(0, 1)) == true)
309 posToUse.x = 0;
310
311 return super.moveWormsLike(posToUse);
312 }
313
314 public reCalcMaxHp(): void{
315 // Base maximum hp : 100

Callers

nothing calls this directly

Calls 3

checkCollisionMethod · 0.95
copyMethod · 0.80
isEquippedMethod · 0.80

Tested by

no test coverage detected