1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-30 16:01:53 +08:00

refactor(MathTool): 重命名随机数生成方法并优化蘑菇矿挖爪属性

将 randomVector2In 重命名为 sampleInCircle,randomRingPoint 重命名为 sampleInRing,randChoiceWeightsFrom 重命名为 randomChoiceFromWeights,signBeforeStr 重命名为 toSigned
调整蘑菇矿挖爪的攻击力和掉落率,减少基础伤害至0.5,固定掉落率为0.1,优化物品掉落逻辑
This commit is contained in:
2026-01-18 15:31:52 +08:00
parent ac2696a412
commit 1904edd623
13 changed files with 41 additions and 41 deletions
+4 -4
View File
@@ -52,7 +52,7 @@ func attack(type):
if !is_instance_valid(currentFocusedBoss): return false
for bullet in BulletBase.generate(ComponentManager.getBullet("ArrowSeven"), self, findWeaponAnchor("normal"), deg_to_rad(randf_range(0, 360))):
bullet.tracer = currentFocusedBoss
bullet.position += MathTool.randomVector2In(50)
bullet.position += MathTool.sampleInCircle(50)
await TickTool.millseconds(50)
return false
elif type == 1:
@@ -76,7 +76,7 @@ func attack(type):
await trySprint()
sprintParticle.emitting = false
canRunAi = true
await sprintTo(currentFocusedBoss.position + MathTool.randomVector2In(400), 0.25)
await sprintTo(currentFocusedBoss.position + MathTool.sampleInCircle(400), 0.25)
currentInvinsible = false
return false
elif type == 4:
@@ -102,8 +102,8 @@ func attack(type):
for i in 16:
if !is_instance_valid(currentFocusedBoss): return false
for bullet in BulletBase.generate(ComponentManager.getBullet("LightGun"), self, currentFocusedBoss.position, 0):
bullet.position += MathTool.randomVector2In(600)
bullet.look_at(currentFocusedBoss.position + MathTool.randomVector2In(50))
bullet.position += MathTool.sampleInCircle(600)
bullet.look_at(currentFocusedBoss.position + MathTool.sampleInCircle(50))
await TickTool.millseconds(100)
return false
elif type == 7:
+1 -1
View File
@@ -34,7 +34,7 @@ func attack(type):
if type == 0:
var weaponPos = findWeaponAnchor("normal")
for i in randi_range(7, 16):
BulletBase.generate(ComponentManager.getBullet("Diamond"), self, weaponPos + MathTool.randomVector2In(20), rotation + deg_to_rad(randf_range(-90, 90)))
BulletBase.generate(ComponentManager.getBullet("Diamond"), self, weaponPos + MathTool.sampleInCircle(20), rotation + deg_to_rad(randf_range(-90, 90)))
elif type == 1:
var laserCount = randi_range(2, 4)
for i in laserCount:
+1 -1
View File
@@ -34,7 +34,7 @@ func attack(type):
await TickTool.millseconds(randi_range(10, 50))
elif type == 1 and health < fields[FieldStore.Entity.MAX_HEALTH] * 0.5 and canSummon:
for i in randi_range(1, 2):
var child = EntityBase.generate(ComponentManager.getCharacter("KukeChild"), position + MathTool.randomVector2In(500))
var child = EntityBase.generate(ComponentManager.getCharacter("KukeChild"), position + MathTool.sampleInCircle(500))
child.currentFocusedBoss = currentFocusedBoss
child.masterMine = self
elif type == 2: