Commit febf18fe authored by 18손재민's avatar 18손재민

반격시간이 infinity가 되는 문제 수정

parent 1da990cf
......@@ -139,8 +139,8 @@ class AttackWord extends WordObject
this.wordWeight += this.wordWeight * 0.2 * (WordReader.getWordTyping(_playerData.nickname) - 9);
this.wordWeight *= isStrong ? 3 : 2;
this.attacker = _playerData;
this.counterTime = WordSpace.gameTimer.now + 1000 * (this.wordTyping <= (5 - _wordGrade) * 2.5 ? this.wordTyping / (WordSpace.playerTyping / 60) * 1.5 :
((5 - _wordGrade) * 2.5 + (this.wordTyping - (5 - _wordGrade) * 2.5) * 2.5) / (WordSpace.playerTyping / 60) * 1.5);
this.counterTime = WordSpace.gameTimer.now + 1000 * (this.wordTyping <= (5 - _wordGrade) * 2.5 ? this.wordTyping / (Math.max(200, WordSpace.playerTyping) / 60) * 1.5 :
((5 - _wordGrade) * 2.5 + (this.wordTyping - (5 - _wordGrade) * 2.5) * 2.5) / (Math.max(200, WordSpace.playerTyping) / 60) * 1.5);
console.log('Attack text : ' + text + ', Attacker : ' + this.attacker.nickname + ', Weight : ' + this.wordWeight);
console.log('Counter time : ' + this.counterTime);
}
......@@ -157,8 +157,6 @@ class AttackWord extends WordObject
if(WordSpace.gameTimer.now < this.counterTime)
{
WordSpace.nameGroup.push(new NameWord(this.attacker, true));
WordSpace.generateWord.Name(WordSpace.gameSceneForTest, false);
WordSpace.generateWord.Name(WordSpace.gameSceneForTest, false);
}
//강호패 넣기 구현해야됨
//WordSpace.generateWord.Name(WordSpace.gameSceneForTest, true);
......
......@@ -433,8 +433,8 @@ WordSpace.nameQueue =
tempQueue[tempLength - 1] = tempQueue[tempIdx];
tempQueue[tempIdx] = tempElement;
}
tempQueue.forEach(function(element){
//console.log(element.id + ' ' + PlayerData.idNum);
tempQueue.forEach(function(element)
{
if(element.id != PlayerData.idNum && element.isAlive)
WordSpace.nameQueue.queue.push(element);
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment