mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 15:01:53 +08:00
06413d204c
- 修改Oxygener武器属性,增加count字段控制篮球消耗 - 实现checkAttack方法检查篮球消耗 - 调整武器基础数值和描述 - 移除氧气火焰的击退效果 - 在Rooster角色中替换初始武器为Oxygener - 修复代码缩进问题
33 lines
997 B
GDScript
33 lines
997 B
GDScript
@tool
|
|
extends Weapon
|
|
|
|
func update(to: int, origin: Dictionary, _entity: EntityBase):
|
|
origin["atk"] += 1 * to * soulLevel
|
|
origin["fireatk"] += 0.5 * to * soulLevel
|
|
origin["max-n"] += 2 * (soulLevel - 1)
|
|
origin["count"] *= soulLevel
|
|
return origin
|
|
func checkAttack(entity: EntityBase) -> bool:
|
|
return entity.useItem({ItemStore.ItemType.BASKETBALL: 1.0 / readStore("count")})
|
|
func attack(entity: EntityBase):
|
|
for bullet in BulletBase.generate(
|
|
ComponentManager.getBullet("OxygenFire"),
|
|
entity,
|
|
entity.findWeaponAnchor("normal"),
|
|
entity.position.angle_to_point(get_global_mouse_position()),
|
|
):
|
|
if bullet is OxygenFire:
|
|
bullet.baseDamage = readStore("fireatk")
|
|
if MathTool.rate(0.1):
|
|
for i in randi_range(readStore("min-n"), readStore("max-n")):
|
|
for n in BulletBase.generate(
|
|
ComponentManager.getBullet("AcidN"),
|
|
entity,
|
|
bullet.position,
|
|
0,
|
|
):
|
|
if n is AcidN:
|
|
n.baseDamage = readStore("atk")
|
|
n.storm = bullet
|
|
return true
|