diff --git a/assets/common/abilities/axe/doublestrike.ron b/assets/common/abilities/axe/doublestrike.ron index 042e9f0b72..0521ee3cdf 100644 --- a/assets/common/abilities/axe/doublestrike.ron +++ b/assets/common/abilities/axe/doublestrike.ron @@ -2,9 +2,9 @@ ComboMelee( stage_data: [ ( stage: 1, - base_damage: 110, + base_damage: 11.0, base_poise_damage: 12, - damage_increase: 10, + damage_increase: 1.0, poise_damage_increase: 0, knockback: 5.0, range: 3.5, @@ -24,9 +24,9 @@ ComboMelee( ), ( stage: 2, - base_damage: 130, + base_damage: 13.0, base_poise_damage: 20, - damage_increase: 15, + damage_increase: 1.5, poise_damage_increase: 0, knockback: 6.0, range: 3.5, diff --git a/assets/common/abilities/axe/leap.ron b/assets/common/abilities/axe/leap.ron index 2d06e6ff3d..0f93a5672e 100644 --- a/assets/common/abilities/axe/leap.ron +++ b/assets/common/abilities/axe/leap.ron @@ -4,7 +4,7 @@ LeapMelee( movement_duration: 0.2, swing_duration: 0.2, recover_duration: 0.2, - base_damage: 150, + base_damage: 15.0, base_poise_damage: 70, knockback: 12.0, range: 4.5, diff --git a/assets/common/abilities/axe/spin.ron b/assets/common/abilities/axe/spin.ron index c6ead7a592..5e314e583f 100644 --- a/assets/common/abilities/axe/spin.ron +++ b/assets/common/abilities/axe/spin.ron @@ -2,7 +2,7 @@ SpinMelee( buildup_duration: 0.2, swing_duration: 0.6, recover_duration: 0.2, - base_damage: 70, + base_damage: 7.0, base_poise_damage: 25, knockback: ( strength: 0.0, direction: Away), range: 3.5, diff --git a/assets/common/abilities/axesimple/dash.ron b/assets/common/abilities/axesimple/dash.ron index 23074786f2..5ef8a402c5 100644 --- a/assets/common/abilities/axesimple/dash.ron +++ b/assets/common/abilities/axesimple/dash.ron @@ -1,7 +1,7 @@ DashMelee( energy_cost: 0, - base_damage: 80, - scaled_damage: 160, + base_damage: 8.0, + scaled_damage: 16.0, base_poise_damage: 0, scaled_poise_damage: 0, base_knockback: 8.0, diff --git a/assets/common/abilities/axesimple/doublestrike.ron b/assets/common/abilities/axesimple/doublestrike.ron index bc8a30cd1e..3f39a42911 100644 --- a/assets/common/abilities/axesimple/doublestrike.ron +++ b/assets/common/abilities/axesimple/doublestrike.ron @@ -2,8 +2,8 @@ ComboMelee( stage_data: [ ( stage: 1, - base_damage: 90, - damage_increase: 10, + base_damage: 9.0, + damage_increase: 1.0, base_poise_damage: 0, poise_damage_increase: 0, knockback: 4.0, @@ -24,8 +24,8 @@ ComboMelee( ), ( stage: 2, - base_damage: 130, - damage_increase: 15, + base_damage: 13.0, + damage_increase: 1.5, base_poise_damage: 0, poise_damage_increase: 0, knockback: 16.0, diff --git a/assets/common/abilities/bow/charged.ron b/assets/common/abilities/bow/charged.ron index e97fbbf02d..1f5b071528 100644 --- a/assets/common/abilities/bow/charged.ron +++ b/assets/common/abilities/bow/charged.ron @@ -3,8 +3,8 @@ ChargedRanged( energy_drain: 0, initial_regen: 5, scaled_regen: 120, - initial_damage: 5, - scaled_damage: 140, + initial_damage: 0.5, + scaled_damage: 14.0, initial_knockback: 0.0, scaled_knockback: 10.0, buildup_duration: 0.2, diff --git a/assets/common/abilities/bow/repeater.ron b/assets/common/abilities/bow/repeater.ron index bbffcbb587..5a5857a113 100644 --- a/assets/common/abilities/bow/repeater.ron +++ b/assets/common/abilities/bow/repeater.ron @@ -6,7 +6,7 @@ RepeaterRanged( max_speed: 2.0, half_speed_at: 1, projectile: Arrow( - damage: 30.0, + damage: 3.0, knockback: 2.0, energy_regen: 0, ), diff --git a/assets/common/abilities/bow/shotgun.ron b/assets/common/abilities/bow/shotgun.ron index eb31b47a56..30d9805bd8 100644 --- a/assets/common/abilities/bow/shotgun.ron +++ b/assets/common/abilities/bow/shotgun.ron @@ -4,7 +4,7 @@ BasicRanged( recover_duration: 0.3, projectile_spread: 0.05, projectile: Arrow( - damage: 40.0, + damage: 4.0, knockback: 5.0, energy_regen: 0, ), diff --git a/assets/common/abilities/bowsimple/basic.ron b/assets/common/abilities/bowsimple/basic.ron index 0dd7e0e008..602741dd20 100644 --- a/assets/common/abilities/bowsimple/basic.ron +++ b/assets/common/abilities/bowsimple/basic.ron @@ -3,7 +3,7 @@ BasicRanged( buildup_duration: 0.5, recover_duration: 0.3, projectile: Arrow( - damage: 35.0, + damage: 3.5, knockback: 5.0, energy_regen: 40, ), diff --git a/assets/common/abilities/custom/asp/firebomb.ron b/assets/common/abilities/custom/asp/firebomb.ron index 383f35ee39..738fb4c3f3 100644 --- a/assets/common/abilities/custom/asp/firebomb.ron +++ b/assets/common/abilities/custom/asp/firebomb.ron @@ -3,7 +3,7 @@ BasicRanged( buildup_duration: 0.8, recover_duration: 0.35, projectile: Fireball( - damage: 130.0, + damage: 13.0, radius: 5.0, energy_regen: 0, ), diff --git a/assets/common/abilities/custom/asp/singlestrike.ron b/assets/common/abilities/custom/asp/singlestrike.ron index ec3acbcd37..bf66750e24 100644 --- a/assets/common/abilities/custom/asp/singlestrike.ron +++ b/assets/common/abilities/custom/asp/singlestrike.ron @@ -2,7 +2,7 @@ ComboMelee( stage_data: [ ( stage: 1, - base_damage: 140, + base_damage: 14.0, damage_increase: 0, base_poise_damage: 28, poise_damage_increase: 0, diff --git a/assets/common/abilities/custom/basilisk/dash.ron b/assets/common/abilities/custom/basilisk/dash.ron index f4e8c56c40..eb3a673183 100644 --- a/assets/common/abilities/custom/basilisk/dash.ron +++ b/assets/common/abilities/custom/basilisk/dash.ron @@ -1,7 +1,7 @@ DashMelee( energy_cost: 0, - base_damage: 120, - scaled_damage: 180, + base_damage: 12.0, + scaled_damage: 18.0, base_poise_damage: 25, scaled_poise_damage: 0, base_knockback: 4.0, diff --git a/assets/common/abilities/custom/basilisk/petrify.ron b/assets/common/abilities/custom/basilisk/petrify.ron index 3ef55daf04..d5914137d3 100644 --- a/assets/common/abilities/custom/basilisk/petrify.ron +++ b/assets/common/abilities/custom/basilisk/petrify.ron @@ -2,7 +2,7 @@ BasicBeam( buildup_duration: 0.9, recover_duration: 1.0, beam_duration: 1.0, - damage: 420, + damage: 42.0, tick_rate: 0.5, range: 22.0, max_angle: 5.0, diff --git a/assets/common/abilities/custom/basilisk/triplestrike.ron b/assets/common/abilities/custom/basilisk/triplestrike.ron index db05cf3e26..9a7e49b3bd 100644 --- a/assets/common/abilities/custom/basilisk/triplestrike.ron +++ b/assets/common/abilities/custom/basilisk/triplestrike.ron @@ -2,7 +2,7 @@ ComboMelee( stage_data: [ ( stage: 1, - base_damage: 180, + base_damage: 18.0, damage_increase: 0, base_poise_damage: 15, poise_damage_increase: 0, @@ -18,7 +18,7 @@ ComboMelee( ), ( stage: 2, - base_damage: 180, + base_damage: 18.0, damage_increase: 0, base_poise_damage: 18, poise_damage_increase: 0, @@ -34,7 +34,7 @@ ComboMelee( ), ( stage: 3, - base_damage: 180, + base_damage: 18.0, damage_increase: 0, base_poise_damage: 20, poise_damage_increase: 0, diff --git a/assets/common/abilities/custom/beastclaws/basic.ron b/assets/common/abilities/custom/beastclaws/basic.ron index 6246489fb3..6b701fe173 100644 --- a/assets/common/abilities/custom/beastclaws/basic.ron +++ b/assets/common/abilities/custom/beastclaws/basic.ron @@ -4,7 +4,7 @@ BasicMelee( swing_duration: 0.1, recover_duration: 0.25, knockback: ( strength: 25.0, direction: Away), - base_damage: 200, + base_damage: 20.0, base_poise_damage: 40, range: 5.0, max_angle: 120.0, diff --git a/assets/common/abilities/custom/birdlargebasic/dash.ron b/assets/common/abilities/custom/birdlargebasic/dash.ron index 7e600ce698..f0d3f22d9a 100644 --- a/assets/common/abilities/custom/birdlargebasic/dash.ron +++ b/assets/common/abilities/custom/birdlargebasic/dash.ron @@ -1,7 +1,7 @@ DashMelee( energy_cost: 0, - base_damage: 80, - scaled_damage: 150, + base_damage: 8.0, + scaled_damage: 15.0, base_poise_damage: 50, scaled_poise_damage: 100, base_knockback: 6.0, diff --git a/assets/common/abilities/custom/birdlargebasic/triplestrike.ron b/assets/common/abilities/custom/birdlargebasic/triplestrike.ron index ae24969a40..5fc9b43899 100644 --- a/assets/common/abilities/custom/birdlargebasic/triplestrike.ron +++ b/assets/common/abilities/custom/birdlargebasic/triplestrike.ron @@ -2,7 +2,7 @@ ComboMelee( stage_data: [ ( stage: 1, - base_damage: 110, + base_damage: 11.0, damage_increase: 0, base_poise_damage: 0, poise_damage_increase: 0, @@ -18,7 +18,7 @@ ComboMelee( ), ( stage: 2, - base_damage: 90, + base_damage: 9.0, damage_increase: 0, base_poise_damage: 0, poise_damage_increase: 0, @@ -34,7 +34,7 @@ ComboMelee( ), ( stage: 3, - base_damage: 140, + base_damage: 14.0, damage_increase: 0, base_poise_damage: 0, poise_damage_increase: 0, diff --git a/assets/common/abilities/custom/birdlargebreathe/firebomb.ron b/assets/common/abilities/custom/birdlargebreathe/firebomb.ron index 6c2b6245ff..f91e9f7be0 100644 --- a/assets/common/abilities/custom/birdlargebreathe/firebomb.ron +++ b/assets/common/abilities/custom/birdlargebreathe/firebomb.ron @@ -3,7 +3,7 @@ BasicRanged( buildup_duration: 0.5, recover_duration: 0.35, projectile: Fireball( - damage: 100.0, + damage: 10.0, radius: 5.0, energy_regen: 50, ), diff --git a/assets/common/abilities/custom/birdlargebreathe/flamethrower.ron b/assets/common/abilities/custom/birdlargebreathe/flamethrower.ron index cf3e4c63b6..6b6ccdff31 100644 --- a/assets/common/abilities/custom/birdlargebreathe/flamethrower.ron +++ b/assets/common/abilities/custom/birdlargebreathe/flamethrower.ron @@ -2,7 +2,7 @@ BasicBeam( buildup_duration: 0.4, recover_duration: 0.25, beam_duration: 0.5, - damage: 50, + damage: 5.0, tick_rate: 3.0, range: 15.0, max_angle: 22.5, diff --git a/assets/common/abilities/custom/birdlargebreathe/triplestrike.ron b/assets/common/abilities/custom/birdlargebreathe/triplestrike.ron index ed38a425c9..c8c932a288 100644 --- a/assets/common/abilities/custom/birdlargebreathe/triplestrike.ron +++ b/assets/common/abilities/custom/birdlargebreathe/triplestrike.ron @@ -2,7 +2,7 @@ ComboMelee( stage_data: [ ( stage: 1, - base_damage: 100, + base_damage: 10.0, damage_increase: 0, base_poise_damage: 0, poise_damage_increase: 0, @@ -24,7 +24,7 @@ ComboMelee( ), ( stage: 2, - base_damage: 80, + base_damage: 8.0, damage_increase: 0, base_poise_damage: 0, poise_damage_increase: 0, @@ -46,7 +46,7 @@ ComboMelee( ), ( stage: 3, - base_damage: 130, + base_damage: 13.0, damage_increase: 0, base_poise_damage: 0, poise_damage_increase: 0, diff --git a/assets/common/abilities/custom/birdlargefire/firebomb.ron b/assets/common/abilities/custom/birdlargefire/firebomb.ron index 6c2b6245ff..f91e9f7be0 100644 --- a/assets/common/abilities/custom/birdlargefire/firebomb.ron +++ b/assets/common/abilities/custom/birdlargefire/firebomb.ron @@ -3,7 +3,7 @@ BasicRanged( buildup_duration: 0.5, recover_duration: 0.35, projectile: Fireball( - damage: 100.0, + damage: 10.0, radius: 5.0, energy_regen: 50, ), diff --git a/assets/common/abilities/custom/birdlargefire/fireshockwave.ron b/assets/common/abilities/custom/birdlargefire/fireshockwave.ron index 07637b0099..2a467cd0b2 100644 --- a/assets/common/abilities/custom/birdlargefire/fireshockwave.ron +++ b/assets/common/abilities/custom/birdlargefire/fireshockwave.ron @@ -3,7 +3,7 @@ Shockwave( buildup_duration: 0.7, swing_duration: 0.1, recover_duration: 0.2, - damage: 200, + damage: 20.0, poise_damage: 0, knockback: ( strength: 25.0, direction: Away), shockwave_angle: 360.0, diff --git a/assets/common/abilities/custom/birdlargefire/flamethrower.ron b/assets/common/abilities/custom/birdlargefire/flamethrower.ron index cf3e4c63b6..6b6ccdff31 100644 --- a/assets/common/abilities/custom/birdlargefire/flamethrower.ron +++ b/assets/common/abilities/custom/birdlargefire/flamethrower.ron @@ -2,7 +2,7 @@ BasicBeam( buildup_duration: 0.4, recover_duration: 0.25, beam_duration: 0.5, - damage: 50, + damage: 5.0, tick_rate: 3.0, range: 15.0, max_angle: 22.5, diff --git a/assets/common/abilities/custom/birdlargefire/triplestrike.ron b/assets/common/abilities/custom/birdlargefire/triplestrike.ron index ed38a425c9..c8c932a288 100644 --- a/assets/common/abilities/custom/birdlargefire/triplestrike.ron +++ b/assets/common/abilities/custom/birdlargefire/triplestrike.ron @@ -2,7 +2,7 @@ ComboMelee( stage_data: [ ( stage: 1, - base_damage: 100, + base_damage: 10.0, damage_increase: 0, base_poise_damage: 0, poise_damage_increase: 0, @@ -24,7 +24,7 @@ ComboMelee( ), ( stage: 2, - base_damage: 80, + base_damage: 8.0, damage_increase: 0, base_poise_damage: 0, poise_damage_increase: 0, @@ -46,7 +46,7 @@ ComboMelee( ), ( stage: 3, - base_damage: 130, + base_damage: 13.0, damage_increase: 0, base_poise_damage: 0, poise_damage_increase: 0, diff --git a/assets/common/abilities/custom/claygolem/laser.ron b/assets/common/abilities/custom/claygolem/laser.ron index 95782454f0..0a6360260d 100644 --- a/assets/common/abilities/custom/claygolem/laser.ron +++ b/assets/common/abilities/custom/claygolem/laser.ron @@ -2,7 +2,7 @@ BasicBeam( buildup_duration: 0.5, recover_duration: 0.4, beam_duration: 0.25, - damage: 70, + damage: 7.0, tick_rate: 2.0, range: 40.0, max_angle: 1.0, diff --git a/assets/common/abilities/custom/claygolem/rocket.ron b/assets/common/abilities/custom/claygolem/rocket.ron index 762b84408c..a5b2a230c6 100644 --- a/assets/common/abilities/custom/claygolem/rocket.ron +++ b/assets/common/abilities/custom/claygolem/rocket.ron @@ -3,7 +3,7 @@ BasicRanged( buildup_duration: 0.8, recover_duration: 0.5, projectile: ClayRocket( - damage: 500.0, + damage: 50.0, knockback: 18.0, radius: 5.0, ), diff --git a/assets/common/abilities/custom/claygolem/shockwave.ron b/assets/common/abilities/custom/claygolem/shockwave.ron index b23ed1ba62..2d9a425735 100644 --- a/assets/common/abilities/custom/claygolem/shockwave.ron +++ b/assets/common/abilities/custom/claygolem/shockwave.ron @@ -3,7 +3,7 @@ Shockwave( buildup_duration: 1.5, swing_duration: 0.12, recover_duration: 1.2, - damage: 500, + damage: 50.0, poise_damage: 50, knockback: (strength: 30.0, direction: TowardsUp), shockwave_angle: 180.0, diff --git a/assets/common/abilities/custom/claygolem/strike.ron b/assets/common/abilities/custom/claygolem/strike.ron index 9552e7f2bc..ac1f33fd3d 100644 --- a/assets/common/abilities/custom/claygolem/strike.ron +++ b/assets/common/abilities/custom/claygolem/strike.ron @@ -3,7 +3,7 @@ BasicMelee( buildup_duration: 0.8, swing_duration: 0.1, recover_duration: 0.5, - base_damage: 200, + base_damage: 20.0, base_poise_damage: 50, knockback: ( strength: 10.0, direction: Away), range: 4.0, diff --git a/assets/common/abilities/custom/harvester/explodingpumpkin.ron b/assets/common/abilities/custom/harvester/explodingpumpkin.ron index ecea54a587..5d76172c15 100644 --- a/assets/common/abilities/custom/harvester/explodingpumpkin.ron +++ b/assets/common/abilities/custom/harvester/explodingpumpkin.ron @@ -3,7 +3,7 @@ BasicRanged( buildup_duration: 0.5, recover_duration: 0.8, projectile: ExplodingPumpkin( - damage: 200.0, + damage: 20.0, knockback: 25.0, radius: 5.0, ), diff --git a/assets/common/abilities/custom/harvester/firebreath.ron b/assets/common/abilities/custom/harvester/firebreath.ron index ac52ce7561..979b2d727c 100644 --- a/assets/common/abilities/custom/harvester/firebreath.ron +++ b/assets/common/abilities/custom/harvester/firebreath.ron @@ -2,7 +2,7 @@ BasicBeam( buildup_duration: 0.5, recover_duration: 0.5, beam_duration: 1.0, - damage: 40, + damage: 4.0, tick_rate: 1.5, range: 20.0, max_angle: 15.0, diff --git a/assets/common/abilities/custom/harvester/scythe.ron b/assets/common/abilities/custom/harvester/scythe.ron index 1c05eedf5f..3db0d65a25 100644 --- a/assets/common/abilities/custom/harvester/scythe.ron +++ b/assets/common/abilities/custom/harvester/scythe.ron @@ -3,7 +3,7 @@ BasicMelee( buildup_duration: 0.7, swing_duration: 0.1, recover_duration: 0.6, - base_damage: 70, + base_damage: 7.0, base_poise_damage: 10, knockback: ( strength: 10.0, direction: Away), range: 4.0, diff --git a/assets/common/abilities/custom/husk/singlestrike.ron b/assets/common/abilities/custom/husk/singlestrike.ron index d64184bfa8..42fa5e98e3 100644 --- a/assets/common/abilities/custom/husk/singlestrike.ron +++ b/assets/common/abilities/custom/husk/singlestrike.ron @@ -2,7 +2,7 @@ ComboMelee( stage_data: [ ( stage: 1, - base_damage: 160, + base_damage: 16.0, damage_increase: 0, base_poise_damage: 12, poise_damage_increase: 0, diff --git a/assets/common/abilities/custom/husk/triplestrike.ron b/assets/common/abilities/custom/husk/triplestrike.ron index d4b66e6a50..56d2ecc260 100644 --- a/assets/common/abilities/custom/husk/triplestrike.ron +++ b/assets/common/abilities/custom/husk/triplestrike.ron @@ -2,7 +2,7 @@ ComboMelee( stage_data: [ ( stage: 1, - base_damage: 160, + base_damage: 16.0, damage_increase: 0, base_poise_damage: 6, poise_damage_increase: 0, @@ -18,7 +18,7 @@ ComboMelee( ), ( stage: 2, - base_damage: 160, + base_damage: 16.0, damage_increase: 0, base_poise_damage: 8, poise_damage_increase: 0, @@ -34,7 +34,7 @@ ComboMelee( ), ( stage: 3, - base_damage: 160, + base_damage: 16.0, damage_increase: 0, base_poise_damage: 10, poise_damage_increase: 0, diff --git a/assets/common/abilities/custom/husk_brute/chargedmelee.ron b/assets/common/abilities/custom/husk_brute/chargedmelee.ron index 6225afafa4..b62d78798f 100644 --- a/assets/common/abilities/custom/husk_brute/chargedmelee.ron +++ b/assets/common/abilities/custom/husk_brute/chargedmelee.ron @@ -1,8 +1,8 @@ ChargedMelee( energy_cost: 0, energy_drain: 0, - initial_damage: 50, - scaled_damage: 450, + initial_damage: 5.0, + scaled_damage: 45.0, initial_poise_damage: 50, scaled_poise_damage: 150, initial_knockback: 0.0, diff --git a/assets/common/abilities/custom/husk_brute/singlestrike.ron b/assets/common/abilities/custom/husk_brute/singlestrike.ron index ce9cc97599..ef4b204ef2 100644 --- a/assets/common/abilities/custom/husk_brute/singlestrike.ron +++ b/assets/common/abilities/custom/husk_brute/singlestrike.ron @@ -2,7 +2,7 @@ ComboMelee( stage_data: [ ( stage: 1, - base_damage: 200, + base_damage: 20.0, damage_increase: 0, base_poise_damage: 12, poise_damage_increase: 0, diff --git a/assets/common/abilities/custom/maneater/poisonball.ron b/assets/common/abilities/custom/maneater/poisonball.ron index f8a2b14c9b..8b171eba68 100644 --- a/assets/common/abilities/custom/maneater/poisonball.ron +++ b/assets/common/abilities/custom/maneater/poisonball.ron @@ -3,7 +3,7 @@ BasicRanged( buildup_duration: 0.8, recover_duration: 0.35, projectile: NecroticSphere( - damage: 260.0, + damage: 26.0, radius: 5.0, energy_regen: 0, ), diff --git a/assets/common/abilities/custom/maneater/singlestrike.ron b/assets/common/abilities/custom/maneater/singlestrike.ron index 45ebb89522..ac08ed7a97 100644 --- a/assets/common/abilities/custom/maneater/singlestrike.ron +++ b/assets/common/abilities/custom/maneater/singlestrike.ron @@ -2,7 +2,7 @@ ComboMelee( stage_data: [ ( stage: 1, - base_damage: 200, + base_damage: 20.0, damage_increase: 0, base_poise_damage: 28, poise_damage_increase: 0, diff --git a/assets/common/abilities/custom/mindflayer/cursedflames.ron b/assets/common/abilities/custom/mindflayer/cursedflames.ron index 8ce5a5cfb5..423e29d139 100644 --- a/assets/common/abilities/custom/mindflayer/cursedflames.ron +++ b/assets/common/abilities/custom/mindflayer/cursedflames.ron @@ -2,7 +2,7 @@ BasicBeam( buildup_duration: 0.40, recover_duration: 0.50, beam_duration: 1.0, - damage: 150, + damage: 15.0, tick_rate: 5.0, range: 22.0, max_angle: 15.0, diff --git a/assets/common/abilities/custom/mindflayer/necroticsphere.ron b/assets/common/abilities/custom/mindflayer/necroticsphere.ron index 08c2039552..52004b1bbf 100644 --- a/assets/common/abilities/custom/mindflayer/necroticsphere.ron +++ b/assets/common/abilities/custom/mindflayer/necroticsphere.ron @@ -3,7 +3,7 @@ BasicRanged( buildup_duration: 0.75, recover_duration: 0.4, projectile: NecroticSphere( - damage: 450.0, + damage: 45.0, radius: 5.0, ), projectile_body: Object(FireworkPurple), diff --git a/assets/common/abilities/custom/mindflayer/necroticvortex.ron b/assets/common/abilities/custom/mindflayer/necroticvortex.ron index e6f89f6750..7b96a88cf9 100644 --- a/assets/common/abilities/custom/mindflayer/necroticvortex.ron +++ b/assets/common/abilities/custom/mindflayer/necroticvortex.ron @@ -2,7 +2,7 @@ SpinMelee( buildup_duration: 0.8, swing_duration: 0.5, recover_duration: 0.6, - base_damage: 200.0, + base_damage: 20.0, base_poise_damage: 1.0, knockback: ( strength: 7.0, direction: Towards), range: 16.0, diff --git a/assets/common/abilities/custom/minotaur/charge.ron b/assets/common/abilities/custom/minotaur/charge.ron index b8324ee500..8f74bffe9b 100644 --- a/assets/common/abilities/custom/minotaur/charge.ron +++ b/assets/common/abilities/custom/minotaur/charge.ron @@ -1,7 +1,7 @@ DashMelee( energy_cost: 0, - base_damage: 150, - scaled_damage: 600, + base_damage: 15.0, + scaled_damage: 60.0, base_poise_damage: 25, scaled_poise_damage: 100, base_knockback: 10.0, diff --git a/assets/common/abilities/custom/minotaur/cleave.ron b/assets/common/abilities/custom/minotaur/cleave.ron index c656f6201d..bd03569545 100644 --- a/assets/common/abilities/custom/minotaur/cleave.ron +++ b/assets/common/abilities/custom/minotaur/cleave.ron @@ -1,8 +1,8 @@ ChargedMelee( energy_cost: 0, energy_drain: 0, - initial_damage: 50, - scaled_damage: 450, + initial_damage: 5.0, + scaled_damage: 45.0, initial_poise_damage: 50, scaled_poise_damage: 150, initial_knockback: 0.0, diff --git a/assets/common/abilities/custom/minotaur/cripplingstrike.ron b/assets/common/abilities/custom/minotaur/cripplingstrike.ron index d662f33a60..071b496edf 100644 --- a/assets/common/abilities/custom/minotaur/cripplingstrike.ron +++ b/assets/common/abilities/custom/minotaur/cripplingstrike.ron @@ -3,7 +3,7 @@ BasicMelee( buildup_duration: 0.3, swing_duration: 0.1, recover_duration: 0.6, - base_damage: 150.0, + base_damage: 15.0, base_poise_damage: 60.0, knockback: ( strength: 15.0, direction: Away), range: 5.0, diff --git a/assets/common/abilities/custom/quadlowbasic/singlestrike.ron b/assets/common/abilities/custom/quadlowbasic/singlestrike.ron index d0ce162fcd..cf0349d12c 100644 --- a/assets/common/abilities/custom/quadlowbasic/singlestrike.ron +++ b/assets/common/abilities/custom/quadlowbasic/singlestrike.ron @@ -2,7 +2,7 @@ ComboMelee( stage_data: [ ( stage: 1, - base_damage: 200, + base_damage: 20.0, damage_increase: 0, base_poise_damage: 28, poise_damage_increase: 0, diff --git a/assets/common/abilities/custom/quadlowbasic/triplestrike.ron b/assets/common/abilities/custom/quadlowbasic/triplestrike.ron index db548b316b..308860f0ee 100644 --- a/assets/common/abilities/custom/quadlowbasic/triplestrike.ron +++ b/assets/common/abilities/custom/quadlowbasic/triplestrike.ron @@ -2,7 +2,7 @@ ComboMelee( stage_data: [ ( stage: 1, - base_damage: 140, + base_damage: 14.0, damage_increase: 0, base_poise_damage: 15, poise_damage_increase: 0, @@ -18,7 +18,7 @@ ComboMelee( ), ( stage: 2, - base_damage: 140, + base_damage: 14.0, damage_increase: 0, base_poise_damage: 18, poise_damage_increase: 0, @@ -34,7 +34,7 @@ ComboMelee( ), ( stage: 3, - base_damage: 140, + base_damage: 14.0, damage_increase: 0, base_poise_damage: 20, poise_damage_increase: 0, diff --git a/assets/common/abilities/custom/quadlowbeam/lifestealbeam.ron b/assets/common/abilities/custom/quadlowbeam/lifestealbeam.ron index bf9f67567c..bc318299c3 100644 --- a/assets/common/abilities/custom/quadlowbeam/lifestealbeam.ron +++ b/assets/common/abilities/custom/quadlowbeam/lifestealbeam.ron @@ -2,7 +2,7 @@ BasicBeam( buildup_duration: 0.25, recover_duration: 0.25, beam_duration: 1.0, - damage: 30, + damage: 3.0, tick_rate: 2.0, range: 25.0, max_angle: 1.0, diff --git a/assets/common/abilities/custom/quadlowbreathe/dash.ron b/assets/common/abilities/custom/quadlowbreathe/dash.ron index 887298f7a5..9199432ea3 100644 --- a/assets/common/abilities/custom/quadlowbreathe/dash.ron +++ b/assets/common/abilities/custom/quadlowbreathe/dash.ron @@ -1,7 +1,7 @@ DashMelee( energy_cost: 0, - base_damage: 80, - scaled_damage: 150, + base_damage: 8.0, + scaled_damage: 15.0, base_poise_damage: 25, scaled_poise_damage: 0, base_knockback: 4.0, diff --git a/assets/common/abilities/custom/quadlowbreathe/flamethrower.ron b/assets/common/abilities/custom/quadlowbreathe/flamethrower.ron index 5d6fd2895e..3b89fcec4a 100644 --- a/assets/common/abilities/custom/quadlowbreathe/flamethrower.ron +++ b/assets/common/abilities/custom/quadlowbreathe/flamethrower.ron @@ -2,7 +2,7 @@ BasicBeam( buildup_duration: 0.4, recover_duration: 0.25, beam_duration: 0.5, - damage: 70, + damage: 7.0, tick_rate: 3.0, range: 15.0, max_angle: 22.5, diff --git a/assets/common/abilities/custom/quadlowbreathe/triplestrike.ron b/assets/common/abilities/custom/quadlowbreathe/triplestrike.ron index 6c68f6f61a..f17dcdedbb 100644 --- a/assets/common/abilities/custom/quadlowbreathe/triplestrike.ron +++ b/assets/common/abilities/custom/quadlowbreathe/triplestrike.ron @@ -2,7 +2,7 @@ ComboMelee( stage_data: [ ( stage: 1, - base_damage: 220, + base_damage: 22.0, damage_increase: 0, base_poise_damage: 20, poise_damage_increase: 0, @@ -18,7 +18,7 @@ ComboMelee( ), ( stage: 2, - base_damage: 220, + base_damage: 22.0, damage_increase: 0, base_poise_damage: 20, poise_damage_increase: 0, @@ -34,7 +34,7 @@ ComboMelee( ), ( stage: 3, - base_damage: 220, + base_damage: 22.0, damage_increase: 0, base_poise_damage: 20, poise_damage_increase: 0, diff --git a/assets/common/abilities/custom/quadlowquick/dash.ron b/assets/common/abilities/custom/quadlowquick/dash.ron index 42838c2b98..97a4c03615 100644 --- a/assets/common/abilities/custom/quadlowquick/dash.ron +++ b/assets/common/abilities/custom/quadlowquick/dash.ron @@ -1,7 +1,7 @@ DashMelee( energy_cost: 0, - base_damage: 40, - scaled_damage: 80, + base_damage: 4.0, + scaled_damage: 8.0, base_poise_damage: 30, scaled_poise_damage: 0, base_knockback: 2.0, diff --git a/assets/common/abilities/custom/quadlowquick/quadstrike.ron b/assets/common/abilities/custom/quadlowquick/quadstrike.ron index fdf237aebf..b8575523ff 100644 --- a/assets/common/abilities/custom/quadlowquick/quadstrike.ron +++ b/assets/common/abilities/custom/quadlowquick/quadstrike.ron @@ -2,7 +2,7 @@ ComboMelee( stage_data: [ ( stage: 1, - base_damage: 60, + base_damage: 6.0, damage_increase: 0, base_poise_damage: 15, poise_damage_increase: 0, @@ -18,7 +18,7 @@ ComboMelee( ), ( stage: 2, - base_damage: 60, + base_damage: 6.0, damage_increase: 0, base_poise_damage: 15, poise_damage_increase: 0, @@ -34,7 +34,7 @@ ComboMelee( ), ( stage: 3, - base_damage: 60, + base_damage: 6.0, damage_increase: 0, base_poise_damage: 15, poise_damage_increase: 0, @@ -50,7 +50,7 @@ ComboMelee( ), ( stage: 4, - base_damage: 60, + base_damage: 6.0, damage_increase: 0, base_poise_damage: 15, poise_damage_increase: 0, diff --git a/assets/common/abilities/custom/quadlowranged/firebomb.ron b/assets/common/abilities/custom/quadlowranged/firebomb.ron index 4c758438cf..27f0381ad8 100644 --- a/assets/common/abilities/custom/quadlowranged/firebomb.ron +++ b/assets/common/abilities/custom/quadlowranged/firebomb.ron @@ -3,7 +3,7 @@ BasicRanged( buildup_duration: 0.8, recover_duration: 0.35, projectile: NecroticSphere( - damage: 130.0, + damage: 13.0, radius: 5.0, energy_regen: 0, ), diff --git a/assets/common/abilities/custom/quadlowtail/charged.ron b/assets/common/abilities/custom/quadlowtail/charged.ron index b4111c7f4c..ad87da1df1 100644 --- a/assets/common/abilities/custom/quadlowtail/charged.ron +++ b/assets/common/abilities/custom/quadlowtail/charged.ron @@ -1,8 +1,8 @@ ChargedMelee( energy_cost: 0, energy_drain: 0, - initial_damage: 40, - scaled_damage: 200, + initial_damage: 4.0, + scaled_damage: 20.0, initial_poise_damage: 30, scaled_poise_damage: 80, initial_knockback: 10.0, diff --git a/assets/common/abilities/custom/quadlowtail/triplestrike.ron b/assets/common/abilities/custom/quadlowtail/triplestrike.ron index 457328d1c0..36c18555bc 100644 --- a/assets/common/abilities/custom/quadlowtail/triplestrike.ron +++ b/assets/common/abilities/custom/quadlowtail/triplestrike.ron @@ -2,7 +2,7 @@ ComboMelee( stage_data: [ ( stage: 1, - base_damage: 80, + base_damage: 8.0, damage_increase: 0, base_poise_damage: 0, poise_damage_increase: 22, @@ -18,7 +18,7 @@ ComboMelee( ), ( stage: 2, - base_damage: 80, + base_damage: 8.0, damage_increase: 0, base_poise_damage: 22, poise_damage_increase: 0, @@ -34,7 +34,7 @@ ComboMelee( ), ( stage: 3, - base_damage: 80, + base_damage: 8.0, damage_increase: 0, base_poise_damage: 22, poise_damage_increase: 0, diff --git a/assets/common/abilities/custom/quadmedbasic/singlestrike.ron b/assets/common/abilities/custom/quadmedbasic/singlestrike.ron index d5659cd650..2b654ced93 100644 --- a/assets/common/abilities/custom/quadmedbasic/singlestrike.ron +++ b/assets/common/abilities/custom/quadmedbasic/singlestrike.ron @@ -2,7 +2,7 @@ ComboMelee( stage_data: [ ( stage: 1, - base_damage: 100, + base_damage: 10.0, damage_increase: 0, base_poise_damage: 28, poise_damage_increase: 0, diff --git a/assets/common/abilities/custom/quadmedbasic/triplestrike.ron b/assets/common/abilities/custom/quadmedbasic/triplestrike.ron index 1a5577da1d..c0ce86171f 100644 --- a/assets/common/abilities/custom/quadmedbasic/triplestrike.ron +++ b/assets/common/abilities/custom/quadmedbasic/triplestrike.ron @@ -2,7 +2,7 @@ ComboMelee( stage_data: [ ( stage: 1, - base_damage: 50, + base_damage: 5.0, damage_increase: 0, base_poise_damage: 15, poise_damage_increase: 0, @@ -18,7 +18,7 @@ ComboMelee( ), ( stage: 2, - base_damage: 50, + base_damage: 5.0, damage_increase: 0, base_poise_damage: 18, poise_damage_increase: 0, @@ -34,7 +34,7 @@ ComboMelee( ), ( stage: 3, - base_damage: 50, + base_damage: 5.0, damage_increase: 0, base_poise_damage: 20, poise_damage_increase: 0, diff --git a/assets/common/abilities/custom/quadmedcharge/dash.ron b/assets/common/abilities/custom/quadmedcharge/dash.ron index 75a399c0cd..41f9007fd3 100644 --- a/assets/common/abilities/custom/quadmedcharge/dash.ron +++ b/assets/common/abilities/custom/quadmedcharge/dash.ron @@ -1,7 +1,7 @@ DashMelee( energy_cost: 0, - base_damage: 70, - scaled_damage: 280, + base_damage: 7.0, + scaled_damage: 28.0, base_poise_damage: 28, scaled_poise_damage: 40, base_knockback: 8.0, diff --git a/assets/common/abilities/custom/quadmedcharge/doublestrike.ron b/assets/common/abilities/custom/quadmedcharge/doublestrike.ron index 30fa68b6aa..73b31feec1 100644 --- a/assets/common/abilities/custom/quadmedcharge/doublestrike.ron +++ b/assets/common/abilities/custom/quadmedcharge/doublestrike.ron @@ -2,7 +2,7 @@ ComboMelee( stage_data: [ ( stage: 1, - base_damage: 250, + base_damage: 25.0, damage_increase: 0, base_poise_damage: 22, poise_damage_increase: 0, @@ -18,7 +18,7 @@ ComboMelee( ), ( stage: 2, - base_damage: 370, + base_damage: 37.0, damage_increase: 0, base_poise_damage: 0, poise_damage_increase: 22, diff --git a/assets/common/abilities/custom/quadmedhoof/basic.ron b/assets/common/abilities/custom/quadmedhoof/basic.ron index b1d70e5f7f..b0c6ff437c 100644 --- a/assets/common/abilities/custom/quadmedhoof/basic.ron +++ b/assets/common/abilities/custom/quadmedhoof/basic.ron @@ -3,7 +3,7 @@ BasicMelee( buildup_duration: 0.65, swing_duration: 0.3, recover_duration: 0.35, - base_damage: 100, + base_damage: 10.0, base_poise_damage: 28, knockback: ( strength: 25.0, direction: Away), range: 0.8, diff --git a/assets/common/abilities/custom/quadmedjump/doublestrike.ron b/assets/common/abilities/custom/quadmedjump/doublestrike.ron index d57e0c63df..37eb39aaa5 100644 --- a/assets/common/abilities/custom/quadmedjump/doublestrike.ron +++ b/assets/common/abilities/custom/quadmedjump/doublestrike.ron @@ -2,7 +2,7 @@ ComboMelee( stage_data: [ ( stage: 1, - base_damage: 80, + base_damage: 8.0, damage_increase: 0, base_poise_damage: 30, poise_damage_increase: 0, @@ -18,7 +18,7 @@ ComboMelee( ), ( stage: 2, - base_damage: 80, + base_damage: 8.0, damage_increase: 0, base_poise_damage: 30, poise_damage_increase: 0, diff --git a/assets/common/abilities/custom/quadmedjump/leap.ron b/assets/common/abilities/custom/quadmedjump/leap.ron index 15a470ac97..6ca74502b7 100644 --- a/assets/common/abilities/custom/quadmedjump/leap.ron +++ b/assets/common/abilities/custom/quadmedjump/leap.ron @@ -4,7 +4,7 @@ LeapMelee( movement_duration: 0.4, swing_duration: 0.075, recover_duration: 0.2, - base_damage: 120, + base_damage: 12.0, base_poise_damage: 60, knockback: 4.0, range: 4.5, diff --git a/assets/common/abilities/custom/quadmedjump/quickleap.ron b/assets/common/abilities/custom/quadmedjump/quickleap.ron index 0a701ea0c7..7d271bf5a1 100644 --- a/assets/common/abilities/custom/quadmedjump/quickleap.ron +++ b/assets/common/abilities/custom/quadmedjump/quickleap.ron @@ -4,7 +4,7 @@ LeapMelee( movement_duration: 0.3, swing_duration: 0.075, recover_duration: 0.125, - base_damage: 80, + base_damage: 8.0, base_poise_damage: 30, knockback: 2.0, range: 4.5, diff --git a/assets/common/abilities/custom/quadmedquick/dash.ron b/assets/common/abilities/custom/quadmedquick/dash.ron index 1bb33c9825..bb79fa08f6 100644 --- a/assets/common/abilities/custom/quadmedquick/dash.ron +++ b/assets/common/abilities/custom/quadmedquick/dash.ron @@ -1,7 +1,7 @@ DashMelee( energy_cost: 0, - base_damage: 75, - scaled_damage: 20, + base_damage: 7.5, + scaled_damage: 2.0, base_poise_damage: 28, scaled_poise_damage: 28, base_knockback: 3.0, diff --git a/assets/common/abilities/custom/quadmedquick/triplestrike.ron b/assets/common/abilities/custom/quadmedquick/triplestrike.ron index 596df64343..7c2f8980e6 100644 --- a/assets/common/abilities/custom/quadmedquick/triplestrike.ron +++ b/assets/common/abilities/custom/quadmedquick/triplestrike.ron @@ -2,7 +2,7 @@ ComboMelee( stage_data: [ ( stage: 1, - base_damage: 100, + base_damage: 10.0, damage_increase: 0, base_poise_damage: 15, poise_damage_increase: 0, @@ -18,7 +18,7 @@ ComboMelee( ), ( stage: 2, - base_damage: 100, + base_damage: 10.0, damage_increase: 0, base_poise_damage: 17, poise_damage_increase: 0, @@ -34,7 +34,7 @@ ComboMelee( ), ( stage: 3, - base_damage: 100, + base_damage: 10.0, damage_increase: 0, base_poise_damage: 20, poise_damage_increase: 0, diff --git a/assets/common/abilities/custom/quadsmallbasic/singlestrike.ron b/assets/common/abilities/custom/quadsmallbasic/singlestrike.ron index d494ab6974..73ad450775 100644 --- a/assets/common/abilities/custom/quadsmallbasic/singlestrike.ron +++ b/assets/common/abilities/custom/quadsmallbasic/singlestrike.ron @@ -2,7 +2,7 @@ ComboMelee( stage_data: [ ( stage: 1, - base_damage: 30, + base_damage: 3.0, damage_increase: 0, base_poise_damage: 10, poise_damage_increase: 0, diff --git a/assets/common/abilities/custom/stonegolemfist/shockwave.ron b/assets/common/abilities/custom/stonegolemfist/shockwave.ron index 0d0ced9475..0f9ac664d1 100644 --- a/assets/common/abilities/custom/stonegolemfist/shockwave.ron +++ b/assets/common/abilities/custom/stonegolemfist/shockwave.ron @@ -3,7 +3,7 @@ Shockwave( buildup_duration: 0.6, swing_duration: 0.12, recover_duration: 1.2, - damage: 500, + damage: 50.0, poise_damage: 50, knockback: (strength: 40.0, direction: TowardsUp), shockwave_angle: 100.0, diff --git a/assets/common/abilities/custom/stonegolemfist/singlestrike.ron b/assets/common/abilities/custom/stonegolemfist/singlestrike.ron index 0c22b0bdb7..eec00b7c17 100644 --- a/assets/common/abilities/custom/stonegolemfist/singlestrike.ron +++ b/assets/common/abilities/custom/stonegolemfist/singlestrike.ron @@ -2,7 +2,7 @@ ComboMelee( stage_data: [ ( stage: 1, - base_damage: 300, + base_damage: 30.0, damage_increase: 0, base_poise_damage: 40, poise_damage_increase: 0, diff --git a/assets/common/abilities/custom/stonegolemfist/spin.ron b/assets/common/abilities/custom/stonegolemfist/spin.ron index 5035e8ba67..3a44ad00e0 100644 --- a/assets/common/abilities/custom/stonegolemfist/spin.ron +++ b/assets/common/abilities/custom/stonegolemfist/spin.ron @@ -2,7 +2,7 @@ SpinMelee( buildup_duration: 0.1, swing_duration: 0.3, recover_duration: 0.1, - base_damage: 500, + base_damage: 50.0, base_poise_damage: 30, knockback: ( strength: 0.0, direction: Away), range: 7.5, diff --git a/assets/common/abilities/custom/theropodbasic/dash.ron b/assets/common/abilities/custom/theropodbasic/dash.ron index 8552a30b75..9f381eed07 100644 --- a/assets/common/abilities/custom/theropodbasic/dash.ron +++ b/assets/common/abilities/custom/theropodbasic/dash.ron @@ -1,7 +1,7 @@ DashMelee( energy_cost: 0, - base_damage: 120, - scaled_damage: 160, + base_damage: 12.0, + scaled_damage: 16.0, base_poise_damage: 0, scaled_poise_damage: 0, base_knockback: 8.0, diff --git a/assets/common/abilities/custom/theropodbasic/singlestrike.ron b/assets/common/abilities/custom/theropodbasic/singlestrike.ron index 9c607d0058..1226876cdd 100644 --- a/assets/common/abilities/custom/theropodbasic/singlestrike.ron +++ b/assets/common/abilities/custom/theropodbasic/singlestrike.ron @@ -2,7 +2,7 @@ ComboMelee( stage_data: [ ( stage: 1, - base_damage: 270, + base_damage: 27.0, damage_increase: 0, base_poise_damage: 40, poise_damage_increase: 0, diff --git a/assets/common/abilities/custom/theropodbasic/triplestrike.ron b/assets/common/abilities/custom/theropodbasic/triplestrike.ron index 7157a77620..7516469eb9 100644 --- a/assets/common/abilities/custom/theropodbasic/triplestrike.ron +++ b/assets/common/abilities/custom/theropodbasic/triplestrike.ron @@ -2,7 +2,7 @@ ComboMelee( stage_data: [ ( stage: 1, - base_damage: 300, + base_damage: 30.0, damage_increase: 0, base_poise_damage: 35, poise_damage_increase: 0, @@ -18,7 +18,7 @@ ComboMelee( ), ( stage: 2, - base_damage: 340, + base_damage: 34.0, damage_increase: 0, base_poise_damage: 35, poise_damage_increase: 0, @@ -34,7 +34,7 @@ ComboMelee( ), ( stage: 3, - base_damage: 400, + base_damage: 40.0, damage_increase: 0, base_poise_damage: 35, poise_damage_increase: 0, diff --git a/assets/common/abilities/custom/theropodbird/singlestrike.ron b/assets/common/abilities/custom/theropodbird/singlestrike.ron index 1401500a4b..d7932993cc 100644 --- a/assets/common/abilities/custom/theropodbird/singlestrike.ron +++ b/assets/common/abilities/custom/theropodbird/singlestrike.ron @@ -2,7 +2,7 @@ ComboMelee( stage_data: [ ( stage: 1, - base_damage: 110, + base_damage: 11.0, damage_increase: 0, base_poise_damage: 28, poise_damage_increase: 0, diff --git a/assets/common/abilities/custom/theropodbird/triplestrike.ron b/assets/common/abilities/custom/theropodbird/triplestrike.ron index 9693aa46d0..51d8a24280 100644 --- a/assets/common/abilities/custom/theropodbird/triplestrike.ron +++ b/assets/common/abilities/custom/theropodbird/triplestrike.ron @@ -2,7 +2,7 @@ ComboMelee( stage_data: [ ( stage: 1, - base_damage: 110, + base_damage: 11.0, damage_increase: 0, base_poise_damage: 20, poise_damage_increase: 0, @@ -18,7 +18,7 @@ ComboMelee( ), ( stage: 2, - base_damage: 150, + base_damage: 15.0, damage_increase: 0, base_poise_damage: 20, poise_damage_increase: 0, @@ -34,7 +34,7 @@ ComboMelee( ), ( stage: 3, - base_damage: 180, + base_damage: 18.0, damage_increase: 0, base_poise_damage: 20, poise_damage_increase: 0, diff --git a/assets/common/abilities/custom/tidalclaws/bubbles.ron b/assets/common/abilities/custom/tidalclaws/bubbles.ron deleted file mode 100644 index b51aab85a9..0000000000 --- a/assets/common/abilities/custom/tidalclaws/bubbles.ron +++ /dev/null @@ -1,14 +0,0 @@ -BasicBeam( - buildup_duration: 0.4, - recover_duration: 0.25, - beam_duration: 0.5, - base_hps: 0, - base_dps: 150, - tick_rate: 3.0, - range: 15.0, - max_angle: 22.5, - damage_effect: None, - energy_regen: 0, - energy_cost: 0, - energy_drain: 0, -) \ No newline at end of file diff --git a/assets/common/abilities/custom/tidalwarrior/bubbles.ron b/assets/common/abilities/custom/tidalwarrior/bubbles.ron index 3d35c86f50..d0466b356a 100644 --- a/assets/common/abilities/custom/tidalwarrior/bubbles.ron +++ b/assets/common/abilities/custom/tidalwarrior/bubbles.ron @@ -2,7 +2,7 @@ BasicBeam( buildup_duration: 0.5, recover_duration: 0.5, beam_duration: 2.5, - damage: 50, + damage: 5.0, tick_rate: 2.0, range: 25.0, max_angle: 15.0, diff --git a/assets/common/abilities/custom/tidalwarrior/pincer.ron b/assets/common/abilities/custom/tidalwarrior/pincer.ron index 3678f7f840..fa1308434f 100644 --- a/assets/common/abilities/custom/tidalwarrior/pincer.ron +++ b/assets/common/abilities/custom/tidalwarrior/pincer.ron @@ -3,7 +3,7 @@ BasicMelee( buildup_duration: 0.3, swing_duration: 0.1, recover_duration: 0.6, - base_damage: 50.0, + base_damage: 5.0, base_poise_damage: 0.0, knockback: ( strength: 50.0, direction: Towards), range: 5.0, diff --git a/assets/common/abilities/custom/tidalwarrior/scuttle.ron b/assets/common/abilities/custom/tidalwarrior/scuttle.ron index 31499e4f9d..9075810c5d 100644 --- a/assets/common/abilities/custom/tidalwarrior/scuttle.ron +++ b/assets/common/abilities/custom/tidalwarrior/scuttle.ron @@ -1,7 +1,7 @@ DashMelee( energy_cost: 0, - base_damage: 50, - scaled_damage: 250, + base_damage: 5.0, + scaled_damage: 25.0, base_poise_damage: 10, scaled_poise_damage: 40, base_knockback: 10.0, diff --git a/assets/common/abilities/custom/tidalwarrior/totem_wave.ron b/assets/common/abilities/custom/tidalwarrior/totem_wave.ron index bc1e7426ef..7271a351dd 100644 --- a/assets/common/abilities/custom/tidalwarrior/totem_wave.ron +++ b/assets/common/abilities/custom/tidalwarrior/totem_wave.ron @@ -3,7 +3,7 @@ Shockwave( buildup_duration: 0.4, swing_duration: 0.1, recover_duration: 3.5, - damage: 10, + damage: 1.0, poise_damage: 0, knockback: ( strength: 18.0, direction: Away), shockwave_angle: 360.0, diff --git a/assets/common/abilities/custom/tornado/spin.ron b/assets/common/abilities/custom/tornado/spin.ron index d5051d6495..6efa749f55 100644 --- a/assets/common/abilities/custom/tornado/spin.ron +++ b/assets/common/abilities/custom/tornado/spin.ron @@ -2,7 +2,7 @@ SpinMelee( buildup_duration: 0.0, swing_duration: 0.5, recover_duration: 0.0, - base_damage: 400, + base_damage: 40.0, base_poise_damage: 0, knockback: ( strength: 50.0, direction: Away), range: 3.5, diff --git a/assets/common/abilities/custom/turret/arrows.ron b/assets/common/abilities/custom/turret/arrows.ron index b86a4b329b..a2aa3546d0 100644 --- a/assets/common/abilities/custom/turret/arrows.ron +++ b/assets/common/abilities/custom/turret/arrows.ron @@ -3,7 +3,7 @@ BasicRanged( buildup_duration: 1.0, recover_duration: 0.3, projectile: Arrow( - damage: 200.0, + damage: 20.0, knockback: 5.0, energy_regen: 100, ), diff --git a/assets/common/abilities/custom/turret/flamethrower.ron b/assets/common/abilities/custom/turret/flamethrower.ron index da84dd0160..30fabdc45e 100644 --- a/assets/common/abilities/custom/turret/flamethrower.ron +++ b/assets/common/abilities/custom/turret/flamethrower.ron @@ -2,7 +2,7 @@ BasicBeam( buildup_duration: 0.25, recover_duration: 0.25, beam_duration: 1.0, - damage: 35, + damage: 3.5, tick_rate: 3.0, range: 20.0, max_angle: 15.0, diff --git a/assets/common/abilities/custom/wendigomagic/frostbomb.ron b/assets/common/abilities/custom/wendigomagic/frostbomb.ron index d49f94fcc1..732f397d76 100644 --- a/assets/common/abilities/custom/wendigomagic/frostbomb.ron +++ b/assets/common/abilities/custom/wendigomagic/frostbomb.ron @@ -3,7 +3,7 @@ BasicRanged( buildup_duration: 0.5, recover_duration: 0.35, projectile: Frostball( - damage: 120.0, + damage: 12.0, radius: 5.0, ), projectile_body: Object(BoltFire), // TODO: Get ice projectile model diff --git a/assets/common/abilities/custom/wendigomagic/singlestrike.ron b/assets/common/abilities/custom/wendigomagic/singlestrike.ron index efdf2b7bc9..94083f6be7 100644 --- a/assets/common/abilities/custom/wendigomagic/singlestrike.ron +++ b/assets/common/abilities/custom/wendigomagic/singlestrike.ron @@ -2,7 +2,7 @@ ComboMelee( stage_data: [ ( stage: 1, - base_damage: 180, + base_damage: 18.0, damage_increase: 0, base_poise_damage: 40, poise_damage_increase: 0, diff --git a/assets/common/abilities/custom/yeti/frostbreath.ron b/assets/common/abilities/custom/yeti/frostbreath.ron index 2f29bf5e94..b3f7b8a8a5 100644 --- a/assets/common/abilities/custom/yeti/frostbreath.ron +++ b/assets/common/abilities/custom/yeti/frostbreath.ron @@ -2,7 +2,7 @@ BasicBeam( buildup_duration: 0.8, recover_duration: 0.25, beam_duration: 0.25, - damage: 10, + damage: 1.0, tick_rate: 5.0, range: 15.0, max_angle: 30.0, diff --git a/assets/common/abilities/custom/yeti/icespikes.ron b/assets/common/abilities/custom/yeti/icespikes.ron index ef46d632c5..f7ede09e73 100644 --- a/assets/common/abilities/custom/yeti/icespikes.ron +++ b/assets/common/abilities/custom/yeti/icespikes.ron @@ -3,7 +3,7 @@ Shockwave( buildup_duration: 0.6, swing_duration: 0.15, recover_duration: 1.0, - damage: 100, + damage: 10.0, poise_damage: 10, knockback: (strength: 18.0, direction: Up), shockwave_angle: 90.0, diff --git a/assets/common/abilities/custom/yeti/snowball.ron b/assets/common/abilities/custom/yeti/snowball.ron index 918622f706..3a53ac3d5b 100644 --- a/assets/common/abilities/custom/yeti/snowball.ron +++ b/assets/common/abilities/custom/yeti/snowball.ron @@ -3,7 +3,7 @@ BasicRanged( buildup_duration: 0.5, recover_duration: 0.9, projectile: Snowball( - damage: 200.0, + damage: 20.0, radius: 5.0, ), projectile_body: Object(Snowball), diff --git a/assets/common/abilities/custom/yeti/strike.ron b/assets/common/abilities/custom/yeti/strike.ron index f54fb79408..ec2393a488 100644 --- a/assets/common/abilities/custom/yeti/strike.ron +++ b/assets/common/abilities/custom/yeti/strike.ron @@ -3,7 +3,7 @@ BasicMelee( buildup_duration: 0.8, swing_duration: 0.1, recover_duration: 1.0, - base_damage: 100, + base_damage: 10.0, base_poise_damage: 50, knockback: ( strength: 50.0, direction: Away), range: 4.0, diff --git a/assets/common/abilities/dagger/tempbasic.ron b/assets/common/abilities/dagger/tempbasic.ron index a818caa352..9a5f3f6f9b 100644 --- a/assets/common/abilities/dagger/tempbasic.ron +++ b/assets/common/abilities/dagger/tempbasic.ron @@ -3,7 +3,7 @@ BasicMelee( buildup_duration: 0.1, swing_duration: 0.1, recover_duration: 0.3, - base_damage: 50, + base_damage: 5.0, base_poise_damage: 0, knockback: ( strength: 0.0, direction: Away), range: 3.5, diff --git a/assets/common/abilities/empty/basic.ron b/assets/common/abilities/empty/basic.ron index 51b68d8fd1..dfe6ece6c7 100644 --- a/assets/common/abilities/empty/basic.ron +++ b/assets/common/abilities/empty/basic.ron @@ -3,7 +3,7 @@ BasicMelee( buildup_duration: 0.0, swing_duration: 0.1, recover_duration: 0.9, - base_damage: 20, + base_damage: 2.0, base_poise_damage: 0, knockback: ( strength: 0.0, direction: Away), range: 3.5, diff --git a/assets/common/abilities/farming/basic.ron b/assets/common/abilities/farming/basic.ron index b77fa80aeb..357c4c51de 100644 --- a/assets/common/abilities/farming/basic.ron +++ b/assets/common/abilities/farming/basic.ron @@ -3,7 +3,7 @@ BasicMelee( buildup_duration: 0.6, swing_duration: 0.1, recover_duration: 0.15, - base_damage: 50, + base_damage: 5.0, base_poise_damage: 0, knockback: ( strength: 0.0, direction: Away), range: 3.5, diff --git a/assets/common/abilities/hammer/charged.ron b/assets/common/abilities/hammer/charged.ron index 0820ef5bdf..b9fdb409bd 100644 --- a/assets/common/abilities/hammer/charged.ron +++ b/assets/common/abilities/hammer/charged.ron @@ -1,8 +1,8 @@ ChargedMelee( energy_cost: 1, energy_drain: 300, - initial_damage: 10, - scaled_damage: 160, + initial_damage: 1.0, + scaled_damage: 16.0, initial_poise_damage: 5, scaled_poise_damage: 75, initial_knockback: 5.0, diff --git a/assets/common/abilities/hammer/leap.ron b/assets/common/abilities/hammer/leap.ron index f1dd598690..ee4d0fc9bc 100644 --- a/assets/common/abilities/hammer/leap.ron +++ b/assets/common/abilities/hammer/leap.ron @@ -4,7 +4,7 @@ LeapMelee( movement_duration: 0.8, swing_duration: 0.15, recover_duration: 0.2, - base_damage: 160, + base_damage: 16.0, base_poise_damage: 80, knockback: 25.0, range: 4.5, diff --git a/assets/common/abilities/hammer/singlestrike.ron b/assets/common/abilities/hammer/singlestrike.ron index d4aef1f59c..3601cc404b 100644 --- a/assets/common/abilities/hammer/singlestrike.ron +++ b/assets/common/abilities/hammer/singlestrike.ron @@ -1,8 +1,8 @@ ComboMelee( stage_data: [( stage: 1, - base_damage: 150, - damage_increase: 10, + base_damage: 15.0, + damage_increase: 1.0, base_poise_damage: 20, poise_damage_increase: 0, knockback: 3.5, diff --git a/assets/common/abilities/hammersimple/doublestrike.ron b/assets/common/abilities/hammersimple/doublestrike.ron index fa333528e3..d7be904587 100644 --- a/assets/common/abilities/hammersimple/doublestrike.ron +++ b/assets/common/abilities/hammersimple/doublestrike.ron @@ -2,8 +2,8 @@ ComboMelee( stage_data: [ ( stage: 1, - base_damage: 240, - damage_increase: 10, + base_damage: 24.0, + damage_increase: 1.0, base_poise_damage: 40, poise_damage_increase: 0, knockback: 4.0, @@ -18,8 +18,8 @@ ComboMelee( ), ( stage: 2, - base_damage: 320, - damage_increase: 15, + base_damage: 32.0, + damage_increase: 1.5, base_poise_damage: 40, poise_damage_increase: 0, knockback: 16.0, diff --git a/assets/common/abilities/pick/swing.ron b/assets/common/abilities/pick/swing.ron index 06cf310e2d..e700f6aafc 100644 --- a/assets/common/abilities/pick/swing.ron +++ b/assets/common/abilities/pick/swing.ron @@ -3,7 +3,7 @@ BasicMelee( buildup_duration: 0.25, swing_duration: 0.05, recover_duration: 0.075, - base_damage: 50, + base_damage: 5.0, base_poise_damage: 0, knockback: ( strength: 0.0, direction: Away), range: 4.5, diff --git a/assets/common/abilities/sceptre/lifestealbeam.ron b/assets/common/abilities/sceptre/lifestealbeam.ron index 7d37405d23..aa5f31caa4 100644 --- a/assets/common/abilities/sceptre/lifestealbeam.ron +++ b/assets/common/abilities/sceptre/lifestealbeam.ron @@ -2,7 +2,7 @@ BasicBeam( buildup_duration: 0.20, recover_duration: 0.20, beam_duration: 1.0, - damage: 30, + damage: 3.0, tick_rate: 2.0, range: 25.0, max_angle: 1.0, diff --git a/assets/common/abilities/shield/tempbasic.ron b/assets/common/abilities/shield/tempbasic.ron index 1a6150bb7b..9ac62a04a3 100644 --- a/assets/common/abilities/shield/tempbasic.ron +++ b/assets/common/abilities/shield/tempbasic.ron @@ -3,7 +3,7 @@ BasicMelee( buildup_duration: 0.1, swing_duration: 0.1, recover_duration: 0.3, - base_damage: 40, + base_damage: 4.0, base_poise_damage: 0, knockback: ( strength: 0.0, direction: Away), range: 3.0, diff --git a/assets/common/abilities/spear/dash.ron b/assets/common/abilities/spear/dash.ron index 1914b1f67d..c20f1efa6a 100644 --- a/assets/common/abilities/spear/dash.ron +++ b/assets/common/abilities/spear/dash.ron @@ -1,7 +1,7 @@ DashMelee( energy_cost: 100, - base_damage: 10, - scaled_damage: 80, + base_damage: 1.0, + scaled_damage: 8.0, base_poise_damage: 0, scaled_poise_damage: 25, base_knockback: 8.0, diff --git a/assets/common/abilities/spear/doublestrike.ron b/assets/common/abilities/spear/doublestrike.ron index c97d3e0eba..082acb24c7 100644 --- a/assets/common/abilities/spear/doublestrike.ron +++ b/assets/common/abilities/spear/doublestrike.ron @@ -2,7 +2,7 @@ ComboMelee( stage_data: [ ( stage: 1, - base_damage: 65, + base_damage: 6.5, damage_increase: 0, base_poise_damage: 18, poise_damage_increase: 0, @@ -24,7 +24,7 @@ ComboMelee( ), ( stage: 2, - base_damage: 80, + base_damage: 8.0, damage_increase: 0, base_poise_damage: 18, poise_damage_increase: 0, diff --git a/assets/common/abilities/staff/firebomb.ron b/assets/common/abilities/staff/firebomb.ron index 4766bf9765..07c8d16af7 100644 --- a/assets/common/abilities/staff/firebomb.ron +++ b/assets/common/abilities/staff/firebomb.ron @@ -3,7 +3,7 @@ BasicRanged( buildup_duration: 0.5, recover_duration: 0.4, projectile: Fireball( - damage: 90.0, + damage: 9.0, radius: 4.0, energy_regen: 60, ), diff --git a/assets/common/abilities/staff/fireshockwave.ron b/assets/common/abilities/staff/fireshockwave.ron index 07637b0099..2a467cd0b2 100644 --- a/assets/common/abilities/staff/fireshockwave.ron +++ b/assets/common/abilities/staff/fireshockwave.ron @@ -3,7 +3,7 @@ Shockwave( buildup_duration: 0.7, swing_duration: 0.1, recover_duration: 0.2, - damage: 200, + damage: 20.0, poise_damage: 0, knockback: ( strength: 25.0, direction: Away), shockwave_angle: 360.0, diff --git a/assets/common/abilities/staff/flamethrower.ron b/assets/common/abilities/staff/flamethrower.ron index aefa0236b8..6cc5091881 100644 --- a/assets/common/abilities/staff/flamethrower.ron +++ b/assets/common/abilities/staff/flamethrower.ron @@ -2,7 +2,7 @@ BasicBeam( buildup_duration: 0.25, recover_duration: 0.25, beam_duration: 1.0, - damage: 35, + damage: 3.5, tick_rate: 3.0, range: 20.0, max_angle: 15.0, diff --git a/assets/common/abilities/staffsimple/firebomb.ron b/assets/common/abilities/staffsimple/firebomb.ron index 92ec89d2b7..f417b8f694 100644 --- a/assets/common/abilities/staffsimple/firebomb.ron +++ b/assets/common/abilities/staffsimple/firebomb.ron @@ -3,7 +3,7 @@ BasicRanged( buildup_duration: 0.5, recover_duration: 0.35, projectile: Fireball( - damage: 60.0, + damage: 6.0, radius: 5.0, energy_regen: 50, ), diff --git a/assets/common/abilities/staffsimple/flamethrower.ron b/assets/common/abilities/staffsimple/flamethrower.ron index d676f32c10..f6dfc11f4e 100644 --- a/assets/common/abilities/staffsimple/flamethrower.ron +++ b/assets/common/abilities/staffsimple/flamethrower.ron @@ -2,7 +2,7 @@ BasicBeam( buildup_duration: 0.5, recover_duration: 0.5, beam_duration: 1.0, - damage: 35, + damage: 3.5, tick_rate: 3.0, range: 20.0, max_angle: 15.0, diff --git a/assets/common/abilities/sword/dash.ron b/assets/common/abilities/sword/dash.ron index 6ae5fdba0e..84c8884584 100644 --- a/assets/common/abilities/sword/dash.ron +++ b/assets/common/abilities/sword/dash.ron @@ -1,7 +1,7 @@ DashMelee( energy_cost: 100, - base_damage: 80, - scaled_damage: 160, + base_damage: 8.0, + scaled_damage: 16.0, base_poise_damage: 0, scaled_poise_damage: 60, base_knockback: 8.0, diff --git a/assets/common/abilities/sword/spin.ron b/assets/common/abilities/sword/spin.ron index 8c656130c1..99a541276c 100644 --- a/assets/common/abilities/sword/spin.ron +++ b/assets/common/abilities/sword/spin.ron @@ -2,7 +2,7 @@ SpinMelee( buildup_duration: 0.35, swing_duration: 0.4, recover_duration: 0.5, - base_damage: 160, + base_damage: 16.0, base_poise_damage: 13, knockback: ( strength: 10.0, direction: Away), range: 3.5, diff --git a/assets/common/abilities/sword/triplestrike.ron b/assets/common/abilities/sword/triplestrike.ron index 6f4660b543..20e92526ba 100644 --- a/assets/common/abilities/sword/triplestrike.ron +++ b/assets/common/abilities/sword/triplestrike.ron @@ -2,8 +2,8 @@ ComboMelee( stage_data: [ ( stage: 1, - base_damage: 100, - damage_increase: 10, + base_damage: 10.0, + damage_increase: 1.0, base_poise_damage: 10, poise_damage_increase: 0, knockback: 0.0, @@ -24,8 +24,8 @@ ComboMelee( ), ( stage: 2, - base_damage: 80, - damage_increase: 15, + base_damage: 8.0, + damage_increase: 1.5, base_poise_damage: 13, poise_damage_increase: 0, knockback: 2.0, @@ -46,8 +46,8 @@ ComboMelee( ), ( stage: 3, - base_damage: 130, - damage_increase: 20, + base_damage: 13, + damage_increase: 2, base_poise_damage: 15, poise_damage_increase: 0, knockback: 2.0, diff --git a/assets/common/abilities/swordsimple/dash.ron b/assets/common/abilities/swordsimple/dash.ron index b9ae042353..0768c992cf 100644 --- a/assets/common/abilities/swordsimple/dash.ron +++ b/assets/common/abilities/swordsimple/dash.ron @@ -1,7 +1,7 @@ DashMelee( energy_cost: 100, - base_damage: 90, - scaled_damage: 160, + base_damage: 9.0, + scaled_damage: 16.0, base_poise_damage: 40, scaled_poise_damage: 0, base_knockback: 8.0, diff --git a/assets/common/abilities/swordsimple/doublestrike.ron b/assets/common/abilities/swordsimple/doublestrike.ron index 39eb48d54a..443680ebc8 100644 --- a/assets/common/abilities/swordsimple/doublestrike.ron +++ b/assets/common/abilities/swordsimple/doublestrike.ron @@ -2,8 +2,8 @@ ComboMelee( stage_data: [ ( stage: 1, - base_damage: 80, - damage_increase: 10, + base_damage: 8.0, + damage_increase: 1.0, base_poise_damage: 15, poise_damage_increase: 0, knockback: 8.0, @@ -24,8 +24,8 @@ ComboMelee( ), ( stage: 2, - base_damage: 100, - damage_increase: 15, + base_damage: 10.0, + damage_increase: 1.5, base_poise_damage: 20, poise_damage_increase: 0, knockback: 12.0, diff --git a/assets/common/items/boss_drops/potions.ron b/assets/common/items/boss_drops/potions.ron index d1e43691d9..72000810c1 100644 --- a/assets/common/items/boss_drops/potions.ron +++ b/assets/common/items/boss_drops/potions.ron @@ -7,7 +7,7 @@ ItemDef( Buff(( kind: Potion, data: ( - strength: 1000.0, + strength: 100.0, duration: Some(( secs: 1, nanos: 0, diff --git a/assets/common/items/consumable/potion_big.ron b/assets/common/items/consumable/potion_big.ron index e194375023..f8044bc2bf 100644 --- a/assets/common/items/consumable/potion_big.ron +++ b/assets/common/items/consumable/potion_big.ron @@ -7,7 +7,7 @@ ItemDef( Buff(( kind: Potion, data: ( - strength: 1000.0, + strength: 100.0, duration: Some(( secs: 1, nanos: 0, diff --git a/assets/common/items/consumable/potion_med.ron b/assets/common/items/consumable/potion_med.ron index a374857233..71e5a8f500 100644 --- a/assets/common/items/consumable/potion_med.ron +++ b/assets/common/items/consumable/potion_med.ron @@ -7,7 +7,7 @@ ItemDef( Buff(( kind: Potion, data: ( - strength: 750.0, + strength: 75.0, duration: Some(( secs: 1, nanos: 0, diff --git a/assets/common/items/consumable/potion_minor.ron b/assets/common/items/consumable/potion_minor.ron index d74d72ccb1..ad2410bc7a 100644 --- a/assets/common/items/consumable/potion_minor.ron +++ b/assets/common/items/consumable/potion_minor.ron @@ -7,7 +7,7 @@ ItemDef( Buff(( kind: Potion, data: ( - strength: 500.0, + strength: 50.0, duration: Some(( secs: 1, nanos: 0, diff --git a/assets/common/items/food/apple.ron b/assets/common/items/food/apple.ron index 8ad3069011..54f285cdcb 100644 --- a/assets/common/items/food/apple.ron +++ b/assets/common/items/food/apple.ron @@ -7,7 +7,7 @@ ItemDef( Buff(( kind: Saturation, data: ( - strength: 20.0, + strength: 2.0, duration: Some(( secs: 5, nanos: 0, diff --git a/assets/common/items/food/apple_mushroom_curry.ron b/assets/common/items/food/apple_mushroom_curry.ron index f98c61d942..5a4a09d15b 100644 --- a/assets/common/items/food/apple_mushroom_curry.ron +++ b/assets/common/items/food/apple_mushroom_curry.ron @@ -7,7 +7,7 @@ ItemDef( Buff(( kind: Saturation, data: ( - strength: 100.0, + strength: 10.0, duration: Some(( secs: 5, nanos: 0, @@ -18,7 +18,7 @@ ItemDef( Buff(( kind: Regeneration, data: ( - strength: 10.0, + strength: 1.0, duration: Some(( secs: 70, nanos: 0, diff --git a/assets/common/items/food/apple_stick.ron b/assets/common/items/food/apple_stick.ron index c8596c90cc..dfea253a23 100644 --- a/assets/common/items/food/apple_stick.ron +++ b/assets/common/items/food/apple_stick.ron @@ -7,7 +7,7 @@ ItemDef( Buff(( kind: Saturation, data: ( - strength: 50.0, + strength: 5.0, duration: Some(( secs: 5, nanos: 0, diff --git a/assets/common/items/food/cactus_colada.ron b/assets/common/items/food/cactus_colada.ron index e974721a78..9cd659fdc0 100644 --- a/assets/common/items/food/cactus_colada.ron +++ b/assets/common/items/food/cactus_colada.ron @@ -7,7 +7,7 @@ ItemDef( Buff(( kind: Saturation, data: ( - strength: 50.0, + strength: 5.0, duration: Some(( secs: 5, nanos: 0, diff --git a/assets/common/items/food/carrot.ron b/assets/common/items/food/carrot.ron index 96fba22146..2bd7d19e05 100644 --- a/assets/common/items/food/carrot.ron +++ b/assets/common/items/food/carrot.ron @@ -7,7 +7,7 @@ ItemDef( Buff(( kind: Saturation, data: ( - strength: 10.0, + strength: 1.0, duration: Some(( secs: 5, nanos: 0, diff --git a/assets/common/items/food/cheese.ron b/assets/common/items/food/cheese.ron index 14d90da42c..ef4ae1f25e 100644 --- a/assets/common/items/food/cheese.ron +++ b/assets/common/items/food/cheese.ron @@ -7,7 +7,7 @@ ItemDef( Buff(( kind: Saturation, data: ( - strength: 15.0, + strength: 1.5, duration: Some(( secs: 10, nanos: 0, diff --git a/assets/common/items/food/coconut.ron b/assets/common/items/food/coconut.ron index 2a161e1bf6..476edb4769 100644 --- a/assets/common/items/food/coconut.ron +++ b/assets/common/items/food/coconut.ron @@ -7,7 +7,7 @@ ItemDef( Buff(( kind: Saturation, data: ( - strength: 40.0, + strength: 4.0, duration: Some(( secs: 5, nanos: 0, diff --git a/assets/common/items/food/coltsfoot.ron b/assets/common/items/food/coltsfoot.ron index 5cf2795ee8..b5b414fd08 100644 --- a/assets/common/items/food/coltsfoot.ron +++ b/assets/common/items/food/coltsfoot.ron @@ -7,7 +7,7 @@ ItemDef( Buff(( kind: Saturation, data: ( - strength: 10.0, + strength: 1.0, duration: Some(( secs: 5, nanos: 0, diff --git a/assets/common/items/food/dandelion.ron b/assets/common/items/food/dandelion.ron index 7b9f7fd8e3..d613c32be4 100644 --- a/assets/common/items/food/dandelion.ron +++ b/assets/common/items/food/dandelion.ron @@ -7,7 +7,7 @@ ItemDef( Buff(( kind: Saturation, data: ( - strength: 10.0, + strength: 1.0, duration: Some(( secs: 5, nanos: 0, diff --git a/assets/common/items/food/garlic.ron b/assets/common/items/food/garlic.ron index a55159d5c5..c21119a0cb 100644 --- a/assets/common/items/food/garlic.ron +++ b/assets/common/items/food/garlic.ron @@ -7,7 +7,7 @@ ItemDef( Buff(( kind: Saturation, data: ( - strength: 10.0, + strength: 1.0, duration: Some(( secs: 5, nanos: 0, diff --git a/assets/common/items/food/lettuce.ron b/assets/common/items/food/lettuce.ron index 1d8c5a3c03..b6d4d32620 100644 --- a/assets/common/items/food/lettuce.ron +++ b/assets/common/items/food/lettuce.ron @@ -7,7 +7,7 @@ ItemDef( Buff(( kind: Saturation, data: ( - strength: 10.0, + strength: 1.0, duration: Some(( secs: 5, nanos: 0, diff --git a/assets/common/items/food/meat.ron b/assets/common/items/food/meat.ron index 84fcd698e8..c17296ef09 100644 --- a/assets/common/items/food/meat.ron +++ b/assets/common/items/food/meat.ron @@ -7,7 +7,7 @@ ItemDef( Buff(( kind: Saturation, data: ( - strength: 10.0, + strength: 1.0, duration: Some(( secs: 5, nanos: 0, diff --git a/assets/common/items/food/meat/beast_large_cooked.ron b/assets/common/items/food/meat/beast_large_cooked.ron index 7ed2859b32..33f70a47a1 100644 --- a/assets/common/items/food/meat/beast_large_cooked.ron +++ b/assets/common/items/food/meat/beast_large_cooked.ron @@ -7,7 +7,7 @@ ItemDef( Buff(( kind: Saturation, data: ( - strength: 25.0, + strength: 2.5, duration: Some(( secs: 10, nanos: 0, diff --git a/assets/common/items/food/meat/beast_large_raw.ron b/assets/common/items/food/meat/beast_large_raw.ron index fdba37c8fa..147730e61a 100644 --- a/assets/common/items/food/meat/beast_large_raw.ron +++ b/assets/common/items/food/meat/beast_large_raw.ron @@ -7,7 +7,7 @@ ItemDef( Buff(( kind: Saturation, data: ( - strength: 4.5, + strength: .45, duration: Some(( secs: 10, nanos: 0, diff --git a/assets/common/items/food/meat/beast_small_cooked.ron b/assets/common/items/food/meat/beast_small_cooked.ron index a80752320a..a56471dd16 100644 --- a/assets/common/items/food/meat/beast_small_cooked.ron +++ b/assets/common/items/food/meat/beast_small_cooked.ron @@ -7,7 +7,7 @@ ItemDef( Buff(( kind: Saturation, data: ( - strength: 15.0, + strength: 1.5, duration: Some(( secs: 10, nanos: 0, diff --git a/assets/common/items/food/meat/beast_small_raw.ron b/assets/common/items/food/meat/beast_small_raw.ron index 900a9e3e91..f09abd213e 100644 --- a/assets/common/items/food/meat/beast_small_raw.ron +++ b/assets/common/items/food/meat/beast_small_raw.ron @@ -7,7 +7,7 @@ ItemDef( Buff(( kind: Saturation, data: ( - strength: 2.5, + strength: .25, duration: Some(( secs: 10, nanos: 0, diff --git a/assets/common/items/food/meat/bird_cooked.ron b/assets/common/items/food/meat/bird_cooked.ron index 19d5988751..8c764a7a7b 100644 --- a/assets/common/items/food/meat/bird_cooked.ron +++ b/assets/common/items/food/meat/bird_cooked.ron @@ -7,7 +7,7 @@ ItemDef( Buff(( kind: Saturation, data: ( - strength: 25.0, + strength: 2.5, duration: Some(( secs: 10, nanos: 0, diff --git a/assets/common/items/food/meat/bird_large_cooked.ron b/assets/common/items/food/meat/bird_large_cooked.ron index e1cdb09299..f838557284 100644 --- a/assets/common/items/food/meat/bird_large_cooked.ron +++ b/assets/common/items/food/meat/bird_large_cooked.ron @@ -7,7 +7,7 @@ ItemDef( Buff(( kind: Saturation, data: ( - strength: 55.0, + strength: 5.5, duration: Some(( secs: 15, nanos: 0, diff --git a/assets/common/items/food/meat/bird_large_raw.ron b/assets/common/items/food/meat/bird_large_raw.ron index 5256fda296..9edbab0b55 100644 --- a/assets/common/items/food/meat/bird_large_raw.ron +++ b/assets/common/items/food/meat/bird_large_raw.ron @@ -7,7 +7,7 @@ ItemDef( Buff(( kind: Saturation, data: ( - strength: 9.0, + strength: .9, duration: Some(( secs: 10, nanos: 0, diff --git a/assets/common/items/food/meat/bird_raw.ron b/assets/common/items/food/meat/bird_raw.ron index 4c4ba428dd..bfd2bd963a 100644 --- a/assets/common/items/food/meat/bird_raw.ron +++ b/assets/common/items/food/meat/bird_raw.ron @@ -7,7 +7,7 @@ ItemDef( Buff(( kind: Saturation, data: ( - strength: 4.5, + strength: .45, duration: Some(( secs: 10, nanos: 0, diff --git a/assets/common/items/food/meat/fish_cooked.ron b/assets/common/items/food/meat/fish_cooked.ron index c1545af513..4610ccec91 100644 --- a/assets/common/items/food/meat/fish_cooked.ron +++ b/assets/common/items/food/meat/fish_cooked.ron @@ -7,7 +7,7 @@ ItemDef( Buff(( kind: Saturation, data: ( - strength: 25.0, + strength: 2.5, duration: Some(( secs: 10, nanos: 0, diff --git a/assets/common/items/food/meat/fish_raw.ron b/assets/common/items/food/meat/fish_raw.ron index 80c789cbfc..a627dd8ccb 100644 --- a/assets/common/items/food/meat/fish_raw.ron +++ b/assets/common/items/food/meat/fish_raw.ron @@ -7,7 +7,7 @@ ItemDef( Buff(( kind: Saturation, data: ( - strength: 4.5, + strength: .45, duration: Some(( secs: 10, nanos: 0, diff --git a/assets/common/items/food/meat/tough_cooked.ron b/assets/common/items/food/meat/tough_cooked.ron index 8297c66909..efa4d0f2fe 100644 --- a/assets/common/items/food/meat/tough_cooked.ron +++ b/assets/common/items/food/meat/tough_cooked.ron @@ -7,7 +7,7 @@ ItemDef( Buff(( kind: Saturation, data: ( - strength: 20.0, + strength: 2.0, duration: Some(( secs: 10, nanos: 0, diff --git a/assets/common/items/food/meat/tough_raw.ron b/assets/common/items/food/meat/tough_raw.ron index 16b837135e..0029bcae39 100644 --- a/assets/common/items/food/meat/tough_raw.ron +++ b/assets/common/items/food/meat/tough_raw.ron @@ -7,7 +7,7 @@ ItemDef( Buff(( kind: Saturation, data: ( - strength: 3.6, + strength: .36, duration: Some(( secs: 10, nanos: 0, diff --git a/assets/common/items/food/mushroom.ron b/assets/common/items/food/mushroom.ron index 8d90dff0c5..8cca72e9ea 100644 --- a/assets/common/items/food/mushroom.ron +++ b/assets/common/items/food/mushroom.ron @@ -7,7 +7,7 @@ ItemDef( Buff(( kind: Saturation, data: ( - strength: 10.0, + strength: 1.0, duration: Some(( secs: 5, nanos: 0, diff --git a/assets/common/items/food/mushroom_stick.ron b/assets/common/items/food/mushroom_stick.ron index e19c0f1ef6..ec193f762b 100644 --- a/assets/common/items/food/mushroom_stick.ron +++ b/assets/common/items/food/mushroom_stick.ron @@ -7,7 +7,7 @@ ItemDef( Buff(( kind: Saturation, data: ( - strength: 40.0, + strength: 4.0, duration: Some(( secs: 5, nanos: 0, diff --git a/assets/common/items/food/onion.ron b/assets/common/items/food/onion.ron index 023a1f9f7d..8c34c0c56b 100644 --- a/assets/common/items/food/onion.ron +++ b/assets/common/items/food/onion.ron @@ -7,7 +7,7 @@ ItemDef( Buff(( kind: Saturation, data: ( - strength: 10.0, + strength: 1.0, duration: Some(( secs: 5, nanos: 0, diff --git a/assets/common/items/food/plainsalad.ron b/assets/common/items/food/plainsalad.ron index 21f8412201..dbd7511692 100644 --- a/assets/common/items/food/plainsalad.ron +++ b/assets/common/items/food/plainsalad.ron @@ -7,7 +7,7 @@ ItemDef( Buff(( kind: Saturation, data: ( - strength: 20.0, + strength: 2.0, duration: Some(( secs: 5, nanos: 0, diff --git a/assets/common/items/food/sage.ron b/assets/common/items/food/sage.ron index 38c46a67bf..e4b58f6751 100644 --- a/assets/common/items/food/sage.ron +++ b/assets/common/items/food/sage.ron @@ -7,7 +7,7 @@ ItemDef( Buff(( kind: Saturation, data: ( - strength: 10.0, + strength: 1.0, duration: Some(( secs: 5, nanos: 0, diff --git a/assets/common/items/food/sunflower_icetea.ron b/assets/common/items/food/sunflower_icetea.ron index 7c74fd904a..1190c15f89 100644 --- a/assets/common/items/food/sunflower_icetea.ron +++ b/assets/common/items/food/sunflower_icetea.ron @@ -7,7 +7,7 @@ ItemDef( Buff(( kind: Saturation, data: ( - strength: 100.0, + strength: 10.0, duration: Some(( secs: 5, nanos: 0, diff --git a/assets/common/items/food/tomato.ron b/assets/common/items/food/tomato.ron index c1fde8cd6f..747027a8bb 100644 --- a/assets/common/items/food/tomato.ron +++ b/assets/common/items/food/tomato.ron @@ -7,7 +7,7 @@ ItemDef( Buff(( kind: Saturation, data: ( - strength: 10.0, + strength: 1.0, duration: Some(( secs: 5, nanos: 0, diff --git a/assets/common/items/food/tomatosalad.ron b/assets/common/items/food/tomatosalad.ron index 4bf41d8f8a..577decfba3 100644 --- a/assets/common/items/food/tomatosalad.ron +++ b/assets/common/items/food/tomatosalad.ron @@ -7,7 +7,7 @@ ItemDef( Buff(( kind: Saturation, data: ( - strength: 30.0, + strength: 3.0, duration: Some(( secs: 5, nanos: 0, diff --git a/assets/voxygen/audio/music_transition_manifest.ron b/assets/voxygen/audio/music_transition_manifest.ron index 226ae5c830..e7333eceba 100644 --- a/assets/voxygen/audio/music_transition_manifest.ron +++ b/assets/voxygen/audio/music_transition_manifest.ron @@ -1,6 +1,6 @@ ( combat_nearby_radius: 40.0, - combat_health_factor: 750, + combat_health_factor: 75.0, combat_nearby_high_thresh: 4, combat_nearby_low_thresh: 4, fade_timings: { diff --git a/common/src/combat.rs b/common/src/combat.rs index f2d02722b7..42132ec053 100644 --- a/common/src/combat.rs +++ b/common/src/combat.rs @@ -13,7 +13,7 @@ use crate::{ poise::PoiseChange, skills::SkillGroupKind, Alignment, Body, CharacterState, Combo, Energy, EnergyChange, EnergySource, Health, - HealthChange, HealthSource, Inventory, Ori, Player, Poise, SkillSet, Stats, + HealthChange, Inventory, Ori, Player, Poise, SkillSet, Stats, }, event::ServerEvent, outcome::Outcome, @@ -231,8 +231,8 @@ impl Attack { let applied_damage = -change.amount as f32; accumulated_damage += applied_damage; emit_outcome(Outcome::Damage { pos: target.pos }); - if change.amount != 0 { - emit(ServerEvent::Damage { + if change.amount.abs() > Health::HEALTH_EPSILON { + emit(ServerEvent::HealthChange { entity: target.entity, change, }); @@ -273,13 +273,12 @@ impl Attack { CombatEffect::Lifesteal(l) => { if let Some(attacker_entity) = attacker.map(|a| a.entity) { let change = HealthChange { - amount: (applied_damage * l) as i32, - cause: HealthSource::Heal { - by: attacker.map(|a| a.uid), - }, + amount: applied_damage * l, + by: attacker.map(|a| a.uid), + cause: None, }; - if change.amount != 0 { - emit(ServerEvent::Damage { + if change.amount.abs() > Health::HEALTH_EPSILON { + emit(ServerEvent::HealthChange { entity: attacker_entity, change, }); @@ -298,13 +297,12 @@ impl Attack { }, CombatEffect::Heal(h) => { let change = HealthChange { - amount: *h as i32, - cause: HealthSource::Heal { - by: attacker.map(|a| a.uid), - }, + amount: *h, + by: attacker.map(|a| a.uid), + cause: None, }; - if change.amount != 0 { - emit(ServerEvent::Damage { + if change.amount.abs() > Health::HEALTH_EPSILON { + emit(ServerEvent::HealthChange { entity: target.entity, change, }); @@ -410,13 +408,12 @@ impl Attack { CombatEffect::Lifesteal(l) => { if let Some(attacker_entity) = attacker.map(|a| a.entity) { let change = HealthChange { - amount: (accumulated_damage * l) as i32, - cause: HealthSource::Heal { - by: attacker.map(|a| a.uid), - }, + amount: accumulated_damage * l, + by: attacker.map(|a| a.uid), + cause: None, }; - if change.amount != 0 { - emit(ServerEvent::Damage { + if change.amount.abs() > Health::HEALTH_EPSILON { + emit(ServerEvent::HealthChange { entity: attacker_entity, change, }); @@ -435,13 +432,12 @@ impl Attack { }, CombatEffect::Heal(h) => { let change = HealthChange { - amount: h as i32, - cause: HealthSource::Heal { - by: attacker.map(|a| a.uid), - }, + amount: h, + by: attacker.map(|a| a.uid), + cause: None, }; - if change.amount != 0 { - emit(ServerEvent::Damage { + if change.amount.abs() > Health::HEALTH_EPSILON { + emit(ServerEvent::HealthChange { entity: target.entity, change, }); @@ -699,11 +695,9 @@ impl Damage { damage *= 1.0 - damage_reduction; HealthChange { - amount: -damage as i32, - cause: HealthSource::Damage { - kind: self.source, - by: uid, - }, + amount: -damage, + by: uid, + cause: Some(self.source), } }, DamageSource::Falling => { @@ -712,16 +706,15 @@ impl Damage { damage = 0.0; } HealthChange { - amount: -damage as i32, - cause: HealthSource::World, + amount: -damage, + by: None, + cause: Some(self.source), } }, DamageSource::Buff(_) | DamageSource::Other => HealthChange { - amount: -damage as i32, - cause: HealthSource::Damage { - kind: self.source, - by: uid, - }, + amount: -damage, + by: None, + cause: Some(self.source), }, } } diff --git a/common/src/comp/body.rs b/common/src/comp/body.rs index ab747f78a1..6131c4c7fe 100644 --- a/common/src/comp/body.rs +++ b/common/src/comp/body.rs @@ -436,201 +436,201 @@ impl Body { } #[allow(unreachable_patterns)] - pub fn base_health(&self) -> u32 { + pub fn base_health(&self) -> u16 { match self { - Body::Humanoid(_) => 500, + Body::Humanoid(_) => 50, Body::QuadrupedSmall(quadruped_small) => match quadruped_small.species { - quadruped_small::Species::Boar => 700, - quadruped_small::Species::Batfox => 400, - quadruped_small::Species::Dodarock => 1000, - quadruped_small::Species::Holladon => 800, - quadruped_small::Species::Hyena => 450, - quadruped_small::Species::Truffler => 450, - _ => 400, + quadruped_small::Species::Boar => 70, + quadruped_small::Species::Batfox => 40, + quadruped_small::Species::Dodarock => 100, + quadruped_small::Species::Holladon => 80, + quadruped_small::Species::Hyena => 45, + quadruped_small::Species::Truffler => 45, + _ => 40, }, Body::QuadrupedMedium(quadruped_medium) => match quadruped_medium.species { - quadruped_medium::Species::Grolgar => 900, - quadruped_medium::Species::Saber => 600, - quadruped_medium::Species::Tiger => 700, - quadruped_medium::Species::Lion => 900, - quadruped_medium::Species::Tarasque => 1500, - quadruped_medium::Species::Wolf => 550, - quadruped_medium::Species::Frostfang => 400, - quadruped_medium::Species::Mouflon => 500, - quadruped_medium::Species::Catoblepas => 1000, - quadruped_medium::Species::Bonerattler => 500, - quadruped_medium::Species::Deer => 500, - quadruped_medium::Species::Hirdrasil => 700, - quadruped_medium::Species::Roshwalr => 800, - quadruped_medium::Species::Donkey => 550, - quadruped_medium::Species::Zebra => 550, - quadruped_medium::Species::Antelope => 450, - quadruped_medium::Species::Kelpie => 600, - quadruped_medium::Species::Horse => 600, - quadruped_medium::Species::Barghest => 1700, - quadruped_medium::Species::Cattle => 1000, - quadruped_medium::Species::Highland => 1200, - quadruped_medium::Species::Yak => 1100, - quadruped_medium::Species::Panda => 900, - quadruped_medium::Species::Bear => 900, - quadruped_medium::Species::Moose => 800, - quadruped_medium::Species::Dreadhorn => 3700, - quadruped_medium::Species::Mammoth => 2500, - quadruped_medium::Species::Ngoubou => 2900, - _ => 700, + quadruped_medium::Species::Grolgar => 90, + quadruped_medium::Species::Saber => 60, + quadruped_medium::Species::Tiger => 70, + quadruped_medium::Species::Lion => 90, + quadruped_medium::Species::Tarasque => 150, + quadruped_medium::Species::Wolf => 55, + quadruped_medium::Species::Frostfang => 40, + quadruped_medium::Species::Mouflon => 50, + quadruped_medium::Species::Catoblepas => 100, + quadruped_medium::Species::Bonerattler => 50, + quadruped_medium::Species::Deer => 50, + quadruped_medium::Species::Hirdrasil => 70, + quadruped_medium::Species::Roshwalr => 80, + quadruped_medium::Species::Donkey => 55, + quadruped_medium::Species::Zebra => 55, + quadruped_medium::Species::Antelope => 45, + quadruped_medium::Species::Kelpie => 60, + quadruped_medium::Species::Horse => 60, + quadruped_medium::Species::Barghest => 170, + quadruped_medium::Species::Cattle => 100, + quadruped_medium::Species::Highland => 120, + quadruped_medium::Species::Yak => 110, + quadruped_medium::Species::Panda => 90, + quadruped_medium::Species::Bear => 90, + quadruped_medium::Species::Moose => 80, + quadruped_medium::Species::Dreadhorn => 370, + quadruped_medium::Species::Mammoth => 250, + quadruped_medium::Species::Ngoubou => 290, + _ => 70, }, Body::BirdMedium(bird_medium) => match bird_medium.species { - bird_medium::Species::Chicken => 300, - bird_medium::Species::Duck => 300, - bird_medium::Species::Goose => 300, - bird_medium::Species::Parrot => 250, - bird_medium::Species::Peacock => 350, - bird_medium::Species::Eagle => 450, - _ => 250, + bird_medium::Species::Chicken => 30, + bird_medium::Species::Duck => 30, + bird_medium::Species::Goose => 30, + bird_medium::Species::Parrot => 25, + bird_medium::Species::Peacock => 35, + bird_medium::Species::Eagle => 45, + _ => 25, }, - Body::FishMedium(_) => 250, - Body::Dragon(_) => 5000, + Body::FishMedium(_) => 25, + Body::Dragon(_) => 500, Body::BirdLarge(bird_large) => match bird_large.species { - bird_large::Species::Roc => 2800, - _ => 3000, + bird_large::Species::Roc => 280, + _ => 300, }, - Body::FishSmall(_) => 20, + Body::FishSmall(_) => 2, Body::BipedLarge(biped_large) => match biped_large.species { - biped_large::Species::Ogre => 3200, - biped_large::Species::Cyclops => 3200, - biped_large::Species::Wendigo => 2800, - biped_large::Species::Cavetroll => 2400, - biped_large::Species::Mountaintroll => 2400, - biped_large::Species::Swamptroll => 2400, - biped_large::Species::Dullahan => 3000, - biped_large::Species::Mindflayer => 12500, - biped_large::Species::Tidalwarrior => 16000, - biped_large::Species::Yeti => 12000, - biped_large::Species::Minotaur => 30000, - biped_large::Species::Harvester => 5000, - biped_large::Species::Blueoni => 2400, - biped_large::Species::Redoni => 2400, - biped_large::Species::Huskbrute => 8000, - _ => 1200, + biped_large::Species::Ogre => 320, + biped_large::Species::Cyclops => 320, + biped_large::Species::Wendigo => 280, + biped_large::Species::Cavetroll => 240, + biped_large::Species::Mountaintroll => 240, + biped_large::Species::Swamptroll => 240, + biped_large::Species::Dullahan => 300, + biped_large::Species::Mindflayer => 1250, + biped_large::Species::Tidalwarrior => 1600, + biped_large::Species::Yeti => 1200, + biped_large::Species::Minotaur => 3000, + biped_large::Species::Harvester => 500, + biped_large::Species::Blueoni => 240, + biped_large::Species::Redoni => 240, + biped_large::Species::Huskbrute => 800, + _ => 120, }, Body::BipedSmall(biped_small) => match biped_small.species { - biped_small::Species::Gnarling => 500, - biped_small::Species::Adlet => 600, - biped_small::Species::Sahagin => 800, - biped_small::Species::Haniwa => 900, - biped_small::Species::Myrmidon => 900, - biped_small::Species::Husk => 200, - _ => 600, + biped_small::Species::Gnarling => 50, + biped_small::Species::Adlet => 60, + biped_small::Species::Sahagin => 80, + biped_small::Species::Haniwa => 90, + biped_small::Species::Myrmidon => 90, + biped_small::Species::Husk => 20, + _ => 60, }, Body::Object(object) => match object { - object::Body::TrainingDummy => 10000, - object::Body::Crossbow => 800, - object::Body::HaniwaSentry => 600, - object::Body::SeaLantern => 1000, - _ => 10000, + object::Body::TrainingDummy => 1000, + object::Body::Crossbow => 80, + object::Body::HaniwaSentry => 60, + object::Body::SeaLantern => 100, + _ => 1000, }, Body::Golem(golem) => match golem.species { - golem::Species::ClayGolem => 4500, - _ => 10000, + golem::Species::ClayGolem => 450, + _ => 1000, }, Body::Theropod(theropod) => match theropod.species { - theropod::Species::Archaeos => 3500, - theropod::Species::Yale => 2800, - theropod::Species::Odonto => 3000, - theropod::Species::Ntouka => 3000, - _ => 1100, + theropod::Species::Archaeos => 350, + theropod::Species::Yale => 280, + theropod::Species::Odonto => 300, + theropod::Species::Ntouka => 300, + _ => 110, }, Body::QuadrupedLow(quadruped_low) => match quadruped_low.species { - quadruped_low::Species::Crocodile => 800, - quadruped_low::Species::Alligator => 900, - quadruped_low::Species::Monitor => 600, - quadruped_low::Species::Asp => 750, - quadruped_low::Species::Tortoise => 900, - quadruped_low::Species::Rocksnapper => 1400, - quadruped_low::Species::Pangolin => 400, - quadruped_low::Species::Maneater => 1300, - quadruped_low::Species::Sandshark => 1100, - quadruped_low::Species::Hakulaq => 500, - quadruped_low::Species::Lavadrake => 1600, - quadruped_low::Species::Basilisk => 2000, - quadruped_low::Species::Deadwood => 700, - _ => 700, + quadruped_low::Species::Crocodile => 80, + quadruped_low::Species::Alligator => 90, + quadruped_low::Species::Monitor => 60, + quadruped_low::Species::Asp => 75, + quadruped_low::Species::Tortoise => 90, + quadruped_low::Species::Rocksnapper => 140, + quadruped_low::Species::Pangolin => 40, + quadruped_low::Species::Maneater => 130, + quadruped_low::Species::Sandshark => 110, + quadruped_low::Species::Hakulaq => 50, + quadruped_low::Species::Lavadrake => 160, + quadruped_low::Species::Basilisk => 200, + quadruped_low::Species::Deadwood => 70, + _ => 70, }, - Body::Ship(_) => 10000, + Body::Ship(_) => 1000, } } #[allow(unreachable_patterns)] - pub fn base_health_increase(&self) -> u32 { + pub fn base_health_increase(&self) -> u16 { match self { Body::Humanoid(_) => HUMANOID_HP_PER_LEVEL, Body::QuadrupedSmall(quadruped_small) => match quadruped_small.species { - quadruped_small::Species::Boar => 20, - quadruped_small::Species::Batfox => 10, - quadruped_small::Species::Dodarock => 30, - quadruped_small::Species::Holladon => 30, - quadruped_small::Species::Hyena => 20, - quadruped_small::Species::Truffler => 20, - _ => 10, + quadruped_small::Species::Boar => 2, + quadruped_small::Species::Batfox => 1, + quadruped_small::Species::Dodarock => 3, + quadruped_small::Species::Holladon => 3, + quadruped_small::Species::Hyena => 2, + quadruped_small::Species::Truffler => 2, + _ => 1, }, Body::QuadrupedMedium(quadruped_medium) => match quadruped_medium.species { - quadruped_medium::Species::Grolgar => 30, - quadruped_medium::Species::Saber => 20, - quadruped_medium::Species::Tiger => 20, - quadruped_medium::Species::Tuskram => 30, - quadruped_medium::Species::Lion => 40, - quadruped_medium::Species::Tarasque => 60, - quadruped_medium::Species::Wolf => 20, - quadruped_medium::Species::Frostfang => 40, - quadruped_medium::Species::Mouflon => 30, - quadruped_medium::Species::Catoblepas => 50, - quadruped_medium::Species::Bonerattler => 30, - quadruped_medium::Species::Deer => 20, - quadruped_medium::Species::Hirdrasil => 30, - quadruped_medium::Species::Roshwalr => 40, - quadruped_medium::Species::Donkey => 30, - quadruped_medium::Species::Camel => 30, - quadruped_medium::Species::Zebra => 30, - quadruped_medium::Species::Antelope => 20, - quadruped_medium::Species::Kelpie => 30, - quadruped_medium::Species::Horse => 30, - quadruped_medium::Species::Barghest => 50, - quadruped_medium::Species::Cattle => 30, - quadruped_medium::Species::Highland => 30, - quadruped_medium::Species::Yak => 50, - quadruped_medium::Species::Panda => 40, - quadruped_medium::Species::Bear => 40, - quadruped_medium::Species::Moose => 30, - quadruped_medium::Species::Dreadhorn => 60, - quadruped_medium::Species::Mammoth => 80, - quadruped_medium::Species::Ngoubou => 70, - _ => 20, + quadruped_medium::Species::Grolgar => 3, + quadruped_medium::Species::Saber => 2, + quadruped_medium::Species::Tiger => 2, + quadruped_medium::Species::Tuskram => 3, + quadruped_medium::Species::Lion => 4, + quadruped_medium::Species::Tarasque => 6, + quadruped_medium::Species::Wolf => 2, + quadruped_medium::Species::Frostfang => 4, + quadruped_medium::Species::Mouflon => 3, + quadruped_medium::Species::Catoblepas => 5, + quadruped_medium::Species::Bonerattler => 3, + quadruped_medium::Species::Deer => 2, + quadruped_medium::Species::Hirdrasil => 3, + quadruped_medium::Species::Roshwalr => 4, + quadruped_medium::Species::Donkey => 3, + quadruped_medium::Species::Camel => 3, + quadruped_medium::Species::Zebra => 3, + quadruped_medium::Species::Antelope => 2, + quadruped_medium::Species::Kelpie => 3, + quadruped_medium::Species::Horse => 3, + quadruped_medium::Species::Barghest => 5, + quadruped_medium::Species::Cattle => 3, + quadruped_medium::Species::Highland => 3, + quadruped_medium::Species::Yak => 5, + quadruped_medium::Species::Panda => 4, + quadruped_medium::Species::Bear => 4, + quadruped_medium::Species::Moose => 3, + quadruped_medium::Species::Dreadhorn => 6, + quadruped_medium::Species::Mammoth => 8, + quadruped_medium::Species::Ngoubou => 7, + _ => 2, }, Body::BirdMedium(bird_medium) => match bird_medium.species { - bird_medium::Species::Chicken => 10, - bird_medium::Species::Duck => 10, - bird_medium::Species::Goose => 10, - bird_medium::Species::Parrot => 10, - bird_medium::Species::Peacock => 10, - bird_medium::Species::Eagle => 10, - _ => 20, + bird_medium::Species::Chicken => 1, + bird_medium::Species::Duck => 1, + bird_medium::Species::Goose => 1, + bird_medium::Species::Parrot => 1, + bird_medium::Species::Peacock => 1, + bird_medium::Species::Eagle => 1, + _ => 2, }, - Body::FishMedium(_) => 10, - Body::Dragon(_) => 500, + Body::FishMedium(_) => 1, + Body::Dragon(_) => 50, Body::BirdLarge(bird_large) => match bird_large.species { - bird_large::Species::Roc => 110, - _ => 120, + bird_large::Species::Roc => 11, + _ => 12, }, - Body::FishSmall(_) => 10, + Body::FishSmall(_) => 1, Body::BipedLarge(biped_large) => match biped_large.species { - biped_large::Species::Ogre => 70, - biped_large::Species::Cyclops => 80, - biped_large::Species::Wendigo => 80, - biped_large::Species::Cavetroll => 60, - biped_large::Species::Mountaintroll => 60, - biped_large::Species::Swamptroll => 60, - biped_large::Species::Dullahan => 120, - biped_large::Species::Huskbrute => 100, + biped_large::Species::Ogre => 7, + biped_large::Species::Cyclops => 8, + biped_large::Species::Wendigo => 8, + biped_large::Species::Cavetroll => 6, + biped_large::Species::Mountaintroll => 6, + biped_large::Species::Swamptroll => 6, + biped_large::Species::Dullahan => 12, + biped_large::Species::Huskbrute => 10, // Boss enemies have their health set, not adjusted by level. biped_large::Species::Huskbrute => 0, biped_large::Species::Mindflayer => 0, @@ -638,28 +638,28 @@ impl Body { biped_large::Species::Tidalwarrior => 0, biped_large::Species::Yeti => 0, biped_large::Species::Harvester => 0, - _ => 100, + _ => 10, }, - Body::BipedSmall(_) => 10, - Body::Object(_) => 10, + Body::BipedSmall(_) => 1, + Body::Object(_) => 1, Body::Golem(_) => 0, - Body::Theropod(_) => 20, + Body::Theropod(_) => 2, Body::QuadrupedLow(quadruped_low) => match quadruped_low.species { - quadruped_low::Species::Crocodile => 20, - quadruped_low::Species::Alligator => 20, - quadruped_low::Species::Salamander => 10, - quadruped_low::Species::Monitor => 10, - quadruped_low::Species::Asp => 10, - quadruped_low::Species::Tortoise => 20, - quadruped_low::Species::Rocksnapper => 50, - quadruped_low::Species::Pangolin => 10, - quadruped_low::Species::Maneater => 30, - quadruped_low::Species::Sandshark => 45, - quadruped_low::Species::Hakulaq => 10, - quadruped_low::Species::Deadwood => 30, - _ => 20, + quadruped_low::Species::Crocodile => 2, + quadruped_low::Species::Alligator => 2, + quadruped_low::Species::Salamander => 1, + quadruped_low::Species::Monitor => 1, + quadruped_low::Species::Asp => 1, + quadruped_low::Species::Tortoise => 2, + quadruped_low::Species::Rocksnapper => 5, + quadruped_low::Species::Pangolin => 1, + quadruped_low::Species::Maneater => 3, + quadruped_low::Species::Sandshark => 5, + quadruped_low::Species::Hakulaq => 1, + quadruped_low::Species::Deadwood => 3, + _ => 2, }, - Body::Ship(_) => 500, + Body::Ship(_) => 50, } } diff --git a/common/src/comp/buff.rs b/common/src/comp/buff.rs index fb78ff6af1..63a7e2e1f7 100644 --- a/common/src/comp/buff.rs +++ b/common/src/comp/buff.rs @@ -18,13 +18,13 @@ use strum_macros::EnumIter; pub enum BuffKind { // Buffs /// Restores health/time for some period - /// Strength should be 10x the healing per second + /// Strength should be the healing per second Regeneration, /// Restores health/time for some period for consumables - /// Strength should be 10x the healing per second + /// Strength should be the healing per second Saturation, /// Applied when drinking a potion - /// Strength should be 10x the healing per second + /// Strength should be the healing per second Potion, /// Applied when sitting at a campfire /// Strength is fraction of health resotred per second @@ -33,7 +33,7 @@ pub enum BuffKind { /// Strength should be 10x the effect to max energy IncreaseMaxEnergy, /// Raises maximum health - /// Strength should be 10x the effect to max health + /// Strength should be the effect to max health IncreaseMaxHealth, /// Makes you immune to attacks /// Strength does not affect this buff @@ -48,10 +48,10 @@ pub enum BuffKind { Frenzied, // Debuffs /// Does damage to a creature over time - /// Strength should be 10x the DPS of the debuff + /// Strength should be the DPS of the debuff Burning, /// Lowers health over time for some duration - /// Strength should be 10x the DPS of the debuff + /// Strength should be the DPS of the debuff Bleeding, /// Lower a creature's max health over time /// Strength only affects the target max health, 0.5 targets 50% of base @@ -59,7 +59,7 @@ pub enum BuffKind { Cursed, /// Reduces movement speed and causes bleeding damage /// Strength scales the movement speed debuff non-linearly. 0.5 is 50% - /// speed, 1.0 is 33% speed. Bleeding is at 10x the value of the strength. + /// speed, 1.0 is 33% speed. Bleeding is at 4x the value of the strength. Crippled, /// Slows movement and attack speed. /// Strength scales the attack speed debuff non-linearly. 0.5 is ~50% @@ -247,13 +247,13 @@ impl Buff { BuffKind::Cursed => ( vec![ BuffEffect::MaxHealthChangeOverTime { - rate: -10.0, + rate: -1.0, kind: ModifierKind::Additive, target_fraction: 1.0 - data.strength, achieved_fraction: None, }, BuffEffect::HealthChangeOverTime { - rate: -10.0, + rate: -1.0, accumulated: 0.0, kind: ModifierKind::Additive, }, @@ -296,7 +296,7 @@ impl Buff { vec![ BuffEffect::MovementSpeed(1.0 - nn_scaling(data.strength)), BuffEffect::HealthChangeOverTime { - rate: -data.strength * 40.0, + rate: -data.strength * 4.0, accumulated: 0.0, kind: ModifierKind::Additive, }, @@ -307,7 +307,7 @@ impl Buff { vec![ BuffEffect::MovementSpeed(1.0 + data.strength), BuffEffect::HealthChangeOverTime { - rate: data.strength * 100.0, + rate: data.strength * 10.0, accumulated: 0.0, kind: ModifierKind::Additive, }, diff --git a/common/src/comp/health.rs b/common/src/comp/health.rs index 7f39648b34..193cb64a56 100644 --- a/common/src/comp/health.rs +++ b/common/src/comp/health.rs @@ -1,5 +1,5 @@ #[cfg(not(target_arch = "wasm32"))] -use crate::comp::Body; +use crate::comp; use crate::{uid::Uid, DamageSource}; use serde::{Deserialize, Serialize}; @@ -9,153 +9,151 @@ use specs::{Component, DerefFlaggedStorage}; use specs_idvs::IdvStorage; /// Specifies what and how much changed current health -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, Serialize, Deserialize)] +#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq)] pub struct HealthChange { - pub amount: i32, - pub cause: HealthSource, + pub amount: f32, + pub by: Option, + pub cause: Option, } -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, Serialize, Deserialize)] -pub enum HealthSource { - Damage { kind: DamageSource, by: Option }, - Heal { by: Option }, - //Attack { by: Uid }, // TODO: Implement weapon - //Projectile { owner: Option }, - //Explosion { owner: Option }, - //Energy { owner: Option }, - //Buff { owner: Option }, - Suicide, - World, - Revive, - Command, - LevelUp, - Item, - //Healing { by: Option }, - Unknown, +impl HealthChange { + pub fn damage_by(&self) -> Option { self.cause.is_some().then_some(self.by).flatten() } } -impl HealthSource { - pub fn damage_by(&self) -> Option { - if let HealthSource::Damage { by, .. } = self { - *by - } else { - None - } - } -} - -#[derive(Clone, Copy, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Copy, Debug, Serialize, Deserialize)] +/// Health is represented by u32s within the module, but treated as a float by +/// the rest of the game. +// As a general rule, all input and output values to public functions should be +// floats rather than integers. pub struct Health { + // Current and base_max are scaled by 256 within this module compared to what is visible to + // outside this module. The scaling is done to allow health to function as a fixed point while + // still having the advantages of being an integer. The scaling of 256 was chosen so that max + // health could be u16::MAX - 1, and then the scaled health could fit inside an f32 with no + // precision loss + /// Current health is how much health the entity currently has current: u32, + /// Base max is the amount of health the entity has without considering + /// temporary modifiers such as buffs base_max: u32, + /// Maximum is the amount of health the entity has after temporary modifiers + /// are considered maximum: u32, + // Time since last change and what the last change was + // TODO: Remove the time since last change, either convert to time of last change or just emit + // an outcome where appropriate. Is currently just used for frontend. pub last_change: (f64, HealthChange), pub is_dead: bool, } impl Health { - #[cfg(not(target_arch = "wasm32"))] - pub fn new(body: Body, level: u16) -> Self { - let mut health = Health::empty(); + /// Used when comparisons to health are needed outside this module. + // This value is chosen as anything smaller than this is more precise than our + // units of health. + pub const HEALTH_EPSILON: f32 = 0.5 / Self::MAX_SCALED_HEALTH as f32; + /// Maximum value allowed for health before scaling + const MAX_HEALTH: u16 = u16::MAX - 1; + /// The maximum value allowed for current and maximum health + /// Maximum value is (u16:MAX - 1) * 256, which only requires 24 bits. This + /// can fit into an f32 with no loss to precision + // Cast to u32 done as u32::from cannot be called inside constant + const MAX_SCALED_HEALTH: u32 = Self::MAX_HEALTH as u32 * Self::SCALING_FACTOR_INT; + /// The amount health is scaled by within this module + const SCALING_FACTOR_FLOAT: f32 = 256.; + const SCALING_FACTOR_INT: u32 = Self::SCALING_FACTOR_FLOAT as u32; - health.update_max_hp(Some(body), level); - health.set_to(health.maximum(), HealthSource::Revive); + /// Returns the current value of health casted to a float + pub fn current(&self) -> f32 { self.current as f32 / Self::SCALING_FACTOR_FLOAT } - health + /// Returns the base maximum value of health casted to a float + pub fn base_max(&self) -> f32 { self.base_max as f32 / Self::SCALING_FACTOR_FLOAT } + + /// Returns the maximum value of health casted to a float + pub fn maximum(&self) -> f32 { self.maximum as f32 / Self::SCALING_FACTOR_FLOAT } + + /// Returns the fraction of health an entity has remaining + pub fn fraction(&self) -> f32 { self.current() / self.maximum().max(1.0) } + + /// Updates the maximum value for health + pub fn update_maximum(&mut self, modifiers: comp::stats::StatsModifier) { + let maximum = modifiers + .compute_maximum(self.base_max as f32) + // NaN does not need to be handled here as rust will automatically change to 0 when casting to u32 + .clamp(0.0, Self::MAX_SCALED_HEALTH as f32) as u32; + self.maximum = maximum; } + #[cfg(not(target_arch = "wasm32"))] + pub fn new(body: comp::Body, level: u16) -> Self { + let health = u32::from( + body.base_health() + .saturating_add(body.base_health_increase().saturating_mul(level)), + ) * Self::SCALING_FACTOR_INT; + Health { + current: health, + base_max: health, + maximum: health, + last_change: (0.0, HealthChange { + amount: 0.0, + by: None, + cause: None, + }), + is_dead: false, + } + } + + // TODO: Delete this once stat points will be a thing + #[cfg(not(target_arch = "wasm32"))] + pub fn update_max_hp(&mut self, body: comp::Body, level: u16) { + let old_max = self.base_max; + self.base_max = u32::from( + body.base_health() + .saturating_add(body.base_health_increase().saturating_mul(level)), + ) * Self::SCALING_FACTOR_INT; + self.current = (self.current + self.base_max - old_max).min(self.maximum); + } + + #[cfg(not(target_arch = "wasm32"))] + pub fn change_by(&mut self, change: HealthChange) { + self.current = (((self.current() + change.amount).clamp(0.0, f32::from(Self::MAX_HEALTH)) + as u32 + * Self::SCALING_FACTOR_INT) as u32) + .min(self.maximum); + self.last_change = (0.0, change); + } + + pub fn should_die(&self) -> bool { self.current == 0 } + + pub fn kill(&mut self) { + self.current = 0; + self.is_dead = true; + } + + #[cfg(not(target_arch = "wasm32"))] + pub fn revive(&mut self) { + self.current = self.maximum; + self.is_dead = false; + } + + // Function only exists for plugin tests, do not use anywhere else + // TODO: Remove somehow later + #[deprecated] pub fn empty() -> Self { Health { current: 0, base_max: 0, maximum: 0, last_change: (0.0, HealthChange { - amount: 0, - cause: HealthSource::Revive, + amount: 0.0, + by: None, + cause: None, }), is_dead: false, } } - - pub fn current(&self) -> u32 { self.current } - - pub fn maximum(&self) -> u32 { self.maximum } - - pub fn base_max(&self) -> u32 { self.base_max } - - #[cfg(not(target_arch = "wasm32"))] - pub fn set_to(&mut self, amount: u32, cause: HealthSource) { - let amount = amount.min(self.maximum); - self.last_change = (0.0, HealthChange { - amount: amount as i32 - self.current as i32, - cause, - }); - self.current = amount; - } - - #[cfg(not(target_arch = "wasm32"))] - pub fn change_by(&mut self, change: HealthChange) { - self.current = ((self.current as i32 + change.amount).max(0) as u32).min(self.maximum); - self.last_change = (0.0, change); - } - - // This function changes the modified max health value, not the base health - // value. The modified health value takes into account buffs and other temporary - // changes to max health. - pub fn set_maximum(&mut self, amount: u32) { - self.maximum = amount; - self.current = self.current.min(self.maximum); - } - - // Scales the temporary max health by a modifier. - pub fn scale_maximum(&mut self, scaled: f32) { - let scaled_max = (self.base_max as f32 * scaled) as u32; - self.set_maximum(scaled_max); - } - - // This is private because max hp is based on the level - #[cfg(not(target_arch = "wasm32"))] - fn set_base_max(&mut self, amount: u32) { - self.base_max = amount; - self.current = self.current.min(self.maximum); - } - - pub fn should_die(&self) -> bool { self.current == 0 } - - #[cfg(not(target_arch = "wasm32"))] - pub fn revive(&mut self) { - self.set_to(self.maximum(), HealthSource::Revive); - self.is_dead = false; - } - - // TODO: Delete this once stat points will be a thing - #[cfg(not(target_arch = "wasm32"))] - pub fn update_max_hp(&mut self, body: Option, level: u16) { - if let Some(body) = body { - self.set_base_max(body.base_health() + body.base_health_increase() * level as u32); - self.set_maximum(body.base_health() + body.base_health_increase() * level as u32); - self.change_by(HealthChange { - amount: body.base_health_increase() as i32, - cause: HealthSource::LevelUp, - }); - } - } - - /// Returns the fraction of health an entity has remaining - pub fn fraction(&self) -> f32 { self.current as f32 / self.maximum.max(1) as f32 } } #[cfg(not(target_arch = "wasm32"))] impl Component for Health { type Storage = DerefFlaggedStorage>; } - -#[derive(Copy, Clone, Debug, Serialize, Deserialize)] -pub struct Dead { - pub cause: HealthSource, -} - -#[cfg(not(target_arch = "wasm32"))] -impl Component for Dead { - type Storage = IdvStorage; -} diff --git a/common/src/comp/mod.rs b/common/src/comp/mod.rs index 2ff0d41209..be6b7d5c4e 100644 --- a/common/src/comp/mod.rs +++ b/common/src/comp/mod.rs @@ -99,4 +99,4 @@ pub use self::{ visual::{LightAnimation, LightEmitter}, }; -pub use health::{Health, HealthChange, HealthSource}; +pub use health::{Health, HealthChange}; diff --git a/common/src/comp/stats.rs b/common/src/comp/stats.rs index d3f2b6d77e..d1a20c91a7 100644 --- a/common/src/comp/stats.rs +++ b/common/src/comp/stats.rs @@ -10,6 +10,31 @@ pub enum StatChangeError { Overflow, } +#[derive(Debug, Clone, Copy, Deserialize, Serialize)] +pub struct StatsModifier { + pub add_mod: f32, + pub mult_mod: f32, +} + +impl Default for StatsModifier { + fn default() -> Self { + Self { + add_mod: 0.0, + mult_mod: 1.0, + } + } +} + +impl StatsModifier { + pub fn compute_maximum(&self, base_value: f32) -> f32 { + base_value * self.mult_mod + self.add_mod + } + + pub fn update_maximum(&self) -> bool { + self.add_mod > 0.0 || (self.mult_mod - 1.0).abs() > f32::EPSILON + } +} + impl fmt::Display for StatChangeError { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "{}", match self { @@ -24,7 +49,7 @@ impl Error for StatChangeError {} pub struct Stats { pub name: String, pub damage_reduction: f32, - pub max_health_modifier: f32, + pub max_health_modifiers: StatsModifier, pub move_speed_modifier: f32, pub attack_speed_modifier: f32, pub friction_modifier: f32, @@ -36,7 +61,7 @@ impl Stats { Self { name, damage_reduction: 0.0, - max_health_modifier: 1.0, + max_health_modifiers: StatsModifier::default(), move_speed_modifier: 1.0, attack_speed_modifier: 1.0, friction_modifier: 1.0, @@ -46,22 +71,12 @@ impl Stats { /// Creates an empty `Stats` instance - used during character loading from /// the database - pub fn empty() -> Self { - Self { - name: "".to_owned(), - damage_reduction: 0.0, - max_health_modifier: 1.0, - move_speed_modifier: 1.0, - attack_speed_modifier: 1.0, - friction_modifier: 1.0, - max_energy_modifier: 1.0, - } - } + pub fn empty() -> Self { Self::new("".to_string()) } /// Resets temporary modifiers to default values pub fn reset_temp_modifiers(&mut self) { self.damage_reduction = 0.0; - self.max_health_modifier = 1.0; + self.max_health_modifiers = StatsModifier::default(); self.move_speed_modifier = 1.0; self.attack_speed_modifier = 1.0; self.friction_modifier = 1.0; diff --git a/common/src/consts.rs b/common/src/consts.rs index 5e0594fbc4..48c0adfaac 100644 --- a/common/src/consts.rs +++ b/common/src/consts.rs @@ -29,4 +29,4 @@ pub const SOUND_TRAVEL_DIST_PER_VOLUME: f32 = 3.0; // Stat increase per level (multiplied by 10 compared to what you'll see in UI) pub const ENERGY_PER_LEVEL: u32 = 50; -pub const HUMANOID_HP_PER_LEVEL: u32 = 50; +pub const HUMANOID_HP_PER_LEVEL: u16 = 5; diff --git a/common/src/effect.rs b/common/src/effect.rs index a1b6b599e3..13a49e1a20 100644 --- a/common/src/effect.rs +++ b/common/src/effect.rs @@ -30,7 +30,7 @@ impl Effect { pub fn is_harm(&self) -> bool { match self { - Effect::Health(c) => c.amount < 0, + Effect::Health(c) => c.amount < 0.0, Effect::PoiseChange(c) => c.amount < 0, Effect::Damage(_) => true, Effect::Buff(e) => !e.kind.is_buff(), @@ -40,7 +40,7 @@ impl Effect { pub fn modify_strength(&mut self, modifier: f32) { match self { Effect::Health(change) => { - change.amount = (change.amount as f32 * modifier) as i32; + change.amount *= modifier; }, Effect::PoiseChange(change) => { change.amount = (change.amount as f32 * modifier) as i32; diff --git a/common/src/event.rs b/common/src/event.rs index a3852dc1ea..3c243a4eb1 100644 --- a/common/src/event.rs +++ b/common/src/event.rs @@ -47,7 +47,7 @@ pub enum ServerEvent { owner: Option, target: Option, }, - Damage { + HealthChange { entity: EcsEntity, change: comp::HealthChange, }, @@ -59,7 +59,7 @@ pub enum ServerEvent { Delete(EcsEntity), Destroy { entity: EcsEntity, - cause: comp::HealthSource, + cause: comp::HealthChange, }, InventoryManip(EcsEntity, comp::InventoryManip), GroupManip(EcsEntity, comp::GroupManip), diff --git a/common/systems/src/beam.rs b/common/systems/src/beam.rs index 06182c3953..cb379e95d4 100644 --- a/common/systems/src/beam.rs +++ b/common/systems/src/beam.rs @@ -3,7 +3,7 @@ use common::{ comp::{ agent::{Sound, SoundKind}, Alignment, Beam, BeamSegment, Body, CharacterState, Combo, Energy, Group, Health, - HealthSource, Inventory, Ori, Player, Pos, Scale, Stats, + Inventory, Ori, Player, Pos, Scale, Stats, }, event::{EventBus, ServerEvent}, outcome::Outcome, @@ -108,10 +108,7 @@ impl<'a> System<'a> for Sys { // may have traveled and produced effects a bit before reaching its // end point if end_time < time { - server_events.push(ServerEvent::Destroy { - entity, - cause: HealthSource::World, - }); + server_events.push(ServerEvent::Delete(entity)); } // Determine area that was covered by the beam in the last tick diff --git a/common/systems/src/buff.rs b/common/systems/src/buff.rs index b22a9b15e1..b6d7239fab 100644 --- a/common/systems/src/buff.rs +++ b/common/systems/src/buff.rs @@ -6,8 +6,7 @@ use common::{ Buffs, }, fluid_dynamics::{Fluid, LiquidKind}, - Energy, Health, HealthChange, HealthSource, Inventory, LightEmitter, ModifierKind, - PhysicsState, Stats, + Energy, Health, HealthChange, Inventory, LightEmitter, ModifierKind, PhysicsState, Stats, }, event::{EventBus, ServerEvent}, resources::DeltaTime, @@ -203,34 +202,30 @@ impl<'a> System<'a> for Sys { if accumulated.abs() > rate.abs().min(10.0) || buff.time.map_or(false, |dur| dur == Duration::default()) { - let cause = if *accumulated > 0.0 { - HealthSource::Heal { by: buff_owner } + let (cause, by) = if *accumulated < 0.0 { + (Some(DamageSource::Buff(buff.kind)), buff_owner) } else { - HealthSource::Damage { - kind: DamageSource::Buff(buff.kind), - by: buff_owner, - } + (None, None) }; let amount = match *kind { - ModifierKind::Additive => *accumulated as i32, + ModifierKind::Additive => *accumulated, ModifierKind::Fractional => { - (health.maximum() as f32 * *accumulated) as i32 + health.maximum() as f32 * *accumulated }, }; - server_emitter.emit(ServerEvent::Damage { + server_emitter.emit(ServerEvent::HealthChange { entity, - change: HealthChange { amount, cause }, + change: HealthChange { amount, by, cause }, }); *accumulated = 0.0; }; }, BuffEffect::MaxHealthModifier { value, kind } => match kind { ModifierKind::Additive => { - stat.max_health_modifier *= - 1.0 + *value / (health.base_max() as f32); + stat.max_health_modifiers.add_mod += *value; }, ModifierKind::Fractional => { - stat.max_health_modifier *= *value; + stat.max_health_modifiers.mult_mod *= *value; }, }, BuffEffect::MaxEnergyModifier { value, kind } => match kind { @@ -302,7 +297,7 @@ impl<'a> System<'a> for Sys { } // Apply achieved_fraction to max_health_modifier - stat.max_health_modifier *= *achieved_fraction; + stat.max_health_modifiers.mult_mod *= *achieved_fraction; } }, BuffEffect::MovementSpeed(speed) => { diff --git a/common/systems/src/projectile.rs b/common/systems/src/projectile.rs index 83bb98e102..5ccede22a4 100644 --- a/common/systems/src/projectile.rs +++ b/common/systems/src/projectile.rs @@ -2,8 +2,8 @@ use common::{ combat::{self, AttackOptions, AttackSource, AttackerInfo, TargetInfo}, comp::{ agent::{Sound, SoundKind}, - projectile, Alignment, Body, CharacterState, Combo, Energy, Group, Health, HealthSource, - Inventory, Ori, PhysicsState, Player, Pos, Projectile, Stats, Vel, + projectile, Alignment, Body, CharacterState, Combo, Energy, Group, Health, Inventory, Ori, + PhysicsState, Player, Pos, Projectile, Stats, Vel, }, event::{Emitter, EventBus, ServerEvent}, outcome::Outcome, @@ -176,10 +176,7 @@ impl<'a> System<'a> for Sys { }); }, projectile::Effect::Vanish => { - server_emitter.emit(ServerEvent::Destroy { - entity, - cause: HealthSource::World, - }); + server_emitter.emit(ServerEvent::Delete(entity)); projectile_vanished = true; }, projectile::Effect::Bonk => { @@ -203,10 +200,7 @@ impl<'a> System<'a> for Sys { } if projectile.time_left == Duration::default() { - server_emitter.emit(ServerEvent::Destroy { - entity, - cause: HealthSource::World, - }); + server_emitter.emit(ServerEvent::Delete(entity)); } projectile.time_left = projectile .time_left @@ -348,10 +342,7 @@ fn dispatch_hit( }, projectile::Effect::Vanish => { let entity = projectile_info.entity; - server_emitter.emit(ServerEvent::Destroy { - entity, - cause: HealthSource::World, - }); + server_emitter.emit(ServerEvent::Delete(entity)); *projectile_vanished = true; }, projectile::Effect::Possess => { diff --git a/common/systems/src/shockwave.rs b/common/systems/src/shockwave.rs index f44b965d9d..64b735901b 100644 --- a/common/systems/src/shockwave.rs +++ b/common/systems/src/shockwave.rs @@ -2,8 +2,8 @@ use common::{ combat::{self, AttackOptions, AttackSource, AttackerInfo, TargetInfo}, comp::{ agent::{Sound, SoundKind}, - Alignment, Body, CharacterState, Combo, Energy, Group, Health, HealthSource, Inventory, - Ori, PhysicsState, Player, Pos, Scale, Shockwave, ShockwaveHitEntities, Stats, + Alignment, Body, CharacterState, Combo, Energy, Group, Health, Inventory, Ori, + PhysicsState, Player, Pos, Scale, Shockwave, ShockwaveHitEntities, Stats, }, event::{EventBus, ServerEvent}, outcome::Outcome, @@ -101,10 +101,7 @@ impl<'a> System<'a> for Sys { // If shockwave is out of time emit destroy event but still continue since it // may have traveled and produced effects a bit before reaching it's end point if time > end_time { - server_emitter.emit(ServerEvent::Destroy { - entity, - cause: HealthSource::World, - }); + server_emitter.emit(ServerEvent::Delete(entity)); continue; } diff --git a/common/systems/src/stats.rs b/common/systems/src/stats.rs index 77288da764..4c821dbc9d 100644 --- a/common/systems/src/stats.rs +++ b/common/systems/src/stats.rs @@ -105,7 +105,7 @@ impl<'a> System<'a> for Sys { entities_died_last_tick.0.push(cloned_entity); server_event_emitter.emit(ServerEvent::Destroy { entity, - cause: health.last_change.1.cause, + cause: health.last_change.1, }); health.is_dead = true; @@ -113,12 +113,12 @@ impl<'a> System<'a> for Sys { let stat = stats; let update_max_hp = { - (stat.max_health_modifier - 1.0).abs() > f32::EPSILON - || health.base_max() != health.maximum() + stat.max_health_modifiers.update_maximum() + || (health.base_max() - health.maximum()).abs() > Health::HEALTH_EPSILON }; if update_max_hp { - health.scale_maximum(stat.max_health_modifier); + health.update_maximum(stat.max_health_modifiers); } let (change_energy, energy_scaling) = { @@ -176,7 +176,7 @@ impl<'a> System<'a> for Sys { .skill_level(Skill::General(GeneralSkill::HealthIncrease)) .unwrap_or(None) .unwrap_or(0); - health.update_max_hp(Some(*body), health_level); + health.update_max_hp(*body, health_level); skill_set.modify_health = false; } if skill_set.modify_energy { diff --git a/server/src/cmd.rs b/server/src/cmd.rs index 2f395fb284..0bc34eefcd 100644 --- a/server/src/cmd.rs +++ b/server/src/cmd.rs @@ -837,27 +837,17 @@ fn handle_home( fn handle_kill( server: &mut Server, - client: EcsEntity, + _client: EcsEntity, target: EcsEntity, _args: Vec, _action: &ChatCommand, ) -> CmdResult<()> { - let reason = if client == target { - comp::HealthSource::Suicide - } else if let Some(uid) = server.state.read_storage::().get(client) { - comp::HealthSource::Damage { - kind: DamageSource::Other, - by: Some(*uid), - } - } else { - comp::HealthSource::Command - }; server .state .ecs_mut() .write_storage::() .get_mut(target) - .map(|mut h| h.set_to(0, reason)); + .map(|mut h| h.kill()); Ok(()) } @@ -1014,14 +1004,19 @@ fn handle_health( args: Vec, _action: &ChatCommand, ) -> CmdResult<()> { - if let Some(hp) = parse_args!(args, u32) { + if let Some(hp) = parse_args!(args, f32) { if let Some(mut health) = server .state .ecs() .write_storage::() .get_mut(target) { - health.set_to(hp * 10, comp::HealthSource::Command); + let change = comp::HealthChange { + amount: hp - health.current(), + by: None, + cause: None, + }; + health.change_by(change); Ok(()) } else { Err("You have no health".into()) @@ -1693,7 +1688,7 @@ fn handle_kill_npcs( if should_kill { count += 1; - health.set_to(0, comp::HealthSource::Command); + health.kill(); } } diff --git a/server/src/events/entity_manipulation.rs b/server/src/events/entity_manipulation.rs index 62787a6fbd..ca12dfa5d3 100644 --- a/server/src/events/entity_manipulation.rs +++ b/server/src/events/entity_manipulation.rs @@ -18,8 +18,8 @@ use common::{ chat::{KillSource, KillType}, inventory::item::MaterialStatManifest, object, Alignment, Auras, Body, CharacterState, Energy, EnergyChange, EnergySource, Group, - Health, HealthChange, HealthSource, Inventory, Player, Poise, PoiseChange, PoiseSource, - Pos, SkillSet, Stats, + Health, HealthChange, Inventory, Player, Poise, PoiseChange, PoiseSource, Pos, SkillSet, + Stats, }, event::{EventBus, ServerEvent}, lottery::{LootSpec, Lottery}, @@ -58,14 +58,15 @@ pub fn handle_poise( } } -pub fn handle_damage(server: &Server, entity: EcsEntity, change: HealthChange) { +pub fn handle_health_change(server: &Server, entity: EcsEntity, change: HealthChange) { let ecs = &server.state.ecs(); if let Some(mut health) = ecs.write_storage::().get_mut(entity) { health.change_by(change); } // This if statement filters out anything under 5 damage, for DOT ticks // TODO: Find a better way to separate direct damage from DOT here - if change.amount < -50 { + let damage = -change.amount; + if damage > -5.0 { if let Some(agent) = ecs.write_storage::().get_mut(entity) { agent.inbox.push_front(AgentEvent::Hurt); } @@ -111,7 +112,7 @@ pub fn handle_knockback(server: &Server, entity: EcsEntity, impulse: Vec3) // the loop; but repeating the loop would currently be very inefficient since it has to // rescan every entity on the server again. #[allow(clippy::needless_collect)] -pub fn handle_destroy(server: &mut Server, entity: EcsEntity, cause: HealthSource) { +pub fn handle_destroy(server: &mut Server, entity: EcsEntity, last_change: HealthChange) { let state = server.state_mut(); // TODO: Investigate duplicate `Destroy` events (but don't remove this). @@ -161,43 +162,22 @@ pub fn handle_destroy(server: &mut Server, entity: EcsEntity, cause: HealthSourc // If it was a player that died if let Some(_player) = state.ecs().read_storage::().get(entity) { if let Some(uid) = state.ecs().read_storage::().get(entity) { - let kill_source = match cause { - HealthSource::Damage { - kind: DamageSource::Melee, - by: Some(by), - } => get_attacker_name(KillType::Melee, by), - HealthSource::Damage { - kind: DamageSource::Projectile, - by: Some(by), - } => { - // TODO: add names to projectiles and send in message + let kill_source = match (last_change.cause, last_change.by) { + (Some(DamageSource::Melee), Some(by)) => get_attacker_name(KillType::Melee, by), + (Some(DamageSource::Projectile), Some(by)) => { get_attacker_name(KillType::Projectile, by) }, - HealthSource::Damage { - kind: DamageSource::Explosion, - by: Some(by), - } => get_attacker_name(KillType::Explosion, by), - HealthSource::Damage { - kind: DamageSource::Energy, - by: Some(by), - } => get_attacker_name(KillType::Energy, by), - HealthSource::Damage { - kind: DamageSource::Buff(buff_kind), - by: Some(by), - } => get_attacker_name(KillType::Buff(buff_kind), by), - HealthSource::Damage { - kind: DamageSource::Other, - by: Some(by), - } => get_attacker_name(KillType::Other, by), - HealthSource::World => KillSource::FallDamage, - HealthSource::Suicide => KillSource::Suicide, - HealthSource::Damage { .. } - | HealthSource::Revive - | HealthSource::Command - | HealthSource::LevelUp - | HealthSource::Item - | HealthSource::Heal { by: _ } - | HealthSource::Unknown => KillSource::Other, + (Some(DamageSource::Explosion), Some(by)) => { + get_attacker_name(KillType::Explosion, by) + }, + (Some(DamageSource::Energy), Some(by)) => get_attacker_name(KillType::Energy, by), + (Some(DamageSource::Buff(buff_kind)), Some(by)) => { + get_attacker_name(KillType::Buff(buff_kind), by) + }, + (Some(DamageSource::Other), Some(by)) => get_attacker_name(KillType::Other, by), + (Some(DamageSource::Falling), _) => KillSource::FallDamage, + // HealthSource::Suicide => KillSource::Suicide, + _ => KillSource::Other, }; state.send_chat(GenericChatMsg { @@ -215,7 +195,7 @@ pub fn handle_destroy(server: &mut Server, entity: EcsEntity, cause: HealthSourc let inventories = state.ecs().read_storage::(); let players = state.ecs().read_storage::(); let bodies = state.ecs().read_storage::(); - let by = if let HealthSource::Damage { by: Some(by), .. } = cause { + let by = if let Some(by) = last_change.by { by } else { return; diff --git a/server/src/events/mod.rs b/server/src/events/mod.rs index 3aeb9e7d58..504f593825 100644 --- a/server/src/events/mod.rs +++ b/server/src/events/mod.rs @@ -6,8 +6,8 @@ use entity_creation::{ handle_initialize_character, handle_loaded_character_data, handle_shockwave, handle_shoot, }; use entity_manipulation::{ - handle_aura, handle_bonk, handle_buff, handle_combo_change, handle_damage, handle_delete, - handle_destroy, handle_energy_change, handle_entity_attacked_hook, handle_explosion, + handle_aura, handle_bonk, handle_buff, handle_combo_change, handle_delete, handle_destroy, + handle_energy_change, handle_entity_attacked_hook, handle_explosion, handle_health_change, handle_knockback, handle_land_on_ground, handle_parry, handle_poise, handle_respawn, handle_teleport_to, }; @@ -91,7 +91,9 @@ impl Server { ServerEvent::Knockback { entity, impulse } => { handle_knockback(self, entity, impulse) }, - ServerEvent::Damage { entity, change } => handle_damage(self, entity, change), + ServerEvent::HealthChange { entity, change } => { + handle_health_change(self, entity, change) + }, ServerEvent::PoiseChange { entity, change, diff --git a/server/src/sys/agent.rs b/server/src/sys/agent.rs index e20382103c..16fc0986f0 100644 --- a/server/src/sys/agent.rs +++ b/server/src/sys/agent.rs @@ -468,7 +468,7 @@ impl<'a> System<'a> for Sys { // was recent and we have a health component match health { Some(health) if health.last_change.0 < DAMAGE_MEMORY_DURATION => { - if let Some(by) = health.last_change.1.cause.damage_by() { + if let Some(by) = health.last_change.1.damage_by() { if let Some(attacker) = read_data.uid_allocator.retrieve_entity_internal(by.id()) { @@ -1425,7 +1425,7 @@ impl<'a> AgentData<'a> { /// the healing isn't interrupted. fn heal_self(&self, _agent: &mut Agent, controller: &mut Controller) -> bool { let healing_value = |item: &Item| { - let mut value = 0; + let mut value = 0.0; if let ItemKind::Consumable { kind: ConsumableKind::Drink, @@ -1442,15 +1442,14 @@ impl<'a> AgentData<'a> { Effect::Buff(BuffEffect { kind, data, .. }) if matches!(kind, Regeneration | Saturation | Potion) => { - value += (data.strength - * data.duration.map_or(0.0, |d| d.as_secs() as f32)) - as i32; + value += + data.strength * data.duration.map_or(0.0, |d| d.as_secs() as f32); } _ => {}, } } } - value + value as i32 }; let mut consumables: Vec<_> = self @@ -1569,7 +1568,7 @@ impl<'a> AgentData<'a> { stats.name == "Guard" && other_is_npc && remembers_damage }); - let attacker_of = |health: &Health| health.last_change.1.cause.damage_by(); + let attacker_of = |health: &Health| health.last_change.1.damage_by(); need_help .then(|| { @@ -4191,7 +4190,7 @@ impl<'a> AgentData<'a> { ) { if let Some(Target { target, .. }) = agent.target { if let Some(tgt_health) = read_data.healths.get(target) { - if let Some(by) = tgt_health.last_change.1.cause.damage_by() { + if let Some(by) = tgt_health.last_change.1.damage_by() { if let Some(attacker) = get_entity_by_id(by.id(), read_data) { if agent.target.is_none() { controller.push_event(ControlEvent::Utterance(UtteranceKind::Angry)); @@ -4450,7 +4449,7 @@ fn decrement_awareness(agent: &mut Agent) { fn entity_was_attacked(entity: EcsEntity, read_data: &ReadData) -> bool { if let Some(entity_health) = read_data.healths.get(entity) { - entity_health.last_change.0 < 5.0 && entity_health.last_change.1.amount < 0 + entity_health.last_change.0 < 5.0 && entity_health.last_change.1.amount < 0.0 } else { false } diff --git a/server/src/sys/object.rs b/server/src/sys/object.rs index f5255db813..9cdc1d4953 100644 --- a/server/src/sys/object.rs +++ b/server/src/sys/object.rs @@ -1,5 +1,5 @@ use common::{ - comp::{HealthSource, Object, PhysicsState, PoiseChange, PoiseSource, Pos, Vel}, + comp::{Object, PhysicsState, PoiseChange, PoiseSource, Pos, Vel}, effect::Effect, event::{EventBus, ServerEvent}, resources::DeltaTime, @@ -46,10 +46,7 @@ impl<'a> System<'a> for Sys { match object { Object::Bomb { owner } => { if physics.on_surface().is_some() { - server_emitter.emit(ServerEvent::Destroy { - entity, - cause: HealthSource::Suicide, - }); + server_emitter.emit(ServerEvent::Delete(entity)); server_emitter.emit(ServerEvent::Explosion { pos: pos.0, explosion: Explosion { @@ -143,10 +140,7 @@ impl<'a> System<'a> for Sys { }); } } - server_emitter.emit(ServerEvent::Destroy { - entity, - cause: HealthSource::Suicide, - }); + server_emitter.emit(ServerEvent::Delete(entity)); server_emitter.emit(ServerEvent::Explosion { pos: pos.0, explosion: Explosion { diff --git a/voxygen/egui/src/lib.rs b/voxygen/egui/src/lib.rs index c92f120c68..7acf8a3f0b 100644 --- a/voxygen/egui/src/lib.rs +++ b/voxygen/egui/src/lib.rs @@ -518,7 +518,7 @@ fn selected_entity_window( .show(ui, |ui| { two_col_row(ui, "Name", stats.name.to_string()); two_col_row(ui, "Damage Reduction", format!("{:.1}", stats.damage_reduction)); - two_col_row(ui, "Max Health Modifier", format!("{:.1}", stats.max_health_modifier)); + two_col_row(ui, "Multiplicative Max Health Modifier", format!("{:.1}", stats.max_health_modifiers.mult_mod)); two_col_row(ui, "Move Speed Modifier", format!("{:.1}", stats.move_speed_modifier)); }); diff --git a/voxygen/src/audio/music.rs b/voxygen/src/audio/music.rs index c1d25b598b..b31fd50f98 100644 --- a/voxygen/src/audio/music.rs +++ b/voxygen/src/audio/music.rs @@ -163,7 +163,7 @@ pub struct MusicTransitionManifest { combat_nearby_radius: f32, /// Each multiple of this factor that an enemy has health counts as an extra /// enemy - combat_health_factor: u32, + combat_health_factor: f32, /// How many nearby enemies trigger High combat music combat_nearby_high_thresh: u32, /// How many nearby enemies trigger Low combat music @@ -178,7 +178,7 @@ impl Default for MusicTransitionManifest { fn default() -> MusicTransitionManifest { MusicTransitionManifest { combat_nearby_radius: 40.0, - combat_health_factor: 1000, + combat_health_factor: 100.0, combat_nearby_high_thresh: 3, combat_nearby_low_thresh: 1, fade_timings: HashMap::new(), @@ -247,7 +247,7 @@ impl MusicMgr { && (player_pos.0 - pos.0).magnitude_squared() < mtm.combat_nearby_radius.powf(2.0) { - (health.maximum() / mtm.combat_health_factor).max(1) + (health.maximum() / mtm.combat_health_factor).ceil() as u32 } else { 0 } diff --git a/voxygen/src/ecs/comp.rs b/voxygen/src/ecs/comp.rs index 982a7414bd..87674dd421 100644 --- a/voxygen/src/ecs/comp.rs +++ b/voxygen/src/ecs/comp.rs @@ -9,7 +9,7 @@ use vek::*; pub struct HpFloater { pub timer: f32, // Numbers of times significant damage has been dealt - pub hp_change: i32, + pub hp_change: f32, // Used for randomly offsetting pub rand: f32, } @@ -19,7 +19,7 @@ pub struct HpFloaterList { pub floaters: Vec, // Keep from spawning more floaters from same hp change // Note: this can't detect a change if equivalent healing and damage take place simultaneously - pub last_hp: u32, + pub last_hp: f32, // The time since you last damaged this entity // Used to display nametags outside normal range if this time is below a certain value pub time_since_last_dmg_by_me: Option, diff --git a/voxygen/src/ecs/sys/floater.rs b/voxygen/src/ecs/sys/floater.rs index 9f5da5f6f8..0f67af2ea4 100644 --- a/voxygen/src/ecs/sys/floater.rs +++ b/voxygen/src/ecs/sys/floater.rs @@ -1,6 +1,6 @@ use crate::ecs::comp::{HpFloater, HpFloaterList}; use common::{ - comp::{Health, HealthSource, Pos}, + comp::{Health, Pos}, resources::{DeltaTime, PlayerEntity}, uid::Uid, }; @@ -61,7 +61,7 @@ impl<'a> System<'a> for Sys { // Check if health has changed (won't work if damaged and then healed with // equivalently in the same frame) - if hp_floater_list.last_hp != health.current() { + if (hp_floater_list.last_hp - health.current()).abs() > Health::HEALTH_EPSILON { hp_floater_list.last_hp = health.current(); // TODO: What if multiple health changes occurred since last check here // Also, If we make health store a vec of the last_changes (from say the last @@ -71,9 +71,23 @@ impl<'a> System<'a> for Sys { // would just be a transient glitch in the display of these damage numbers) // (maybe health changes could be sent to the client as a list // of events) - if match health.last_change.1.cause { - HealthSource::Damage { by: Some(by), .. } - | HealthSource::Heal { by: Some(by) } => { + if match health.last_change.1.by { + // HealthSource::Damage { by: Some(by), .. } + // | HealthSource::Heal { by: Some(by) } => { + // let by_me = my_uid.map_or(false, |&uid| by == uid); + // // If the attack was by me also reset this timer + // if by_me { + // hp_floater_list.time_since_last_dmg_by_me = Some(0.0); + // } + // my_entity.0 == Some(entity) || by_me + // }, + // HealthSource::Suicide => my_entity.0 == Some(entity), + // HealthSource::World => my_entity.0 == Some(entity), + // HealthSource::LevelUp => my_entity.0 == Some(entity), + // HealthSource::Command => true, + // HealthSource::Item => true, + // _ => false, + Some(by) => { let by_me = my_uid.map_or(false, |&uid| by == uid); // If the attack was by me also reset this timer if by_me { @@ -81,12 +95,7 @@ impl<'a> System<'a> for Sys { } my_entity.0 == Some(entity) || by_me }, - HealthSource::Suicide => my_entity.0 == Some(entity), - HealthSource::World => my_entity.0 == Some(entity), - HealthSource::LevelUp => my_entity.0 == Some(entity), - HealthSource::Command => true, - HealthSource::Item => true, - _ => false, + None => false, } { let last_floater = hp_floater_list.floaters.last_mut(); match last_floater { @@ -144,7 +153,7 @@ impl<'a> System<'a> for Sys { } else { MY_HP_SHOWTIME } - || *last_hp == 0 + || last_hp.abs() < Health::HEALTH_EPSILON }) { floaters.clear(); } diff --git a/voxygen/src/hud/buffs.rs b/voxygen/src/hud/buffs.rs index 2c3ca35b06..0356f13d52 100644 --- a/voxygen/src/hud/buffs.rs +++ b/voxygen/src/hud/buffs.rs @@ -126,9 +126,10 @@ impl<'a> Widget for BuffsBar<'a> { .font_id(self.fonts.cyri.conrod_id) .desc_text_color(TEXT_COLOR); if let BuffPosition::Bar = buff_position { - let decayed_health = 1.0 - self.health.maximum() as f64 / self.health.base_max() as f64; - let show_health = - self.health.current() != self.health.maximum() || decayed_health > 0.0; + let decayed_health = 1.0 - self.health.maximum() / self.health.base_max(); + let show_health = (self.health.current() - self.health.maximum()).abs() + > Health::HEALTH_EPSILON + || decayed_health > 0.0; let show_energy = self.energy.current() != self.energy.maximum(); let offset = if show_energy && show_health { 140.0 diff --git a/voxygen/src/hud/diary.rs b/voxygen/src/hud/diary.rs index f40feff4d8..a179878555 100644 --- a/voxygen/src/hud/diary.rs +++ b/voxygen/src/hud/diary.rs @@ -2094,7 +2094,7 @@ fn general_skill_strings(skill: GeneralSkill, i18n: &Localization) -> (&str, Cow i18n, "hud.skill.inc_health_title", "hud.skill.inc_health", - HUMANOID_HP_PER_LEVEL / 10, + u32::from(HUMANOID_HP_PER_LEVEL), ), GeneralSkill::EnergyIncrease => splice_constant( i18n, diff --git a/voxygen/src/hud/group.rs b/voxygen/src/hud/group.rs index 2b8653ce18..1d3d8d5696 100644 --- a/voxygen/src/hud/group.rs +++ b/voxygen/src/hud/group.rs @@ -383,8 +383,7 @@ impl<'a> Widget for Group<'a> { inventory, health, energy, skill_set, *body, self.msm, ); let char_name = stats.name.to_string(); - let health_perc = - health.current() as f64 / health.base_max().max(health.maximum()) as f64; + let health_perc = health.current() / health.base_max().max(health.maximum()); // change panel positions when debug info is shown let x = if debug_on { i / 8 } else { i / 12 }; let y = if debug_on { i % 8 } else { i % 12 }; @@ -411,7 +410,7 @@ impl<'a> Widget for Group<'a> { .set(state.ids.member_panels_bg[i], ui); // Health Image::new(self.imgs.bar_content) - .w_h(148.0 * health_perc, 22.0) + .w_h(148.0 * f64::from(health_perc), 22.0) .color(Some(health_col)) .top_left_with_margins_on(state.ids.member_panels_bg[i], 2.0, 2.0) .set(state.ids.member_health[i], ui); @@ -437,21 +436,21 @@ impl<'a> Widget for Group<'a> { // Health Text let txt = format!( "{}/{}", - health.current() / 10_u32, - health.maximum() / 10_u32, + health.current().round() as u32, + health.maximum().round() as u32, ); // Change font size depending on health amount let font_size = match health.maximum() { - 0..=999 => 14, - 1000..=9999 => 13, - 10000..=99999 => 12, + x if (0.0..100.0).contains(&x) => 14, + x if (100.0..=1000.0).contains(&x) => 13, + x if (1000.0..=10000.0).contains(&x) => 12, _ => 11, }; // Change text offset depending on health amount let txt_offset = match health.maximum() { - 0..=999 => 4.0, - 1000..=9999 => 4.5, - 10000..=99999 => 5.0, + x if (0.0..=100.0).contains(&x) => 4.0, + x if (100.0..=1000.0).contains(&x) => 4.5, + x if (1000.0..=10000.0).contains(&x) => 5.0, _ => 5.5, }; Text::new(&txt) diff --git a/voxygen/src/hud/mod.rs b/voxygen/src/hud/mod.rs index b12cd57f5c..6b9b28548e 100644 --- a/voxygen/src/hud/mod.rs +++ b/voxygen/src/hud/mod.rs @@ -1120,7 +1120,7 @@ impl Hud { //self.input = client.read_storage::(); if let Some(health) = healths.get(me) { // Hurt Frame - let hp_percentage = health.current() as f32 / health.maximum() as f32 * 100.0; + let hp_percentage = health.current() / health.maximum() * 100.0; if hp_percentage < 10.0 && !health.is_dead { let hurt_fade = (self.pulse * (10.0 - hp_percentage as f32) * 0.1/* speed factor */).sin() @@ -1217,9 +1217,9 @@ impl Hud { ); // Calculate total change // Ignores healing - let hp_damage = floaters.iter().fold(0, |acc, f| f.hp_change.min(0) + acc); - // Divide by 10 to stay in the same dimension as the HP display - let hp_dmg_rounded_abs = ((hp_damage + 5) / 10).abs(); + let hp_damage: f32 = floaters.iter().map(|f| f.hp_change.min(0.0)).sum(); + // .fold(0.0, |acc, f| f.hp_change.min(0.0) + acc); + let hp_dmg_rounded_abs = hp_damage.round().abs() as u32; let max_hp_frac = hp_damage.abs() as f32 / health.maximum() as f32; let timer = floaters .last() @@ -1242,7 +1242,7 @@ impl Hud { Text::new(&format!("{}", hp_dmg_rounded_abs)) .font_size(font_size) .font_id(self.fonts.cyri.conrod_id) - .color(if hp_damage < 0 { + .color(if hp_damage < 0.0 { Color::Rgba(0.0, 0.0, 0.0, hp_fade) } else { Color::Rgba(0.0, 0.0, 0.0, 0.0) @@ -1252,7 +1252,7 @@ impl Hud { Text::new(&format!("{}", hp_dmg_rounded_abs)) .font_size(font_size) .font_id(self.fonts.cyri.conrod_id) - .color(if hp_damage < 0 { + .color(if hp_damage < 0.0 { Color::Rgba(1.0, 0.1, 0.0, hp_fade) } else { Color::Rgba(0.0, 0.0, 0.0, 0.0) @@ -1263,7 +1263,8 @@ impl Hud { for floater in floaters { // Healing always single numbers so just skip damage when in batch mode - if global_state.settings.interface.sct_player_batch && floater.hp_change < 0 + if global_state.settings.interface.sct_player_batch + && floater.hp_change < 0.0 { continue; } @@ -1287,7 +1288,7 @@ impl Hud { 0 }; // Timer sets the widget offset - let y = if floater.hp_change < 0 { + let y = if floater.hp_change < 0.0 { floater.timer as f64 * number_speed * floater.hp_change.signum() as f64 @@ -1303,7 +1304,7 @@ impl Hud { - ui_widgets.win_h * 0.5 }; // Healing is offset randomly - let x = if floater.hp_change < 0 { + let x = if floater.hp_change < 0.0 { 0.0 } else { (floater.rand as f64 - 0.5) * 0.2 * ui_widgets.win_w @@ -1312,17 +1313,17 @@ impl Hud { let hp_fade = ((crate::ecs::sys::floater::MY_HP_SHOWTIME - floater.timer) * 0.25) + 0.2; - if floater.hp_change.abs() > 10 { - Text::new(&format!("{}", (floater.hp_change / 10).abs())) + if floater.hp_change.abs() > 1.0 { + Text::new(&format!("{:.0}", floater.hp_change.abs())) .font_size(font_size) .font_id(self.fonts.cyri.conrod_id) .color(Color::Rgba(0.0, 0.0, 0.0, hp_fade)) .x_y(x, y - 3.0) .set(player_sct_bg_id, ui_widgets); - Text::new(&format!("{}", (floater.hp_change / 10).abs())) + Text::new(&format!("{:.0}", floater.hp_change.abs())) .font_size(font_size) .font_id(self.fonts.cyri.conrod_id) - .color(if floater.hp_change < 0 { + .color(if floater.hp_change < 0.0 { Color::Rgba(1.0, 0.1, 0.0, hp_fade) } else { Color::Rgba(0.1, 1.0, 0.1, hp_fade) @@ -1330,16 +1331,16 @@ impl Hud { .x_y(x, y) .set(player_sct_id, ui_widgets); } else { - Text::new(&format!("{}", (floater.hp_change as f32 / 10.0).abs())) + Text::new(&format!("{:.1}", floater.hp_change.abs())) .font_size(font_size) .font_id(self.fonts.cyri.conrod_id) .color(Color::Rgba(0.0, 0.0, 0.0, hp_fade)) .x_y(x, y - 3.0) .set(player_sct_bg_id, ui_widgets); - Text::new(&format!("{}", (floater.hp_change as f32 / 10.0).abs())) + Text::new(&format!("{:.1}", floater.hp_change.abs())) .font_size(font_size) .font_id(self.fonts.cyri.conrod_id) - .color(if floater.hp_change < 0 { + .color(if floater.hp_change < 0.0 { Color::Rgba(1.0, 0.1, 0.0, hp_fade) } else { Color::Rgba(0.1, 1.0, 0.1, hp_fade) @@ -1871,17 +1872,15 @@ impl Hud { .next(&mut self.ids.sct_bgs, &mut ui_widgets.widget_id_generator()); // Calculate total change // Ignores healing - let hp_damage = floaters.iter().fold(0, |acc, f| { - if f.hp_change < 0 { + let hp_damage = floaters.iter().fold(0.0, |acc, f| { + if f.hp_change < 0.0 { acc + f.hp_change } else { acc } }); - // Divide by 10 to stay in the same dimension as the HP display - let hp_dmg_rounded_abs = ((hp_damage + 5) / 10).abs(); - let max_hp_frac = - hp_damage.abs() as f32 / health.map_or(1.0, |h| h.maximum() as f32); + let hp_dmg_rounded_abs = hp_damage.round().abs(); + let max_hp_frac = hp_damage.abs() / health.map_or(1.0, |h| h.maximum()); let timer = floaters .last() .expect("There must be at least one floater") @@ -1902,20 +1901,20 @@ impl Hud { + 100.0; // Timer sets text transparency let fade = ((crate::ecs::sys::floater::HP_SHOWTIME - timer) * 0.25) + 0.2; - if hp_damage.abs() < 10 { + if hp_damage.abs() < 1.0 { // Damage and heal below 10/10 are shown as decimals - Text::new(&format!("{}", hp_damage.abs() as f32 / 10.0)) + Text::new(&format!("{}", hp_damage.abs())) .font_size(font_size) .font_id(self.fonts.cyri.conrod_id) .color(Color::Rgba(0.0, 0.0, 0.0, fade)) .x_y(0.0, y - 3.0) .position_ingame(ingame_pos) .set(sct_bg_id, ui_widgets); - Text::new(&format!("{}", hp_damage.abs() as f32 / 10.0)) + Text::new(&format!("{}", hp_damage.abs())) .font_size(font_size) .font_id(self.fonts.cyri.conrod_id) .x_y(0.0, y) - .color(if hp_damage < 0 { + .color(if hp_damage < 0.0 { Color::Rgba(font_col.r, font_col.g, font_col.b, fade) } else { Color::Rgba(0.1, 1.0, 0.1, fade) @@ -1936,7 +1935,7 @@ impl Hud { .font_size(font_size) .font_id(self.fonts.cyri.conrod_id) .x_y(0.0, y) - .color(if hp_damage < 0 { + .color(if hp_damage < 0.0 { Color::Rgba(font_col.r, font_col.g, font_col.b, fade) } else { Color::Rgba(0.1, 1.0, 0.1, fade) @@ -1973,12 +1972,12 @@ impl Hud { let fade = ((crate::ecs::sys::floater::HP_SHOWTIME - floater.timer) * 0.25) + 0.2; - if floater.hp_change.abs() < 10 { + if floater.hp_change.abs() < 1.0 { // Damage and heal below 10/10 are shown as decimals - Text::new(&format!("{}", (floater.hp_change.abs() as f32 / 10.0))) + Text::new(&format!("{:.0}", floater.hp_change.abs())) .font_size(font_size) .font_id(self.fonts.cyri.conrod_id) - .color(if floater.hp_change < 0 { + .color(if floater.hp_change < 0.0 { Color::Rgba(0.0, 0.0, 0.0, fade) } else { Color::Rgba(0.0, 0.0, 0.0, 1.0) @@ -1986,11 +1985,11 @@ impl Hud { .x_y(0.0, y - 3.0) .position_ingame(ingame_pos) .set(sct_bg_id, ui_widgets); - Text::new(&format!("{}", (floater.hp_change.abs() as f32 / 10.0))) + Text::new(&format!("{:.0}", floater.hp_change.abs())) .font_size(font_size) .font_id(self.fonts.cyri.conrod_id) .x_y(0.0, y) - .color(if floater.hp_change < 0 { + .color(if floater.hp_change < 0.0 { Color::Rgba(font_col.r, font_col.g, font_col.b, fade) } else { Color::Rgba(0.1, 1.0, 0.1, 1.0) @@ -1999,10 +1998,10 @@ impl Hud { .set(sct_id, ui_widgets); } else { // Damage and heal above 10/10 are shown rounded - Text::new(&format!("{}", (floater.hp_change / 10).abs())) + Text::new(&format!("{:.1}", floater.hp_change.abs())) .font_size(font_size) .font_id(self.fonts.cyri.conrod_id) - .color(if floater.hp_change < 0 { + .color(if floater.hp_change < 0.0 { Color::Rgba(0.0, 0.0, 0.0, fade) } else { Color::Rgba(0.0, 0.0, 0.0, 1.0) @@ -2010,11 +2009,11 @@ impl Hud { .x_y(0.0, y - 3.0) .position_ingame(ingame_pos) .set(sct_bg_id, ui_widgets); - Text::new(&format!("{}", (floater.hp_change / 10).abs())) + Text::new(&format!("{:.1}", floater.hp_change.abs())) .font_size(font_size) .font_id(self.fonts.cyri.conrod_id) .x_y(0.0, y) - .color(if floater.hp_change < 0 { + .color(if floater.hp_change < 0.0 { Color::Rgba(font_col.r, font_col.g, font_col.b, fade) } else { Color::Rgba(0.1, 1.0, 0.1, 1.0) diff --git a/voxygen/src/hud/overhead.rs b/voxygen/src/hud/overhead.rs index c0c191e50d..8bc591254f 100644 --- a/voxygen/src/hud/overhead.rs +++ b/voxygen/src/hud/overhead.rs @@ -67,11 +67,12 @@ pub struct Info<'a> { /// Determines whether to show the healthbar pub fn should_show_healthbar(health: &Health) -> bool { - health.current() != health.maximum() || health.current() < health.base_max() + (health.current() - health.maximum()).abs() > Health::HEALTH_EPSILON + || health.current() < health.base_max() } /// Determines if there is decayed health being applied pub fn decayed_health_displayed(health: &Health) -> bool { - (1.0 - health.maximum() as f64 / health.base_max() as f64) > 0.0 + (1.0 - health.maximum() / health.base_max()) > 0.0 } /// ui widget containing everything that goes over a character's head /// (Speech bubble, Name, Level, HP/energy bars, etc.) @@ -192,8 +193,8 @@ impl<'a> Widget for Overhead<'a> { h.current() as f64 / h.base_max().max(h.maximum()) as f64 * 100.0 }); // Compare levels to decide if a skull is shown - let health_current = health.map_or(1.0, |h| (h.current() / 10) as f64); - let health_max = health.map_or(1.0, |h| (h.maximum() / 10) as f64); + let health_current = health.map_or(1.0, |h| f64::from(h.current())); + let health_max = health.map_or(1.0, |h| f64::from(h.maximum())); let name_y = if (health_current - health_max).abs() < 1e-6 { MANA_BAR_Y + 20.0 } else { diff --git a/voxygen/src/hud/skillbar.rs b/voxygen/src/hud/skillbar.rs index d1777b47af..379ae733ed 100644 --- a/voxygen/src/hud/skillbar.rs +++ b/voxygen/src/hud/skillbar.rs @@ -33,7 +33,6 @@ use conrod_core::{ widget::{self, Button, Image, Rectangle, Text}, widget_ids, Color, Colorable, Positionable, Sizeable, UiCell, Widget, WidgetCommon, }; -use std::cmp; use vek::*; widget_ids! { @@ -366,11 +365,11 @@ impl<'a> Skillbar<'a> { let (hp_percentage, energy_percentage): (f64, f64) = if self.health.is_dead { (0.0, 0.0) } else { - let max_hp = cmp::max(self.health.base_max(), self.health.maximum()) as f64; - let current_hp = self.health.current() as f64; + let max_hp = f64::from(self.health.base_max().max(self.health.maximum())); + let current_hp = f64::from(self.health.current()); ( current_hp / max_hp * 100.0, - (self.energy.fraction() * 100.0).into(), + f64::from(self.energy.fraction() * 100.0), ) }; @@ -378,7 +377,8 @@ impl<'a> Skillbar<'a> { let hp_ani = (self.pulse * 4.0/* speed factor */).cos() * 0.5 + 0.8; let crit_hp_color: Color = Color::Rgba(0.79, 0.19, 0.17, hp_ani); let bar_values = self.global_state.settings.interface.bar_numbers; - let show_health = self.health.current() != self.health.maximum(); + let show_health = + (self.health.current() - self.health.maximum()).abs() > Health::HEALTH_EPSILON; let show_energy = self.energy.current() != self.energy.maximum(); let decayed_health = 1.0 - self.health.maximum() as f64 / self.health.base_max() as f64; @@ -458,9 +458,9 @@ impl<'a> Skillbar<'a> { Some(( format!( "{}/{}", - (self.health.current() / 10).max(1) as u32, /* Don't show 0 health for - * living players */ - (self.health.maximum() / 10) as u32 + self.health.current().round().max(1.0) as u32, /* Don't show 0 health for + * living players */ + self.health.maximum().round() as u32 ), format!( "{}/{}",