Skip to content

Commit

Permalink
Evolution rework
Browse files Browse the repository at this point in the history
Mostly balanced but will receive more balancing in the future too
  • Loading branch information
YoctoProductions committed Dec 22, 2024
1 parent 2ddf0b2 commit 3345ca0
Show file tree
Hide file tree
Showing 10 changed files with 75 additions and 65 deletions.
3 changes: 2 additions & 1 deletion client/src/ui/modals/ChangelogModal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@
}

.primary-link {
color: lime;
color: rgb(91, 80, 255);
font-size: 120%;
font-weight: bold;
display: inline-block;
margin: 20px auto;
font-size: 15px;
}

}
7 changes: 3 additions & 4 deletions client/src/ui/modals/ChangelogModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ function ChangelogModal() {
<br></br>
<ul>(Credit to A-Bot, cool guy 53, and Battleship)</ul>
<hr></hr>
<h1 style={{fontSize: 25}}>Winter Event (Part 2)</h1>
<ul>- 12 New Skins! (7 are event skins!)</ul>
<ul>- Even better sales for the Skin Sale!</ul>
<ul>- New shop UI + better buy counters!</ul>
<h1 style={{fontSize: 25}}>Winter Event (Part 3)</h1>
<li>- Reworked Evolutions! (P.S. - you can also press G to use your ability!)</li>
<a className="primary-link" target="_blank" href="https://discord.com/invite/9A9dNTGWb9">- Join the Swordbattle Discord to give feedback on this update and help us improve it!</a>
</div>

);
Expand Down
2 changes: 1 addition & 1 deletion server/src/game/components/Health.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const Property = require('./Property');

class Health {
constructor(max, regen = 1, regenWait = 5000) {
constructor(max, regen = 1, regenWait = 2500) {
this.max = new Property(max);
this.regen = new Property(regen);
this.regenWait = new Property(regenWait);
Expand Down
12 changes: 3 additions & 9 deletions server/src/game/components/LevelSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class LevelSystem {
[Types.Buff.Speed]: {
level: 0,
max: 10,
step: 0.05,
step: 0.04,
buyable: true,
},
[Types.Buff.Size]: {
Expand All @@ -62,7 +62,7 @@ class LevelSystem {
},
[Types.Buff.Health]: {
level: 0,
step: 0.08,
step: 0.065,
max: 10,
buyable: true,
},
Expand All @@ -74,7 +74,7 @@ class LevelSystem {
},
[Types.Buff.Damage]: {
level: 0,
step: 0.045,
step: 0.04,
max: 10,
buyable: true,
},
Expand All @@ -101,12 +101,6 @@ class LevelSystem {
if (buy && !this.buffs[type].buyable) return;
this.buffs[type].level += 1;
if(buy) this.upgradePoints -= 1;

// if health buff, increase current health
if (type === Types.Buff.Health) {
this.player.health.percent *= 1.5;
this.player.health.percent = Math.min(1, this.player.health.percent);
}
}
}

Expand Down
18 changes: 12 additions & 6 deletions server/src/game/evolutions/Berserker.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,24 @@ module.exports = class Berserker extends Evolution {
static abilityCooldown = 60;

applyAbilityEffects() {
this.player.sword.damage.multiplier *= 1.15;
this.player.shape.setScale(0.95);
this.player.sword.damage.multiplier *= 1.35;
this.player.sword.knockback.multiplier['ability'] = 1.8;
this.player.speed.multiplier *= 1.5;
this.player.sword.swingDuration.multiplier['ability'] = 0.6;
this.player.speed.multiplier *= 1.4;
this.player.sword.swingDuration.multiplier['ability'] = 0.7;
this.player.health.max.multiplier *= 0.75;
this.player.health.regenWait.multiplier *= 2;
this.player.health.regen.multiplier *= 2;
}

update(dt) {
super.update(dt);
this.player.sword.damage.multiplier *= 1.1;
this.player.knockbackResistance.multiplier *= 1.05;
this.player.sword.damage.multiplier *= 1.25;
this.player.knockbackResistance.multiplier *= 1.1;
this.player.speed.multiplier *= 1.1;
this.player.health.max.multiplier *= 0.9;
this.player.health.max.multiplier *= 0.85;
this.player.health.regenWait.multiplier *= 1.25;
this.player.health.regen.multiplier *= 1.2;
}
}

20 changes: 11 additions & 9 deletions server/src/game/evolutions/Knight.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,24 @@ const Types = require('../Types');
module.exports = class Knight extends Evolution {
static type = Types.Evolution.Knight;
static level = 14;
static abilityDuration = 6;
static abilityDuration = 7;
static abilityCooldown = 90;

applyAbilityEffects() {
this.player.sword.damage.multiplier *= 1.15;
this.player.sword.knockback.multiplier['ability'] = 1.8;
this.player.speed.multiplier *= 1.5;
this.player.sword.swingDuration.multiplier['ability'] = 0.6;
this.player.shape.setScale(1.45);
this.player.sword.damage.multiplier *= 1.25;
this.player.sword.knockback.multiplier['ability'] = 1.4;
this.player.speed.multiplier *= 0.75;
this.player.sword.swingDuration.multiplier['ability'] = 0.5;
this.player.knockbackResistance.multiplier *= 1.3;
}

update(dt) {
super.update(dt);

this.player.sword.damage.multiplier *= 1.1;
// this.player.knockbackResistance.multiplier *= 1.05;
this.player.speed.multiplier *= 1.05;
this.player.shape.setScale(0.95);
this.player.sword.damage.multiplier *= 1;
this.player.knockbackResistance.multiplier *= 1.05;
this.player.speed.multiplier *= 1.15;
this.player.health.max.multiplier *= 0.9;
}
}
22 changes: 12 additions & 10 deletions server/src/game/evolutions/Rook.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = class Rook extends Evolution {
static level = 22;
static previousEvol = Types.Evolution.Tank;
static abilityDuration = 0.2;
static abilityCooldown = 60;
static abilityCooldown = 6;

applyAbilityEffects() {
const downInputs = this.player.inputs?.downInputs;
Expand All @@ -30,20 +30,22 @@ module.exports = class Rook extends Evolution {
}
}

this.player.shape.x = this.player.shape.x + (10000000 * Math.cos(angle));
this.player.shape.y = this.player.shape.y + (10000000 * Math.sin(angle));
this.player.shape.x = this.player.shape.x + (375 * Math.cos(angle));
this.player.shape.y = this.player.shape.y + (375 * Math.sin(angle));
}

update(dt) {
this.player.modifiers.disableDiagonalMovement = true;

this.player.shape.setScale(1.25);
this.player.sword.damage.multiplier *= 1.2;
this.player.sword.knockback.multiplier['ability'] = 1.25;
this.player.knockbackResistance.multiplier *= 1.25;
this.player.health.max.multiplier *= 1.25;
this.player.health.regen.multiplier *= 1.25;
this.player.health.regenWait.multiplier *= 1.15;
this.player.shape.setScale(1.135);
this.player.speed.multiplier *= 0.7;
this.player.sword.damage.multiplier *= 1.425;
this.player.sword.swingDuration.multiplier['ability'] = 1.65;
this.player.sword.knockback.multiplier['ability'] = 0.9;
this.player.knockbackResistance.multiplier *= 1.35;
this.player.health.max.multiplier *= 1.3;
this.player.health.regen.multiplier *= 1.5;
this.player.health.regenWait.multiplier *= 1.5;
super.update(dt);
}
}
24 changes: 12 additions & 12 deletions server/src/game/evolutions/Samurai.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,29 @@ module.exports = class Samurai extends Evolution {
static type = Types.Evolution.Samurai;
static level = 22;
static previousEvol = Types.Evolution.Tank;
static abilityDuration = 6;
static abilityCooldown = 60;
static abilityDuration = 8.5;
static abilityCooldown = 55;

applyAbilityEffects() {
this.player.sword.damage.multiplier *= 1.5;
this.player.sword.knockback.multiplier['ability'] = 2.5;
this.player.knockbackResistance.multiplier *= 1.5;
this.player.health.regen.multiplier *= 8;
this.player.speed.multiplier *= 1.25;
this.player.shape.setScale(1.1);
this.player.sword.damage.multiplier *= 0.75;
this.player.knockbackResistance.multiplier *= 100;
this.player.health.regen.multiplier *= 4;
this.player.speed.multiplier *= 1.2;


this.player.health.regenWait.multiplier = 0;
this.player.sword.swingDuration.multiplier['ability'] = 0.5;
}

update(dt) {
super.update(dt);
this.player.speed.multiplier *= 0.85;
this.player.speed.multiplier *= 0.875;
this.player.shape.setScale(1.05);
this.player.sword.damage.multiplier *= 1.15;
this.player.sword.damage.multiplier *= 0.85;
this.player.sword.knockback.multiplier['ability'] = 1.15;
this.player.knockbackResistance.multiplier *= 1.15;
this.player.health.max.multiplier *= 1.15;
this.player.sword.swingDuration.multiplier['ability'] = 0.7;
this.player.knockbackResistance.multiplier *= 2;
this.player.health.max.multiplier *= 1.125;
this.player.health.regen.multiplier *= 1.15;
this.player.health.regenWait.multiplier *= 1;
//TODO: Damagecooldown: 1.1
Expand Down
18 changes: 9 additions & 9 deletions server/src/game/evolutions/Tank.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ module.exports = class Tank extends Evolution {

applyAbilityEffects() {
this.player.sword.damage.multiplier *= 1.5;
this.player.sword.knockback.multiplier['ability'] = 2.5;
this.player.knockbackResistance.multiplier *= 1.5;
this.player.sword.knockback.multiplier['ability'] = 1.2;
this.player.knockbackResistance.multiplier *= 2;
this.player.shape.setScale(1.75);
this.player.health.regen.multiplier *= 8;
this.player.health.regen.multiplier *= 7;

this.player.health.regenWait.multiplier = 0;
this.player.sword.swingDuration.multiplier['ability'] = 0.5;
Expand All @@ -21,13 +21,13 @@ module.exports = class Tank extends Evolution {
update(dt) {
super.update(dt);
this.player.speed.multiplier *= 0.7;
this.player.shape.setScale(1.15);
this.player.shape.setScale(1.175);
this.player.sword.damage.multiplier *= 1.15;
this.player.sword.knockback.multiplier['ability'] = 1.15;
this.player.knockbackResistance.multiplier *= 1.15;
this.player.health.max.multiplier *= 1.15;
this.player.health.regen.multiplier *= 1.15;
this.player.health.regenWait.multiplier *= 1;
this.player.sword.knockback.multiplier['ability'] = 1.35;
this.player.knockbackResistance.multiplier *= 1.2;
this.player.health.max.multiplier *= 1.3;
this.player.health.regen.multiplier *= 1;
this.player.health.regenWait.multiplier *= 0.8;
//TODO: Damagecooldown: 1.1
}
}
14 changes: 10 additions & 4 deletions server/src/game/evolutions/Vampire.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,23 @@ module.exports = class Vampire extends Evolution {
static level = 22;
static previousEvol = Types.Evolution.Knight;
// static level = 1;
static abilityDuration = 6;
static abilityCooldown = 90;
static abilityDuration = 4;
static abilityCooldown = 75;

applyAbilityEffects() {
this.player.shape.setScale(0.75);
this.player.modifiers.leech = 2;
this.player.sword.knockback.multiplier['ability'] = 1.8;
this.player.speed.multiplier *= 1.5;
this.player.speed.multiplier *= 1.55;
this.player.sword.damage.multiplier *= 1.1;
this.player.sword.swingDuration.multiplier['ability'] = 2;
this.player.health.max.multiplier *= 0.5;
}

update(dt) {
this.player.modifiers.leech = 0.5;
this.player.modifiers.leech = 0.35;
this.player.sword.damage.multiplier *= 0.9;
this.player.health.max.multiplier *= 0.9;
super.update(dt);
}
}

0 comments on commit 3345ca0

Please sign in to comment.