mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-07-05 01:32:13 +08:00
feat(武器): 增强红水晶武器爆炸效果
修改红水晶武器爆炸时生成的水晶碎片数量逻辑,从固定数量改为1~N随机数量 更新相关描述文本以反映新的随机数量机制
This commit is contained in:
@@ -12,7 +12,7 @@ displayName = "红水晶簇"
|
|||||||
typeTopic = 1
|
typeTopic = 1
|
||||||
store = {
|
store = {
|
||||||
"atk": 45,
|
"atk": 45,
|
||||||
"count": 1,
|
"count": 3,
|
||||||
"percent": 0.5,
|
"percent": 0.5,
|
||||||
"radius": 150.0
|
"radius": 150.0
|
||||||
}
|
}
|
||||||
@@ -22,7 +22,7 @@ storeType = {
|
|||||||
"percent": 2,
|
"percent": 2,
|
||||||
"radius": 1
|
"radius": 1
|
||||||
}
|
}
|
||||||
descriptionTemplate = "发射[b]红水晶[/b],在3秒后以$radius的半径爆炸,造成$atk点伤害并向随机方向发射$count个[b]水晶碎片[/b],造成$percent基础伤害。"
|
descriptionTemplate = "发射[b]红水晶[/b],在3秒后以$radius的半径爆炸,造成$atk点伤害并向随机方向发射1~$count个[b]水晶碎片[/b],造成$percent基础伤害。"
|
||||||
cooldown = 1000.0
|
cooldown = 1000.0
|
||||||
debugRebuild = true
|
debugRebuild = true
|
||||||
|
|
||||||
@@ -37,4 +37,4 @@ displayName = "红水晶簇"
|
|||||||
typeTopic = 1
|
typeTopic = 1
|
||||||
|
|
||||||
[node name="description" parent="container" index="2"]
|
[node name="description" parent="container" index="2"]
|
||||||
text = "[center]发射[b]红水晶[/b],在3秒后以[color=cyan]150[/color]的半径爆炸,造成[color=cyan]45[/color]点伤害并向随机方向发射[color=cyan]1[/color]个[b]水晶碎片[/b],造成[color=cyan]50%[/color]基础伤害。[/center]"
|
text = "[center]发射[b]红水晶[/b],在3秒后以[color=cyan]150[/color]的半径爆炸,造成[color=cyan]45[/color]点伤害并向随机方向发射1~[color=cyan]3[/color]个[b]水晶碎片[/b],造成[color=cyan]50%[/color]基础伤害。[/center]"
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ class_name RedCrystalBullet
|
|||||||
|
|
||||||
var radius: float = 0
|
var radius: float = 0
|
||||||
var percent: float = 0
|
var percent: float = 0
|
||||||
|
var count: int = 0
|
||||||
|
|
||||||
func register():
|
func register():
|
||||||
hitbox.shape = hitbox.shape.duplicate()
|
hitbox.shape = hitbox.shape.duplicate()
|
||||||
@@ -12,7 +13,8 @@ func ai():
|
|||||||
func destroy(_beacuseMap: bool):
|
func destroy(_beacuseMap: bool):
|
||||||
hitbox.shape.radius = radius
|
hitbox.shape.radius = radius
|
||||||
EffectController.create(ComponentManager.getEffect("RedCrystalExplosion"), global_position).shot()
|
EffectController.create(ComponentManager.getEffect("RedCrystalExplosion"), global_position).shot()
|
||||||
for bullet in BulletBase.generate(ComponentManager.getBullet("CrystalBlock"), launcher, position, deg_to_rad(randf_range(0, 360))):
|
for i in randi_range(1, count):
|
||||||
if bullet is CrystalBlockBullet:
|
for bullet in BulletBase.generate(ComponentManager.getBullet("CrystalBlock"), launcher, position, deg_to_rad(randf_range(0, 360))):
|
||||||
bullet.baseDamage = baseDamage * percent
|
if bullet is CrystalBlockBullet:
|
||||||
|
bullet.baseDamage = baseDamage * percent
|
||||||
await TickTool.millseconds(100)
|
await TickTool.millseconds(100)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ class_name RedCrystalWeapon
|
|||||||
func update(to: int, origin: Dictionary, _entity: EntityBase):
|
func update(to: int, origin: Dictionary, _entity: EntityBase):
|
||||||
origin["atk"] += 5 * to * soulLevel
|
origin["atk"] += 5 * to * soulLevel
|
||||||
origin["radius"] += 1 * to * soulLevel
|
origin["radius"] += 1 * to * soulLevel
|
||||||
origin["count"] = 1 * soulLevel
|
origin["count"] = 2 + 1 * soulLevel
|
||||||
origin["percent"] += 0.001 * to * soulLevel
|
origin["percent"] += 0.001 * to * soulLevel
|
||||||
return origin
|
return origin
|
||||||
func attack(entity: EntityBase):
|
func attack(entity: EntityBase):
|
||||||
@@ -14,4 +14,6 @@ func attack(entity: EntityBase):
|
|||||||
if bullet is RedCrystalBullet:
|
if bullet is RedCrystalBullet:
|
||||||
bullet.baseDamage = readStore("atk")
|
bullet.baseDamage = readStore("atk")
|
||||||
bullet.radius = readStore("radius")
|
bullet.radius = readStore("radius")
|
||||||
|
bullet.percent = readStore("percent")
|
||||||
|
bullet.count = readStore("count")
|
||||||
return true
|
return true
|
||||||
|
|||||||
Reference in New Issue
Block a user