training mode choice for new players

electronegativity: +26->23% damage

gun cancel button doesn't show up on the initial level if you haven't done the training yet and you didn't choose a gun
after exiting initial level players are prompted to start the training levels
  only if they haven't done the training and they didn't pick up a gun, and a few other conditions
community training levels only are added when community maps setting is on and player clicks on training

if you die after clearing fewer than 4 levels the difficulty settings automatically opens
improved text formatting on updates
This commit is contained in:
landgreen
2024-01-29 21:29:39 -08:00
parent 4e6acdd5d0
commit 778a2c93b6
8 changed files with 123 additions and 88 deletions

View File

@@ -683,6 +683,8 @@ const powerUps = {
return `<div></div>`
} else if (tech.isCancelTech) {
return `<div class='cancel-card' onclick='powerUps.endDraft("${type}",true)' style="width: 115px;">randomize</div>`
} else if (level.levelsCleared === 0 && localSettings.isTrainingNotAttempted) { //don't show cancel if on initial level and haven't done tutorial
return `<div class='cancel-card' style="visibility: hidden;"></div>`
} else {
return `<div class='cancel-card' onclick='powerUps.endDraft("${type}",true)' style="width: 85px;">cancel</div>`
}
@@ -739,10 +741,11 @@ const powerUps = {
text += `<span class='cancel-card' style="width: 95px;float: right;background-color: #aaa;color:#888;">cancel</span>`
} else if (tech.isCancelTech) {
text += `<span class='cancel-card' onclick='powerUps.endDraft("${type}",true)' style="width: 115px;float: right;font-size:0.9em;padding-top:5px">randomize</span>`
} else if (level.levelsCleared === 0 && localSettings.isTrainingNotAttempted) {
text += `<span class='cancel-card' style="visibility: hidden;">cancel</span>` //don't show cancel if on initial level and haven't done tutorial
} else {
text += `<span class='cancel-card' onclick='powerUps.endDraft("${type}",true)' style="width: 95px;float: right;">cancel</span>`
}
return text + "</div>"
},
buildColumns(totalChoices, type) {