test(quests): Add user.ops.buyQuest test

Also adds the Bailey announcement for the day and implements "locked" quest scrolls for the beginning quests in extant quest chains.
This commit is contained in:
Sabe Jones 2015-07-14 17:34:01 -05:00
parent 5e0d754553
commit 6cad2df6a3
19 changed files with 1947 additions and 1864 deletions

File diff suppressed because one or more lines are too long

View file

@ -4942,3 +4942,15 @@
width: 60px;
height: 60px;
}
.hair_base_7_purple {
background-image: url(spritesmith1.png);
background-position: -1820px -1092px;
width: 90px;
height: 90px;
}
.customize-option.hair_base_7_purple {
background-image: url(spritesmith1.png);
background-position: -1845px -1107px;
width: 60px;
height: 60px;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

File diff suppressed because it is too large Load diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 KiB

After

Width:  |  Height:  |  Size: 109 KiB

File diff suppressed because it is too large Load diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 88 KiB

File diff suppressed because it is too large Load diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 554 KiB

After

Width:  |  Height:  |  Size: 554 KiB

File diff suppressed because it is too large Load diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 233 KiB

After

Width:  |  Height:  |  Size: 234 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

View file

@ -15,6 +15,7 @@
"buyGems": "Buy Gems",
"justin": "Justin",
"ian": "Ian",
"ianText": "Welcome to the Quest Shop! Here you can use Quest Scrolls to battle monsters with your friends. Be sure to check out our fine array of Quest Scrolls for purchase on the right!",
"USD": "USD",
"newStuff": "New Stuff",
"cool": "Tell Me Later",

View file

@ -25,6 +25,7 @@ newUser = (addTasks=true)->
equipped: {}
costume: {}
owned: {}
quests: {}
party:
quest:
progress:
@ -386,13 +387,41 @@ describe 'User', ->
expect(user.items.gear.equipped).to.eql { armor: 'armor_warrior_1', weapon: 'weapon_base_0', head: 'head_base_0', shield: 'shield_base_0' }
expect(user).toHaveGP 1
it 'do not buy equipment without enough money', ->
it 'does not buy equipment without enough Gold', ->
user = newUser()
user.stats.gp = 1
user.ops.buy {params: {key: 'armor_warrior_1'}}
expect(user.items.gear.equipped).to.eql { armor: 'armor_base_0', weapon: 'weapon_base_0', head: 'head_base_0', shield: 'shield_base_0' }
expect(user).toHaveGP 1
it 'buys a Quest scroll', ->
user = newUser()
user.stats.gp = 205
user.ops.buyQuest {params: {key: 'dilatoryDistress1'}}
expect(user.items.quests).to.eql {dilatoryDistress: 1}
expect(user).toHaveGP 5
it 'does not buy Quests without enough Gold', ->
user = newUser()
user.stats.gp = 1
user.ops.buyQuest {params: {key: 'dilatoryDistress1'}}
expect(user.items.quests).to.eql {}
expect(user).toHaveGP 1
it 'does not buy nonexistent Quests', ->
user = newUser()
user.stats.gp = 9999
user.ops.buyQuest {params: {key: 'snarfblatter'}}
expect(user.items.quests).to.eql {}
expect(user).toHaveGP 9999
it 'does not buy Gem-premium Quests', ->
user = newUser()
user.stats.gp = 9999
user.ops.buyQuest {params: {key: 'kraken'}}
expect(user.items.quests).to.eql {}
expect(user).toHaveGP 9999
describe 'Gem purchases', ->
it 'does not purchase items without enough Gems', ->
user = newUser()

View file

@ -7,7 +7,7 @@
.arrow
h3.popover-title=env.t('ian')
.popover-content
p.muted!=env.t('scrollsText1') + ' <a href="/#/options/groups/party">' + env.t('scrollsText2') + '</a>.'
p=env.t('ianText')
.row
- var questCategories = {'unlockable':'unlockableQuests','pet':'petQuests','gold':'goldQuests'}
.col-md-6

View file

@ -1,27 +1,56 @@
h5 7/9/2015 - DERBY DAY! FREE ORCA MOUNT AND WHALE QUEST
h5 7/14/2015 - GOLD-PURCHASABLE QUESTS, NEW EQUIPMENT IN THE ENCHANTED ARMOIRE, AND TRIVIAL TASK DIFFICULTY SETTING!
hr
tr
td
h5 Derby Day!
p On this day, Habitica defeated the worst of its ancient bugs! We celebrate with the Dilatory Derby, which means that Habiticans get aquatic mounts to ride!
.promo_dilatoryDistress.pull-right
h5 Gold-Purchasable Quest Line: Dilatory Distress
p We've moved the quests to <a href='/#/options/inventory/quests'>their own separate page</a>, and added a new category: GOLD PURCHASABLE QUESTS!
br
p Now you can use Gold to purchase the Dilatory Distress Quest Line! King Manta's daughter has disappeared, and monsters are laying siege to the underwater city of Dilatory. Can you intervene to save them all? If so, you'll earn the exclusive Oceanic Armor Set.
br
p As time goes on, we'll be adding more gold-purchasable quests. Dilatory Distress is not a limited-edition quest line, so you have plenty of time to save up!
p.small.muted by SabreCat and Lemoness
p.small.muted Writing by liorsamuel
p.small.muted Art by Kiwibot, aiseant, starsystemic, hazel40, and benga
tr
td
.promo_orca.pull-right
h5 Free Orca Mount
p Everyone has received a rare Orca Mount in honor of the Dilatory Derby! Now you can race through the waves on the back of your Orca, which is found under <a href='/#/options/inventory/mounts'>Mounts</a>.
p.small.muted by Uncommon Criminal
.promo_enchanted_armoire_201507.pull-right
h5 New Equipment in the Enchanted Armoire
p There is new equipment in Enchanted Armoire, a 100 GP Reward in the Rewards Column which unlocks after you've attained Ultimate Gear!
br
p Click on the Enchanted Armoire for a random chance at special Equipment, including the Rancher Robes, Rancher Lasso, Blue Hairbow, and Royal Crown! It may also give you random XP or food items. We'll be adding new equipment to it during the first week of each month, but even when you've exhausted the current supply, you can keep clicking for a chance at food and XP.
br
p Now go spend all that accumulated gold! May the Random Number Generator smile upon you...
p.small.muted by Lemoness and SabreCat
p.small.muted Art by podcod, Kiwibot, and Megan
tr
td
.quest_whale.pull-right
h5 New Pet Quest: Whales!
p Want more whales? Check out the The Wail of the Whale, a new pet quest in the <a href='/#/options/inventory/drops'>Market</a>! On your way to the Dilatory Derby, you encounter a whale in distress. Can you calm her down? If so, you may gain some whale eggs...
p.small.muted Art by krazjega, zoebeagle, and Uncommon Criminal
p.small.muted Writing by Calae
h5 Trivial Task Difficulty
p There's a new difficulty for Tasks available under task edit: Trivial! Trivial tasks reward you or damage you at the rate of one tenth of the amount that Easy tasks would. Likewise, Trivial tasks cause much less damage during boss battles!
p.small.muted by efim
hr
a(href='/static/old-news', target='_blank') Read older news
mixin oldNews
h5 7/9/2015 - DERBY DAY! FREE ORCA MOUNT AND WHALE QUEST
tr
td
h5 Derby Day!
p On this day, Habitica defeated the worst of its ancient bugs! We celebrate with the Dilatory Derby, which means that Habiticans get aquatic mounts to ride!
tr
td
.promo_orca.pull-right
h5 Free Orca Mount
p Everyone has received a rare Orca Mount in honor of the Dilatory Derby! Now you can race through the waves on the back of your Orca, which is found under <a href='/#/options/inventory/mounts'>Mounts</a>.
p.small.muted by Uncommon Criminal
tr
td
.quest_whale.pull-right
h5 New Pet Quest: Whales!
p Want more whales? Check out the The Wail of the Whale, a new pet quest in the <a href='/#/options/inventory/drops'>Market</a>! On your way to the Dilatory Derby, you encounter a whale in distress. Can you calm her down? If so, you may gain some whale eggs...
p.small.muted Art by krazjega, zoebeagle, and Uncommon Criminal
p.small.muted Writing by Calae
h5 7/7/2015 - NEW iOS APP: HABITICA!
tr
td