Browse Source

fix: 🐛 Try to fix the bug that student can't escape from EmergencyExit

tags/0.1.0
shangfengh 2 years ago
parent
commit
ed1c35477d
4 changed files with 12 additions and 20 deletions
  1. +1
    -1
      logic/Client/Properties/launchSettings.json
  2. +7
    -12
      logic/Gaming/ActionManager.cs
  3. +2
    -6
      logic/cmd/gameServer.cmd
  4. +2
    -1
      logic/规则Logic.md

+ 1
- 1
logic/Client/Properties/launchSettings.json View File

@@ -2,7 +2,7 @@
"profiles": {
"Client": {
"commandName": "Project",
"commandLineArgs": "--ip 183.172.235.138 --cl --port 8888 --characterID 0 --type 1 --occupation 1"
"commandLineArgs": "--ip 183.172.173.238 --cl --port 8888 --characterID 4 --type 2 --occupation 2"
}
}
}

+ 7
- 12
logic/Gaming/ActionManager.cs View File

@@ -165,28 +165,23 @@ namespace Gaming
if (!(player.Commandable()) || player.CharacterType == CharacterType.Robot)
return false;
Doorway? doorwayForEscape = (Doorway?)gameMap.OneForInteractInACross(player.Position, GameObjType.Doorway);
if (doorwayForEscape != null)
if (doorwayForEscape != null && doorwayForEscape.IsOpen())
{
if (doorwayForEscape.IsOpen())
{
player.AddScore(GameData.StudentScoreEscape);
++gameMap.NumOfEscapedStudent;
player.Die(PlayerStateType.Escaped);
return true;
}
else
return false;
player.AddScore(GameData.StudentScoreEscape);
++gameMap.NumOfEscapedStudent;
player.Die(PlayerStateType.Escaped);
return true;
}
else
{
EmergencyExit? emergencyExit = (EmergencyExit?)gameMap.OneForInteractInACross(player.Position, GameObjType.EmergencyExit);
if (emergencyExit != null && emergencyExit.IsOpen)
{
++gameMap.NumOfEscapedStudent;
player.Die(PlayerStateType.Escaped);
return true;
}
else
return false;
return false;
}
}



+ 2
- 6
logic/cmd/gameServer.cmd View File

@@ -4,12 +4,8 @@ start cmd /k ..\Server\bin\Debug\net6.0\Server.exe --ip 0.0.0.0 --port 8888 --s

ping -n 2 127.0.0.1 > NUL

start cmd /k ..\Client\bin\Debug\net6.0-windows\Client.exe --cl --port 8888 --characterID 4 --type 2 --occupation 1
start cmd /k ..\Client\bin\Debug\net6.0-windows\Client.exe --cl --port 8888 --characterID 4 --type 2 --occupation 2

start cmd /k ..\Client\bin\Debug\net6.0-windows\Client.exe --cl --port 8888 --characterID 0 --type 1 --occupation 1

ping -n 2 127.0.0.1 > NUL

start cmd /k ..\Client\bin\Debug\net6.0-windows\Client.exe --cl --port 8888 --characterID 1 --type 1 --occupation 3

ping -n 2 127.0.0.1 > NUL
start cmd /k ..\Client\bin\Debug\net6.0-windows\Client.exe --cl --port 8888 --characterID 1 --type 1 --occupation 3

+ 2
- 1
logic/规则Logic.md View File

@@ -35,8 +35,9 @@
- 大门开启的进度不清空

### 攻击
- 无论近战远程均产生子弹以表示攻击所至距离
- 攻击时,从播放攻击动作到可以开始产生伤害的期间,称为前摇。
(前摇阶段,搞蛋鬼产生通常为不可爆炸(部分搞蛋鬼能可以产生可爆炸)子弹(爆炸范围=0),[子弹大小待商榷],期间监管者攻击被打断时,子弹消失)(无论近战远程均产生子弹
(前摇阶段,搞蛋鬼产生通常为不可爆炸(部分搞蛋鬼能可以产生可爆炸)子弹(爆炸范围=0),[子弹大小待商榷],期间监管者攻击被打断时,子弹消失)()
- 无论搞蛋鬼或学生,攻击后,通常会出现一段无伤害判定的攻击动作后置时间,称为后摇。击中物体时后摇更长
- 假如监管者攻击或一些监管者的特定技能击中正在交互或处于攻击前后摇或使用部分技能(指PlayerState==UsingSkill)的求生者,将使求生者眩晕
1. 处于前摇或后摇


Loading…
Cancel
Save