mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-27 22:41:56 +08:00
aec1db5088
- 在Weapon.gd中添加sublimateToggled信号 - 为武器添加默认的升华选项"强化攻击" - 优化WeaponPanel.gd中的变量类型声明 - 修改Tree.gd中的描述文本使其更准确
55 lines
1.7 KiB
GDScript
55 lines
1.7 KiB
GDScript
@tool
|
|
extends Weapon
|
|
|
|
func sublimateOptions() -> Array[SublimateOption]:
|
|
return [
|
|
SublimateOption.new("引气入体", "乾坤剑伤害+6",
|
|
func(w: Weapon, _e): w.addStoreExtra("atk", 6),
|
|
1,
|
|
CategoryStore.Quality.COMMON
|
|
),
|
|
SublimateOption.new("健体·阳", "格挡次数+1",
|
|
func(w: Weapon, _e): w.addStoreExtra("count", 1),
|
|
1,
|
|
CategoryStore.Quality.LEGENDARY
|
|
),
|
|
SublimateOption.new("健体·阴", "气力上限+1",
|
|
func(w: Weapon, _e): w.addStoreExtra("max", 1),
|
|
1,
|
|
CategoryStore.Quality.EPIC
|
|
),
|
|
SublimateOption.new("献祭", "乾坤剑伤害-8,但弹反概率+4%",
|
|
func(w: Weapon, _e):
|
|
w.addStoreExtra("atk", -10)
|
|
w.addStoreExtra("rate", 0.05),
|
|
1,
|
|
CategoryStore.Quality.RARE
|
|
),
|
|
SublimateOption.new("亏心", "消耗所有幸运,每点幸运增加1%弹反概率",
|
|
func(w: Weapon, e: EntityBase):
|
|
w.addStoreExtra("rate", e.fields[FieldStore.Entity.LUCK_VALUE]),
|
|
1,
|
|
CategoryStore.Quality.WASTE
|
|
),
|
|
]
|
|
func update(to: int, origin: Dictionary, _entity: EntityBase):
|
|
origin["atk"] += 2 * to * soulLevel
|
|
origin["count"] += 1 * (soulLevel - 1)
|
|
origin["max"] += 2 * (soulLevel - 1)
|
|
origin["rate"] += 0.15 * (soulLevel - 1)
|
|
return origin
|
|
func attack(entity: EntityBase):
|
|
for bullet in BulletBase.generate(
|
|
ComponentManager.getBullet("Parrier"),
|
|
entity,
|
|
entity.texture.global_position,
|
|
entity.texture.global_position.angle_to_point(get_global_mouse_position()),
|
|
):
|
|
if bullet is ParrierBullet:
|
|
bullet.atk = readStore("atk")
|
|
bullet.maxParryTimes = readStore("count")
|
|
bullet.maxBallCount = readStore("max")
|
|
bullet.reflectRate = readStore("rate")
|
|
bullet.baseDamage = readStore("atk") * readStore("rate")
|
|
return true
|