thermoelectric balance

ice IX mod: thermoelectric effect - when ice IX kills a mob heal 3% and regen 66% energy
This commit is contained in:
landgreen
2020-10-06 19:37:58 -07:00
parent b2cb88832c
commit dd8df8f563
4 changed files with 17 additions and 112 deletions

View File

@@ -801,10 +801,14 @@ const b = {
lockedOn: null, lockedOn: null,
isFollowMouse: true, isFollowMouse: true,
onDmg(who) { onDmg(who) {
console.log(who.alive)
mobs.statusSlow(who, 60) mobs.statusSlow(who, 60)
this.endCycle = game.cycle this.endCycle = game.cycle
if (mod.isHeavyWater) mobs.statusDoT(who, 0.1, 300) if (mod.isHeavyWater) mobs.statusDoT(who, 0.15, 300)
if (mod.iceEnergy && !who.shield) mech.energy += mod.iceEnergy //&& mech.energy < mech.maxEnergy if (mod.iceEnergy && !who.shield && !who.isShielded && who.dropPowerUp && !who.alive) {
mech.energy += mod.iceEnergy * 0.66
mech.addHealth(mod.iceEnergy * 0.03)
}
}, },
onEnd() {}, onEnd() {},
do() { do() {
@@ -1836,85 +1840,6 @@ const b = {
this.nextFireCycle = mech.cycle + CD * b.fireCD //predict next fire cycle if the fire button is held down this.nextFireCycle = mech.cycle + CD * b.fireCD //predict next fire cycle if the fire button is held down
} }
mech.fireCDcycle = mech.cycle + Math.floor(CD * b.fireCD); // cool down mech.fireCDcycle = mech.cycle + Math.floor(CD * b.fireCD); // cool down
// const range = 2000
// const totalBullets = 6
// const angleStep = (mech.crouch ? 0.06 : 0.25) / totalBullets
// let dir = mech.angle - angleStep * totalBullets / 2;
// for (let i = 0; i < totalBullets; i++) {
// dir += angleStep
// const vertexCollision = function (v1, v1End, domain) {
// for (let i = 0; i < domain.length; ++i) {
// let vertices = domain[i].vertices;
// const len = vertices.length - 1;
// for (let j = 0; j < len; j++) {
// results = game.checkLineIntersection(v1, v1End, vertices[j], vertices[j + 1]);
// if (results.onLine1 && results.onLine2) {
// const dx = v1.x - results.x;
// const dy = v1.y - results.y;
// const dist2 = dx * dx + dy * dy;
// if (dist2 < best.dist2 && (!domain[i].mob || domain[i].alive)) {
// best = {
// x: results.x,
// y: results.y,
// dist2: dist2,
// who: domain[i],
// v1: vertices[j],
// v2: vertices[j + 1]
// };
// }
// }
// }
// results = game.checkLineIntersection(v1, v1End, vertices[0], vertices[len]);
// if (results.onLine1 && results.onLine2) {
// const dx = v1.x - results.x;
// const dy = v1.y - results.y;
// const dist2 = dx * dx + dy * dy;
// if (dist2 < best.dist2 && (!domain[i].mob || domain[i].alive)) {
// best = {
// x: results.x,
// y: results.y,
// dist2: dist2,
// who: domain[i],
// v1: vertices[0],
// v2: vertices[len]
// };
// }
// }
// }
// };
// const path = [{
// x: mech.pos.x,
// y: mech.pos.y
// },
// {
// x: mech.pos.x + range * Math.cos(dir),
// y: mech.pos.y + range * Math.sin(dir)
// }
// ];
// let best = {
// x: null,
// y: null,
// dist2: Infinity,
// who: null,
// v1: null,
// v2: null
// };
// vertexCollision(path[path.length - 2], path[path.length - 1], mob);
// vertexCollision(path[path.length - 2], path[path.length - 1], map);
// vertexCollision(path[path.length - 2], path[path.length - 1], body);
// if (best.dist2 !== Infinity) { //if hitting something
// b.explosion({
// x: best.x,
// y: best.y
// }, (mech.crouch ? 95 : 75) + (Math.random() - 0.5) * 50);
// } else {
// b.explosion(path[path.length - 1], (mech.crouch ? 95 : 75) + (Math.random() - 0.5) * 50);
// }
// }
const speed = 30 + 6 * Math.random() + 9 * mod.nailInstantFireRate const speed = 30 + 6 * Math.random() + 9 * mod.nailInstantFireRate
const angle = mech.angle + (Math.random() - 0.5) * (Math.random() - 0.5) * (mech.crouch ? 1.35 : 3.2) / CD const angle = mech.angle + (Math.random() - 0.5) * (Math.random() - 0.5) * (mech.crouch ? 1.35 : 3.2) / CD
const dmg = 0.9 const dmg = 0.9
@@ -1925,7 +1850,6 @@ const b = {
x: mech.Vx / 2 + speed * Math.cos(angle), x: mech.Vx / 2 + speed * Math.cos(angle),
y: mech.Vy / 2 + speed * Math.sin(angle) y: mech.Vy / 2 + speed * Math.sin(angle)
}, dmg) //position, velocity, damage }, dmg) //position, velocity, damage
if (mod.isIceCrystals) { if (mod.isIceCrystals) {
bullet[bullet.length - 1].onDmg = function (who) { bullet[bullet.length - 1].onDmg = function (who) {
mobs.statusSlow(who, 30) mobs.statusSlow(who, 30)

View File

@@ -23,8 +23,8 @@ const level = {
// mod.giveMod("eddy current brake") // mod.giveMod("eddy current brake")
// level.intro(); //starting level level.intro(); //starting level
level.testing(); //not in rotation // level.testing(); //not in rotation
// level.template() //not in rotation // level.template() //not in rotation
// level.testChamber() //less mobs, more puzzle // level.testChamber() //less mobs, more puzzle
// level.sewers(); // level.sewers();
@@ -141,6 +141,7 @@ const level = {
spawn.mapRect(level.exit.x, level.exit.y + 20, 100, 100); //exit bump spawn.mapRect(level.exit.x, level.exit.y + 20, 100, 100); //exit bump
// spawn.boost(1500, 0, 900); // spawn.boost(1500, 0, 900);
spawn.starter(1600, -500)
// spawn.bomberBoss(2900, -500) // spawn.bomberBoss(2900, -500)
// spawn.launcherBoss(1200, -500) // spawn.launcherBoss(1200, -500)
// spawn.laserTargetingBoss(1600, -400) // spawn.laserTargetingBoss(1600, -400)
@@ -150,12 +151,11 @@ const level = {
// spawn.sniper(1800, -120) // spawn.sniper(1800, -120)
// spawn.sniper(2200, -120) // spawn.sniper(2200, -120)
// spawn.cellBossCulture(1600, -500) // spawn.cellBossCulture(1600, -500)
// spawn.starter(1600, -500)
// spawn.powerUpBoss(1600, -500) // spawn.powerUpBoss(1600, -500)
// spawn.shield(mob[mob.length - 1], 1200, -500, 1); // spawn.shield(mob[mob.length - 1], 1200, -500, 1);
// spawn.nodeBoss(1200, -500, "launcher") // spawn.nodeBoss(1200, -500, "launcher")
spawn.snakeBoss(1200, -500) // spawn.snakeBoss(1200, -500)
// spawn.timeSkipBoss(2900, -500) // spawn.timeSkipBoss(2900, -500)
// spawn.randomMob(1600, -500) // spawn.randomMob(1600, -500)
}, },

View File

@@ -2208,7 +2208,7 @@ const mod = {
maxCount: 1, maxCount: 1,
count: 0, count: 0,
allowed() { allowed() {
return mod.haveGunCheck("ice IX") || mod.isIceField return (mod.haveGunCheck("ice IX") || mod.isIceField) && !mod.iceEnergy
}, },
requires: "ice IX", requires: "ice IX",
effect() { effect() {
@@ -2220,15 +2220,15 @@ const mod = {
}, },
{ {
name: "thermoelectric effect", name: "thermoelectric effect",
description: "<strong>ice IX</strong> bullets give you <strong>7%</strong> <strong class='color-f'>energy</strong><br>after they <strong>collide</strong> with mobs", description: "<strong>killing</strong> mobs with <strong>ice IX</strong> gives <strong>3%</strong> <strong class='color-h'>health</strong><br>and overfills your <strong class='color-f'>energy</strong> by <strong>66%</strong>",
maxCount: 9, maxCount: 3,
count: 0, count: 0,
allowed() { allowed() {
return mod.haveGunCheck("ice IX") || mod.isIceField return (mod.haveGunCheck("ice IX") || mod.isIceField) && !mod.isHeavyWater
}, },
requires: "ice IX", requires: "ice IX",
effect() { effect() {
mod.iceEnergy += 0.07 mod.iceEnergy++
}, },
remove() { remove() {
mod.iceEnergy = 0; mod.iceEnergy = 0;

View File

@@ -1,14 +1,8 @@
ice IX mod: thermoelectric effect - when ice IX kills a mob heal 3% and regen 66% energy
************** TODO - n-gon ************** ************** TODO - n-gon **************
buff neutron bomb? all explosions based guns seem weak, buff damage?
less fire CD?
mod set a max speed cap based on distance from player while field is active
name: eddy current brake
who runs the code?
new bot
perfect diamagnetism
vacuum bomb applies status effect to mobs that makes blocks attracted to them vacuum bomb applies status effect to mobs that makes blocks attracted to them
@@ -35,7 +29,6 @@ add a flag to some bullets to indicate that mobs can't learn the player position
2. bullet is less than 4 seconds old 2. bullet is less than 4 seconds old
3. damage is nearby player or in line of sight of player 3. damage is nearby player or in line of sight of player
add some more computer / AI stuff to the level lore text add some more computer / AI stuff to the level lore text
mod - mines stun targets nearby when they explode mod - mines stun targets nearby when they explode
@@ -78,18 +71,6 @@ standing wave harmonics mod - push things away
or push away at the peak of an oscillation or push away at the peak of an oscillation
or always push or always push
hit scan bullets -> nails
new gun or field - fire 3+ balls in arc
name: something about energy
does damage in area, like neutron bomb
ends on contact with wall, doesn't stick or bounce
hold fire to charge: increases the size of the balls
mod: balls are attracted to mobs
rework perfect diamagnetism
let the shield also do bremsstrahlung radiation
map element - player rotates a rotor that makes a platform go up or down map element - player rotates a rotor that makes a platform go up or down
use mac automator to speed up your n-gon -> git sync use mac automator to speed up your n-gon -> git sync