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 3.2 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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. switch (gameObjType)
  38. {
  39. case GameObjType.Character:
  40. case GameObjType.Generator:
  41. return true;
  42. default:
  43. return false;
  44. }
  45. }
  46. public override BulletType TypeOfBullet => BulletType.CommonAttackOfGhost;
  47. }
  48. internal sealed class FlyingKnife : Bullet
  49. {
  50. public FlyingKnife(Character player, PlaceType placeType, XY pos, int radius = GameData.bulletRadius) :
  51. base(player, radius, placeType, pos)
  52. {
  53. }
  54. public override double BulletBombRange => 0;
  55. public override double BulletAttackRange => GameData.basicRemoteAttackRange * 13;
  56. public int ap = GameData.basicApOfGhost * 4 / 5;
  57. public override int AP
  58. {
  59. get => ap;
  60. set
  61. {
  62. lock (gameObjLock)
  63. ap = value;
  64. }
  65. }
  66. public override int Speed => GameData.basicBulletMoveSpeed * 2;
  67. public override bool IsToBomb => false;
  68. public override int CastTime => GameData.basicCastTime;
  69. public override int Backswing => GameData.basicBackswing * 2 / 5;
  70. public override int RecoveryFromHit => GameData.basicBackswing * 3 / 4;
  71. public const int cd = GameData.basicBackswing * 2 / 5 + 100;
  72. public override int CD => cd;
  73. public override bool CanAttack(GameObj target)
  74. {
  75. return false;
  76. }
  77. public override bool CanBeBombed(GameObjType gameObjType)
  78. {
  79. switch (gameObjType)
  80. {
  81. case GameObjType.Character:
  82. return true;
  83. default:
  84. return false;
  85. }
  86. }
  87. public override BulletType TypeOfBullet => BulletType.FlyingKnife;
  88. }
  89. }