| @@ -269,7 +269,7 @@ namespace Constants | |||||
| struct ShowTime | struct ShowTime | ||||
| { | { | ||||
| SCCI int skillCD = commonSkillCD * 3; | |||||
| SCCI int skillCD = commonSkillCD * 8 / 3; | |||||
| SCCI int durationTime = commonSkillTime * 1; | SCCI int durationTime = commonSkillTime * 1; | ||||
| }; | }; | ||||
| @@ -270,7 +270,7 @@ class Howl: | |||||
| class ShowTime: | class ShowTime: | ||||
| skillCD = (int)(3.0 * Constants.commonSkillCD) | |||||
| skillCD = (int)(8 * Constants.commonSkillCD/3) | |||||
| durationTime = (int)(1.0 * Constants.commonSkillTime) | durationTime = (int)(1.0 * Constants.commonSkillTime) | ||||
| @@ -584,7 +584,7 @@ namespace GameClass.GameObj | |||||
| this.Vampire = this.OriVampire; | this.Vampire = this.OriVampire; | ||||
| } | } | ||||
| }*/ | }*/ | ||||
| public void Die(PlayerStateType playerStateType) | |||||
| public void RemoveFromGame(PlayerStateType playerStateType) | |||||
| { | { | ||||
| lock (gameObjLock) | lock (gameObjLock) | ||||
| { | { | ||||
| @@ -1,5 +1,5 @@ | |||||
| # 规则 | # 规则 | ||||
| V4.4 | |||||
| V4.5 | |||||
| - [规则](#规则) | - [规则](#规则) | ||||
| - [简则](#简则) | - [简则](#简则) | ||||
| - [地图](#地图) | - [地图](#地图) | ||||
| @@ -43,6 +43,14 @@ namespace Gaming | |||||
| return true; | return true; | ||||
| } | } | ||||
| public bool MovePlayerWhenStunned(Character playerToMove, int moveTimeInMilliseconds, double moveDirection) | |||||
| { | |||||
| if (!playerToMove.Commandable() && playerToMove.PlayerState != PlayerStateType.Stunned) return false; | |||||
| characterManager.SetPlayerState(playerToMove, PlayerStateType.Stunned); | |||||
| moveEngine.MoveObj(playerToMove, moveTimeInMilliseconds, moveDirection); | |||||
| return true; | |||||
| } | |||||
| public bool Stop(Character player) | public bool Stop(Character player) | ||||
| { | { | ||||
| if (player.Commandable() || !TryToStop()) | if (player.Commandable() || !TryToStop()) | ||||
| @@ -129,7 +137,7 @@ namespace Gaming | |||||
| { | { | ||||
| player.AddScore(GameData.StudentScoreEscape); | player.AddScore(GameData.StudentScoreEscape); | ||||
| ++gameMap.NumOfEscapedStudent; | ++gameMap.NumOfEscapedStudent; | ||||
| player.Die(PlayerStateType.Escaped); | |||||
| player.RemoveFromGame(PlayerStateType.Escaped); | |||||
| return true; | return true; | ||||
| } | } | ||||
| else | else | ||||
| @@ -139,7 +147,7 @@ namespace Gaming | |||||
| { | { | ||||
| player.AddScore(GameData.StudentScoreEscape); | player.AddScore(GameData.StudentScoreEscape); | ||||
| ++gameMap.NumOfEscapedStudent; | ++gameMap.NumOfEscapedStudent; | ||||
| player.Die(PlayerStateType.Escaped); | |||||
| player.RemoveFromGame(PlayerStateType.Escaped); | |||||
| return true; | return true; | ||||
| } | } | ||||
| return false; | return false; | ||||
| @@ -378,12 +378,12 @@ namespace Gaming | |||||
| return true; | return true; | ||||
| } | } | ||||
| private void Die(Character player) | |||||
| public void Die(Student player) | |||||
| { | { | ||||
| #if DEBUG | #if DEBUG | ||||
| Debugger.Output(player, "die."); | Debugger.Output(player, "die."); | ||||
| #endif | #endif | ||||
| player.Die(PlayerStateType.Deceased); | |||||
| player.RemoveFromGame(PlayerStateType.Deceased); | |||||
| for (int i = 0; i < GameData.maxNumOfPropInPropInventory; i++) | for (int i = 0; i < GameData.maxNumOfPropInPropInventory; i++) | ||||
| { | { | ||||
| @@ -49,8 +49,25 @@ namespace Gaming | |||||
| { | { | ||||
| foreach (Character person in gameMap.GameObjDict[GameObjType.Character]) | foreach (Character person in gameMap.GameObjDict[GameObjType.Character]) | ||||
| { | { | ||||
| if (!person.IsGhost()) | |||||
| actionManager.MovePlayer(person, GameData.frameDuration, (player.Position - person.Position).Angle()); | |||||
| if (!person.IsGhost() && player.CharacterType != CharacterType.Robot && !person.NoHp()) | |||||
| { | |||||
| double dis = XY.Distance(person.Position, player.Position); | |||||
| if (dis >= player.AlertnessRadius) | |||||
| { | |||||
| person.AddMoveSpeed(GameData.checkIntervalWhenShowTime, dis / player.AlertnessRadius); | |||||
| actionManager.MovePlayerWhenStunned(person, GameData.checkIntervalWhenShowTime, (player.Position - person.Position).Angle()); | |||||
| } | |||||
| else if (dis >= player.ViewRange) | |||||
| { | |||||
| Student student = (Student)person; | |||||
| student.GamingAddiction += GameData.checkIntervalWhenShowTime; | |||||
| if (student.GamingAddiction == student.MaxGamingAddiction) | |||||
| { | |||||
| player.AddScore(GameData.TrickerScoreStudentDie); | |||||
| characterManager.Die(student); | |||||
| } | |||||
| } | |||||
| } | |||||
| } | } | ||||
| } | } | ||||
| finally | finally | ||||
| @@ -58,7 +75,7 @@ namespace Gaming | |||||
| gameMap.GameObjLockDict[GameObjType.Character].ExitReadLock(); | gameMap.GameObjLockDict[GameObjType.Character].ExitReadLock(); | ||||
| } | } | ||||
| }, | }, | ||||
| timeInterval: GameData.frameDuration, | |||||
| timeInterval: GameData.checkIntervalWhenShowTime, | |||||
| finallyReturn: () => 0 | finallyReturn: () => 0 | ||||
| ) | ) | ||||
| @@ -167,7 +184,7 @@ namespace Gaming | |||||
| { | { | ||||
| foreach (Character character in gameMap.GameObjDict[GameObjType.Character]) | foreach (Character character in gameMap.GameObjDict[GameObjType.Character]) | ||||
| { | { | ||||
| if (!character.IsGhost() && XY.Distance(character.Position, player.Position) <= player.ViewRange) | |||||
| if (!character.IsGhost() && !character.NoHp() && XY.Distance(character.Position, player.Position) <= player.ViewRange) | |||||
| { | { | ||||
| if (characterManager.BeStunned(character, GameData.timeOfStudentStunnedWhenHowl)) | if (characterManager.BeStunned(character, GameData.timeOfStudentStunnedWhenHowl)) | ||||
| player.AddScore(GameData.TrickerScoreStudentBeStunned(GameData.timeOfStudentStunnedWhenHowl)); | player.AddScore(GameData.TrickerScoreStudentBeStunned(GameData.timeOfStudentStunnedWhenHowl)); | ||||
| @@ -123,7 +123,7 @@ namespace Preparation.Interface | |||||
| public class ShowTime : IActiveSkill | public class ShowTime : IActiveSkill | ||||
| { | { | ||||
| public int SkillCD => GameData.commonSkillCD * 3; | |||||
| public int SkillCD => GameData.commonSkillCD * 8 / 3; | |||||
| public int DurationTime => GameData.commonSkillTime; | public int DurationTime => GameData.commonSkillTime; | ||||
| private readonly object commonSkillLock = new(); | private readonly object commonSkillLock = new(); | ||||