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

반격 시 강호패 바로 집어넣기 wip

parent 735c481b
var GameServer = GameServer || {}; var GameServer = GameServer || {};
GameServer.Phase = {READY: 0, START: 1, MAIN: 2, MUSIC: 3}; GameServer.Phase = {READY: 0, START: 1, MAIN: 2, MUSIC: 3};
GameServer.startCount = 3; GameServer.startCount = 2;
GameServer.currentPlayer = []; GameServer.currentPlayer = [];
GameServer.playingRoom = []; GameServer.playingRoom = [];
......
...@@ -117,6 +117,7 @@ class AttackWord extends WordObject ...@@ -117,6 +117,7 @@ class AttackWord extends WordObject
constructor(text, _wordGrade, _playerData, isStrong) constructor(text, _wordGrade, _playerData, isStrong)
{ {
super(text); super(text);
console.log(_playerData);
this.wordGrade = _wordGrade; this.wordGrade = _wordGrade;
this.wordWeight = WordReader.getWordWeight(this.wordGrade); this.wordWeight = WordReader.getWordWeight(this.wordGrade);
if(WordReader.getWordTyping(_playerData.nickname) <= 9) if(WordReader.getWordTyping(_playerData.nickname) <= 9)
...@@ -126,6 +127,7 @@ class AttackWord extends WordObject ...@@ -126,6 +127,7 @@ class AttackWord extends WordObject
//서버 사용하게 되면 PlayerTyping을 피격자의 것으로 바꿔야 함 //서버 사용하게 되면 PlayerTyping을 피격자의 것으로 바꿔야 함
this.counterTime = WordSpace.gameTimer.now + 1000 * (this.wordTyping <= (5 - _wordGrade) * 2.5 ? this.wordTyping * (WordSpace.playerTyping / 60) * 2 : this.counterTime = WordSpace.gameTimer.now + 1000 * (this.wordTyping <= (5 - _wordGrade) * 2.5 ? this.wordTyping * (WordSpace.playerTyping / 60) * 2 :
((5 - _wordGrade) * 2.5 + (this.wordTyping - (5 - _wordGrade) * 2.5) * 3) * (WordSpace.playerTyping / 60) * 2); ((5 - _wordGrade) * 2.5 + (this.wordTyping - (5 - _wordGrade) * 2.5) * 3) * (WordSpace.playerTyping / 60) * 2);
this.counterTime = 10000;
console.log('Attack text : ' + text + ', Attacker : ' + this.attacker.nickname + ', Weight : ' + this.wordWeight); console.log('Attack text : ' + text + ', Attacker : ' + this.attacker.nickname + ', Weight : ' + this.wordWeight);
console.log('Counter time : ' + this.counterTime); console.log('Counter time : ' + this.counterTime);
} }
...@@ -139,7 +141,9 @@ class AttackWord extends WordObject ...@@ -139,7 +141,9 @@ class AttackWord extends WordObject
case 3: WordSpace.attackGauge.add(0.5); break; case 3: WordSpace.attackGauge.add(0.5); break;
default: console.log('[ERR] wrong grade of word'); break; default: console.log('[ERR] wrong grade of word'); break;
} }
if(WordSpace.gameTimer.now < this.counterTime) WordSpace.generateWord.Name(WordSpace.gameSceneForTest, true); if(WordSpace.gameTimer.now < this.counterTime) WordSpace.nameGroup.push(new NameWord(this.attacker, true));
//강호패 넣기 구현해야됨
//WordSpace.generateWord.Name(WordSpace.gameSceneForTest, true);
super.destroy(); super.destroy();
} }
} }
......
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