diff --git a/components/Bullets/Parrier.tscn b/components/Bullets/Parrier.tscn index 90a7417..706c2e2 100644 --- a/components/Bullets/Parrier.tscn +++ b/components/Bullets/Parrier.tscn @@ -113,7 +113,7 @@ size = Vector2(54, 204) [node name="Parrier" instance=ExtResource("1_57y3f")] script = ExtResource("2_li4th") parryRate = 0.0 -baseDamage = 1.0 +baseDamage = 0.0 penerate = 1.0 autoSpawnAnimation = true freeAfterSpawn = true diff --git a/components/Weapons/Tree.tscn b/components/Weapons/Tree.tscn index 7d4ec1f..8967b1b 100644 --- a/components/Weapons/Tree.tscn +++ b/components/Weapons/Tree.tscn @@ -9,25 +9,28 @@ script = ExtResource("2_jsuc8") avatarTexture = ExtResource("3_nwamk") displayName = "扶桑元神" quality = 4 +typeTopic = 3 costBeachball = 900 oneShoot = true store = { -"atk": 10, +"atk": 20, "count": 1.0, -"foo": 1.0 +"max": 3.0 } storeType = { "atk": 1, "count": 1, -"foo": 1 +"max": 1 } descriptionTemplate = "进行[b]格挡[/b],化解飞来的子弹。 每成功格挡一次,获得一点[b]气力[/b]。 -每拥有一点气力,闪避穿过敌人时对其贴上$foo层[b]符咒[/b],一段时间后符咒自动引爆, +每拥有一点气力,闪避穿过敌人时对其贴上一层[b]符咒[/b],一段时间后符咒自动引爆, 召唤[b]乾坤剑[/b]穿透敌人。 乾坤剑造成$atk点伤害, -每次格挡最多化解$count个子弹。" +每次格挡最多化解$count个子弹, +体内最多储存$max点气力, +格挡时机越精确,成功率越高。" cooldown = 0.0 debugRebuild = true @@ -40,12 +43,15 @@ count = 900 [node name="name" parent="container/info" index="2"] displayName = "扶桑元神" quality = 4 +typeTopic = 3 [node name="description" parent="container" index="2"] text = "[center]进行[b]格挡[/b],化解飞来的子弹。 每成功格挡一次,获得一点[b]气力[/b]。 -每拥有一点气力,闪避穿过敌人时对其贴上[color=cyan]1[/color]层[b]符咒[/b],一段时间后符咒自动引爆, +每拥有一点气力,闪避穿过敌人时对其贴上一层[b]符咒[/b],一段时间后符咒自动引爆, 召唤[b]乾坤剑[/b]穿透敌人。 -乾坤剑造成[color=cyan]10[/color]点伤害, -每次格挡最多化解[color=cyan]1[/color]个子弹。[/center]" +乾坤剑造成[color=cyan]20[/color]点伤害, +每次格挡最多化解[color=cyan]1[/color]个子弹, +体内最多储存[color=cyan]3[/color]点气力, +格挡时机越精确,成功率越高。[/center]" diff --git a/scripts/Contents/Bullets/Parrier.gd b/scripts/Contents/Bullets/Parrier.gd index acbe059..4efa62b 100644 --- a/scripts/Contents/Bullets/Parrier.gd +++ b/scripts/Contents/Bullets/Parrier.gd @@ -5,6 +5,8 @@ class_name ParrierBullet var parryiedTimes: int = 0 var maxParryTimes: int = 1 +var maxBallCount: int = 3 +var atk: float = 0 func hitBullet(bullet: BulletBase): # 当前子弹与其他子弹相撞 if BulletTool.canDamage(bullet, launcher): # 其他子弹可以使当前子弹的发射者受伤吗? @@ -17,7 +19,7 @@ func hitBullet(bullet: BulletBase): # 当前子弹与其他子弹相撞 # 摧毁其他子弹 bullet.tryDestroy() var cycler = launcher.getOrCreateCycleTimer("parry", 2000, 100) - if len(cycler.bullets) < 5: # 玩家最多只能拥有5点气 + if len(cycler.bullets) < maxBallCount: # 玩家最多只能拥有5点气 for b in BulletBase.generate( ComponentManager.getBullet("ParryBall"), # 生成气的子弹 launcher, @@ -25,4 +27,4 @@ func hitBullet(bullet: BulletBase): # 当前子弹与其他子弹相撞 0 ): if b is ParryBallBullet: - pass + b.atk = atk diff --git a/scripts/Contents/Bullets/ParryBall.gd b/scripts/Contents/Bullets/ParryBall.gd index e583d40..1c1fd04 100644 --- a/scripts/Contents/Bullets/ParryBall.gd +++ b/scripts/Contents/Bullets/ParryBall.gd @@ -2,6 +2,7 @@ extends BulletBase class_name ParryBallBullet var cycler: CycleTimer +var atk: float = 0 func spawn(): cycler = launcher.getOrCreateCycleTimer("parry") @@ -20,6 +21,7 @@ func succeedToHit(_dmg: float, entity: EntityBase): # 当撞到敌人时 0 ): if bullet is QKSwordBullet: + bullet.baseDamage = atk bullet.position = entity.texture.global_position + MathTool.sampleInRing(200, 500) bullet.tracer = entity bullet.look_at(entity.getTrackingAnchor()) # 生成的乾坤剑面向敌人 diff --git a/scripts/Contents/Bullets/QKSword.gd b/scripts/Contents/Bullets/QKSword.gd index 0c7306e..9f51054 100644 --- a/scripts/Contents/Bullets/QKSword.gd +++ b/scripts/Contents/Bullets/QKSword.gd @@ -8,6 +8,7 @@ var spawnSpeed: float = 1 func register(): spawnSpeed = randf_range(0.25, 1.75) animator.speed_scale = spawnSpeed + lifeTime /= spawnSpeed func ai(): if is_instance_valid(tracer) && !attackedTracer: look_at(tracer.getTrackingAnchor()) diff --git a/scripts/Contents/Weapons/Tree.gd b/scripts/Contents/Weapons/Tree.gd index a3e8d9d..6d489d2 100644 --- a/scripts/Contents/Weapons/Tree.gd +++ b/scripts/Contents/Weapons/Tree.gd @@ -1,6 +1,11 @@ @tool extends Weapon +func update(to: int, origin: Dictionary, _entity: EntityBase): + origin["atk"] += 5 * to * soulLevel + origin["count"] += 1 * (soulLevel - 1) + origin["max"] += 2 * (soulLevel - 1) + return origin func attack(entity: EntityBase): for bullet in BulletBase.generate( ComponentManager.getBullet("Parrier"), @@ -9,5 +14,7 @@ func attack(entity: EntityBase): entity.findWeaponAnchor("normal").angle_to_point(get_global_mouse_position()), ): if bullet is ParrierBullet: - pass + bullet.atk = readStore("atk") + bullet.maxParryTimes = readStore("count") + bullet.maxBallCount = readStore("max") return true