diff --git a/components/Bullets/Wuwei.tscn b/components/Bullets/Wuwei.tscn new file mode 100644 index 0000000..3ee0441 --- /dev/null +++ b/components/Bullets/Wuwei.tscn @@ -0,0 +1,132 @@ +[gd_scene format=3 uid="uid://bwr1jbnnkvkgi"] + +[ext_resource type="PackedScene" uid="uid://crtdkysmnkith" path="res://components/Abstracts/BulletBase.tscn" id="1_eg848"] +[ext_resource type="Texture2D" uid="uid://d1ismqrlhbv7f" path="res://resources/bullets/wuwei/Wuwei.png" id="2_6ny68"] + +[sub_resource type="Animation" id="Animation_6ny68"] +length = 0.001 +tracks/0/type = "bezier" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath(".:rotation") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"handle_modes": PackedInt32Array(0), +"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0), +"times": PackedFloat32Array(0) +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath(".:modulate") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Color(1, 1, 1, 1)] +} +tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath("%hitbox:disabled") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [false] +} + +[sub_resource type="Animation" id="Animation_vxgkj"] +resource_name = "destroy" +length = 0.5 +step = 0.1 + +[sub_resource type="Animation" id="Animation_rpg0e"] +resource_name = "loop" +loop_mode = 1 +step = 0.1 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath(".:rotation") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 1), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [0.0, 6.28319] +} + +[sub_resource type="Animation" id="Animation_06poh"] +resource_name = "spawn" +length = 3.0 +loop_mode = 1 +step = 0.1 +tracks/0/type = "bezier" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath(".:rotation") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"handle_modes": PackedInt32Array(2, 2), +"points": PackedFloat32Array(0, 0, 0, 3.5, 4, -1.57, -1, -2, 0, 0), +"times": PackedFloat32Array(0, 3) +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath(".:modulate") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0, 0.9, 2.7, 3), +"transitions": PackedFloat32Array(1, 1, 1, 1), +"update": 0, +"values": [Color(1, 1, 1, 0), Color(1, 1, 1, 1), Color(1, 1, 1, 1), Color(1, 1, 1, 0)] +} +tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath("%hitbox:disabled") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(0, 2.4, 3), +"transitions": PackedFloat32Array(1, 1, 1), +"update": 1, +"values": [true, false, false] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_57ptn"] +_data = { +&"RESET": SubResource("Animation_6ny68"), +&"destroy": SubResource("Animation_vxgkj"), +&"loop": SubResource("Animation_rpg0e"), +&"spawn": SubResource("Animation_06poh") +} + +[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_6ny68"] +radius = 55.20601 +height = 389.01526 + +[node name="Wuwei" unique_id=326826451 instance=ExtResource("1_eg848")] + +[node name="animator" parent="texture" index="0"] +libraries/ = SubResource("AnimationLibrary_57ptn") + +[node name="static" type="Sprite2D" parent="texture" index="1" unique_id=892692141] +position = Vector2(136.00002, 0) +scale = Vector2(0.37746382, 0.37746382) +texture = ExtResource("2_6ny68") + +[node name="hitbox" parent="." index="1"] +position = Vector2(112, -64) +rotation = -0.29216617 +shape = SubResource("CapsuleShape2D_6ny68") diff --git a/components/Weapons/DaoStatue.tscn b/components/Weapons/DaoStatue.tscn new file mode 100644 index 0000000..31012d0 --- /dev/null +++ b/components/Weapons/DaoStatue.tscn @@ -0,0 +1,33 @@ +[gd_scene format=3 uid="uid://bbrllsqjmx0ie"] + +[ext_resource type="PackedScene" uid="uid://ckq2cq6m23hq3" path="res://components/Abstracts/WeaponCardBase.tscn" id="1_mps21"] +[ext_resource type="Texture2D" uid="uid://gwsychqkmv21" path="res://resources/weapons/Statue_Sword_Attack0.png" id="2_gx1sf"] + +[node name="DaoStatue" unique_id=265403254 instance=ExtResource("1_mps21")] +avatarTexture = ExtResource("2_gx1sf") +displayName = "道教石像" +typeTopic = 1 +store = { +"atk": 50, +"rate": 0.05 +} +storeType = { +"atk": 1, +"rate": 2 +} +descriptionTemplate = "挥出[b]无为之剑[/b],蓄力一段时间后挥出, +发射一道[b]次元斩[/b],造成$atk点伤害。 +攻击速度每降低1%,次元斩伤害+$rate" +debugRebuild = true + +[node name="avatar" parent="container/info" index="0"] +texture = ExtResource("2_gx1sf") + +[node name="name" parent="container/info" index="2"] +displayName = "道教石像" +typeTopic = 1 + +[node name="description" parent="container" index="2"] +text = "[center]挥出[b]无为之剑[/b],蓄力一段时间后挥出, +发射一道[b]次元斩[/b],造成[color=cyan]50[/color]点伤害。 +攻击速度每降低1%,次元斩伤害+[color=cyan]5.0%[/color][/center]" diff --git a/components/Weapons/Tree.tscn b/components/Weapons/Tree.tscn index 8f69a14..ed9c787 100644 --- a/components/Weapons/Tree.tscn +++ b/components/Weapons/Tree.tscn @@ -27,6 +27,7 @@ storeType = { descriptionTemplate = "进行[b]格挡[/b],化解飞来的子弹。 每成功格挡一次,获得一点[b]气力[/b]。 每拥有一点气力,增加[color=yellow]1[/color]点冲刺初速度,闪避穿过敌人时对其贴上一层[b]符咒[/b],符咒会自动引爆,召唤[b]乾坤剑[/b]穿透敌人。 +近战攻击造成乾坤剑的$rate点伤害。 每次格挡有$rate的概率弹反,子弹弹反后造成乾坤剑的$rate伤害。 每次格挡最多化解$count个子弹, @@ -52,6 +53,7 @@ typeTopic = 3 text = "[center]进行[b]格挡[/b],化解飞来的子弹。 每成功格挡一次,获得一点[b]气力[/b]。 每拥有一点气力,增加[color=yellow]1[/color]点冲刺初速度,闪避穿过敌人时对其贴上一层[b]符咒[/b],符咒会自动引爆,召唤[b]乾坤剑[/b]穿透敌人。 +近战攻击造成乾坤剑的[color=cyan]25.0%[/color]点伤害。 每次格挡有[color=cyan]25.0%[/color]的概率弹反,子弹弹反后造成乾坤剑的[color=cyan]25.0%[/color]伤害。 每次格挡最多化解[color=cyan]1[/color]个子弹, diff --git a/project.godot b/project.godot index 0152548..d6cc26b 100644 --- a/project.godot +++ b/project.godot @@ -8,11 +8,15 @@ config_version=5 +[animation] + +compatibility/default_parent_skeleton_in_mesh_instance_3d=true + [application] config/name="ChickenVSBear" run/main_scene="uid://dmxi1ikn6avig" -config/features=PackedStringArray("4.5", "GL Compatibility") +config/features=PackedStringArray("4.6", "GL Compatibility") config/icon="res://icon.svg" [display] diff --git a/resources/bullets/wuwei/Wuwei.png b/resources/bullets/wuwei/Wuwei.png new file mode 100644 index 0000000..de0d1c6 Binary files /dev/null and b/resources/bullets/wuwei/Wuwei.png differ diff --git a/resources/bullets/wuwei/Wuwei.png.import b/resources/bullets/wuwei/Wuwei.png.import new file mode 100644 index 0000000..9e85e47 --- /dev/null +++ b/resources/bullets/wuwei/Wuwei.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://d1ismqrlhbv7f" +path="res://.godot/imported/Wuwei.png-965a127cd19f69ae95d16a7b43452b00.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resources/bullets/wuwei/Wuwei.png" +dest_files=["res://.godot/imported/Wuwei.png-965a127cd19f69ae95d16a7b43452b00.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 diff --git a/resources/weapons/Statue_Sword_Attack0.png b/resources/weapons/Statue_Sword_Attack0.png new file mode 100644 index 0000000..865d5dc Binary files /dev/null and b/resources/weapons/Statue_Sword_Attack0.png differ diff --git a/resources/weapons/Statue_Sword_Attack0.png.import b/resources/weapons/Statue_Sword_Attack0.png.import new file mode 100644 index 0000000..2d63fc6 --- /dev/null +++ b/resources/weapons/Statue_Sword_Attack0.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://gwsychqkmv21" +path="res://.godot/imported/Statue_Sword_Attack0.png-44d8dd8893c34f910f6f91f6329ed0d0.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resources/weapons/Statue_Sword_Attack0.png" +dest_files=["res://.godot/imported/Statue_Sword_Attack0.png-44d8dd8893c34f910f6f91f6329ed0d0.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 diff --git a/scripts/Contents/Bullets/Parrier.gd b/scripts/Contents/Bullets/Parrier.gd index a039055..0ac9988 100644 --- a/scripts/Contents/Bullets/Parrier.gd +++ b/scripts/Contents/Bullets/Parrier.gd @@ -21,13 +21,13 @@ func spawn(): eff.texture.sprite_frames = frames eff.shot() func succeedToHit(_dmg: float, entity: EntityBase): - if parryiedTimes < maxParryTimes: + if parryiedTimes < maxParryTimes && MathTool.rate(parryRate): parryiedTimes += 1 var effSpawn = entity.texture.global_position var eff = EffectController.create(ComponentManager.getEffect("ParryEntity"), effSpawn) eff.rotation = position.angle_to_point(effSpawn) eff.shot() - entity.impluse((effSpawn - position).normalized() * 600) + entity.impluse((effSpawn - position).normalized() * 450) func hitBullet(bullet: BulletBase): # 当前子弹与其他子弹相撞 if BulletTool.canDamage(bullet, launcher): # 其他子弹可以使当前子弹的发射者受伤吗? if parryiedTimes < maxParryTimes && MathTool.rate(parryRate): # 一个刀光最多格挡多少个敌方子弹? diff --git a/scripts/Contents/Bullets/Wuwei.gd b/scripts/Contents/Bullets/Wuwei.gd new file mode 100644 index 0000000..24e3e58 --- /dev/null +++ b/scripts/Contents/Bullets/Wuwei.gd @@ -0,0 +1,2 @@ +extends BulletBase +class_name WuweiBullet diff --git a/scripts/Contents/Effects/ParryEntity.gd b/scripts/Contents/Effects/ParryEntity.gd index 9d0cac5..7989404 100644 --- a/scripts/Contents/Effects/ParryEntity.gd +++ b/scripts/Contents/Effects/ParryEntity.gd @@ -2,4 +2,4 @@ extends ParryEffect class_name ParryEntityEffect func beforeShot(): - CameraManager.shake(100, 200) + CameraManager.shake(50, 200) diff --git a/scripts/Contents/Panels/SelectIntialFeed.gd b/scripts/Contents/Panels/SelectIntialFeed.gd index 68b4076..896a78d 100644 --- a/scripts/Contents/Panels/SelectIntialFeed.gd +++ b/scripts/Contents/Panels/SelectIntialFeed.gd @@ -21,15 +21,17 @@ func beforeOpen(_args: Array = []): initialWeaponSelection.add_child(card) card.selected.connect( func(_x): - clearWeapons() - title2.hide() + if WorldManager.isRelease(): + clearWeapons() + title2.hide() ) else: initialFeedSelection.add_child(card) card.selected.connect( func(_x): - clearFeeds() - title1.hide() + if WorldManager.isRelease(): + clearFeeds() + title1.hide() ) func clearFeeds(): diff --git a/scripts/Contents/Wave.gd b/scripts/Contents/Wave.gd index 1fc0c77..ac01a9e 100644 --- a/scripts/Contents/Wave.gd +++ b/scripts/Contents/Wave.gd @@ -23,13 +23,13 @@ func duplicate() -> Wave: return wave static var WAVE_NORMAL = [ - Wave.create("Hen", 1, 3, false, 0, INF, 1), + Wave.create("Hen", 1, 3, false, 0, INF, 3), Wave.create("Cat", 1, 5, false, 0, INF, 1), - Wave.create("Dog", 1, 2, false, 0, INF, 1), - Wave.create("MTY", 0, 1, false, 4, INF, 4), + Wave.create("Dog", 1, 2, false, 0, INF, 5), + Wave.create("MTY", 0, 1, false, 4, INF, 7), Wave.create("Chick", 0, 0, true, 9, INF, 20), Wave.create("KukeMC", 0, 0, true, 19, INF, 20), - Wave.create("Bear", 0, 0, true, 29, INF, 20), + Wave.create("Bear", 0, 0, true, 29, INF, 23), ] static var WAVE_TESTBOSS_ALL = [ Wave.create("Chick", 0, 0, true, 0, INF, 3), @@ -49,7 +49,7 @@ static var WAVE_JUSTJOKE = [ Wave.create("Kernyr", 0, 0, true, 0, INF, 1), ] static var WAVE_EMPTY = [] -static var waveConfig = [WAVE_JUSTJOKE, 1] +static var waveConfig = [WAVE_NORMAL, 1] static var current: int = startWith(1) if WorldManager.isRelease() else startWith(waveConfig[1]) static var data = WAVE_NORMAL if WorldManager.isRelease() else waveConfig[0] diff --git a/scripts/Contents/Weapons/Tree.gd b/scripts/Contents/Weapons/Tree.gd index bc5d3c5..9dcb0e1 100644 --- a/scripts/Contents/Weapons/Tree.gd +++ b/scripts/Contents/Weapons/Tree.gd @@ -19,5 +19,5 @@ func attack(entity: EntityBase): bullet.maxParryTimes = readStore("count") bullet.maxBallCount = readStore("max") bullet.reflectRate = readStore("rate") - bullet.baseDamage = readStore("atk") + bullet.baseDamage = readStore("atk") * readStore("rate") return true diff --git a/scripts/Structs/Feed.gd b/scripts/Structs/Feed.gd index 86d968d..64b4136 100644 --- a/scripts/Structs/Feed.gd +++ b/scripts/Structs/Feed.gd @@ -41,10 +41,11 @@ func allHad(entity: EntityBase) -> bool: func apply(entity: EntityBase): var allHave = allHad(entity) if allHave: - for i in range(min(costs.size(), costCounts.size())): - var item = costs[i] - var count = countOf(i) - entity.inventory[item] -= count + if !freeToBuy: + for i in range(min(costs.size(), costCounts.size())): + var item = costs[i] + var count = countOf(i) + entity.inventory[item] -= count for i in range(min(fields.size(), fieldValues.size())): var field = fields[i] var value = fieldValues[i] diff --git a/themes/main.tres b/themes/main.tres index 7cc2da5..f4ce5f2 100644 --- a/themes/main.tres +++ b/themes/main.tres @@ -1,4 +1,4 @@ -[gd_resource type="Theme" load_steps=9 format=3 uid="uid://dhvs6urgf6jr5"] +[gd_resource type="Theme" format=3 uid="uid://dhvs6urgf6jr5"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_2jby4"] content_margin_left = 5.0