Initial commit: unlock notification, new modals

This commit is contained in:
Sabe Jones 2013-12-22 08:32:39 -06:00
parent 4adb66cc4f
commit 60c622f1c1
4 changed files with 48 additions and 4 deletions

View file

@ -139,7 +139,10 @@ angular.module('guideServices', []).
}
});
$rootScope.$watch('user.flags.rebirthEnabled', function(after, before) {
if (alreadyShown(before, after)) return;
$rootScope.modals.rebirthEnabled = true;
});
/**

View file

@ -45,7 +45,8 @@ var UserSchema = new Schema({
veteran: Boolean,
snowball: Number,
streak: Number,
challenges: Array
challenges: Array,
rebirth: Array
},
auth: {
facebook: Schema.Types.Mixed,
@ -94,7 +95,8 @@ var UserSchema = new Schema({
partyEnabled: Boolean, // FIXME do we need this?
contributor: Boolean,
classSelected: {type: Boolean, 'default': false},
mathUpdates: Boolean
mathUpdates: Boolean,
rebirthEnabled: {type: Boolean, 'default': false}
},
history: {
exp: Array, // [{date: Date, value: Number}], // big peformance issues if these are defined

View file

@ -7,4 +7,5 @@ include ./buy-gems
include ./members
include ./settings
include ./pets
include ./classes
include ./classes
include ./rebirth

View file

@ -0,0 +1,38 @@
// Created by Sabe on 12/22/13.
div(modal='modals.rebirthEnabled')
.modal-header
h3 Rebirth: New Adventure Available!
.modal-body
p
span.
You've unlocked Rebirth! This special Market item allows you to begin a new game at level 1 while keeping your tasks, achievements, pets, and more. Use it to breathe new life into HabitRPG if you feel you've achieved it all, or to experience new features with the fresh eyes of a beginning character!
.modal-footer
button.btn.btn-default.cancel(ng-click='modals.rebirthEnabled = false') Close
div(modal='modals.rebirth')
.modal-header
h3 Rebirth: Begin a New Adventure
.modal-body
include ../gems
p.
Rebirth sets your game to a starting state, as if you'd created a new account, but keeps your most hard-earned or paid-for items intact. When you are reborn:
ul
li You become a Level 1 Warrior with full Health but no Experience. You may choose a new class at Level 10 as normal.
li You lose all Gold and all purchased equipment.
li Your tasks are reset to neutral (yellow color), but their history remains.
li Your Dailies' streaks are reset to 0.
li You keep your Achievements, your Gems, your backer and contributor tiers, and any purchased avatar customizations, such as hair styles.
li You keep whatever Challenges, Guilds, and Party you are a member of.
li You keep your Pets and Mounts, though you will not be able to access them until you unlock the Stable again.
li You earn an Achievement for beginning a new adventure!
p.
Consider using this feature if you would like to replay the early game with Habit's newest features, or if your motivation drops when you've attained all the best gear!
.modal-footer
button.btn.btn-large.cancel(ng-click='modals.rebirth = false') Never mind
span(ng-if='user.balance < 1')
a.btn.btn-success.btn-large(ng-click="modals.buyGems = true") Buy More Gems
span.gem-cost Not enough Gems
span(ng-if='user.balance >= 1', ng-controller='SettingsCtrl')
a.btn.btn-danger.btn-large(ng-click='rebirth()') Be Reborn
span.gem-cost 8 Gems