1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-28 06:51:54 +08:00
Files
Dog-Lynx-And-HCN/scripts/Contents/Weapons/AcidWind.gd
T
fallingshrimp 3eb1f84a21 feat(武器): 添加酸蚀风暴武器及五种酸液子弹
实现酸蚀风暴武器系统,包含五种不同类型的酸液子弹:
1. 硫酸:命中时溅射1~3滴酸液
2. 硝酸:造成额外伤害
3. 盐酸:降低敌人移动和攻击速度
4. 碳酸:可无限穿透并逐渐扩大
5. 磷酸:增加敌人散射角

同时调整武器数值平衡,更新VSCode配置中的Godot引擎路径
2026-01-23 23:44:21 +08:00

39 lines
1.5 KiB
GDScript

@tool
extends Weapon
var acids: Array[String] = ["AcidS", "AcidN", "AcidCl", "AcidP", "AcidC"]
func update(to: int, origin: Dictionary, _entity: EntityBase):
origin["atk"] += 0.05 * 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.025 * soulLevel
return origin
func attack(entity: EntityBase):
for bullet in BulletBase.generate(
ComponentManager.getBullet(MathTool.randomChoiceFrom(acids)),
entity,
entity.findWeaponAnchor("normal"),
(get_global_mouse_position() - entity.findWeaponAnchor("normal")).angle()
):
if bullet is AcidBulletBase:
if bullet.acidType == AcidBulletBase.AcidType.STRONG:
bullet.baseDamage = readStore("atk")
else:
bullet.baseDamage = readStore("weakatk")
if bullet is AcidS:
bullet.arg1 = readStore("s-count-max")
if bullet is AcidN:
bullet.arg1 = readStore("n-atk")
if bullet is AcidCl:
bullet.arg1 = readStore("cl-speed")
bullet.arg2 = readStore("cl-atkspeed")
if bullet is AcidP:
bullet.arg1 = readStore("p-offset")
if bullet is AcidC:
bullet.rotation += deg_to_rad(randf_range(-1, 1) * 15)