crystallizer

random tech spawn chance now scales with levels clear (zero chance after level 10)
  (it used to scale with total tech acquired, but you probably will not even notice this change)

tech: crystallizer - mods produce ice-IX crystals when they die

tech pulse and tech slow light now work together for laser beam,
 (I think it is pretty dangerous to try them together though)
This commit is contained in:
landgreen
2021-05-08 07:35:25 -07:00
parent 59b124392c
commit ce169ba860
8 changed files with 104 additions and 65 deletions

View File

@@ -115,7 +115,9 @@ const powerUps = {
if (tech.isDeathAvoid && document.getElementById("tech-anthropic")) {
document.getElementById("tech-anthropic").innerHTML = `-${powerUps.research.count}`
}
if (tech.renormalization && Math.random() < 0.37 && amount < 0) powerUps.spawn(m.pos.x, m.pos.y, "research");
if (tech.renormalization && Math.random() < 0.37 && amount < 0) {
for (let i = 0, len = -amount; i < len; i++) powerUps.spawn(m.pos.x, m.pos.y, "research");
}
if (tech.isRerollHaste) {
if (powerUps.research.count === 0) {
tech.researchHaste = 0.66;
@@ -532,7 +534,8 @@ const powerUps = {
powerUps.spawn(x, y, "gun");
return;
}
if (Math.random() < 0.0027 * (22 - tech.totalCount)) { //a new tech has a low chance for each not acquired tech up to 25
// if (Math.random() < 0.0027 * (22 - tech.totalCount)) { //a new tech has a low chance for each not acquired tech up to 25
if (Math.random() < 0.005 * (10 - level.levelsCleared)) { //a new tech has a low chance that decreases in later levels
powerUps.spawn(x, y, "tech");
return;
}