1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-06-10 13:47:12 +08:00

feat(武器系统): 添加神手玉武器并完善格挡机制

添加新武器"神手玉",实现不同类型的攻击格挡效果:
- 近战挥舞:化解伤害
- 近战戳刺:反弹伤害并击退
- 远程射弹:概率弹反
- 猛冲攻击:反弹速度
- 吐息攻击:产生击退
- 魔法/召唤攻击:少量储能

调整Parry.gd的相机震动参数,增加BulletBase的MotionType枚举值STAB,完善Parrier.gd对不同攻击类型的处理逻辑。同时添加Debug测试boss选项,修复AcidS.gd的缩进问题。
This commit is contained in:
2026-05-08 15:43:55 +08:00
parent c079c20f28
commit e8413dd01b
14 changed files with 147 additions and 43 deletions
+4 -4
View File
@@ -2,7 +2,7 @@ extends AcidBulletBase
class_name AcidS
func succeedToHit(_dmg: float, _entity: EntityBase):
for i in randi_range(0, int(arg1)):
for bullet in BulletBase.generate(ComponentManager.getBullet("AcidS"), launcher, position, rotation + deg_to_rad(180 + 90 * randf_range(-1, 1)), true, true):
if bullet is AcidS:
bullet.baseDamage = baseDamage
for i in randi_range(0, int(arg1)):
for bullet in BulletBase.generate(ComponentManager.getBullet("AcidS"), launcher, position, rotation + deg_to_rad(180 + 90 * randf_range(-1, 1)), true, true):
if bullet is AcidS:
bullet.baseDamage = baseDamage
+6
View File
@@ -73,6 +73,12 @@ func hitBullet(bullet: BulletBase): # 当前子弹与其他子弹相撞
parryEffect(bullet)
bullet.hitbox.set_deferred("disabled", true)
generateParryBall(bullet.baseDamage)
elif bullet.motionType == BulletBase.MotionType.STAB:
parryEffect(bullet)
bullet.hitbox.set_deferred("disabled", true)
bullet.launcher.takeDamage(atk * reflectRate)
bullet.launcher.impluse(Vector2.from_angle(bullet.rotation) * -2000)
generateParryBall(bullet.baseDamage)
elif bullet.motionType == BulletBase.MotionType.SPRINT:
parryEffect(bullet)
bullet.tryDestroy()
+5 -5
View File
@@ -17,11 +17,11 @@ func register():
sprintMultiplier = 30
func ai():
PresetEntityAI.distanceAttack(self , currentFocusedBoss, 0, 300, 0)
PresetEntityAI.distanceAttack(self , currentFocusedBoss, 500, 1000, 1)
for i in 5:
tryAttack(i + 2, [3, 4])
if 1 not in attackingStates:
PresetEntityAI.follow(self , currentFocusedBoss, 200)
# PresetEntityAI.distanceAttack(self , currentFocusedBoss, 500, 1000, 1)
# for i in 5:
# tryAttack(i + 2, [3, 4])
# if 1 not in attackingStates:
# PresetEntityAI.follow(self , currentFocusedBoss, 200)
func attack(type: int):
if type == 0:
for bullet in BulletBase.generate(ComponentManager.getBullet("SwingSword"), self , getTrackingAnchor(), getTrackingAnchor().angle_to_point(currentFocusedPosition)):
+1 -1
View File
@@ -2,4 +2,4 @@ extends EffectController
class_name ParryEffect
func beforeShot():
CameraManager.shake(200, 300)
CameraManager.shake(300, 500)
+3 -1
View File
@@ -29,7 +29,7 @@ class_name StarterPanel
var historyStack
static var GAMEMODE_MAP_WAVE = [Wave.WAVE_NORMAL, Wave.WAVE_BOSSRUSH, Wave.WAVE_MOWING]
static var GAMEMODE_MAP_WAVE = [Wave.WAVE_NORMAL, Wave.WAVE_BOSSRUSH, Wave.WAVE_MOWING, Wave.WAVE_TESTBOSS]
static var START_CHARACTERS = ["MuyangDog", "Lynx", "HCN"]
static var buildingShader: bool = true
static var selectingFeed: bool = true
@@ -146,6 +146,8 @@ func _ready():
setPlayerName(getLast.call(1), newText)
mutexPlayer.rpc(newText)
)
if WorldManager.isRelease():
gamemodeOption.remove_item(3)
func _physics_process(_delta):
levelShow.text = "%d ∈ [%d, %d]" % [diffEdit.value, diffEdit.min_value, diffEdit.max_value]
GameRule.difficulty = diffEdit.value