b2b & combo properties
This commit is contained in:
		
							
								
								
									
										20
									
								
								app.js
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								app.js
									
									
									
									
									
								
							| @ -591,6 +591,24 @@ class Stats { | |||||||
|         return this._goal |         return this._goal | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     set combo(combo) { | ||||||
|  |         this._combo = combo | ||||||
|  |         if (combo > this.maxCombo) this.maxCombo = combo | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     get combo() { | ||||||
|  |         return this._combo | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     set b2b(b2b) { | ||||||
|  |         this._b2b = b2b | ||||||
|  |         if (b2b > this.maxB2B) this.maxB2B = b2b | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     get b2b() { | ||||||
|  |         return this._b2b | ||||||
|  |     } | ||||||
|  |  | ||||||
|     set time(time) { |     set time(time) { | ||||||
|         this.startTime = new Date() - time |         this.startTime = new Date() - time | ||||||
|         ticktack() |         ticktack() | ||||||
| @ -628,7 +646,6 @@ class Stats { | |||||||
|         // Combo |         // Combo | ||||||
|         if (nbClearedLines) { |         if (nbClearedLines) { | ||||||
|             this.combo++ |             this.combo++ | ||||||
|             if (this.combo > this.maxCombo) this.maxCombo = this.combo |  | ||||||
|             if (this.combo >= 1) { |             if (this.combo >= 1) { | ||||||
|                 let comboScore = (nbClearedLines == 1 ? 20 : 50) * this.combo * this.level |                 let comboScore = (nbClearedLines == 1 ? 20 : 50) * this.combo * this.level | ||||||
|                 if (this.combo == 1) { |                 if (this.combo == 1) { | ||||||
| @ -653,7 +670,6 @@ class Stats { | |||||||
|         // Back to back sequence |         // Back to back sequence | ||||||
|         if ((nbClearedLines == 4) || (tSpin && nbClearedLines)) { |         if ((nbClearedLines == 4) || (tSpin && nbClearedLines)) { | ||||||
|             this.b2b++ |             this.b2b++ | ||||||
|             if (this.b2b > this.maxB2B) this.maxB2B = this.b2b |  | ||||||
|             if (this.b2b >= 1) { |             if (this.b2b >= 1) { | ||||||
|                 let b2bScore = patternScore / 2 |                 let b2bScore = patternScore / 2 | ||||||
|                 if (this.b2b == 1) { |                 if (this.b2b == 1) { | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user