mod conditions, ground stomp

This commit is contained in:
landgreen
2020-02-06 06:18:47 -08:00
parent b0f5f61e29
commit 388294141d
3 changed files with 33 additions and 29 deletions

View File

@@ -206,11 +206,14 @@ const mech = {
mech.yOff = mech.yOffWhen.jump;
mech.hardLandCD = mech.cycle + Math.min(momentum / 6 - 6, 40)
if (b.isModStompPauli) {
mech.collisionImmune = mech.cycle + b.modCollisionImmuneCycles; //player is immune to collision damage for 30 cycles
}
if (b.isModStomp) {
// const len = Math.min(10, momentum * 0.03)
// for (let i = 0; i < 10; i++) {
// b.spore(player) //spawn drone
// }
const len = Math.min(20, (momentum - 110) * 0.07)
for (let i = 0; i < len; i++) {
b.spore(player) //spawn drone
}
} else if (game.isBodyDamage && player.velocity.y > 26 && momentum > 165 * b.modSquirrelFx) { //falling damage
let dmg = Math.sqrt(momentum - 165) * 0.01
dmg = Math.min(Math.max(dmg, 0.02), 0.20);