| @@ -25,7 +25,7 @@ namespace GameClass.GameObj | |||
| if (HasShield) | |||
| { | |||
| if (bullet.HasSpear) | |||
| _ = TrySubHp(bullet.AP); | |||
| bullet.Parent.AddScore(GameData.TrickerScoreAttackStudent(TrySubHp(bullet.AP))); | |||
| else | |||
| return false; | |||
| } | |||
| @@ -46,11 +46,14 @@ namespace Gaming | |||
| ( | |||
| () => | |||
| { | |||
| int ScoreAdded = GameData.StudentScoreFix(generatorForFix.DegreeOfRepair); | |||
| new FrameRateTaskExecutor<int>( | |||
| loopCondition: () => player.PlayerState == PlayerStateType.Fixing && gameMap.Timer.IsGaming && generatorForFix.DegreeOfRepair < GameData.degreeOfFixedGenerator, | |||
| loopToDo: () => | |||
| { | |||
| generatorForFix.Repair(player.FixSpeed * GameData.frameDuration); | |||
| player.AddScore(GameData.StudentScoreFix(generatorForFix.DegreeOfRepair - ScoreAdded)); | |||
| ScoreAdded = GameData.StudentScoreFix(generatorForFix.DegreeOfRepair); | |||
| }, | |||
| timeInterval: GameData.frameDuration, | |||
| finallyReturn: () => 0 | |||
| @@ -145,6 +148,7 @@ namespace Gaming | |||
| { | |||
| if (doorwayForEscape.IsOpen()) | |||
| { | |||
| player.AddScore(GameData.StudentScoreEscape); | |||
| player.Die(PlayerStateType.Escaped); | |||
| return true; | |||
| } | |||
| @@ -205,12 +209,14 @@ namespace Gaming | |||
| if (playerTreated.HP + playerTreated.DegreeOfTreatment >= playerTreated.MaxHp) | |||
| { | |||
| player.AddScore(GameData.StudentScoreTreat(playerTreated.MaxHp - playerTreated.HP)); | |||
| playerTreated.HP = playerTreated.MaxHp; | |||
| playerTreated.DegreeOfTreatment = 0; | |||
| } | |||
| else | |||
| if (playerTreated.DegreeOfTreatment >= GameData.basicTreatmentDegree) | |||
| { | |||
| player.AddScore(GameData.StudentScoreTreat(GameData.basicTreatmentDegree)); | |||
| playerTreated.HP += GameData.basicTreatmentDegree; | |||
| playerTreated.DegreeOfTreatment = 0; | |||
| } | |||
| @@ -242,8 +248,17 @@ namespace Gaming | |||
| ) | |||
| .Start(); | |||
| if (playerRescued.PlayerState == PlayerStateType.Rescued) playerRescued.PlayerState = PlayerStateType.Null; | |||
| if (player.PlayerState == PlayerStateType.Rescuing) player.PlayerState = (player.TimeOfRescue >= GameData.basicTimeOfRescue) ? PlayerStateType.Null : PlayerStateType.Addicted; | |||
| if (playerRescued.PlayerState == PlayerStateType.Rescued) | |||
| { | |||
| if (player.TimeOfRescue >= GameData.basicTimeOfRescue) | |||
| { | |||
| playerRescued.PlayerState = PlayerStateType.Null; | |||
| player.AddScore(GameData.StudentScoreRescue); | |||
| } | |||
| else | |||
| playerRescued.PlayerState = PlayerStateType.Addicted; | |||
| } | |||
| if (player.PlayerState == PlayerStateType.Rescuing) player.PlayerState = PlayerStateType.Null; | |||
| player.TimeOfRescue = 0; | |||
| } | |||
| ) | |||
| @@ -38,8 +38,9 @@ namespace Gaming | |||
| ); | |||
| } | |||
| private void BeAddictedToGame(Student player) | |||
| private void BeAddictedToGame(Student player, Ghost ghost) | |||
| { | |||
| ghost.AddScore(GameData.TrickerScoreStudentBeAddicted); | |||
| new Thread | |||
| (() => | |||
| { | |||
| @@ -57,6 +58,7 @@ namespace Gaming | |||
| { | |||
| if (player.GamingAddiction == player.MaxGamingAddiction && gameMap.Timer.IsGaming) | |||
| { | |||
| ghost.AddScore(GameData.TrickerScoreStudentDie); | |||
| Die(player); | |||
| } | |||
| return 0; | |||
| @@ -141,9 +143,14 @@ namespace Gaming | |||
| if ((!((Character)objBeingShot).IsGhost()) && bullet.Parent.IsGhost()) | |||
| { | |||
| Student oneBeAttacked = (Student)objBeingShot; | |||
| if (oneBeAttacked.BeAttacked(bullet)) | |||
| { | |||
| BeAddictedToGame(oneBeAttacked, (Ghost)bullet.Parent); | |||
| } | |||
| if (oneBeAttacked.CanBeAwed()) | |||
| { | |||
| oneBeAttacked.PlayerState = PlayerStateType.Stunned; | |||
| bullet.Parent.AddScore(GameData.TrickerScoreStudentBeStunned); | |||
| new Thread | |||
| ( | |||
| () => | |||
| @@ -157,10 +164,6 @@ namespace Gaming | |||
| ) | |||
| { IsBackground = true }.Start(); | |||
| } | |||
| if (oneBeAttacked.BeAttacked(bullet)) | |||
| { | |||
| BeAddictedToGame((Student)objBeingShot); | |||
| } | |||
| } | |||
| // if (((Character)objBeingShot).IsGhost() && !bullet.Parent.IsGhost() && bullet.TypeOfBullet == BulletType.Ram) | |||
| // BeStunned((Character)objBeingShot, bullet.AP); | |||
| @@ -85,13 +85,14 @@ namespace Gaming | |||
| ) | |||
| { IsBackground = true }.Start(); | |||
| #endregion | |||
| #region BGM更新 | |||
| #region BGM,牵制得分更新 | |||
| new Thread | |||
| ( | |||
| () => | |||
| { | |||
| while (!gameMap.Timer.IsGaming) | |||
| Thread.Sleep((int)GameData.checkInterval); | |||
| int TimePinningDown = 0, ScoreAdded = 0; | |||
| new FrameRateTaskExecutor<int>( | |||
| loopCondition: () => gameMap.Timer.IsGaming && !newPlayer.IsResetting, | |||
| loopToDo: () => | |||
| @@ -121,6 +122,13 @@ namespace Gaming | |||
| { | |||
| if (XY.Distance(newPlayer.Position, person.Position) <= (newPlayer.AlertnessRadius / person.Concealment)) | |||
| newPlayer.AddBgm(BgmType.GhostIsComing, (double)newPlayer.AlertnessRadius / XY.Distance(newPlayer.Position, person.Position)); | |||
| if (XY.Distance(newPlayer.Position, person.Position) <= GameData.basicViewRange) | |||
| { | |||
| TimePinningDown += (int)GameData.checkInterval; | |||
| newPlayer.AddScore(GameData.StudentScorePinDown(TimePinningDown) - ScoreAdded); | |||
| ScoreAdded = GameData.StudentScorePinDown(TimePinningDown); | |||
| } | |||
| else TimePinningDown = ScoreAdded = 0; | |||
| break; | |||
| } | |||
| } | |||
| @@ -7,6 +7,8 @@ namespace Preparation.Interface | |||
| { | |||
| public long TeamID { get; } | |||
| public int HP { get; set; } | |||
| public int Score { get; } | |||
| public void AddScore(int add); | |||
| public double Vampire { get; } | |||
| public PlayerStateType PlayerState { get; set; } | |||
| public bool IsGhost(); | |||
| @@ -112,11 +112,18 @@ namespace Preparation.Utility | |||
| { | |||
| return degreeOfFix; | |||
| } | |||
| public const int StudentScoreFixed = 25; | |||
| public static int StudentScorePinDown(int timeOfPiningDown) | |||
| { | |||
| return 0; | |||
| } | |||
| public const int StudentScoreTrickerBeStunned = 25; | |||
| public const int StudentScoreRescue = 100; | |||
| public static int StudentScoreTreat(int degree) | |||
| { | |||
| return degree; | |||
| } | |||
| public const int StudentScoreEscape = 1000; | |||
| public const int ScoreUseProp = 0; | |||
| #endregion | |||
| @@ -295,3 +295,46 @@ | |||
| ### 救人 | |||
| - 一般情况下,救人时间为1秒。 | |||
| - 不能两人同时救一个人 | |||
| ## 得分 | |||
| ### 屠夫 | |||
| #### 伤害得分 | |||
| [Tricker对Student造成伤害时,得伤害*100/基本伤害(1500000)分。] | |||
| #### *[使用道具/技能得分——需要造成一定效果才能获取分数,仅使用不得分]* | |||
| #### 沉迷 | |||
| 使Student进入沉迷状态时,得50分。 | |||
| #### 眩晕 | |||
| 使人类进入眩晕状态时,得25分。 | |||
| #### 淘汰 | |||
| 每淘汰一个Student,得1000分 | |||
| #### ~~主动/被动解除特殊状态得分(如解除眩晕)~~ | |||
| ~~解除眩晕,得15分~~ | |||
| ### 人类 | |||
| #### 修机得分 | |||
| - 人类每修n%的电机,得n分 | |||
| - 修完一台电机,额外得?分 | |||
| #### [牵制得分] | |||
| #### 使用道具/技能得分 | |||
| #### 使屠夫进入特殊状态得分(如使之眩晕) | |||
| #### 救人 | |||
| #### 治疗 | |||
| #### 逃脱 | |||
| #### ~~解除眩晕~~ | |||
| #### ~~自愈~~ | |||