Weapon balancing

This commit is contained in:
Silentium2318 2020-07-02 16:19:39 -04:00 committed by Sam
parent 11807c836b
commit b0f55b3f79
5 changed files with 7 additions and 102 deletions

90
Cargo.lock generated
View File

@ -120,7 +120,7 @@ version = "0.1.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cc755b23c19211c270ef000fa7ce871377825e6cc7d1bfd0311076f22c5e6ba1"
dependencies = [
"proc-macro-error 0.4.12",
"proc-macro-error",
"proc-macro2 1.0.18",
"quote 1.0.7",
"syn 1.0.33",
@ -521,13 +521,9 @@ version = "2.33.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bdfa80d47f954d53a35a64987ca1422f495b8d6483c0fe9f7117b36c2a792129"
dependencies = [
"ansi_term",
"atty",
"bitflags",
"strsim 0.8.0",
"textwrap",
"unicode-width",
"vec_map",
]
[[package]]
@ -1011,7 +1007,7 @@ dependencies = [
"ident_case",
"proc-macro2 1.0.18",
"quote 1.0.7",
"strsim 0.9.3",
"strsim",
"syn 1.0.33",
]
@ -1895,15 +1891,6 @@ dependencies = [
"serde",
]
[[package]]
name = "heck"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205"
dependencies = [
"unicode-segmentation",
]
[[package]]
name = "hermit-abi"
version = "0.1.13"
@ -3110,20 +3097,7 @@ version = "0.4.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "18f33027081eba0a6d8aba6d1b1c3a3be58cbb12106341c2d5759fcd9b5277e7"
dependencies = [
"proc-macro-error-attr 0.4.12",
"proc-macro2 1.0.18",
"quote 1.0.7",
"syn 1.0.33",
"version_check 0.9.2",
]
[[package]]
name = "proc-macro-error"
version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc175e9777c3116627248584e8f8b3e2987405cabe1c0adf7d1dd28f09dc7880"
dependencies = [
"proc-macro-error-attr 1.0.3",
"proc-macro-error-attr",
"proc-macro2 1.0.18",
"quote 1.0.7",
"syn 1.0.33",
@ -3143,19 +3117,6 @@ dependencies = [
"version_check 0.9.2",
]
[[package]]
name = "proc-macro-error-attr"
version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3cc9795ca17eb581285ec44936da7fc2335a3f34f2ddd13118b6f4d515435c50"
dependencies = [
"proc-macro2 1.0.18",
"quote 1.0.7",
"syn 1.0.33",
"syn-mid",
"version_check 0.9.2",
]
[[package]]
name = "proc-macro-hack"
version = "0.5.16"
@ -3981,42 +3942,12 @@ dependencies = [
"bytes",
]
[[package]]
name = "strsim"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
[[package]]
name = "strsim"
version = "0.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c"
[[package]]
name = "structopt"
version = "0.3.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "de2f5e239ee807089b62adce73e48c625e0ed80df02c7ab3f068f5db5281065c"
dependencies = [
"clap",
"lazy_static",
"structopt-derive",
]
[[package]]
name = "structopt-derive"
version = "0.4.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "510413f9de616762a4fbeab62509bf15c729603b72d7cd71280fbca431b1c118"
dependencies = [
"heck",
"proc-macro-error 1.0.3",
"proc-macro2 1.0.18",
"quote 1.0.7",
"syn 1.0.33",
]
[[package]]
name = "sum_type"
version = "0.2.0"
@ -4313,15 +4244,6 @@ dependencies = [
"serde",
]
[[package]]
name = "tools"
version = "0.1.0"
dependencies = [
"csv",
"structopt",
"veloren-common",
]
[[package]]
name = "tracing"
version = "0.1.15"
@ -4463,12 +4385,6 @@ dependencies = [
"smallvec 1.4.0",
]
[[package]]
name = "unicode-segmentation"
version = "1.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0"
[[package]]
name = "unicode-width"
version = "0.1.7"

View File

@ -171,7 +171,7 @@ impl Tool {
hit_entity: vec![
projectile::Effect::Damage((-40.0 * self.base_power()) as i32),
projectile::Effect::Knockback(10.0),
projectile::Effect::RewardEnergy(100),
projectile::Effect::RewardEnergy(50),
projectile::Effect::Vanish,
],
time_left: Duration::from_secs(15),
@ -261,7 +261,6 @@ impl Tool {
col: (0.85, 0.5, 0.11).into(),
..Default::default()
}),
projectile_gravity: None,
},
BasicRanged {

View File

@ -85,7 +85,7 @@ impl CharacterBehavior for Data {
if let Some(attack) = data.attacking {
if attack.applied && attack.hit_count > 0 {
data.updater.remove::<Attacking>(data.entity);
update.energy.change_by(100, EnergySource::HitEnemy);
update.energy.change_by(50, EnergySource::HitEnemy);
}
}

View File

@ -94,7 +94,7 @@ impl CharacterBehavior for Data {
if let Some(attack) = data.attacking {
if attack.applied && attack.hit_count > 0 {
data.updater.remove::<Attacking>(data.entity);
update.energy.change_by(100, EnergySource::HitEnemy);
update.energy.change_by(0, EnergySource::HitEnemy);
}
}

View File

@ -109,16 +109,6 @@ impl CharacterBehavior for Data {
},
};
// Handle hit applied
if let Some(attack) = data.attacking {
if attack.applied && attack.hit_count > 0 {
// Take energy on successful hit
update.energy.change_by(100, EnergySource::HitEnemy);
// Always remove component
data.updater.remove::<Attacking>(data.entity);
}
}
// Handling movement
if stage_time_active < Duration::from_millis(STAGE_DURATION / 3) {
let adjusted_accel = match (self.stage, data.physics.touch_entity.is_none()) {
@ -220,7 +210,7 @@ impl CharacterBehavior for Data {
if let Some(attack) = data.attacking {
if attack.applied && attack.hit_count > 0 {
data.updater.remove::<Attacking>(data.entity);
update.energy.change_by(100, EnergySource::HitEnemy);
update.energy.change_by(50, EnergySource::HitEnemy);
}
}