mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
feat(武器): 添加咸亨记账簿武器及茴香豆子弹
实现新的HXD武器系统,包括: - 咸亨记账簿武器,可发射反弹的茴香豆子弹 - 茴香豆子弹能在敌人间反弹并造成伤害 - 添加相关资源文件及场景配置 - 将新武器添加到公鸡角色的武器库中
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
[gd_scene load_steps=8 format=3 uid="uid://bqqi6l5wjbal0"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://crtdkysmnkith" path="res://components/Abstracts/BulletBase.tscn" id="1_2mhxm"]
|
||||
[ext_resource type="Script" uid="uid://4mb47jqtc8f7" path="res://scripts/Contents/Bullets/HXD.gd" id="2_4lnkm"]
|
||||
[ext_resource type="Texture2D" uid="uid://cn8otc1mue01x" path="res://resources/bullets/HXD/1.png" id="2_c1db4"]
|
||||
[ext_resource type="Texture2D" uid="uid://cu7y6xuwad1if" path="res://resources/bullets/HXD/2.png" id="3_4lnkm"]
|
||||
[ext_resource type="Texture2D" uid="uid://spfkgh4a2lbu" path="res://resources/bullets/HXD/3.png" id="4_ag3l8"]
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_lskjb"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("2_c1db4")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"0",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("3_4lnkm")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"1",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("4_ag3l8")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"2",
|
||||
"speed": 5.0
|
||||
}]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_4lnkm"]
|
||||
size = Vector2(32, 20)
|
||||
|
||||
[node name="HXD" instance=ExtResource("1_2mhxm")]
|
||||
script = ExtResource("2_4lnkm")
|
||||
displayName = "茴香豆"
|
||||
penerate = 1.0
|
||||
lifeTime = 5000.0
|
||||
|
||||
[node name="texture" parent="." index="0"]
|
||||
scale = Vector2(0.185, 0.185)
|
||||
sprite_frames = SubResource("SpriteFrames_lskjb")
|
||||
animation = &"2"
|
||||
|
||||
[node name="hitbox" parent="." index="1"]
|
||||
shape = SubResource("RectangleShape2D_4lnkm")
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
[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://c0n3igy4hucrg" path="res://components/Weapons/PurpleCrystal.tscn" id="3_da2ca"]
|
||||
[ext_resource type="PackedScene" uid="uid://bm5sw6mr71acq" path="res://components/Weapons/HXD.tscn" id="3_da2ca"]
|
||||
[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="AudioStream" uid="uid://dmxh3bpk8vyy5" path="res://resources/sounds/effect/Coin.mp3" id="5_xnbhq"]
|
||||
@@ -58,8 +58,7 @@ metadata/_edit_vertical_guides_ = [71.0]
|
||||
[node name="weaponStore" parent="." index="1"]
|
||||
process_mode = 4
|
||||
|
||||
[node name="PurpleCrystal" parent="weaponStore" index="0" instance=ExtResource("3_da2ca")]
|
||||
debugRebuild = false
|
||||
[node name="HXD" parent="weaponStore" index="0" instance=ExtResource("3_da2ca")]
|
||||
|
||||
[node name="sprint" parent="sounds" index="0"]
|
||||
stream = ExtResource("4_66s6c")
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://bm5sw6mr71acq"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://ckq2cq6m23hq3" path="res://components/Abstracts/WeaponCardBase.tscn" id="1_h4ls7"]
|
||||
[ext_resource type="Script" uid="uid://0xfj35jvi7ym" path="res://scripts/Contents/Weapons/HXD.gd" id="2_7tnwq"]
|
||||
[ext_resource type="Texture2D" uid="uid://cvvtr2mmwo18r" path="res://resources/weapons/HXD.png" id="2_d5bd0"]
|
||||
|
||||
[node name="HXD" instance=ExtResource("1_h4ls7")]
|
||||
script = ExtResource("2_7tnwq")
|
||||
avatarTexture = ExtResource("2_d5bd0")
|
||||
displayName = "咸亨记账簿"
|
||||
quality = 3
|
||||
typeTopic = 3
|
||||
costBeachball = 4000
|
||||
store = {
|
||||
"atk": 4
|
||||
}
|
||||
descriptionTemplate = "发射$atk颗[b]茴香豆[/b],在敌人间反弹,每颗茴香豆最多可以反弹$atk次,每次反弹对敌人造成$atk点伤害。散射+40°"
|
||||
cooldown = 1000.0
|
||||
debugRebuild = true
|
||||
|
||||
[node name="avatar" parent="container/info" index="0"]
|
||||
texture = ExtResource("2_d5bd0")
|
||||
|
||||
[node name="beachball" parent="container/info/infos" index="1"]
|
||||
count = 4000
|
||||
|
||||
[node name="name" parent="container/info" index="2"]
|
||||
displayName = "咸亨记账簿"
|
||||
quality = 3
|
||||
typeTopic = 3
|
||||
|
||||
[node name="description" parent="container" index="2"]
|
||||
text = "[center]发射[color=cyan]4[/color]颗[b]茴香豆[/b],在敌人间反弹,每颗茴香豆最多可以反弹[color=cyan]4[/color]次,每次反弹对敌人造成[color=cyan]4[/color]点伤害。散射+40°[/center]"
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cn8otc1mue01x"
|
||||
path="res://.godot/imported/1.png-57a69a4c68ef0b7bef87f2dfbfb80a64.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://resources/bullets/HXD/1.png"
|
||||
dest_files=["res://.godot/imported/1.png-57a69a4c68ef0b7bef87f2dfbfb80a64.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 27 KiB |
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cu7y6xuwad1if"
|
||||
path="res://.godot/imported/2.png-37506f6061013db59b3d01a78b632aff.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://resources/bullets/HXD/2.png"
|
||||
dest_files=["res://.godot/imported/2.png-37506f6061013db59b3d01a78b632aff.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://spfkgh4a2lbu"
|
||||
path="res://.godot/imported/3.png-8d11a82b969f5c829e3aa7b862e3f6be.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://resources/bullets/HXD/3.png"
|
||||
dest_files=["res://.godot/imported/3.png-8d11a82b969f5c829e3aa7b862e3f6be.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 134 KiB |
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cvvtr2mmwo18r"
|
||||
path="res://.godot/imported/HXD.png-596822d7cb64882146b5a289043d390a.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://resources/weapons/HXD.png"
|
||||
dest_files=["res://.godot/imported/HXD.png-596822d7cb64882146b5a289043d390a.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
@@ -0,0 +1,24 @@
|
||||
extends BulletBase
|
||||
class_name HXDBullet
|
||||
|
||||
var bouncedTime: int = 0
|
||||
var maxBouncedTime: int = 0
|
||||
|
||||
func spawn():
|
||||
texture.play(str(randi_range(0, 2)))
|
||||
func ai():
|
||||
PresetBulletAI.forward(self, rotation)
|
||||
func succeedToHit(_dmg: float, entity: EntityBase):
|
||||
if bouncedTime < maxBouncedTime:
|
||||
var newEntity = EntityTool.findClosetEntity(position, get_tree(), !launcher.isPlayer(), launcher.isPlayer(), [entity])
|
||||
if is_instance_valid(newEntity):
|
||||
look_at(newEntity.position)
|
||||
bouncedTime += 1
|
||||
func split(newBullet: BulletBase, _index: int, _total: int, _lastBullet: float):
|
||||
if newBullet is HXDBullet:
|
||||
newBullet.bouncedTime = 0
|
||||
return newBullet
|
||||
func refract(newBullet: BulletBase, _entity: EntityBase, _index: int, _total: int, _lastBullet: float):
|
||||
if newBullet is HXDBullet:
|
||||
newBullet.bouncedTime = 0
|
||||
return newBullet
|
||||
@@ -0,0 +1 @@
|
||||
uid://4mb47jqtc8f7
|
||||
@@ -0,0 +1,17 @@
|
||||
@tool
|
||||
extends Weapon
|
||||
|
||||
func update(to: int, origin: Dictionary, _entity: EntityBase):
|
||||
origin["atk"] += 1 * to * soulLevel
|
||||
return origin
|
||||
func attack(entity: EntityBase):
|
||||
for i in readStore("atk"):
|
||||
for bullet in BulletBase.generate(
|
||||
ComponentManager.getBullet("HXD"),
|
||||
entity,
|
||||
entity.findWeaponAnchor("normal"),
|
||||
entity.findWeaponAnchor("normal").angle_to_point(get_global_mouse_position()) + deg_to_rad(randf_range(-1, 1) * 40)
|
||||
):
|
||||
if bullet is HXDBullet:
|
||||
bullet.maxBouncedTime = readStore("atk")
|
||||
bullet.baseDamage = readStore("atk")
|
||||
@@ -0,0 +1 @@
|
||||
uid://0xfj35jvi7ym
|
||||
Reference in New Issue
Block a user