diff --git a/docs/游戏机制与平衡性调整更新草案.md b/docs/游戏机制与平衡性调整更新草案.md index b178d45..22c1d45 100644 --- a/docs/游戏机制与平衡性调整更新草案.md +++ b/docs/游戏机制与平衡性调整更新草案.md @@ -54,7 +54,7 @@ v1.6 - 视野范围由9000降为8000 - 翻窗速度改为1000 - 特质: - - 扣血则得分50×受到伤害/基本伤害(1500000) + - 扣血则得分100×受到伤害/基本伤害(1500000) - 技能惩罚(Punish)改为 - CD:45s - “使用瞬间,在**视野距离/4范围内(不是可视范围)的**翻窗、开锁门、攻击前后摇、**使用技能期间**的捣蛋鬼会被眩晕(3070+**500***已受伤害/基本伤害(1500000))ms” diff --git a/docs/版本更新说明.md b/docs/版本更新说明.md index 1f21808..7dc7e94 100644 --- a/docs/版本更新说明.md +++ b/docs/版本更新说明.md @@ -38,8 +38,11 @@ - feat:Robot可用 - hotfix: 修复了移动相关的bug -# 最新更新 +# 5月19日13:00更新 - feat:TechOtaku可用 - feat:Klee、Idol已调整 - fix:修复了InSpire会给Tricker加速的问题 -- fix:修复了开锁门的bug \ No newline at end of file +- fix:修复了开锁门的bug + +# 最新更新 +- docs:更新了 游戏机制与平衡性调整更新草案.pdf \ No newline at end of file diff --git a/logic/GameClass/GameObj/Bullet/Bullet.Ghost.cs b/logic/GameClass/GameObj/Bullet/Bullet.Ghost.cs index 1642a41..68fd362 100644 --- a/logic/GameClass/GameObj/Bullet/Bullet.Ghost.cs +++ b/logic/GameClass/GameObj/Bullet/Bullet.Ghost.cs @@ -8,20 +8,48 @@ namespace GameClass.GameObj public CommonAttackOfGhost(Character player, XY pos, int radius = GameData.bulletRadius) : base(player, radius, pos) { + ap = GameData.basicApOfGhost; } public override double BulletBombRange => 0; public override double AttackDistance => GameData.basicAttackShortRange; - public int ap = GameData.basicApOfGhost; - public override int AP + public override int Speed => GameData.basicBulletMoveSpeed; + public override bool IsRemoteAttack => false; + + public override int CastTime => (int)AttackDistance * 1000 / Speed; + public override int Backswing => GameData.basicBackswing; + public override int RecoveryFromHit => GameData.basicRecoveryFromHit; + public const int cd = GameData.basicBackswing; + public override int CD => cd; + public const int maxBulletNum = 1; + public override int MaxBulletNum => maxBulletNum; + + public override bool CanAttack(GameObj target) { - get => ap; - set + return false; + } + public override bool CanBeBombed(GameObjType gameObjType) + { + switch (gameObjType) { - lock (gameObjLock) - ap = value; + case GameObjType.Character: + return true; + default: + return false; } } - public override int Speed => GameData.basicBulletMoveSpeed; + public override BulletType TypeOfBullet => BulletType.CommonAttackOfGhost; + } + + internal sealed class Strike : Bullet + { + public Strike(Character player, XY pos, int radius = GameData.bulletRadius) : + base(player, radius, pos) + { + ap = GameData.basicApOfGhost * 16 / 15; + } + public override double BulletBombRange => 0; + public override double AttackDistance => GameData.basicAttackShortRange * 20 / 22; + public override int Speed => GameData.basicBulletMoveSpeed * 625 / 740; public override bool IsRemoteAttack => false; public override int CastTime => (int)AttackDistance * 1000 / Speed; @@ -41,12 +69,14 @@ namespace GameClass.GameObj switch (gameObjType) { case GameObjType.Character: + case: + GameObjType.Generator: return true; default: return false; } } - public override BulletType TypeOfBullet => BulletType.CommonAttackOfGhost; + public override BulletType TypeOfBullet => BulletType.Strike; } internal sealed class FlyingKnife : Bullet @@ -54,19 +84,11 @@ namespace GameClass.GameObj public FlyingKnife(Character player, XY pos, int radius = GameData.bulletRadius) : base(player, radius, pos) { + ap = GameData.basicApOfGhost * 4 / 5; } public override double BulletBombRange => 0; public override double AttackDistance => GameData.basicRemoteAttackRange * 13; - public int ap = GameData.basicApOfGhost * 4 / 5; - public override int AP - { - get => ap; - set - { - lock (gameObjLock) - ap = value; - } - } + public override int Speed => GameData.basicBulletMoveSpeed * 25 / 10; public override bool IsRemoteAttack => true; @@ -102,19 +124,11 @@ namespace GameClass.GameObj { public BombBomb(Character player, XY pos, int radius = GameData.bulletRadius) : base(player, radius, pos) { + ap = (int)(GameData.basicApOfGhost * 6.0 / 5); } public override double BulletBombRange => GameData.basicBulletBombRange; public override double AttackDistance => GameData.basicAttackShortRange; - public int ap = (int)(GameData.basicApOfGhost * 6.0 / 5); - public override int AP - { - get => ap; - set - { - lock (gameObjLock) - ap = value; - } - } + public override int Speed => (int)(GameData.basicBulletMoveSpeed * 30 / 37); public override bool IsRemoteAttack => false; @@ -149,19 +163,11 @@ namespace GameClass.GameObj { public JumpyDumpty(Character player, XY pos, int radius = GameData.bulletRadius) : base(player, radius, pos) { + ap = (int)(GameData.basicApOfGhost * 0.6); } public override double BulletBombRange => GameData.basicBulletBombRange / 2; public override double AttackDistance => GameData.basicAttackShortRange * 2; - public int ap = (int)(GameData.basicApOfGhost * 0.6); - public override int AP - { - get => ap; - set - { - lock (gameObjLock) - ap = value; - } - } + public override int Speed => (int)(GameData.basicBulletMoveSpeed * 43 / 37); public override bool IsRemoteAttack => false; diff --git a/logic/GameClass/GameObj/Bullet/Bullet.cs b/logic/GameClass/GameObj/Bullet/Bullet.cs index 470d191..fa25353 100644 --- a/logic/GameClass/GameObj/Bullet/Bullet.cs +++ b/logic/GameClass/GameObj/Bullet/Bullet.cs @@ -1,5 +1,6 @@ using Preparation.Interface; using Preparation.Utility; +using System.Threading; namespace GameClass.GameObj { @@ -10,7 +11,16 @@ namespace GameClass.GameObj /// public abstract double BulletBombRange { get; } public abstract double AttackDistance { get; } - public abstract int AP { get; set; } + protected int ap; + public int AP + { + get => Interlocked.CompareExchange(ref ap, 0, 1); + } + public void AddAP(int addAp) + { + Interlocked.Add(ref ap, addAp); + } + public abstract int Speed { get; } public abstract bool IsRemoteAttack { get; } public abstract int CastTime { get; } diff --git a/logic/GameClass/GameObj/Character/Character.cs b/logic/GameClass/GameObj/Character/Character.cs index e5f9071..26d29e1 100644 --- a/logic/GameClass/GameObj/Character/Character.cs +++ b/logic/GameClass/GameObj/Character/Character.cs @@ -106,7 +106,7 @@ namespace GameClass.GameObj ); Bullet? bullet = BulletFactory.GetBullet(this, res, this.bulletOfPlayer); if (bullet == null) return null; - bullet.AP += TryAddAp() ? GameData.ApPropAdd : 0; + if (TryAddAp()) bullet.AddAP(GameData.ApPropAdd); facingDirection = new(angle, bullet.AttackDistance); return bullet; } diff --git a/logic/Preparation/Utility/EnumType.cs b/logic/Preparation/Utility/EnumType.cs index 2d7329b..d296091 100644 --- a/logic/Preparation/Utility/EnumType.cs +++ b/logic/Preparation/Utility/EnumType.cs @@ -59,7 +59,7 @@ namespace Preparation.Utility CommonAttackOfGhost = 2, JumpyDumpty = 3, BombBomb = 4, - // Ram = 7, + Strike = 8, } public enum PropType // 道具类型 {//numOfPropSpecies 见Gamedata