diff --git a/system/map-player/map/mapCarryers/Enabler.js b/system/map-player/map/mapCarryers/Enabler.js index ab31bbc..376745f 100644 --- a/system/map-player/map/mapCarryers/Enabler.js +++ b/system/map-player/map/mapCarryers/Enabler.js @@ -34,7 +34,7 @@ export class Enabler { this.hitboxes[this.hitboxes.length] = new Hitbox(-16390,6058,188,894, false, "bazooka", true ) this.hitboxes[this.hitboxes.length] = new Hitbox(-16851,6084,214,866, false, "shotgun", true ) this.hitboxes[this.hitboxes.length] = new Hitbox(-17277,6079,191,807, false, "dash", true ) - this.hitboxes[this.hitboxes.length] = new Hitbox(-17750,6134,193,744, false, "null", true ) + this.hitboxes[this.hitboxes.length] = new Hitbox(-17750,6134,193,744, false, "portal", true ) diff --git a/system/map-player/player/Player.js b/system/map-player/player/Player.js index 7c5c694..edea87b 100644 --- a/system/map-player/player/Player.js +++ b/system/map-player/player/Player.js @@ -185,6 +185,18 @@ export class Player { this.game.held.makeImg() } + if(this.orbAlpha <= 0 && this.anim == true && this.Held.get("portal") == false && this.change == "portal") { + this.Held.set("portal",true) + this.game.gameDisplayer.targetR = 167 + this.game.gameDisplayer.targetG = 216 + this.game.gameDisplayer.targetB = 199 + this.game.gameDisplayer.gradMinTarget = 700 + this.game.gameDisplayer.gradMaxTarget = 2000 + this.anim = false + this.game.held.selected = 5 + this.game.held.makeImg() + } + } @@ -421,6 +433,18 @@ export class Player { document.getElementsByTagName("body")[0].style.cursor = "url('http://wiki-devel.sugarlabs.org/images/e/e2/Arrow.cur'), auto"; } } + if(valC == "portal") { + if(this.anim == false && this.Held.get("portal") != true){ + this.orbAlpha = 1 + this.anim = true + await this.sleep(750) + this.game.audio.powerUpSound() + await this.sleep(750) + this.change = "portal" + this.mousevis = true + document.getElementsByTagName("body")[0].style.cursor = "url('http://wiki-devel.sugarlabs.org/images/e/e2/Arrow.cur'), auto"; + } + } } diff --git a/system/map-player/player/heldItems/portalMaker.js b/system/map-player/player/heldItems/portalMaker.js index c81da8e..6a76ca5 100644 --- a/system/map-player/player/heldItems/portalMaker.js +++ b/system/map-player/player/heldItems/portalMaker.js @@ -36,8 +36,8 @@ export class Portals{ - this.velX = this.trajectory.x - (this.game.player.velX/30) - this.velY = this.trajectory.y - (this.game.player.velY/30) + this.velX = this.trajectory.x - (this.game.player.velX/50) + this.velY = this.trajectory.y - (this.game.player.velY/50) this.state = 1 this.speed = this.speedSet }