Skip to content

Commit bc07aa2

Browse files
committed
add more values
1 parent 292a3a6 commit bc07aa2

File tree

5 files changed

+20
-12
lines changed

5 files changed

+20
-12
lines changed

plugin/src/main/kotlin/dev/betrix/superSmashMobsBrawl/abilities/BlockTossAbility.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ class BlockTossAbility(player: Player) : BrawlAbility("block_toss", player) {
2929
private val maxDamage = metadata.double("maxDamage") ?: 9.0
3030
private val damage = metadata.double("damage") ?: 8.0
3131
private val knockbackMultiplier = metadata.double("knockbackMultiplier") ?: 2.5
32+
private val blockRotationStepSpeedTicks = metadata.int("blockRotationStepSpeedTicks") ?: 4
3233

3334
private val activeProjectiles = mutableListOf<BrawlProjectile>()
3435

@@ -137,10 +138,10 @@ class BlockTossAbility(player: Player) : BrawlAbility("block_toss", player) {
137138
var tumbleAngleY = 0f
138139
var tumbleAngleX = 0f
139140

140-
val rotatationStepSpeedTicks = 4
141+
val rotationStepSpeedTicks = blockRotationStepSpeedTicks
141142

142143
runnables.add(
143-
repeatingTask(rotatationStepSpeedTicks.toLong()) {
144+
repeatingTask(rotationStepSpeedTicks.toLong()) {
144145
if (!displayBlock.isValid) {
145146
cancel()
146147
return@repeatingTask
@@ -164,7 +165,7 @@ class BlockTossAbility(player: Player) : BrawlAbility("block_toss", player) {
164165

165166
displayBlock.setTransformationMatrix(transform)
166167
displayBlock.interpolationDelay = 0
167-
displayBlock.interpolationDuration = rotatationStepSpeedTicks
168+
displayBlock.interpolationDuration = rotationStepSpeedTicks
168169
}
169170
)
170171

plugin/src/main/kotlin/dev/betrix/superSmashMobsBrawl/abilities/BoneExplosionAbility.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,15 @@ class BoneExplosionAbility(player: Player) : BrawlAbility("bone_explosion", play
1313

1414
private val explosionRadius = metadata.double("explosionRadius") ?: 7.0
1515
private val baseDamage = metadata.double("baseDamage") ?: 6.0
16+
private val explosionKnockbackMultiplier = metadata.double("explosionKnockbackMultiplier") ?: 2.5
17+
private val explosionBoneCount = metadata.int("explosionBoneCount") ?: 48
18+
private val explosionBoneVelocity = metadata.double("explosionBoneVelocity") ?: 0.8
1619

1720
override fun activate() {
1821
player.location
1922
.clone()
2023
.add(0.0, 0.5, 0.5)
21-
.itemEffect(48, 0.8, Sound.ENTITY_SKELETON_HURT, 2f, 1.2f, Material.BONE, 40)
24+
.itemEffect(explosionBoneCount, explosionBoneVelocity, Sound.ENTITY_SKELETON_HURT, 2f, 1.2f, Material.BONE, 40)
2225

2326
val validEntities =
2427
player.location.getNearbyPlayers(explosionRadius).filter { it != player }
@@ -36,7 +39,7 @@ class BoneExplosionAbility(player: Player) : BrawlAbility("bone_explosion", play
3639
entity,
3740
Damager.DamagerLivingEntity(player),
3841
damage,
39-
2.5,
42+
explosionKnockbackMultiplier,
4043
BrawlDamageType.Explosion,
4144
)
4245

plugin/src/main/kotlin/dev/betrix/superSmashMobsBrawl/abilities/ExplodeAbility.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ class ExplodeAbility(player: Player) : BrawlAbility("explode", player) {
2929
private val explosionRadius = metadata.double("explosionRadius") ?: 8.0
3030
private val explosionKnockbackMultiplier =
3131
metadata.double("explosionKnockbackMultiplier") ?: 2.5
32+
private val explosionVelocityStrength = metadata.double("explosionVelocityStrength") ?: 1.8
3233

3334
override fun canActivate(sendMessage: Boolean): Boolean {
3435
if (isExplodeActive) {
@@ -137,7 +138,7 @@ class ExplodeAbility(player: Player) : BrawlAbility("explode", player) {
137138
damageEvent.callEvent()
138139
}
139140

140-
player.setVelocity(1.8, 0.2, 1.4, true)
141+
player.setVelocity(explosionVelocityStrength, 0.2, 1.4, true)
141142

142143
setCooldown(currentTimeAtActivation)
143144
}

plugin/src/main/kotlin/dev/betrix/superSmashMobsBrawl/abilities/MilkSpiralAbility.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ class MilkSpiralAbility(player: Player) : BrawlAbility("milk_spiral", player) {
1818
private val damage = metadata.double("damage") ?: 5.0
1919
private val maxTimesHit = metadata.int("maxTimesHit") ?: 2
2020
private val damageCooldownMs = metadata.long("damageCooldownMs") ?: 250
21+
private val particleSpiralRadius = metadata.double("particleSpiralRadius") ?: 1.5
2122

2223
private val lastDamageTime = hashMapOf<Player, Long>()
2324
private val timesHit = hashMapOf<Player, Int>()
@@ -60,19 +61,18 @@ class MilkSpiralAbility(player: Player) : BrawlAbility("milk_spiral", player) {
6061
val circleSecond = direction.clone().crossProduct(circleFirst).normalize()
6162

6263
val speed = 3
63-
val radius = 1.5
6464
var theta = player.ticksLived.toDouble() / speed
6565
var totalAddedDistance = 0.0
6666

6767
while (totalAddedDistance < totalDistance) {
6868
val firstParticle =
6969
oldLocation
7070
.clone()
71-
.add(getCirclePoint(circleFirst, circleSecond, theta, radius))
71+
.add(getCirclePoint(circleFirst, circleSecond, theta, particleSpiralRadius))
7272
val secondParticle =
7373
oldLocation
7474
.clone()
75-
.add(getCirclePoint(circleFirst, circleSecond, theta + Math.PI, radius))
75+
.add(getCirclePoint(circleFirst, circleSecond, theta + Math.PI, particleSpiralRadius))
7676

7777
if (first) {
7878
firstParticle.world.playSound(

plugin/src/main/kotlin/dev/betrix/superSmashMobsBrawl/abilities/SulphurBombAbility.kt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ class SulphurBombAbility(player: Player) : BrawlAbility("sulphur_bomb", player)
2121

2222
private val projectileKnockbackModifier = metadata.double("projectileKnockbackModifier") ?: 2.5
2323
private val projectileDamage = metadata.double("projectileDamage") ?: 6.5
24+
private val projectileVelocityMultiplier = metadata.double("projectileVelocityMultiplier") ?: 1.55
25+
private val projectileSize = metadata.double("projectileSize") ?: 0.65
26+
private val projectileTrailMaxParticles = metadata.int("projectileTrailMaxParticles") ?: 8
2427

2528
private val activeProjectiles = mutableListOf<BrawlProjectile>()
2629

@@ -44,9 +47,9 @@ class SulphurBombAbility(player: Player) : BrawlAbility("sulphur_bomb", player)
4447
ItemStack.of(Material.COAL),
4548
"abilities.sulphur_bomb.name",
4649
)
47-
.velocityMultiplier(1.55)
48-
.projectileSize(0.65)
49-
.trailEffect(Particle.SMOKE, count = 8)
50+
.velocityMultiplier(projectileVelocityMultiplier)
51+
.projectileSize(projectileSize)
52+
.trailEffect(Particle.SMOKE, count = projectileTrailMaxParticles)
5053
.impactEffect(Particle.EXPLOSION, Sound.ENTITY_GENERIC_EXPLODE)
5154
.onHitEntity { entity, projectile ->
5255
handleSulphurBombHit(entity, projectile)

0 commit comments

Comments
 (0)