mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-07-08 02:57:06 +08:00
refactor(武器): 调整钢管武器的伤害计算和描述
修改钢管武器的伤害计算公式,使用平方根函数替代线性增长 移除蓄力倍率属性,改为固定值0.1 更新武器描述文本以反映新的伤害机制
This commit is contained in:
@@ -11,18 +11,11 @@ displayName = "钢管"
|
|||||||
costBeachball = 350
|
costBeachball = 350
|
||||||
chargable = true
|
chargable = true
|
||||||
store = {
|
store = {
|
||||||
"atk": 5,
|
"atk": 5
|
||||||
"charge": 0.1
|
|
||||||
}
|
}
|
||||||
storeType = {
|
descriptionTemplate = "按住蓄力扔出钢管,蓄力越久伤害越高,至少造成$atk点伤害,发射钢管后继续按住鼠标可进行连续发射。"
|
||||||
"atk": 1,
|
|
||||||
"charge": 2
|
|
||||||
}
|
|
||||||
descriptionTemplate = "按住蓄力扔出钢管,蓄力越久伤害越高,发射钢管后继续按住鼠标可继续蓄力。
|
|
||||||
基础伤害:$atk,蓄力倍率:$charge"
|
|
||||||
needEnergy = 2.0
|
needEnergy = 2.0
|
||||||
cooldown = 3000.0
|
cooldown = 3000.0
|
||||||
debugRebuild = true
|
|
||||||
|
|
||||||
[node name="avatar" parent="container/info" index="0"]
|
[node name="avatar" parent="container/info" index="0"]
|
||||||
texture = ExtResource("2_mmtf8")
|
texture = ExtResource("2_mmtf8")
|
||||||
@@ -37,5 +30,4 @@ count = 350
|
|||||||
displayName = "钢管"
|
displayName = "钢管"
|
||||||
|
|
||||||
[node name="description" parent="container" index="2"]
|
[node name="description" parent="container" index="2"]
|
||||||
text = "[center]按住蓄力扔出钢管,蓄力越久伤害越高,发射钢管后继续按住鼠标可继续蓄力。
|
text = "[center]按住蓄力扔出钢管,蓄力越久伤害越高,至少造成[color=cyan]5[/color]点伤害,发射钢管后继续按住鼠标可进行连续发射。[/center]"
|
||||||
基础伤害:[color=cyan]5[/color],蓄力倍率:[color=cyan]10.0%[/color][/center]"
|
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ extends Weapon
|
|||||||
|
|
||||||
func update(to: int, origin: Dictionary, _entity: EntityBase):
|
func update(to: int, origin: Dictionary, _entity: EntityBase):
|
||||||
origin["atk"] += 1 * to * soulLevel
|
origin["atk"] += 1 * to * soulLevel
|
||||||
origin["charge"] += 0.05 * (soulLevel - 1)
|
|
||||||
return origin
|
return origin
|
||||||
func attack(entity: EntityBase):
|
func attack(entity: EntityBase):
|
||||||
var weaponPos = entity.findWeaponAnchor("normal")
|
var weaponPos = entity.findWeaponAnchor("normal")
|
||||||
@@ -14,7 +13,7 @@ func attack(entity: EntityBase):
|
|||||||
weaponPos.angle_to_point(get_global_mouse_position())
|
weaponPos.angle_to_point(get_global_mouse_position())
|
||||||
):
|
):
|
||||||
if bullet is PipeBullet:
|
if bullet is PipeBullet:
|
||||||
var e = charged(readStore("atk"), readStore("charge"))
|
var e = charged(readStore("atk"), 0.1)
|
||||||
bullet.baseDamage = e
|
bullet.baseDamage = e
|
||||||
bullet.energy = e
|
bullet.energy = e
|
||||||
bullet.speed = e
|
bullet.speed = e
|
||||||
|
|||||||
@@ -177,7 +177,7 @@ func tryAttack(entity: EntityBase):
|
|||||||
entity.useEnergy(needEnergy)
|
entity.useEnergy(needEnergy)
|
||||||
return result
|
return result
|
||||||
func charged(base: float, percent: float):
|
func charged(base: float, percent: float):
|
||||||
return base * (1 + chargedTime / 75 * percent)
|
return base * sqrt(1 + chargedTime / 20 * percent)
|
||||||
|
|
||||||
# 抽象
|
# 抽象
|
||||||
func update(_to: int, origin: Dictionary, _entity: EntityBase):
|
func update(_to: int, origin: Dictionary, _entity: EntityBase):
|
||||||
|
|||||||
Reference in New Issue
Block a user