mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-05 03:07:12 +08:00
refactor(武器系统): 重构弓箭和七魂武器逻辑及数值
调整弓箭武器的旋转偏移逻辑,将偏移计算从spawn函数移到Arrow类 修改七魂武器的属性和描述,增加治疗效果和能量转换功能 更新游戏难度范围和默认值,调整实体生命值计算方式 移除Rooster角色中的LGBT和HJM武器,替换为SevenSoul武器
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
[gd_scene load_steps=15 format=3 uid="uid://bm7ymrri6pykb"]
|
||||
[gd_scene load_steps=14 format=3 uid="uid://bm7ymrri6pykb"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://cvogxi7mktumf" path="res://components/Abstracts/EntityBase.tscn" id="1_e5pl8"]
|
||||
[ext_resource type="Script" uid="uid://cthtupc6dtbav" path="res://scripts/Contents/Characters/Rooster.gd" id="2_oqdqd"]
|
||||
[ext_resource type="PackedScene" uid="uid://wl8u5m52708w" path="res://components/Weapons/LGBT.tscn" id="3_0omr3"]
|
||||
[ext_resource type="PackedScene" uid="uid://c5y4g70evwy46" path="res://components/Weapons/SevenSoul.tscn" id="3_0omr3"]
|
||||
[ext_resource type="AudioStream" uid="uid://dclinyhu256xi" path="res://resources/sounds/effect/Low Whoosh.mp3" id="3_4syso"]
|
||||
[ext_resource type="AudioStream" uid="uid://cdrevrq7n6yqa" path="res://resources/sounds/effect/Boing.mp3" id="4_66s6c"]
|
||||
[ext_resource type="PackedScene" uid="uid://dbxu15g1pd3cx" path="res://components/Weapons/HJM.tscn" id="4_joj4g"]
|
||||
[ext_resource type="AudioStream" uid="uid://benyec5bqni0b" path="res://resources/sounds/effect/Chomp.wav" id="4_k0yme"]
|
||||
[ext_resource type="AudioStream" uid="uid://dmxh3bpk8vyy5" path="res://resources/sounds/effect/Coin.mp3" id="5_xnbhq"]
|
||||
[ext_resource type="AudioStream" uid="uid://4wuuf1osk0yv" path="res://resources/sounds/effect/Low Boing.wav" id="6_m5px1"]
|
||||
@@ -57,10 +56,7 @@ metadata/_edit_vertical_guides_ = [71.0]
|
||||
[node name="weaponStore" parent="." index="1"]
|
||||
process_mode = 4
|
||||
|
||||
[node name="LGBT" parent="weaponStore" index="0" instance=ExtResource("3_0omr3")]
|
||||
|
||||
[node name="HJM" parent="weaponStore" index="1" instance=ExtResource("4_joj4g")]
|
||||
debugRebuild = false
|
||||
[node name="SevenSoul" parent="weaponStore" index="0" instance=ExtResource("3_0omr3")]
|
||||
|
||||
[node name="sprint" parent="sounds" index="0"]
|
||||
stream = ExtResource("4_66s6c")
|
||||
|
||||
@@ -21,14 +21,14 @@ storeType = {
|
||||
"self": 1
|
||||
}
|
||||
descriptionTemplate = "消耗$self点生命值,发射$count支[b]鸡毛箭[/b],每支造成当前飞行速度的$atk伤害。"
|
||||
needEnergy = 15.0
|
||||
cooldown = 500.0
|
||||
needEnergy = 50.0
|
||||
cooldown = 2000.0
|
||||
|
||||
[node name="avatar" parent="container/info" index="0"]
|
||||
texture = ExtResource("2_ex3jl")
|
||||
|
||||
[node name="energy" parent="container/info/infos/energyInfo" index="1"]
|
||||
text = "40.0"
|
||||
text = "15.0"
|
||||
|
||||
[node name="beachball" parent="container/info/infos" index="1"]
|
||||
count = 50
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://c5y4g70evwy46"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://ckq2cq6m23hq3" path="res://components/Abstracts/WeaponCardBase.tscn" id="1_0f84s"]
|
||||
[ext_resource type="Script" path="res://scripts/Contents/Weapons/SevenSoul.gd" id="2_n7gtb"]
|
||||
[ext_resource type="Script" uid="uid://bxcyflpnuajnn" path="res://scripts/Contents/Weapons/SevenSoul.gd" id="2_n7gtb"]
|
||||
[ext_resource type="Texture2D" uid="uid://ckqfe3a61hw7" path="res://resources/weapons/bill.webp" id="3_nq3bo"]
|
||||
[ext_resource type="AudioStream" uid="uid://dy4k5mni7d7wo" path="res://resources/sounds/weapon/Finale - Toby Fox.wav" id="4_tmgox"]
|
||||
|
||||
@@ -12,11 +12,17 @@ displayName = "bilioicik"
|
||||
quality = 2
|
||||
typeTopic = 3
|
||||
store = {
|
||||
"atk": 3
|
||||
"dmg": 0.1,
|
||||
"heal": 1.0
|
||||
}
|
||||
descriptionTemplate = "召唤7条人类灵魂,每条以10Hz的频率造成$atk点伤害。"
|
||||
storeType = {
|
||||
"dmg": 2,
|
||||
"heal": 1
|
||||
}
|
||||
descriptionTemplate = "召唤7条人类灵魂,敌人子弹命中灵魂时将伤害的$dmg转换为能量并提供$heal点治疗。"
|
||||
needEnergy = 150.0
|
||||
cooldown = 2000.0
|
||||
cooldown = 180000.0
|
||||
debugRebuild = true
|
||||
|
||||
[node name="attack" parent="sounds" index="0"]
|
||||
stream = ExtResource("4_tmgox")
|
||||
@@ -25,6 +31,14 @@ volume_db = 20.0
|
||||
[node name="avatar" parent="container/info" index="0"]
|
||||
texture = ExtResource("3_nq3bo")
|
||||
|
||||
[node name="energy" parent="container/info/infos/energyInfo" index="1"]
|
||||
text = "150.0"
|
||||
|
||||
[node name="beachball" parent="container/info/infos" index="1"]
|
||||
count = 500
|
||||
|
||||
[node name="soul" parent="container/info/infos" index="2"]
|
||||
count = 1
|
||||
|
||||
[node name="name" parent="container/info" index="2"]
|
||||
displayName = "bilioicik"
|
||||
@@ -32,4 +46,4 @@ quality = 2
|
||||
typeTopic = 3
|
||||
|
||||
[node name="description" parent="container" index="2"]
|
||||
text = "[center]召唤7条人类灵魂,每条以10Hz的频率造成[color=cyan]1[/color]→[color=yellow]2[/color]点伤害。[/center]"
|
||||
text = "[center]召唤7条人类灵魂,敌人子弹命中灵魂时将伤害的[color=cyan]10%[/color]转换为能量并提供[color=cyan]1[/color]点治疗。[/center]"
|
||||
|
||||
@@ -5,6 +5,7 @@ class_name Arrow
|
||||
|
||||
var atk: float = 0
|
||||
var waitTime: float = 0
|
||||
var offsetRotation: float = 0
|
||||
|
||||
func register():
|
||||
trail.emitting = false
|
||||
@@ -12,7 +13,7 @@ func register():
|
||||
func ai():
|
||||
if timeLived() < waitTime:
|
||||
PresetBulletAI.lockLauncher(self, launcher, true)
|
||||
rotation = position.angle_to_point(get_global_mouse_position())
|
||||
rotation = position.angle_to_point(get_global_mouse_position()) + offsetRotation
|
||||
return
|
||||
else:
|
||||
trail.emitting = true
|
||||
|
||||
@@ -12,11 +12,12 @@ func spawn():
|
||||
ComponentManager.getBullet("Arrow"),
|
||||
launcher,
|
||||
position,
|
||||
startAngle + deg_to_rad(c * 10.0)
|
||||
startAngle
|
||||
):
|
||||
var bullet: Arrow = i
|
||||
bullet.atk = atk
|
||||
bullet.waitTime = waitTime
|
||||
bullet.offsetRotation = deg_to_rad(c * 10.0)
|
||||
await TickTool.millseconds(waitTime)
|
||||
tryDestroy()
|
||||
func ai():
|
||||
|
||||
@@ -71,6 +71,7 @@ func _ready():
|
||||
historyStack = Composables.useHistoryStack(playerNameInput)
|
||||
diffEdit.min_value = GameRule.difficultyRange.x
|
||||
diffEdit.max_value = GameRule.difficultyRange.y
|
||||
diffEdit.value = GameRule.difficulty
|
||||
multiplayer.connection_failed.connect(
|
||||
func():
|
||||
setState(MultiplayerState.ConnectionState.DISCONNECTED)
|
||||
|
||||
@@ -213,7 +213,7 @@ func setStage(stage: int):
|
||||
canRunAi = true
|
||||
currentInvinsible = false
|
||||
func applyLevel():
|
||||
fields[FieldStore.Entity.MAX_HEALTH] *= (1 + GameRule.entityHealthIncreasePerWave * (GameRule.difficulty - GameRule.difficultyRange.x + 5)) ** level
|
||||
fields[FieldStore.Entity.MAX_HEALTH] *= (1 + GameRule.entityHealthIncreasePerWave * (GameRule.difficulty - GameRule.difficultyRange.x + 1)) ** level
|
||||
fields[FieldStore.Entity.DAMAGE_MULTIPILER] *= sqrt((1 + GameRule.entityDamageIncreasePerWave * (GameRule.difficulty - GameRule.difficultyRange.x))) ** level
|
||||
func displace(direction: Vector2, isSprinting: bool = false):
|
||||
return (direction if isSprinting else direction.normalized()) * fields.get(FieldStore.Entity.MOVEMENT_SPEED) * 400 * abs(animatree.get("parameters/blend_position"))
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
class_name GameRule
|
||||
|
||||
static var deadReasons: Array = JsonTool.parseJson("res://resources/constants/deadReasons.json")
|
||||
static var difficultyRange: Vector2 = Vector2(-5, 10) # 难度倍数范围,包括最小值和最大值,负数则降低难度
|
||||
static var difficulty: float = 10 # 难度倍数,可以写小数
|
||||
static var difficultyRange: Vector2 = Vector2(-20, 50) # 难度倍数范围,包括最小值和最大值,负数则降低难度
|
||||
static var difficulty: float = 1 # 难度倍数,可以写小数
|
||||
static var allowFriendlyFire: bool = false # 是否允许友军伤害
|
||||
static var bulletSpeedMultiplier: float = 1 # 子弹速度倍率
|
||||
static var damageOffset: float = MathTool.percent(20) # 伤害随机浮动比例
|
||||
|
||||
Reference in New Issue
Block a user