mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
46d3816d9d
修改HCN角色的技能触发机制,从召唤物死亡时储能改为击杀敌人时储能 更新角色描述和属性数值 更换角色默认武器为AcidWind 添加killEnemy信号到EntityBase用于触发击杀事件 为AcidWind武器添加升华选项
82 lines
2.3 KiB
GDScript
82 lines
2.3 KiB
GDScript
@tool
|
|
extends Weapon
|
|
|
|
var acids: Array[String] = ["AcidS", "AcidN", "AcidCl", "AcidP", "AcidC"]
|
|
|
|
func sublimateOptions() -> Array[SublimateOption]:
|
|
return [
|
|
SublimateOption.new(
|
|
"浓度提高",
|
|
"硫酸最大溅射数+1,弱酸伤害+0.03",
|
|
func(w: Weapon, _e):
|
|
w.addStoreExtra("s-count-max", 1)
|
|
w.addStoreExtra("weakatk", 0.03),
|
|
1,
|
|
CategoryStore.Quality.COMMON
|
|
),
|
|
SublimateOption.new(
|
|
"王水效应",
|
|
"硝酸额外伤害+10%,盐酸减速效果+0.02%",
|
|
func(w: Weapon, _e):
|
|
w.addStoreExtra("n-atk", 0.1)
|
|
w.addStoreExtra("cl-speed", 0.0002)
|
|
w.addStoreExtra("cl-atkspeed", 0.0002),
|
|
1,
|
|
CategoryStore.Quality.RARE
|
|
),
|
|
SublimateOption.new(
|
|
"脱钙反应",
|
|
"碳酸降伤比例+0.2%,磷酸散射角增加+0.02°",
|
|
func(w: Weapon, _e):
|
|
w.addStoreExtra("c-atk", 0.002)
|
|
w.addStoreExtra("p-offset", 0.02),
|
|
1,
|
|
CategoryStore.Quality.EPIC
|
|
),
|
|
SublimateOption.new(
|
|
"离心涡流",
|
|
"风暴吸引频率+1Hz",
|
|
func(w: Weapon, _e):
|
|
w.addStoreExtra("f", 1),
|
|
1,
|
|
CategoryStore.Quality.LEGENDARY
|
|
),
|
|
SublimateOption.new(
|
|
"强酸蚀骨",
|
|
"强酸基础伤害+0.05",
|
|
func(w: Weapon, _e):
|
|
w.addStoreExtra("atk", 0.05),
|
|
1,
|
|
CategoryStore.Quality.COMMON
|
|
),
|
|
]
|
|
func update(to: int, origin: Dictionary, _entity: EntityBase):
|
|
origin["atk"] += 0.15 * to * soulLevel
|
|
origin["c-atk"] *= soulLevel
|
|
origin["cl-atkspeed"] *= soulLevel
|
|
origin["cl-speed"] *= soulLevel
|
|
origin["n-atk"] *= soulLevel
|
|
origin["p-offset"] *= soulLevel
|
|
origin["s-count-max"] *= soulLevel
|
|
origin["weakatk"] += 0.075 * to * soulLevel
|
|
origin["f"] += 15 * (soulLevel - 1)
|
|
return origin
|
|
func attack(entity: EntityBase):
|
|
for bullet in BulletBase.generate(
|
|
ComponentManager.getBullet("AcidStorm"),
|
|
entity,
|
|
entity.findWeaponAnchor("normal"),
|
|
(get_global_mouse_position() - entity.findWeaponAnchor("normal")).angle(),
|
|
):
|
|
if bullet is AcidStormBullet:
|
|
bullet.strongAtk = readStore("atk")
|
|
bullet.weakAtk = readStore("weakatk")
|
|
bullet.sCountMax = readStore("s-count-max")
|
|
bullet.nAtk = readStore("n-atk")
|
|
bullet.clSpeed = readStore("cl-speed")
|
|
bullet.clAtkSpeed = readStore("cl-atkspeed")
|
|
bullet.cAtk = readStore("c-atk")
|
|
bullet.pOffset = readStore("p-offset")
|
|
bullet.f = readStore("f")
|
|
return true
|