
Description
(()=>{if(Character.prototype.propeller!==undefined)return;Character.prototype.propeller=0;Character.prototype.propAngle=0;Character.prototype.propTime=0;Character.prototype.propCd=0;const cooldown=3000;const boostFrames=24;const boostPower=18;const fallSpeed=1.5;const applyForces=Character.prototype.applyForces;const drawChars=drawCharacters;function stop(c){c.propeller=0;c.propAngle=0;c.propCd=Date.now()+cooldown;}Character.prototype.applyForces=function(grav,ctrl,waterUpMaxSpeed){applyForces.call(this,grav,ctrl,waterUpMaxSpeed);if(this.propeller==0)return;if(this.charState<5||this.deathTimer<30||this.submerged>=2){stop(this);return;}this.propAngle+=this.propeller==1?0.6:0.4;if(this.propeller==1){this.vy=-boostPower*(1-this.propTime/boostFrames);this.propTime++;if(this.propTime>=boostFrames)this.propeller=2;}else{if(this.vy>fallSpeed)this.vy=fallSpeed;if(this.onob)stop(this);}};drawCharacters=function(context){if(!char.some(c=>c.propeller!=0&&c.charState>1)){drawChars(context);return;}const depths=charDepths.slice();for(let d=0;d<depths.length;d++){let i=depths[d];if(i<0)continue;charDepths.fill(-1);charDepths[d]=i;context.save();if(char[i].propeller!=0){context.translate(char[i].x,0);context.scale(Math.cos(char[i].propAngle),1);context.translate(-char[i].x,0);}drawChars(context);context.restore();}for(let d=0;d<depths.length;d++)charDepths[d]=depths[d];};window.addEventListener('keydown',event=>{if(event.keyCode!=88||event.repeat||menuScreen!=3||editingTextBox)return;if(cutScene==1||cutScene==2||recover||control>=1000)return;let c=char[control];if(c.propeller!=0||c.charState<5||c.deathTimer<30||Date.now()<c.propCd)return;c.propeller=1;c.propTime=0;c.onob=false;fallOff(control);});})();