Commit graph

527 commits

Author SHA1 Message Date
gosnat
939509849c Update GoalManager.coffee
Justification:

For a negative goal like saveThangs, let's say you have 5 thangs on the save list.  As things stand, if you don't have a HowMany defined, then the number of needed deaths to fail is 

numNeeded = _.size(stateThangs) - Math.min((goal.howMany ? 1), _.size stateThangs) + 1
numNeeded = 5 - Math.min(1, 5) + 1
numNeeded = 5

So you would only fail the goal if all 5 thangs you were supposed to save died.  This is contrary to the comment right above this line:

# saveThangs: by default we would want to save all the Thangs, which means that we would want none of them to be "done"

Therefore, I think it should be Math.max rather than Math.min.

numNeeded = _.size(stateThangs) - Math.max((goal.howMany ? 1), _.size stateThangs) + 1
numNeeded = 5 - Math.max(1, 5) + 1
numNeeded = 1

So any of the Thangs on the save list dying is enough to fail the goal.

As a double check, what if the level designer designated a HowMany of 5?

numNeeded = _.size(stateThangs) - Math.max((goal.howMany ? 1), _.size stateThangs) + 1
numNeeded = 5 - Math.max(5, 5) + 1
numNeeded = 1

So this is consistent.
2014-05-05 14:08:41 -05:00
gosnat
39b21da035 Update GoalManager.coffee
I'd like to temporarily turn on console logging (lines 240 and 245) to take a peek at why numNeeded doesn't seem to be correct if howMany isn't defined.
2014-05-03 21:36:24 -05:00
Scott Erickson
26cafd2f19 Fixed #941. Actually it was no longer crashing probably because of the fix for #934, but there were still other bugs. Fixed it, and other bugs like it, particularly in the spectate view. Cleaned up a bit, too. 2014-05-01 16:38:27 -07:00
Scott Erickson
3bc0c1710e Merge branch 'master' of https://github.com/codecombat/codecombat 2014-05-01 15:45:00 -07:00
Scott Erickson
31c5890288 Fixed #934 2014-05-01 15:44:50 -07:00
Nick Winter
0f33bae1f1 Hid level done button better. Avoiding building wizard sprite when not needed. 2014-05-01 14:36:26 -07:00
Nick Winter
5376a42f94 Fixed serialization of tracked property arrays. 2014-05-01 13:23:14 -07:00
Nick Winter
f7bdb7e840 Upgrades for teleportation imnterpolation performance, ACE search box styling. 2014-05-01 10:44:17 -07:00
Nick Winter
541a2756fd Simulate properly even if Simulator Supermodel starts fully loaded. 2014-04-29 16:54:57 -07:00
Nick Winter
2f174691c5 Fixed #939. 2014-04-29 16:44:38 -07:00
Nick Winter
04d74fb76f Fixed bug with scale not updating properly when paused. 2014-04-29 16:04:30 -07:00
Nick Winter
bea0589fad Fixed #935. 2014-04-29 15:31:18 -07:00
Nick Winter
369ea8a00f Merge branch 'master' of https://github.com/codecombat/codecombat 2014-04-28 19:09:04 -07:00
Nick Winter
aea49cc27f Fixed bobbing. 2014-04-28 18:36:46 -07:00
Scott Erickson
bcad939eae Merge branch 'master' of https://github.com/codecombat/codecombat 2014-04-28 18:31:04 -07:00
Scott Erickson
57beb94b5c Fixed a bug with the levelloader loading articles. 2014-04-28 18:30:47 -07:00
Nick Winter
b954e70d85 Let's try 30 FPS. Fixed Surface destruction bug. 2014-04-28 17:06:43 -07:00
Nick Winter
0b947dbeee Let's try 30 FPS for a while now. 2014-04-28 16:41:18 -07:00
Nick Winter
bd3c059c2a Several performance improvements based on profiling. 2014-04-28 16:31:51 -07:00
Scott Erickson
01f2a556f9 Set up the patches view with the new loading system, fixing a few things in the meanwhile. 2014-04-28 11:09:21 -07:00
Scott Erickson
17a0bf54c6 Merge branch 'master' into feature/loading-views 2014-04-28 10:10:57 -07:00
Nick Winter
fc6ad1dd01 Properly tracking first-frame team gold. Slightly more visible team gold on hover. 2014-04-27 20:11:11 -07:00
Nick Winter
a7179ae3b2 Fixed some more gold view stuff. 2014-04-27 15:33:16 -07:00
Nick Winter
fa0e7f04f7 Fixed a thing. 2014-04-26 14:21:26 -07:00
Scott Erickson
fed5d681f2 Merge branch 'master' into feature/loading-views 2014-04-26 12:54:37 -07:00
Scott Erickson
d5bcec5ad0 Fixed the level editor with the new loading system. 2014-04-25 19:11:32 -07:00
Nick Winter
834c27bbd7 Show spell palette for Thangs with apiProperties that aren't programmable. 2014-04-25 16:57:42 -07:00
Scott Erickson
14d62915f4 Got projection and backups set back up, partially fixed the level editor. 2014-04-25 16:14:05 -07:00
Nick Winter
d8d2a57c38 Listed a few new levels. 2014-04-25 15:00:46 -07:00
Scott Erickson
7640a6365b Removed some logs. 2014-04-25 14:59:17 -07:00
Scott Erickson
3dc3f62473 Merge branch 'master' into feature/loading-views
Conflicts:
	app/views/editor/components/main.coffee
2014-04-25 14:31:58 -07:00
Scott Erickson
278d6752c3 Refactored SuperModel, CocoModel and LevelLoader.
Removed the dynamic population of the Level, instead putting straightforward logic into LevelLoader.
Simplified SuperModel.
2014-04-25 14:30:06 -07:00
Nick Winter
183fe9c496 Code review of 97d3b6. 2014-04-25 10:46:43 -07:00
Michael Schmatz
97d3b6107d Merge feature/linkedin into master 2014-04-25 08:47:31 -07:00
Michael Schmatz
0dbcc861bf Various tweaks to employer signup 2014-04-25 07:48:59 -07:00
Michael Schmatz
4f6f845c2d Employer signup works 2014-04-24 17:36:07 -07:00
Michael Schmatz
6644c6a9ee Push for george 2014-04-24 15:27:37 -07:00
Nick Winter
2a2ddd068e Separate isSelectable from inThangList. Mouse wheel all the way in/out. bountyGold shows up as gold. Moved say Labels to mouth offset from aboveHead offset and obey sprite rotation. Don't link projects to example.com. 2014-04-24 14:23:15 -07:00
Michael Schmatz
628a784ac4 Progress towards LinkedIn integration 2014-04-23 11:25:36 -07:00
Nick Winter
d4cf31c8fe Improved admin view of pending candidates. 2014-04-23 10:21:58 -07:00
Scott Erickson
c85971e5e6 Added i18n population action to the level editor. 2014-04-22 17:56:41 -07:00
Scott Erickson
e8da248302 Made the level editor not break when using units that are incomplete. 2014-04-22 10:39:15 -07:00
Ting-Kuan
974e5e1b24 remove debugging msg. 2014-04-19 13:09:50 -04:00
Ting-Kuan
692693c181 Merge branch 'master' into feature/loading-views
Conflicts:
	app/locale/en.coffee
	app/views/editor/level/edit.coffee
	app/views/kinds/CocoView.coffee
	app/views/play/ladder/ladder_tab.coffee
	app/views/play/ladder_view.coffee
	app/views/play/level/level_loading_view.coffee
2014-04-19 01:15:04 -04:00
dpen2000
75b759b1dc Add system names into delta messages 2014-04-18 17:25:25 -04:00
dpen2000
b20f8fd260 Refactor getNameById to use mongo db's $in instead of parallel and use a new generic method in Handler.coffee 2014-04-18 21:06:57 +01:00
Ting-Kuan
1c1cf2f189 Fix loading of Level. 2014-04-17 19:23:35 -04:00
Ting-Kuan
360e594f3d Merge branch 'feature/loading-views' of https://github.com/codecombat/codecombat into feature/loading-views
Conflicts:
	server/commons/Handler.coffee
2014-04-17 12:58:29 -04:00
Scott Erickson
9ed876d12a Some bug fixes to get Anya import to work. 2014-04-16 09:25:34 -07:00
Scott Erickson
bf7117d1c6 Merge pull request #854 from dpen2000/ShadowsIssue
Fix #736 Invisible thangs still have shadows
2014-04-16 08:38:59 -07:00