You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

Bullet.Ghost.cs 2.9 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. using Preparation.Interface;
  2. using Preparation.Utility;
  3. using System;
  4. namespace GameClass.GameObj
  5. {
  6. internal sealed class CommonAttackOfGhost : Bullet
  7. {
  8. public CommonAttackOfGhost(Character player, PlaceType placeType, XY pos, int radius = GameData.bulletRadius) :
  9. base(player, radius, placeType, pos)
  10. {
  11. }
  12. public override double BulletBombRange => 0;
  13. public override double BulletAttackRange => GameData.basicAttackShortRange;
  14. public int ap = GameData.basicApOfGhost;
  15. public override int AP
  16. {
  17. get => ap;
  18. set
  19. {
  20. lock (gameObjLock)
  21. ap = value;
  22. }
  23. }
  24. public override int Speed => GameData.basicBulletMoveSpeed;
  25. public override bool IsToBomb => false;
  26. public override int CastTime => GameData.basicCastTime;
  27. public override int Backswing => GameData.basicBackswing;
  28. public override int RecoveryFromHit => GameData.basicRecoveryFromHit;
  29. public const int cd = GameData.basicBackswing;
  30. public override int CD => cd;
  31. public override bool CanAttack(GameObj target)
  32. {
  33. return false;
  34. }
  35. public override bool CanBeBombed(GameObjType gameObjType)
  36. {
  37. if (gameObjType == GameObjType.Character) return true;
  38. return false;
  39. }
  40. public override BulletType TypeOfBullet => BulletType.CommonAttackOfGhost;
  41. }
  42. internal sealed class FlyingKnife : Bullet
  43. {
  44. public FlyingKnife(Character player, PlaceType placeType, XY pos, int radius = GameData.bulletRadius) :
  45. base(player, radius, placeType, pos)
  46. {
  47. }
  48. public override double BulletBombRange => 0;
  49. public override double BulletAttackRange => GameData.basicRemoteAttackRange * 13;
  50. public int ap = GameData.basicApOfGhost * 4 / 5;
  51. public override int AP
  52. {
  53. get => ap;
  54. set
  55. {
  56. lock (gameObjLock)
  57. ap = value;
  58. }
  59. }
  60. public override int Speed => GameData.basicBulletMoveSpeed * 2;
  61. public override bool IsToBomb => false;
  62. public override int CastTime => GameData.basicCastTime;
  63. public override int Backswing => GameData.basicBackswing * 2 / 5;
  64. public override int RecoveryFromHit => GameData.basicBackswing * 3 / 4;
  65. public const int cd = GameData.basicBackswing * 2 / 5 + 100;
  66. public override int CD => cd;
  67. public override bool CanAttack(GameObj target)
  68. {
  69. return false;
  70. }
  71. public override bool CanBeBombed(GameObjType gameObjType)
  72. {
  73. if (gameObjType == GameObjType.Character) return true;
  74. return false;
  75. }
  76. public override BulletType TypeOfBullet => BulletType.FlyingKnife;
  77. }
  78. }