mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
feat(武器系统): 重构氧化加农炮并添加篮球消耗机制
- 修改Oxygener武器属性,增加count字段控制篮球消耗 - 实现checkAttack方法检查篮球消耗 - 调整武器基础数值和描述 - 移除氧气火焰的击退效果 - 在Rooster角色中替换初始武器为Oxygener - 修复代码缩进问题
This commit is contained in:
@@ -146,7 +146,6 @@ penerate = 1.0
|
||||
lifeTime = 1000.0
|
||||
autoSpawnAnimation = true
|
||||
freeAfterSpawn = true
|
||||
knockback = 10.0
|
||||
|
||||
[node name="animator" parent="texture" index="0"]
|
||||
libraries = {
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
[gd_scene load_steps=20 format=3 uid="uid://dky8574uqc18r"]
|
||||
[gd_scene load_steps=21 format=3 uid="uid://dky8574uqc18r"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://cvogxi7mktumf" path="res://components/Abstracts/EntityBase.tscn" id="1_e5pl8"]
|
||||
[ext_resource type="Script" uid="uid://cthtupc6dtbav" path="res://scripts/Contents/Characters/Rooster.gd" id="2_oqdqd"]
|
||||
[ext_resource type="PackedScene" uid="uid://b5ebx8duvgtt5" path="res://components/Weapons/Oxygener.tscn" id="3_0omr3"]
|
||||
[ext_resource type="AudioStream" uid="uid://cdrevrq7n6yqa" path="res://resources/sounds/effect/Boing.mp3" id="4_66s6c"]
|
||||
[ext_resource type="AudioStream" uid="uid://benyec5bqni0b" path="res://resources/sounds/effect/Chomp.wav" id="4_k0yme"]
|
||||
[ext_resource type="PackedScene" uid="uid://cxabqjo7skxev" path="res://components/Weapons/BigLaser.tscn" id="5_joj4g"]
|
||||
@@ -101,7 +102,11 @@ process_material = SubResource("ParticleProcessMaterial_joj4g")
|
||||
[node name="weaponStore" parent="." index="2"]
|
||||
process_mode = 4
|
||||
|
||||
[node name="BigLaser" parent="weaponStore" index="0" instance=ExtResource("5_joj4g")]
|
||||
[node name="Oxygener" parent="weaponStore" index="0" instance=ExtResource("3_0omr3")]
|
||||
offset_bottom = 446.0
|
||||
debugRebuild = false
|
||||
|
||||
[node name="BigLaser" parent="weaponStore" index="1" instance=ExtResource("5_joj4g")]
|
||||
|
||||
[node name="sprint" parent="sounds" index="0"]
|
||||
stream = ExtResource("4_66s6c")
|
||||
|
||||
@@ -11,18 +11,20 @@ displayName = "氧化加农炮"
|
||||
quality = 0
|
||||
typeTopic = 2
|
||||
store = {
|
||||
"atk": 3.0,
|
||||
"fireatk": 1.0,
|
||||
"atk": 10.0,
|
||||
"count": 1,
|
||||
"fireatk": 5.0,
|
||||
"max-n": 7.0,
|
||||
"min-n": 3.0
|
||||
"min-n": 2.0
|
||||
}
|
||||
storeType = {
|
||||
"atk": 0,
|
||||
"count": 1,
|
||||
"fireatk": 0,
|
||||
"max-n": 1,
|
||||
"min-n": 1
|
||||
}
|
||||
descriptionTemplate = "高速喷出[b]火焰[/b],造成$fireatk点伤害。小概率喷出[b]硝化火[/b],召唤$min-n~$max-n滴[b]浓硝酸[/b]围绕在火焰旁,每滴造成$atk点伤害。[b]火焰[/b]具有高额击退效果,[b]浓硝酸[/b]液滴的射程较短。"
|
||||
descriptionTemplate = "高速喷出[b]火焰[/b],造成$fireatk点伤害。小概率喷出[b]硝化火[/b],召唤$min-n~$max-n滴[b]浓硝酸[/b]围绕在火焰旁,每滴造成$atk点伤害。[b]火焰[/b]具有高额击退效果,[b]浓硝酸[/b]液滴的射程较短,每发射$count次火焰会消耗[color=yellow]1[/color]个[b]篮球[/b]。"
|
||||
cooldown = 50.0
|
||||
debugRebuild = true
|
||||
|
||||
@@ -35,4 +37,4 @@ quality = 0
|
||||
typeTopic = 2
|
||||
|
||||
[node name="description" parent="container" index="2"]
|
||||
text = "[center]高速喷出[b]火焰[/b],造成[color=cyan]1.00[/color]点伤害。小概率喷出[b]硝化火[/b],召唤[color=cyan]3[/color]~[color=cyan]7[/color]滴[b]浓硝酸[/b]围绕在火焰旁,每滴造成[color=cyan]3.00[/color]点伤害。[b]火焰[/b]具有高额击退效果,[b]浓硝酸[/b]液滴的射程较短。[/center]"
|
||||
text = "[center]高速喷出[b]火焰[/b],造成[color=cyan]5.00[/color]点伤害。小概率喷出[b]硝化火[/b],召唤[color=cyan]2[/color]~[color=cyan]7[/color]滴[b]浓硝酸[/b]围绕在火焰旁,每滴造成[color=cyan]10.00[/color]点伤害。[b]火焰[/b]具有高额击退效果,[b]浓硝酸[/b]液滴的射程较短,每发射[color=cyan]1[/color]次火焰会消耗[color=yellow]1[/color]个[b]篮球[/b]。[/center]"
|
||||
|
||||
@@ -2,4 +2,4 @@ extends BulletBase
|
||||
class_name OxygenFire
|
||||
|
||||
func ai():
|
||||
PresetBulletAI.forward(self, rotation)
|
||||
PresetBulletAI.forward(self, rotation)
|
||||
|
||||
@@ -4,8 +4,11 @@ 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
|
||||
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"),
|
||||
|
||||
@@ -169,7 +169,7 @@ func playSound(sound: String):
|
||||
cloned.queue_free()
|
||||
func canAttackBy(entity: EntityBase):
|
||||
cooldownTimer.speedScale = entity.fields.get(FieldStore.Entity.ATTACK_SPEED) * attackSpeed
|
||||
return cooldownTimer.isCooldowned() and entity.isEnergyEnough(needEnergy)
|
||||
return cooldownTimer.isCooldowned() and entity.isEnergyEnough(needEnergy) and checkAttack(entity)
|
||||
func tryAttack(entity: EntityBase):
|
||||
if canAttackBy(entity):
|
||||
var result = await attack(entity)
|
||||
@@ -183,5 +183,7 @@ func charged(base: float, percent: float):
|
||||
# 抽象
|
||||
func update(_to: int, origin: Dictionary, _entity: EntityBase):
|
||||
return origin
|
||||
func checkAttack(_entity: EntityBase) -> bool:
|
||||
return true
|
||||
func attack(_entity: EntityBase):
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user