diff --git a/index.js b/index.js index 711ca2b..a3f4323 100644 --- a/index.js +++ b/index.js @@ -141,17 +141,17 @@ let characterBuilds = { "Ultimate": (color, user)=>{}, }, - "Jackson": { + "Ryan": { "Neutral_B": (color,user)=>{}, - "Side_B": (color,user)=>{}, + "Side_B": (color,user)=>{return RyanChargedSing_SideB(color,user)}, "Up_B": (color,user)=>{}, "Down_B": (summonerColor, user)=>{}, "Neutral_A": (color,user)=>{}, "Side_A": (color,user)=>{}, - "LeftSide_A_air": (color,user)=>{}, - "RightSide_A_air": (color,user)=>{}, - "Down_A": (color,user)=>{}, + "LeftSide_A_air": (color,user)=>{return RyanQueenDash_SideAirA(color, user)}, + "RightSide_A_air": (color,user)=>{return RyanQueenDash_SideAirA(color, user)}, + "Down_A": (color,user)=>{return RyanTapDance_DownA(color,user)}, "Up_A": (color,user)=>{}, "Ultimate": (color, user)=>{}, @@ -278,10 +278,10 @@ sprites.push(background) const player = new Fighter({ playerIndex: 0, - characterName: "Cooper", + characterName: "Ryan", color: 'red', facingRight: true, - attacks: characterBuilds["Cooper"], + attacks: characterBuilds["Ryan"], position: { x: 0 * canvasScale, diff --git a/js/customAttacks.js b/js/customAttacks.js index 897a74a..2bdbade 100644 --- a/js/customAttacks.js +++ b/js/customAttacks.js @@ -213,6 +213,107 @@ function CooperSideB_LongPunch(summonerColor, user){ return 2000 } +// Ryan Attacks + +function RyanQueenDash_SideAirA(color, user){ + user.velocity.x = 15 * (user.facingRight ? 1 : -1) + + let clearingId = setInterval(()=>{ + clearInterval(clearingId) + let eligable = [] + for(var i=0;i{ + user.velocity.x = 0 + },1) + + let func = function(){ + if((keys[keyNeed]!=true && holdTime >= 200) || holdTime>=3000){ + return clearInterval(clearId) + } + + holdTime += deltaTimeMS * skipTimeMult + let t = holdTime>=maxTime ? maxTime : holdTime + let damage = Math.floor( parabolaGet(1,2,2, t/1000) ) + + let e = new Sprite({ + position: {"x": user.position.x, "y": user.position.y}, + imageSrc: './sprites/ryan_images/note'+randomInt(1,7)+'-sheet.png', + scale: canvasScale * 0.1, + framesMax: 13, + }) + + e.width = 25 + e.height = 55 + + damageSprites.push({ + entity: e, + vel: {"x": user.facingRight ? 10 : -10, "y": 0}, + dmg: damage, + color: color, + uses: 1, + life: 9000, + }) + + setTimeout(func, deltaTimeMS*skipTimeMult) + } + setTimeout(func, deltaTimeMS*skipTimeMult) + + return 9000 +} // Dillion Attacks @@ -376,4 +477,8 @@ function setEntityFrozenFrameAndImageSrc(frozenFrameCount, imageSrc, imageMaxFra entity.frozenSprite = frozenFrameCount entity.image = tempImage entity.framesMax = imageMaxFrames +} + +function parabolaGet(a,b,c, x){ + return (a*(x*x)) + (b*x) + c } \ No newline at end of file diff --git a/js/customClasses.js b/js/customClasses.js index 48fb0ec..de82c28 100644 --- a/js/customClasses.js +++ b/js/customClasses.js @@ -750,9 +750,6 @@ class Fighter extends Sprite { } this.setSprite(this.sprites[this.lastMove][facing], this.sprites[this.lastMove][maxFramesFacing]) - - // display the proper sprite - // find this out, either attacking, jump, moving, idle } setSprite(spriteImage, maxFrames){ diff --git a/notes.txt b/notes.txt index d46992e..8e03e7d 100644 --- a/notes.txt +++ b/notes.txt @@ -42,14 +42,14 @@ 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 + - Side Air > Dashes forward trying to stab someone with a chess queen (can spike) + - Down > (SPRITE BASED) 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) + - Neutral ~ Prays to god, recieves 1 of 5 buffs (damage, 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 + - Down ~ Summons 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) diff --git a/sprites/ryan_images/chess_queen.png b/sprites/ryan_images/chess_queen.png new file mode 100644 index 0000000..5c74cdf Binary files /dev/null and b/sprites/ryan_images/chess_queen.png differ diff --git a/sprites/ryan_images/note1-sheet.png b/sprites/ryan_images/note1-sheet.png new file mode 100644 index 0000000..e8c4b9a Binary files /dev/null and b/sprites/ryan_images/note1-sheet.png differ diff --git a/sprites/ryan_images/note2-sheet.png b/sprites/ryan_images/note2-sheet.png new file mode 100644 index 0000000..608e6d8 Binary files /dev/null and b/sprites/ryan_images/note2-sheet.png differ diff --git a/sprites/ryan_images/note3-sheet.png b/sprites/ryan_images/note3-sheet.png new file mode 100644 index 0000000..7abd81b Binary files /dev/null and b/sprites/ryan_images/note3-sheet.png differ diff --git a/sprites/ryan_images/note4-sheet.png b/sprites/ryan_images/note4-sheet.png new file mode 100644 index 0000000..2e4066f Binary files /dev/null and b/sprites/ryan_images/note4-sheet.png differ diff --git a/sprites/ryan_images/note5-sheet.png b/sprites/ryan_images/note5-sheet.png new file mode 100644 index 0000000..4c6a2d2 Binary files /dev/null and b/sprites/ryan_images/note5-sheet.png differ diff --git a/sprites/ryan_images/note6-sheet.png b/sprites/ryan_images/note6-sheet.png new file mode 100644 index 0000000..fb6a48a Binary files /dev/null and b/sprites/ryan_images/note6-sheet.png differ diff --git a/sprites/ryan_images/note7-sheet.png b/sprites/ryan_images/note7-sheet.png new file mode 100644 index 0000000..fac3ac7 Binary files /dev/null and b/sprites/ryan_images/note7-sheet.png differ