diff --git a/index.html b/index.html index 018d9c3..20ed1cf 100644 --- a/index.html +++ b/index.html @@ -98,6 +98,8 @@

FPS: 0

+ +

diff --git a/index.js b/index.js index ba3735a..b253b5c 100644 --- a/index.js +++ b/index.js @@ -113,7 +113,7 @@ let characterBuilds = { }, "Dillion": { "Neutral_B": (color,user)=>{}, - "Side_B": (color,user)=>{dillionSideB_GrappleDirection(color,user)}, + "Side_B": (color,user)=>{return dillionSideB_GrappleDirection(color,user)}, "Up_B": (color,user)=>{return dillionUpB_RecoverUp(color, user)}, "Down_B": (summonerColor, user)=>{return spawnTurret(summonerColor, user)}, @@ -127,7 +127,7 @@ let characterBuilds = { "Ultimate": (color, user)=>{return spawnBlackhole(color, user)}, }, "Cooper": { - "Neutral_B": (color,user)=>{}, + "Neutral_B": (color,user)=>{return dillionSideB_GrappleDirection(color,user)}, "Side_B": (color,user)=>{return CooperSideB_LongPunch(color, user)}, "Up_B": (color,user)=>{}, "Down_B": (summonerColor, user)=>{}, @@ -136,7 +136,7 @@ let characterBuilds = { "Side_A": (color,user)=>{}, "LeftSide_A_air": (color,user)=>{}, "RightSide_A_air": (color,user)=>{}, - "Down_A": (color,user)=>{}, + "Down_A": (color,user)=>{return CooperDownA_Grenade(color, user)}, "Up_A": (color,user)=>{}, "Ultimate": (color, user)=>{}, @@ -364,6 +364,7 @@ function animate() { performanceNow = performance.now() deltaTimeMS = performanceNow-lastFrameNow + dtMultiplier = deltaTimeMS / 1000 lastFrameNow = performanceNow + 0 FPS = 1000 / deltaTimeMS fpsCounter.innerText = Math.round(FPS) @@ -376,8 +377,8 @@ function animate() { for(var i=0;i{ + if(grenadeSprite.framesCurrent != grenadeSprite.framesMax-1) return + sprites.splice( sprites.indexOf(grenadeSprite), 1) + explosionCreate(color, { + "x": user.position.x, + "y": user.position.y - user.height/2, + }) + clearInterval(clearingId) + }, 1) + + return 6000 +} + function CooperSideB_LongPunch(summonerColor, user){ let spriteName = user.facingRight ? "right" : "left" - + let e = new Sprite({ position: { "x": user.position.x, @@ -53,21 +79,22 @@ function CooperSideB_LongPunch(summonerColor, user){ //pullUser: true, life: 9000, - }) + }) - return 2000 + return 2000 } // Dillion Attacks function spawnTurret(summonerColor, user){ - let usetTurretCount = 0 + let maxTurrets = 1 + let usetTurretCount = 0 for(var i=0;i= 3){ return 0 } + if(usetTurretCount >= maxTurrets){ return 0 } let e = new Sprite({ position: { @@ -146,6 +173,7 @@ function dillionUpA_DestroyTurrets(color, user){ x: user.position.x - (user.width/2), y: user.position.y - (user.height/2) }) + user.takeHit(randomInt(1, 10), user.position) for(var i=0;i 0 let attkCooldownKeys = Object.keys(this.cooldowns) for(let i=0;i 0) return + if(Math.random() <= this.critChance) dmg += randomInt(1, 10) + this.damage += dmg this.immunityFrames = 5 @@ -711,7 +717,7 @@ class Fighter extends Sprite { if(didAttack == false) return this.isAttacking = true - this.attackRunTime = 100 + this.attackRunTime = 0.05 } determineAndUpdateSprite(){ diff --git a/notes.txt b/notes.txt index 2f3100a..f9f6675 100644 --- a/notes.txt +++ b/notes.txt @@ -21,6 +21,36 @@ Dillion Attacks and Notes > Spawn Black Hole on current position +Cooper Attacks and Notes +* A Attacks + - Neutral ~ Everyone becomes Miles Morales suprised for X seconds + - Side ~ Stick hand grapple to enemy or wall + - Side Air ~ Same as grapple - ground side + - Down ~ Pull grenade pin and explode everyone + - Up ~ Turn into plane, and blow up one player +* B Attacks + - Neutral ~ Pull someone towards you (facing direction) (Side B in Dillion) + - Side ~ Long punch in direction (comically long hand) + - Up ~ Stock Photo hand Punch Up Quickly + - Down ~ Stock Photo hand Punch Down Quickly +* Ultimate + ~ Giga Chad for X seconds w/ buff attack and speed + + +Ryan Attacks and Notes +* A Attacks + - Neutral ~ Spout factual nonsence firing a projectile that deals decent damage + - Side ~ Pulls out big ol' book that smack enemies in front of him + - Side Air ~ Dashes forward trying yo stab someone with a chess queen (can spike) + - Down ~ Does the funny little tap dance, minor damage and temp. stuns nearby enemies + - Up ~ Smacks the words "no" and "life" together above himself good damge and blasts enemy away +* B Attacks + - Neutral ~ Prays to god, recieves 1 of 5 buffs (damahe, defense, speed, jump, or 1% chance to one-tap enemy) + - Side ~ Sings incredibly loudly and fires a music note towards enemies (damage based on charge) + - Up ~ Pulls out winged shoes and given a moment to target (sepherof up b in smash bros ult.) + - Down ~ Smmons a skeleton that can have a gun, a sword, or a shield that attacks enemies +* Ultimate + ~ God and Goku appear in the background and combine the power to fire a ray of light where targeted (HUGE DAMAGE) @@ -67,25 +97,6 @@ Ult gigachad head massive buff to speed and attack -Cooper Attacks and Notes -* A Attacks - - Neutral ~ Everyone becomes Miles Morales suprised for X seconds - - Side ~ Stick hand grapple to enemy or wall - - Side Air ~ Same as grapple - ground side - - Down ~ Pull grenade pin and explode everyone - - Up ~ Turn into plane, and blow up one player -* B Attacks - - Neutral ~ Pull someone towards you (facing direction) (Side B in Dillion) - - Side ~ Long punch in direction (comically long hand) - - Up ~ Stock Photo hand Punch Up Quickly - - Down ~ Stock Photo hand Punch Down Quickly -* Ultimate - ~ Giga Chad for X seconds w/ buff attack and speed - - - - - EmptyPlayer Attacks and Notes * A Attacks - Neutral ~