Browse Source

docs: 📝 edit 游戏机制与平衡性调整更新草案.md

tags/v0.1.0
shangfengh 2 years ago
parent
commit
43b2d987f1
5 changed files with 13 additions and 12 deletions
  1. +1
    -0
      docs/游戏机制与平衡性调整更新草案.md
  2. +1
    -3
      logic/GameClass/GameObj/Bullet/Bullet.cs
  3. +0
    -5
      logic/GameClass/GameObj/Character/Character.Ghost.cs
  4. +1
    -1
      logic/GameClass/GameObj/Map/Map.cs
  5. +10
    -3
      logic/GameEngine/MoveEngine.cs

+ 1
- 0
docs/游戏机制与平衡性调整更新草案.md View File

@@ -23,6 +23,7 @@ v1.6
- 增强为“可以攻击使门被打开(可以重新被锁上)” - 增强为“可以攻击使门被打开(可以重新被锁上)”
- 小炸弹JumpyDumpty - 小炸弹JumpyDumpty
- 小炸弹不受道具增益影响 - 小炸弹不受道具增益影响
- 修改为“小炸弹与自己无碰撞体积”
- strike(新增) - strike(新增)
- 可以攻击未写完的作业 - 可以攻击未写完的作业




+ 1
- 3
logic/GameClass/GameObj/Bullet/Bullet.cs View File

@@ -1,6 +1,5 @@
using Preparation.Interface; using Preparation.Interface;
using Preparation.Utility; using Preparation.Utility;
using System;


namespace GameClass.GameObj namespace GameClass.GameObj
{ {
@@ -27,7 +26,6 @@ namespace GameClass.GameObj
public bool HasSpear => hasSpear; public bool HasSpear => hasSpear;


/// <summary> /// <summary>
/// 与THUAI4不同的一个攻击判定方案,通过这个函数判断爆炸时能否伤害到target
/// </summary> /// </summary>
/// <param name="target">被尝试攻击者</param> /// <param name="target">被尝试攻击者</param>
/// <returns>是否可以攻击到</returns> /// <returns>是否可以攻击到</returns>
@@ -36,7 +34,7 @@ namespace GameClass.GameObj


public override bool IgnoreCollideExecutor(IGameObj targetObj) public override bool IgnoreCollideExecutor(IGameObj targetObj)
{ {
if (targetObj == Parent && CanMove) return true;
if (targetObj == Parent) return true;
if (targetObj.Type == GameObjType.Prop || targetObj.Type == GameObjType.Bullet) if (targetObj.Type == GameObjType.Prop || targetObj.Type == GameObjType.Bullet)
return true; return true;
return false; return false;


+ 0
- 5
logic/GameClass/GameObj/Character/Character.Ghost.cs View File

@@ -1,10 +1,5 @@
using Preparation.Interface; using Preparation.Interface;
using Preparation.Utility; using Preparation.Utility;
using System;
using System.Collections.Generic;
using System.Numerics;
using System.Runtime.InteropServices;
using System.Threading;


namespace GameClass.GameObj namespace GameClass.GameObj
{ {


+ 1
- 1
logic/GameClass/GameObj/Map/Map.cs View File

@@ -484,7 +484,7 @@ namespace GameClass.GameObj
} }
case (uint)PlaceType.Window: case (uint)PlaceType.Window:
{ {
Add(new Window(GameData.GetCellCenterPos(i, j), mapResource[i - 1, j] == (uint)PlaceType.Wall));
Add(new Window(GameData.GetCellCenterPos(i, j)));
break; break;
} }
case (uint)PlaceType.BirthPoint1: case (uint)PlaceType.BirthPoint1:


+ 10
- 3
logic/GameEngine/MoveEngine.cs View File

@@ -148,9 +148,11 @@ namespace GameEngine
{ {
Thread.Sleep(GameData.numOfPosGridPerCell / GameData.numOfStepPerSecond); Thread.Sleep(GameData.numOfPosGridPerCell / GameData.numOfStepPerSecond);
new FrameRateTaskExecutor<int>( new FrameRateTaskExecutor<int>(
() => gameTimer.IsGaming && obj.StateNum == stateNum && obj.CanMove && !obj.IsRemoved,
() => gameTimer.IsGaming,
() => () =>
{ {
if (obj.StateNum == stateNum && obj.CanMove && !obj.IsRemoved)
return !(isEnded = true);
return !(isEnded = !LoopDo(obj, direction, ref deltaLen, stateNum)); return !(isEnded = !LoopDo(obj, direction, ref deltaLen, stateNum));
}, },
GameData.numOfPosGridPerCell / GameData.numOfStepPerSecond, GameData.numOfPosGridPerCell / GameData.numOfStepPerSecond,
@@ -179,8 +181,13 @@ namespace GameEngine
if (!isEnded && obj.StateNum == stateNum && obj.CanMove && !obj.IsRemoved) if (!isEnded && obj.StateNum == stateNum && obj.CanMove && !obj.IsRemoved)
isEnded = !LoopDo(obj, direction, ref deltaLen, stateNum); isEnded = !LoopDo(obj, direction, ref deltaLen, stateNum);
} }

if (!isEnded && obj.StateNum == stateNum && obj.CanMove && !obj.IsRemoved)
if (isEnded)
{
obj.IsMoving = false;
EndMove(obj);
return;
}
if (obj.StateNum == stateNum && obj.CanMove && !obj.IsRemoved)
{ {
int leftTime = moveTime % (GameData.numOfPosGridPerCell / GameData.numOfStepPerSecond); int leftTime = moveTime % (GameData.numOfPosGridPerCell / GameData.numOfStepPerSecond);
if (leftTime > 0) if (leftTime > 0)


Loading…
Cancel
Save