Commit graph

41 commits

Author SHA1 Message Date
Nick Winter
98b0bcfc75 Fixed playback victory message for spectate mode. Spectate mode now opens in new tabs. 2015-09-03 15:05:10 -07:00
Nick Winter
df60ecd09c Added multiplayer win/loss notice at end of level. 2015-09-03 13:32:20 -07:00
Nick Winter
da72991260 A few misc tweaks for the new desert level options. 2014-12-17 12:42:42 -08:00
Scott Erickson
31214e854e Wabam. Refactored a bunch of stuff into 'core' folders so that it's clearer which files are being loaded first thing, and which are not. Also reworked a bunch of the anymatch things in config.coffee, cause there were better ways. 2014-11-28 17:49:41 -08:00
Scott Erickson
ba79d59190 Fixed a couple errors in the tests. 2014-10-21 11:54:03 -07:00
Nick Winter
a33bb215d4 Fixed checking compile-time problems for clean code goals. 2014-10-20 17:49:52 -07:00
Nick Winter
d0b878db37 Implemented lines-of-code goal type. 2014-10-20 14:43:18 -07:00
Nick Winter
ec3e1d0bce Added optional goals. Working on lines-of-code goal. Fixed bugs with HeroVictoryModal not firing. 2014-10-20 13:57:32 -07:00
Nick Winter
1219710cbb Starting to work on codeProblems goal type. Rearranged script import for publishing notes earlier. Fallback for Math.log10. 2014-10-20 09:41:28 -07:00
Nick Winter
0a29a374e1 Changed the way numbering works on collect goals. 2014-09-15 17:01:34 -07:00
Nick Winter
925588dfc2 Extended team-based goal completion to collection and leaving sides goal types. 2014-09-15 16:49:08 -07:00
Tery Lim
618ade4946 Clean up mixed quotes 2014-07-01 12:23:22 +08:00
Scott Erickson
681adc1dcd Got rid of a log. 2014-05-22 13:37:08 -07:00
Nick Winter
022722a19f Fixed cosmetic GoalManager destruction error. 2014-05-20 09:19:31 -07:00
Scott Erickson
b816055f9e Fixed goal states to handle teams. 2014-05-19 21:55:30 -07:00
Scott Erickson
9ad4602e0f Fixed a bug with the new goal view. 2014-05-19 20:11:33 -07:00
Scott Erickson
62ad8dd26a Added a status message to the goals view. 2014-05-19 16:36:45 -07:00
gosnat
25287e0298 Update GoalManager.coffee
add getGoalState
2014-05-13 12:41:39 -05:00
Nick Winter
1a5e30d5b5 Dynamic Canvas sizing. 2014-05-12 13:28:46 -07:00
Nick Winter
09c8a99a9b Merge branch 'patch-5' of git://github.com/gosnat/codecombat into gosnat-patch-5 2014-05-06 07:23:51 -07:00
Nick Winter
acccee33a3 Cleaner conditional init syntax. 2014-05-06 07:22:09 -07:00
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
93d117100a Update GoalManager.coffee
For compound goals like GetAllToLocation, you should continue adding to the existing list of thang states.
2014-05-05 13:22:57 -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
Nick Winter
3325c55c3f Fixed #759. 2014-04-08 14:58:34 -07:00
Nick Winter
cb27124285 Fixed #135. 2014-03-30 17:24:07 -07:00
Nick Winter
e08265a725 Merge pull request #730 from Darredevil/master
Added setGoalState
2014-03-29 14:04:33 -07:00
Darredevil
e060d4b73d Added setGoalState 2014-03-29 03:52:02 +02:00
Scott Erickson
37a9b7f319 Switching from the slow _.cloneDeep to the fast $.extend 2014-03-18 13:08:26 -07:00
Darredevil
012c25a817 Added GetALLToLocations and KeepALLFromLocations 2014-03-12 01:57:30 +02:00
Darredevil
c9a56048ca Update GoalManager.coffee 2014-03-09 20:35:33 +02:00
Scott Erickson
6b2e0bc364 Changed how the goal manager handles arriving at goals and figuring out the how many requirement. 2014-02-20 11:43:35 -08:00
Scott Erickson
b8051689b3 Fixed the goal manager from polluting the goals in the level with the isPositive property. 2014-02-13 15:50:53 -08:00
Scott Erickson
23964abee9 Set up the goal manager to only use goals from the level.goals property, rather than from scripts. 2014-02-13 09:26:42 -08:00
Scott Erickson
8176e2258f Set up the goal manager to use goals from the new level goals property, rather than from scripts. Backward-compatible for now. 2014-02-12 16:20:25 -08:00
Michael Schmatz
1a2fa68473 Merge branch 'feature/task-queue'
Conflicts:
	app/views/play/level/tome/spell.coffee
2014-02-11 15:58:38 -08:00
Michael Schmatz
b29ab56fe2 Fixed simulation goals 2014-02-11 15:26:57 -08:00
Scott Erickson
47eeda5af4 More memory fixes. 2014-02-11 12:54:08 -08:00
Scott Erickson
7ddb97fa22 More memory fixes. 2014-02-11 12:32:12 -08:00
Nick Winter
6af2d34f59 Fixed a ton of memory leaks, but not all of them. 2014-02-06 14:00:27 -08:00
Nick Winter
6009df26de Ready for action, sir! 2014-01-03 10:32:13 -08:00