diff --git a/components/Characters/EnergyBlock.tscn b/components/Characters/EnergyBlock.tscn new file mode 100644 index 0000000..1bad652 --- /dev/null +++ b/components/Characters/EnergyBlock.tscn @@ -0,0 +1,11 @@ +[gd_scene format=3 uid="uid://b5bsvrtu8v2f7"] + +[ext_resource type="PackedScene" uid="uid://cvogxi7mktumf" path="res://components/Abstracts/EntityBase.tscn" id="1_n2ng1"] +[ext_resource type="Script" uid="uid://du30qanswie6y" path="res://scripts/Contents/Characters/EnergyBlock.gd" id="2_h3ykr"] + +[node name="EnergyBlock" unique_id=247617339 instance=ExtResource("1_n2ng1")] +script = ExtResource("2_h3ykr") +displayName = "稻草人" + +[node name="statebar" parent="." index="4"] +position = Vector2(0, -131) diff --git a/components/Feeds/A-VectorStar.tscn b/components/Feeds/A-VectorStar.tscn new file mode 100644 index 0000000..89ca417 --- /dev/null +++ b/components/Feeds/A-VectorStar.tscn @@ -0,0 +1,22 @@ +[gd_scene format=3 uid="uid://u6ruynxi1qs0"] + +[ext_resource type="PackedScene" uid="uid://bykwevnv7keeh" path="res://components/Abstracts/FeedCardBase.tscn" id="1_mufgq"] +[ext_resource type="Texture2D" uid="uid://d2pndtow16635" path="res://resources/bullets/lgbt-bullet/造型2.svg" id="2_6fmak"] +[ext_resource type="PackedScene" uid="uid://bb1uh8k7gkhr7" path="res://components/Weapons/VectorStar.tscn" id="3_s34ql"] + +[node name="VectorStar" unique_id=532465365 instance=ExtResource("1_mufgq")] +avatarTexture = ExtResource("2_6fmak") +displayName = "矢量核心" +quality = 2 +topic = 8 +weapons = Array[PackedScene]([ExtResource("3_s34ql")]) +costs = Array[int]([0, 1]) +costCounts = Array[int]([300, 500]) + +[node name="avatar" parent="container/info" index="0"] +texture = ExtResource("2_6fmak") + +[node name="name" parent="container/info" index="1"] +displayName = "矢量核心" +quality = 2 +topic = 8 diff --git a/components/Feeds/RainbowCandy.tscn b/components/Feeds/RainbowCandy.tscn index dae3c67..5aa7cf9 100644 --- a/components/Feeds/RainbowCandy.tscn +++ b/components/Feeds/RainbowCandy.tscn @@ -1,15 +1,15 @@ -[gd_scene load_steps=3 format=3 uid="uid://bbhi7yatfmf8h"] +[gd_scene format=3 uid="uid://bbhi7yatfmf8h"] [ext_resource type="PackedScene" uid="uid://bykwevnv7keeh" path="res://components/Abstracts/FeedCardBase.tscn" id="1_2x0kp"] [ext_resource type="Texture2D" uid="uid://ckw0agpwxpdxv" path="res://resources/feeds/rainbow.svg" id="2_xhiuj"] -[node name="RainbowCandy" instance=ExtResource("1_2x0kp")] +[node name="RainbowCandy" unique_id=68887160 instance=ExtResource("1_2x0kp")] avatarTexture = ExtResource("2_xhiuj") displayName = "彩虹糖" quality = 3 topic = 4 fields = Array[int]([1, 5, 6, 13, 7, 3]) -fieldValues = Array[float]([0.5, 0.75, 0.3, 3.0, 30.0, -0.8]) +fieldValues = Array[float]([0.5, 0.75, 0.3, 3.0, 30.0, -0.65]) costs = Array[int]([0, 3]) costCounts = Array[int]([700, 100]) diff --git a/scripts/Contents/Bullets/RedCrystal.gd b/scripts/Contents/Bullets/RedCrystal.gd index 05d1be8..39eb782 100644 --- a/scripts/Contents/Bullets/RedCrystal.gd +++ b/scripts/Contents/Bullets/RedCrystal.gd @@ -13,6 +13,7 @@ func ai(): func destroy(_beacuseMap: bool): hitbox.shape.radius = radius EffectController.create(ComponentManager.getEffect("RedCrystalExplosion"), global_position).shot() + if !is_instance_valid(launcher):return for i in randi_range(1, count): for bullet in BulletBase.generate(ComponentManager.getBullet("CrystalBlock"), launcher, position, deg_to_rad(randf_range(0, 360))): if bullet is CrystalBlockBullet: diff --git a/scripts/Contents/Characters/EnergyBlock.gd b/scripts/Contents/Characters/EnergyBlock.gd new file mode 100644 index 0000000..e77a658 --- /dev/null +++ b/scripts/Contents/Characters/EnergyBlock.gd @@ -0,0 +1,18 @@ +extends EntityBase +class_name EnergyBlockEntity + +func register(): + fields[FieldStore.Entity.MAX_HEALTH] = 5000 + hit.connect( + func(damage: float, bullet: BulletBase, _crit: bool): + bullet.launcher.storeEnergy(damage) + ) + attackCooldownMap[0] = 0 +func ai(): + tryAttack(0) +func attack(type: int): + if type == 0: + var track = getTrackingAnchor() + var bullet = BulletTool.findClosetBulletCanDamage(track, get_tree(), self , 200) + if is_instance_valid(bullet): + BulletBase.generate(ComponentManager.getBullet("Parrier"), self , track, track.angle_to_point(bullet.position)) diff --git a/scripts/Contents/Characters/EnergyBlock.gd.uid b/scripts/Contents/Characters/EnergyBlock.gd.uid new file mode 100644 index 0000000..9fdd769 --- /dev/null +++ b/scripts/Contents/Characters/EnergyBlock.gd.uid @@ -0,0 +1 @@ +uid://du30qanswie6y diff --git a/scripts/Contents/Wave.gd b/scripts/Contents/Wave.gd index 08dd15b..7b547e4 100644 --- a/scripts/Contents/Wave.gd +++ b/scripts/Contents/Wave.gd @@ -48,10 +48,12 @@ static var WAVE_MOWING = [ Wave.create("Hen", 15, 30, false, 0, INF, 1), Wave.create("Cat", 15, 30, false, 0, INF, 1), Wave.create("Dog", 15, 30, false, 0, INF, 1), - Wave.create("MTY", 1, 5, false, 0, INF, 1), + Wave.create("MTY", 0, 2, false, 0, INF, 1), + Wave.create("EnergyBlock", 0, 1, true, 0, INF, 1), ] static var WAVE_TESTMOB = [ - Wave.create("MTY", 1, 1, false, 0, INF, 1) + Wave.create("EnergyBlock", 1, 1, true, 0, INF, 1), + # Wave.create("MTY", 1, 1, false, 0, INF, 1), ] static var WAVE_EMPTY = [] static var waveReleaseConfig = [WAVE_TESTBOSS, 1] @@ -90,7 +92,7 @@ static func entityCountOf(wave: Wave) -> int: if canSpawn(wave): if wave.isBoss: return 1 - elif !hasBoss(): + elif !hasBoss() || GameRule.canSpawnMobWhenBossWave: return randi_range(ceil(wave.minCount), floor(wave.maxCount * (1 + GameRule.entityCountBoostPerWave * current))) return 0 static func getNextBossInfo() -> Array: diff --git a/scripts/Tools/GameRule.gd b/scripts/Tools/GameRule.gd index 2b8597d..53a7a23 100644 --- a/scripts/Tools/GameRule.gd +++ b/scripts/Tools/GameRule.gd @@ -22,3 +22,4 @@ static var critRateInfluenceByLuckValue: float = MathTool.percent(2.5) # 幸运 static var penerateRateInfluenceByLuckValue: float = MathTool.percent(3) # 幸运值对穿透率的影响 static var detainTime: float = 250 # 血量如果在这个时间内没有改变才会开始播放降低动画 static var weaponUpdateCost: float = 1.1 # 武器升级后消耗的棒球数量倍数 +static var canSpawnMobWhenBossWave: bool = true # Boss波次是否可生成小怪