Browse Source

feat: add a new parameter of activeskills

tags/v0.1.0
shangfengh 2 years ago
parent
commit
0dfa5b68d5
6 changed files with 15 additions and 9 deletions
  1. +1
    -1
      docs/版本更新说明.md
  2. +6
    -4
      logic/Gaming/ActionManager.cs
  3. +4
    -0
      logic/Gaming/AttackManager.cs
  4. +2
    -2
      logic/Gaming/Game.cs
  5. +1
    -1
      logic/Gaming/SkillManager/SkillManager.cs
  6. +1
    -1
      logic/Server/RpcServices.cs

+ 1
- 1
docs/版本更新说明.md View File

@@ -34,6 +34,6 @@
- docs:更新了 游戏机制与平衡性调整更新草案.pdf
- feat:更新了下载器

# 最新更新
# 5月15日更新
- feat:Robot可用
- hotfix: 修复了移动相关的bug

+ 6
- 4
logic/Gaming/ActionManager.cs View File

@@ -392,11 +392,8 @@ namespace Gaming
public bool LockOrOpenDoor(Character player)
{
if (player.CharacterType == CharacterType.Robot) return false;
if (!(player.Commandable()) || player.PlayerState == PlayerStateType.LockingOrOpeningTheDoor)
return false;
Door? doorToLock = (Door?)gameMap.OneForInteract(player.Position, GameObjType.Door);
if (doorToLock == null || doorToLock.OpenOrLockDegree > 0 || gameMap.PartInTheSameCell(doorToLock.Position, GameObjType.Character) != null)
return false;
if (doorToLock == null) return false;
bool flag = false;
foreach (Prop prop in player.PropInventory)
{
@@ -421,6 +418,11 @@ namespace Gaming
}
if (!flag) return false;

if (doorToLock.OpenOrLockDegree > 0 || gameMap.PartInTheSameCell(doorToLock.Position, GameObjType.Character) != null)
return false;
if (!(player.Commandable()) || player.PlayerState == PlayerStateType.LockingOrOpeningTheDoor)
return false;

player.SetPlayerState(PlayerStateType.LockingOrOpeningTheDoor);
long threadNum = player.StateNum;
new Thread


+ 4
- 0
logic/Gaming/AttackManager.cs View File

@@ -70,6 +70,10 @@ namespace Gaming
if (bullet.CanBeBombed(GameObjType.Generator))
((Generator)objBeingShot).Repair(-bullet.AP * GameData.factorDamageGenerator, (Character)bullet.Parent!);
break;
case GameObjType.Door:
if (bullet.CanBeBombed(GameObjType.Door))
;
break;
default:
break;
}


+ 2
- 2
logic/Gaming/Game.cs View File

@@ -253,7 +253,7 @@ namespace Gaming
return false;
}

public bool UseActiveSkill(long playerID, int skillNum)
public bool UseActiveSkill(long playerID, int skillNum, int parameter)
{
if (!gameMap.Timer.IsGaming)
return false;
@@ -261,7 +261,7 @@ namespace Gaming
if (player != null)
{
if (player.Occupation.ListOfIActiveSkill.Count <= skillNum) return false;
return skillManager.UseActiveSkill(player, player.Occupation.ListOfIActiveSkill[skillNum]);
return skillManager.UseActiveSkill(player, player.Occupation.ListOfIActiveSkill[skillNum], parameter);
}
else
return false;


+ 1
- 1
logic/Gaming/SkillManager/SkillManager.cs View File

@@ -11,7 +11,7 @@ namespace Gaming
readonly SkillManager skillManager;
private partial class SkillManager
{
public bool UseActiveSkill(Character character, ActiveSkillType activeSkillType)
public bool UseActiveSkill(Character character, ActiveSkillType activeSkillType, int parameter)
{
if (character.Occupation.ListOfIActiveSkill.Contains(activeSkillType))
switch (activeSkillType)


+ 1
- 1
logic/Server/RpcServices.cs View File

@@ -346,7 +346,7 @@ namespace Server
return Task.FromResult(boolRes);
}
var gameID = communicationToGameID[request.PlayerId];
boolRes.ActSuccess = game.UseActiveSkill(gameID, request.SkillId);
boolRes.ActSuccess = game.UseActiveSkill(gameID, request.SkillId, 0);
return Task.FromResult(boolRes);
}



Loading…
Cancel
Save