mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Made new skills for reworked bow.
Created migration to reset bow skills.
This commit is contained in:
parent
3f16d15bbb
commit
1014ac45bf
@ -26,7 +26,7 @@
|
||||
primary: "common.abilities.bow.charged",
|
||||
secondary: "common.abilities.bow.repeater",
|
||||
abilities: [
|
||||
(Some(Bow(UnlockRepeater)), "common.abilities.bow.shotgun"),
|
||||
(Some(Bow(UnlockShotgun)), "common.abilities.bow.shotgun"),
|
||||
],
|
||||
),
|
||||
Custom("Husk"): (
|
||||
|
@ -1,8 +1,8 @@
|
||||
ChargedRanged(
|
||||
energy_cost: 0,
|
||||
energy_drain: 0,
|
||||
initial_regen: 50,
|
||||
scaled_regen: 150,
|
||||
initial_regen: 0,
|
||||
scaled_regen: 200,
|
||||
initial_damage: 0,
|
||||
scaled_damage: 300,
|
||||
initial_knockback: 0.0,
|
||||
|
@ -2,6 +2,7 @@ BasicRanged(
|
||||
energy_cost: 350,
|
||||
buildup_duration: 0.4,
|
||||
recover_duration: 0.3,
|
||||
projectile_spread: 0.05,
|
||||
projectile: Arrow(
|
||||
damage: 50.0,
|
||||
knockback: 5.0,
|
||||
@ -10,5 +11,5 @@ BasicRanged(
|
||||
projectile_body: Object(Arrow),
|
||||
projectile_light: None,
|
||||
projectile_speed: 60.0,
|
||||
num_projectiles: 8,
|
||||
num_projectiles: 6,
|
||||
)
|
||||
|
@ -11,4 +11,5 @@ BasicRanged(
|
||||
projectile_light: None,
|
||||
projectile_speed: 100.0,
|
||||
num_projectiles: 1,
|
||||
projectile_spread: 0.0,
|
||||
)
|
||||
|
@ -15,4 +15,5 @@ BasicRanged(
|
||||
projectile_gravity: Some(Gravity(0.15)),
|
||||
projectile_speed: 60.0,
|
||||
num_projectiles: 1,
|
||||
projectile_spread: 0.0,
|
||||
)
|
||||
|
@ -15,4 +15,5 @@ BasicRanged(
|
||||
projectile_gravity: Some(Gravity(0.15)),
|
||||
projectile_speed: 60.0,
|
||||
num_projectiles: 1,
|
||||
projectile_spread: 0.0,
|
||||
)
|
||||
|
@ -11,4 +11,5 @@ BasicRanged(
|
||||
projectile_light: None,
|
||||
projectile_speed: 30.0,
|
||||
num_projectiles: 1,
|
||||
projectile_spread: 0.0,
|
||||
)
|
||||
|
@ -9,5 +9,6 @@ BasicRanged(
|
||||
projectile_body: Object(FireworkPurple),
|
||||
projectile_speed: 100.0,
|
||||
num_projectiles: 1,
|
||||
projectile_spread: 0.0,
|
||||
)
|
||||
|
||||
|
@ -14,4 +14,5 @@ BasicRanged(
|
||||
}),*/
|
||||
projectile_speed: 70.0,
|
||||
num_projectiles: 1,
|
||||
projectile_spread: 0.0,
|
||||
)
|
||||
|
@ -11,4 +11,5 @@ BasicRanged(
|
||||
projectile_light: None,
|
||||
projectile_speed: 130.0,
|
||||
num_projectiles: 1,
|
||||
projectile_spread: 0.0,
|
||||
)
|
||||
|
@ -13,4 +13,5 @@ BasicRanged(
|
||||
}),*/
|
||||
projectile_speed: 60.0,
|
||||
num_projectiles: 1,
|
||||
projectile_spread: 0.0,
|
||||
)
|
||||
|
@ -10,4 +10,5 @@ BasicRanged(
|
||||
}),*/
|
||||
projectile_speed: 100.0,
|
||||
num_projectiles: 1,
|
||||
projectile_spread: 0.0,
|
||||
)
|
@ -10,4 +10,5 @@ BasicRanged(
|
||||
projectile_body: Object(BoltFire),
|
||||
projectile_speed: 60.0,
|
||||
num_projectiles: 1,
|
||||
projectile_spread: 0.0,
|
||||
)
|
||||
|
@ -14,4 +14,5 @@ BasicRanged(
|
||||
}),*/
|
||||
projectile_speed: 60.0,
|
||||
num_projectiles: 1,
|
||||
projectile_spread: 0.0,
|
||||
)
|
||||
|
@ -36,17 +36,18 @@
|
||||
Hammer(LKnockback): Some(2),
|
||||
Hammer(LRange): Some(2),
|
||||
Bow(ProjSpeed): Some(2),
|
||||
Bow(BDamage): Some(3),
|
||||
Bow(BRegen): Some(2),
|
||||
Bow(CDamage): Some(3),
|
||||
Bow(CRegen): Some(2),
|
||||
Bow(CKnockback): Some(2),
|
||||
Bow(CProjSpeed): Some(2),
|
||||
Bow(CDrain): Some(2),
|
||||
Bow(CSpeed): Some(2),
|
||||
Bow(CMove): Some(2),
|
||||
Bow(RDamage): Some(2),
|
||||
Bow(RArrows): Some(2),
|
||||
Bow(RDamage): Some(3),
|
||||
Bow(RCost): Some(2),
|
||||
Bow(RSpeed): Some(2),
|
||||
Bow(SDamage): Some(2),
|
||||
Bow(SCost): Some(2),
|
||||
Bow(SArrows): Some(2),
|
||||
Bow(SSpread): Some(2),
|
||||
Staff(BDamage): Some(3),
|
||||
Staff(BRegen): Some(2),
|
||||
Staff(BRadius): Some(3),
|
||||
|
@ -12,10 +12,10 @@
|
||||
Hammer(LDistance): {Hammer(UnlockLeap): None},
|
||||
Hammer(LKnockback): {Hammer(UnlockLeap): None},
|
||||
Hammer(LRange): {Hammer(UnlockLeap): None},
|
||||
Bow(RDamage): {Bow(UnlockRepeater): None},
|
||||
Bow(RGlide): {Bow(UnlockRepeater): None},
|
||||
Bow(RArrows): {Bow(UnlockRepeater): None},
|
||||
Bow(RCost): {Bow(UnlockRepeater): None},
|
||||
Bow(SDamage): {Bow(UnlockShotgun): None},
|
||||
Bow(SCost): {Bow(UnlockShotgun): None},
|
||||
Bow(SArrows): {Bow(UnlockShotgun): None},
|
||||
Bow(SSpread): {Bow(UnlockShotgun): None},
|
||||
Staff(SDamage): {Staff(UnlockShockwave): None},
|
||||
Staff(SKnockback): {Staff(UnlockShockwave): None},
|
||||
Staff(SRange): {Staff(UnlockShockwave): None},
|
||||
|
@ -67,19 +67,19 @@
|
||||
],
|
||||
Weapon(Bow): [
|
||||
Bow(ProjSpeed),
|
||||
Bow(BDamage),
|
||||
Bow(BRegen),
|
||||
Bow(CDamage),
|
||||
Bow(CRegen),
|
||||
Bow(CKnockback),
|
||||
Bow(CProjSpeed),
|
||||
Bow(CDrain),
|
||||
Bow(CSpeed),
|
||||
Bow(CMove),
|
||||
Bow(UnlockRepeater),
|
||||
Bow(RDamage),
|
||||
Bow(RGlide),
|
||||
Bow(RArrows),
|
||||
Bow(RCost),
|
||||
Bow(RSpeed),
|
||||
Bow(UnlockShotgun),
|
||||
Bow(SDamage),
|
||||
Bow(SCost),
|
||||
Bow(SArrows),
|
||||
Bow(SSpread),
|
||||
],
|
||||
Weapon(Staff): [
|
||||
Staff(BDamage),
|
||||
|
@ -104,36 +104,36 @@
|
||||
// Bow
|
||||
"hud.skill.bow_projectile_speed_title" : "Projectile Speed",
|
||||
"hud.skill.bow_projectile_speed" : "Allows you to shoot arrows further, faster, by 30%{SP}",
|
||||
"hud.skill.bow_arrow_count_title" : "Arrow Count",
|
||||
"hud.skill.bow_arrow_count" : "shoot an additional arrow when you leap{SP}",
|
||||
"hud.skill.bow_repeater_cost_title" : "Repeater Cost",
|
||||
"hud.skill.bow_repeater_cost" : "Decreases the energy cost to become a gliding repeater by 30%{SP}",
|
||||
"hud.skill.bow_repeater_glide_title" : "Repeater Glide",
|
||||
"hud.skill.bow_repeater_glide" : "Glide further while repeating{SP}",
|
||||
"hud.skill.bow_repeater_damage_title" : "Repeater Damage",
|
||||
"hud.skill.bow_repeater_damage" : "Increases the damage done by 40%{SP}",
|
||||
"hud.skill.bow_repeater_unlock_title" : "Repeater Unlock",
|
||||
"hud.skill.bow_repeater_unlock" : "Unlocks the ability to leap in the air and shoot a barrage of arrows{SP}",
|
||||
"hud.skill.bow_charged_title" : "Charged Shoot",
|
||||
"hud.skill.bow_charged" : "Because you waited longer",
|
||||
"hud.skill.bow_charged_knockback_title" : "Charged Knockback",
|
||||
"hud.skill.bow_charged_knockback" : "Knock enemies further back by 25%{SP}",
|
||||
"hud.skill.bow_charged_move_speed_title" : "Charged Move Speed",
|
||||
"hud.skill.bow_charged_move_speed" : "Increases how fast you can shuffle while charging the attack by 25%{SP}",
|
||||
"hud.skill.bow_charged_speed_title" : "Charged Speed",
|
||||
"hud.skill.bow_charged_speed" : "Increases the rate that you charge the attack by 10%{SP}",
|
||||
"hud.skill.bow_charged_projectile_speed_title" : "Charged Projectile Speed",
|
||||
"hud.skill.bow_charged_projectile_speed" : "Projectile speed increased by an additional 20% while charging{SP}",
|
||||
"hud.skill.bow_charged_drain_title" : "Charged Drain",
|
||||
"hud.skill.bow_charged_drain" : "Decreases the rate of stamina drain by 15%{SP}",
|
||||
"hud.skill.bow_charged_damage_title" : "Charged Damage",
|
||||
"hud.skill.bow_charged_damage" : "Increases damage by 20%{SP}",
|
||||
"hud.skill.bow_energy_regen_title" : "Energy Regen",
|
||||
"hud.skill.bow_energy_regen" : "Increases stamina gain by 40%{SP}",
|
||||
"hud.skill.bow_title" : "Arrow Shoot",
|
||||
"hud.skill.bow" : "Infinite quiver included, not suitable for children",
|
||||
"hud.skill.bow_damage_title" : "Damage",
|
||||
"hud.skill.bow_damage" : "Increases damage by 25%{SP}",
|
||||
"hud.skill.bow_charged_energy_regen_title" : "Charged Regen",
|
||||
"hud.skill.bow_charged_energy_regen" : "Increases stamina recovery by 20%{SP}",
|
||||
"hud.skill.bow_charged_knockback_title" : "Charged Knockback",
|
||||
"hud.skill.bow_charged_knockback" : "Knock enemies further back by 20%{SP}",
|
||||
"hud.skill.bow_charged_speed_title" : "Charged Speed",
|
||||
"hud.skill.bow_charged_speed" : "Increases the rate that you charge the attack by 10%{SP}",
|
||||
"hud.skill.bow_charged_move_title" : "Charged Move Speed",
|
||||
"hud.skill.bow_charged_move" : "Increases how fast you can shuffle while charging the attack by 20%{SP}",
|
||||
"hud.skill.bow_repeater_title" : "Repeater",
|
||||
"hud.skill.bow_repeater" : "Shoots faster the longer you fire for",
|
||||
"hud.skill.bow_repeater_damage_title" : "Repeater Damage",
|
||||
"hud.skill.bow_repeater_damage" : "Increases the damage done by 20%{SP}",
|
||||
"hud.skill.bow_repeater_cost_title" : "Repeater Cost",
|
||||
"hud.skill.bow_repeater_cost" : "Decreases the energy cost to become a repeater by 20%{SP}",
|
||||
"hud.skill.bow_repeater_speed_title" : "Repeater Speed",
|
||||
"hud.skill.bow_repeater_speed" : "Increases the rate at which you fire arrows by 20%{SP}",
|
||||
"hud.skill.bow_shotgun_unlock_title" : "Unlocks Shotgun",
|
||||
"hud.skill.bow_shotgun_unlock" : "Unlocks ability to fire multiple arrows at once{SP}",
|
||||
"hud.skill.bow_shotgun_damage_title" : "Shotgun Damage",
|
||||
"hud.skill.bow_shotgun_damage" : "Increases the damage done by 20%{SP}",
|
||||
"hud.skill.bow_shotgun_cost_title" : "Shotgun Cost",
|
||||
"hud.skill.bow_shotgun_cost" : "Decreases the cost of shotgun by 20%{SP}",
|
||||
"hud.skill.bow_shotgun_arrow_count_title" : "Shotgun Arrows",
|
||||
"hud.skill.bow_shotgun_arrow_count" : "Increases the number of arrows in the burst by 1{SP}",
|
||||
"hud.skill.bow_shotgun_spread_title" : "Shotgun Spread",
|
||||
"hud.skill.bow_shotgun_spread" : "Decreases the spread of the arrows by 20%{SP}",
|
||||
// Hammer
|
||||
"hud.skill.hmr_leap_radius_title" : "Leap Radius",
|
||||
"hud.skill.hmr_leap_radius" : "Increases attack radius on ground slam by 1 meter{SP}",
|
||||
|
@ -80,6 +80,7 @@ pub enum CharacterAbility {
|
||||
projectile_light: Option<LightEmitter>,
|
||||
projectile_speed: f32,
|
||||
num_projectiles: u32,
|
||||
projectile_spread: f32,
|
||||
},
|
||||
RepeaterRanged {
|
||||
energy_cost: f32,
|
||||
@ -938,77 +939,81 @@ impl CharacterAbility {
|
||||
Some(ToolKind::Bow) => {
|
||||
use skills::BowSkill::*;
|
||||
match self {
|
||||
BasicRanged {
|
||||
ref mut projectile,
|
||||
ref mut projectile_speed,
|
||||
..
|
||||
} => {
|
||||
if let Ok(Some(level)) = skillset.skill_level(Bow(ProjSpeed)) {
|
||||
*projectile_speed *= 1.3_f32.powi(level.into());
|
||||
}
|
||||
let damage_level = skillset
|
||||
.skill_level(Bow(BDamage))
|
||||
.unwrap_or(None)
|
||||
.unwrap_or(0);
|
||||
let regen_level = skillset
|
||||
.skill_level(Bow(BRegen))
|
||||
.unwrap_or(None)
|
||||
.unwrap_or(0);
|
||||
let power = 1.20_f32.powi(damage_level.into());
|
||||
let regen = 1.4_f32.powi(regen_level.into());
|
||||
*projectile = projectile.modified_projectile(power, regen, 1_f32);
|
||||
},
|
||||
ChargedRanged {
|
||||
ref mut scaled_damage,
|
||||
ref mut scaled_regen,
|
||||
ref mut scaled_knockback,
|
||||
ref mut energy_drain,
|
||||
ref mut speed,
|
||||
ref mut move_speed,
|
||||
ref mut initial_projectile_speed,
|
||||
ref mut scaled_projectile_speed,
|
||||
ref mut move_speed,
|
||||
..
|
||||
} => {
|
||||
if let Ok(Some(level)) = skillset.skill_level(Bow(ProjSpeed)) {
|
||||
*initial_projectile_speed *= 1.3_f32.powi(level.into());
|
||||
let projectile_speed_scaling = 1.2_f32.powi(level.into());
|
||||
*initial_projectile_speed *= projectile_speed_scaling;
|
||||
*scaled_projectile_speed *= projectile_speed_scaling;
|
||||
}
|
||||
if let Ok(Some(level)) = skillset.skill_level(Bow(CDamage)) {
|
||||
*scaled_damage *= 1.2_f32.powi(level.into());
|
||||
}
|
||||
if let Ok(Some(level)) = skillset.skill_level(Bow(CRegen)) {
|
||||
*scaled_regen *= 1.2_f32.powi(level.into());
|
||||
}
|
||||
if let Ok(Some(level)) = skillset.skill_level(Bow(CKnockback)) {
|
||||
*scaled_knockback *= 1.25_f32.powi(level.into());
|
||||
}
|
||||
if let Ok(Some(level)) = skillset.skill_level(Bow(CProjSpeed)) {
|
||||
*scaled_projectile_speed *= 1.2_f32.powi(level.into());
|
||||
}
|
||||
if let Ok(Some(level)) = skillset.skill_level(Bow(CDrain)) {
|
||||
*energy_drain *= 0.85_f32.powi(level.into());
|
||||
*scaled_knockback *= 1.2_f32.powi(level.into());
|
||||
}
|
||||
if let Ok(Some(level)) = skillset.skill_level(Bow(CSpeed)) {
|
||||
*speed *= 1.10_f32.powi(level.into());
|
||||
*speed *= 1.1_f32.powi(level.into());
|
||||
}
|
||||
if let Ok(Some(level)) = skillset.skill_level(Bow(CMove)) {
|
||||
*move_speed *= 1.25_f32.powi(level.into());
|
||||
*move_speed *= 1.2_f32.powi(level.into());
|
||||
}
|
||||
},
|
||||
RepeaterRanged {
|
||||
ref mut energy_cost,
|
||||
ref mut buildup_duration,
|
||||
ref mut projectile,
|
||||
ref mut max_speed,
|
||||
ref mut projectile_speed,
|
||||
..
|
||||
} => {
|
||||
if let Ok(Some(level)) = skillset.skill_level(Bow(ProjSpeed)) {
|
||||
*projectile_speed *= 1.3_f32.powi(level.into());
|
||||
*projectile_speed *= 1.2_f32.powi(level.into());
|
||||
}
|
||||
if let Ok(Some(level)) = skillset.skill_level(Bow(RDamage)) {
|
||||
let power = 1.4_f32.powi(level.into());
|
||||
let power = 1.2_f32.powi(level.into());
|
||||
*projectile = projectile.modified_projectile(power, 1_f32, 1_f32);
|
||||
}
|
||||
if !skillset.has_skill(Bow(RGlide)) {
|
||||
*buildup_duration = 0.001;
|
||||
}
|
||||
if let Ok(Some(level)) = skillset.skill_level(Bow(RCost)) {
|
||||
*energy_cost *= 0.70_f32.powi(level.into());
|
||||
*energy_cost *= 0.8_f32.powi(level.into());
|
||||
}
|
||||
if let Ok(Some(level)) = skillset.skill_level(Bow(RSpeed)) {
|
||||
*max_speed *= 1.2_f32.powi(level.into());
|
||||
}
|
||||
},
|
||||
BasicRanged {
|
||||
ref mut projectile,
|
||||
ref mut energy_cost,
|
||||
ref mut num_projectiles,
|
||||
ref mut projectile_spread,
|
||||
ref mut projectile_speed,
|
||||
..
|
||||
} => {
|
||||
if let Ok(Some(level)) = skillset.skill_level(Bow(ProjSpeed)) {
|
||||
*projectile_speed *= 1.2_f32.powi(level.into());
|
||||
}
|
||||
if let Ok(Some(level)) = skillset.skill_level(Bow(SDamage)) {
|
||||
let power = 1.2_f32.powi(level.into());
|
||||
*projectile = projectile.modified_projectile(power, 1_f32, 1_f32);
|
||||
}
|
||||
if let Ok(Some(level)) = skillset.skill_level(Bow(SCost)) {
|
||||
*energy_cost *= 0.8_f32.powi(level.into());
|
||||
}
|
||||
if let Ok(Some(level)) = skillset.skill_level(Bow(SArrows)) {
|
||||
*num_projectiles += level as u32;
|
||||
}
|
||||
if let Ok(Some(level)) = skillset.skill_level(Bow(SSpread)) {
|
||||
*projectile_spread *= 0.8_f32.powi(level.into());
|
||||
}
|
||||
},
|
||||
_ => {},
|
||||
@ -1224,6 +1229,7 @@ impl From<(&CharacterAbility, AbilityInfo)> for CharacterState {
|
||||
projectile_speed,
|
||||
energy_cost: _,
|
||||
num_projectiles,
|
||||
projectile_spread,
|
||||
} => CharacterState::BasicRanged(basic_ranged::Data {
|
||||
static_data: basic_ranged::StaticData {
|
||||
buildup_duration: Duration::from_secs_f32(*buildup_duration),
|
||||
@ -1233,6 +1239,7 @@ impl From<(&CharacterAbility, AbilityInfo)> for CharacterState {
|
||||
projectile_light: *projectile_light,
|
||||
projectile_speed: *projectile_speed,
|
||||
num_projectiles: *num_projectiles,
|
||||
projectile_spread: *projectile_spread,
|
||||
ability_info,
|
||||
},
|
||||
timer: Duration::default(),
|
||||
|
@ -183,22 +183,22 @@ pub enum HammerSkill {
|
||||
pub enum BowSkill {
|
||||
// Passives
|
||||
ProjSpeed,
|
||||
// Basic ranged upgrades
|
||||
BDamage,
|
||||
BRegen,
|
||||
// Charged ranged upgrades
|
||||
// Charged upgrades
|
||||
CDamage,
|
||||
CRegen,
|
||||
CKnockback,
|
||||
CProjSpeed,
|
||||
CDrain,
|
||||
CSpeed,
|
||||
CMove,
|
||||
// Repeater upgrades
|
||||
UnlockRepeater,
|
||||
RDamage,
|
||||
RGlide,
|
||||
RArrows,
|
||||
RCost,
|
||||
RSpeed,
|
||||
// Shotgun upgrades
|
||||
UnlockShotgun,
|
||||
SDamage,
|
||||
SCost,
|
||||
SArrows,
|
||||
SSpread,
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, Serialize, Deserialize)]
|
||||
|
@ -51,11 +51,11 @@ impl SkillSetBuilder {
|
||||
// Bow
|
||||
Self::default()
|
||||
.with_skill_group(SkillGroupKind::Weapon(ToolKind::Bow))
|
||||
.with_skill(Skill::Bow(BowSkill::BDamage), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CDamage), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CKnockback), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CSpeed), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CMove), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::RDamage), Some(1))
|
||||
},
|
||||
_ => Self::default(),
|
||||
}
|
||||
@ -66,11 +66,11 @@ impl SkillSetBuilder {
|
||||
// Bow
|
||||
Self::default()
|
||||
.with_skill_group(SkillGroupKind::Weapon(ToolKind::Bow))
|
||||
.with_skill(Skill::Bow(BowSkill::BDamage), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CDamage), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CKnockback), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CSpeed), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CMove), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::RDamage), Some(1))
|
||||
},
|
||||
_ => Self::default(),
|
||||
}
|
||||
@ -81,11 +81,11 @@ impl SkillSetBuilder {
|
||||
// Bow
|
||||
Self::default()
|
||||
.with_skill_group(SkillGroupKind::Weapon(ToolKind::Bow))
|
||||
.with_skill(Skill::Bow(BowSkill::BDamage), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CDamage), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CKnockback), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CSpeed), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CMove), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::RDamage), Some(1))
|
||||
},
|
||||
_ => Self::default(),
|
||||
}
|
||||
@ -96,11 +96,11 @@ impl SkillSetBuilder {
|
||||
// Bow
|
||||
Self::default()
|
||||
.with_skill_group(SkillGroupKind::Weapon(ToolKind::Bow))
|
||||
.with_skill(Skill::Bow(BowSkill::BDamage), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CDamage), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CKnockback), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CSpeed), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CMove), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::RDamage), Some(1))
|
||||
},
|
||||
_ => Self::default(),
|
||||
}
|
||||
@ -111,11 +111,11 @@ impl SkillSetBuilder {
|
||||
// Bow
|
||||
Self::default()
|
||||
.with_skill_group(SkillGroupKind::Weapon(ToolKind::Bow))
|
||||
.with_skill(Skill::Bow(BowSkill::BDamage), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CDamage), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CKnockback), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CSpeed), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CMove), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::RDamage), Some(1))
|
||||
},
|
||||
_ => Self::default(),
|
||||
}
|
||||
@ -176,11 +176,11 @@ impl SkillSetBuilder {
|
||||
// Bow
|
||||
Self::default()
|
||||
.with_skill_group(SkillGroupKind::Weapon(ToolKind::Bow))
|
||||
.with_skill(Skill::Bow(BowSkill::BDamage), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::ProjSpeed), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CDamage), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CKnockback), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CProjSpeed), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::RDamage), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::RSpeed), Some(1))
|
||||
},
|
||||
Some(ToolKind::Staff) => {
|
||||
// Staff
|
||||
@ -234,13 +234,13 @@ impl SkillSetBuilder {
|
||||
// Bow
|
||||
Self::default()
|
||||
.with_skill_group(SkillGroupKind::Weapon(ToolKind::Bow))
|
||||
.with_skill(Skill::Bow(BowSkill::BDamage), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CDamage), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CKnockback), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CSpeed), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CMove), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::UnlockRepeater), None)
|
||||
.with_skill(Skill::Bow(BowSkill::RArrows), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::RDamage), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::UnlockShotgun), None)
|
||||
.with_skill(Skill::Bow(BowSkill::SArrows), Some(1))
|
||||
},
|
||||
Some(ToolKind::Staff) => {
|
||||
// Staff
|
||||
@ -303,14 +303,14 @@ impl SkillSetBuilder {
|
||||
// Bow
|
||||
Self::default()
|
||||
.with_skill_group(SkillGroupKind::Weapon(ToolKind::Bow))
|
||||
.with_skill(Skill::Bow(BowSkill::BDamage), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::ProjSpeed), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::BRegen), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CDamage), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CDrain), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CRegen), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CSpeed), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::UnlockRepeater), None)
|
||||
.with_skill(Skill::Bow(BowSkill::RGlide), None)
|
||||
.with_skill(Skill::Bow(BowSkill::RDamage), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::RCost), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::UnlockShotgun), None)
|
||||
.with_skill(Skill::Bow(BowSkill::SCost), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::RCost), Some(1))
|
||||
},
|
||||
Some(ToolKind::Staff) => {
|
||||
@ -376,16 +376,16 @@ impl SkillSetBuilder {
|
||||
// Bow
|
||||
Self::default()
|
||||
.with_skill_group(SkillGroupKind::Weapon(ToolKind::Bow))
|
||||
.with_skill(Skill::Bow(BowSkill::BDamage), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::ProjSpeed), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CDamage), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CKnockback), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CProjSpeed), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CDrain), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::UnlockRepeater), None)
|
||||
.with_skill(Skill::Bow(BowSkill::RDamage), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::RGlide), None)
|
||||
.with_skill(Skill::Bow(BowSkill::RArrows), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::RSpeed), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::RCost), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::UnlockShotgun), None)
|
||||
.with_skill(Skill::Bow(BowSkill::SDamage), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::SArrows), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::SSpread), Some(1))
|
||||
},
|
||||
Some(ToolKind::Staff) => {
|
||||
// Staff
|
||||
@ -453,16 +453,16 @@ impl SkillSetBuilder {
|
||||
// Bow
|
||||
Self::default()
|
||||
.with_skill_group(SkillGroupKind::Weapon(ToolKind::Bow))
|
||||
.with_skill(Skill::Bow(BowSkill::BDamage), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CDamage), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CKnockback), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CProjSpeed), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CDrain), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::UnlockRepeater), None)
|
||||
.with_skill(Skill::Bow(BowSkill::CSpeed), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::RDamage), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::RGlide), None)
|
||||
.with_skill(Skill::Bow(BowSkill::RArrows), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::RCost), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::UnlockShotgun), None)
|
||||
.with_skill(Skill::Bow(BowSkill::SDamage), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::SSpread), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::SArrows), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::SCost), Some(1))
|
||||
},
|
||||
Some(ToolKind::Staff) => {
|
||||
// Staff
|
||||
@ -536,18 +536,18 @@ impl SkillSetBuilder {
|
||||
// Bow
|
||||
Self::default()
|
||||
.with_skill_group(SkillGroupKind::Weapon(ToolKind::Bow))
|
||||
.with_skill(Skill::Bow(BowSkill::BDamage), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::BRegen), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CDamage), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CRegen), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CKnockback), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CProjSpeed), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CSpeed), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CMove), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::UnlockRepeater), None)
|
||||
.with_skill(Skill::Bow(BowSkill::RDamage), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::RGlide), None)
|
||||
.with_skill(Skill::Bow(BowSkill::RArrows), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::RCost), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::RSpeed), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::UnlockShotgun), None)
|
||||
.with_skill(Skill::Bow(BowSkill::SDamage), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::SSpread), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::SArrows), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::SCost), Some(1))
|
||||
},
|
||||
Some(ToolKind::Staff) => {
|
||||
// Staff
|
||||
@ -629,20 +629,20 @@ impl SkillSetBuilder {
|
||||
// Bow
|
||||
Self::default()
|
||||
.with_skill_group(SkillGroupKind::Weapon(ToolKind::Bow))
|
||||
.with_skill(Skill::Bow(BowSkill::BDamage), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::ProjSpeed), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::BRegen), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CDamage), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CRegen), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CKnockback), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CProjSpeed), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CDrain), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CSpeed), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::CMove), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::UnlockRepeater), None)
|
||||
.with_skill(Skill::Bow(BowSkill::RDamage), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::RGlide), None)
|
||||
.with_skill(Skill::Bow(BowSkill::RArrows), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::RSpeed), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::RCost), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::UnlockShotgun), None)
|
||||
.with_skill(Skill::Bow(BowSkill::SDamage), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::SSpread), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::SArrows), Some(1))
|
||||
.with_skill(Skill::Bow(BowSkill::SCost), Some(1))
|
||||
},
|
||||
Some(ToolKind::Staff) => {
|
||||
// Staff
|
||||
|
@ -18,6 +18,8 @@ pub struct StaticData {
|
||||
pub buildup_duration: Duration,
|
||||
/// How long the state has until exiting
|
||||
pub recover_duration: Duration,
|
||||
/// How much spread there is when more than 1 projectile is created
|
||||
pub projectile_spread: f32,
|
||||
/// Projectile variables
|
||||
pub projectile: ProjectileConstructor,
|
||||
pub projectile_body: Body,
|
||||
@ -82,7 +84,9 @@ impl CharacterBehavior for Data {
|
||||
);
|
||||
for i in 0..self.static_data.num_projectiles {
|
||||
let dir = Dir::from_unnormalized(data.inputs.look_dir.map(|x| {
|
||||
let offset = (2.0 * thread_rng().gen::<f32>() - 1.0) * 0.03 * i as f32;
|
||||
let offset = (2.0 * thread_rng().gen::<f32>() - 1.0)
|
||||
* self.static_data.projectile_spread
|
||||
* i as f32;
|
||||
x + offset
|
||||
}))
|
||||
.unwrap_or(data.inputs.look_dir);
|
||||
|
19
server/src/migrations/V38__reset_bow_skills.sql
Normal file
19
server/src/migrations/V38__reset_bow_skills.sql
Normal file
@ -0,0 +1,19 @@
|
||||
-- Resets bow skill tree by deleting bow skills and setting available skill points to earned skill points
|
||||
-- Deletes all bow skills, does not delete unlock bow skill
|
||||
DELETE FROM skill WHERE skill = 'Bow ProjSpeed';
|
||||
DELETE FROM skill WHERE skill = 'Bow BDamage';
|
||||
DELETE FROM skill WHERE skill = 'Bow BRegen';
|
||||
DELETE FROM skill WHERE skill = 'Bow CDamage';
|
||||
DELETE FROM skill WHERE skill = 'Bow CKnockback';
|
||||
DELETE FROM skill WHERE skill = 'Bow CProjSpeed';
|
||||
DELETE FROM skill WHERE skill = 'Bow CDrain';
|
||||
DELETE FROM skill WHERE skill = 'Bow CSpeed';
|
||||
DELETE FROM skill WHERE skill = 'Bow CMove';
|
||||
DELETE FROM skill WHERE skill = 'Bow UnlockRepeater';
|
||||
DELETE FROM skill WHERE skill = 'Bow RDamage';
|
||||
DELETE FROM skill WHERE skill = 'Bow RGlide';
|
||||
DELETE FROM skill WHERE skill = 'Bow RArrows';
|
||||
DELETE FROM skill WHERE skill = 'Bow RCost';
|
||||
-- Resets available skill points to earned skill points for bow skill tree
|
||||
UPDATE skill_group
|
||||
SET available_sp = earned_sp WHERE skill_group_kind = 'Weapon Bow';
|
@ -92,19 +92,19 @@ pub fn skill_to_db_string(skill: comp::skills::Skill) -> String {
|
||||
Hammer(HammerSkill::LKnockback) => "Hammer LKnockback",
|
||||
Hammer(HammerSkill::LRange) => "Hammer LRange",
|
||||
Bow(BowSkill::ProjSpeed) => "Bow ProjSpeed",
|
||||
Bow(BowSkill::BDamage) => "Bow BDamage",
|
||||
Bow(BowSkill::BRegen) => "Bow BRegen",
|
||||
Bow(BowSkill::CDamage) => "Bow CDamage",
|
||||
Bow(BowSkill::CRegen) => "Bow CRegen",
|
||||
Bow(BowSkill::CKnockback) => "Bow CKnockback",
|
||||
Bow(BowSkill::CProjSpeed) => "Bow CProjSpeed",
|
||||
Bow(BowSkill::CDrain) => "Bow CDrain",
|
||||
Bow(BowSkill::CSpeed) => "Bow CSpeed",
|
||||
Bow(BowSkill::CMove) => "Bow CMove",
|
||||
Bow(BowSkill::UnlockRepeater) => "Bow UnlockRepeater",
|
||||
Bow(BowSkill::RDamage) => "Bow RDamage",
|
||||
Bow(BowSkill::RGlide) => "Bow RGlide",
|
||||
Bow(BowSkill::RArrows) => "Bow RArrows",
|
||||
Bow(BowSkill::RCost) => "Bow RCost",
|
||||
Bow(BowSkill::RSpeed) => "Bow RSpeed",
|
||||
Bow(BowSkill::UnlockShotgun) => "Bow UnlockShotgun",
|
||||
Bow(BowSkill::SDamage) => "Bow SDamage",
|
||||
Bow(BowSkill::SCost) => "Bow SCost",
|
||||
Bow(BowSkill::SArrows) => "Bow SArrows",
|
||||
Bow(BowSkill::SSpread) => "Bow SSpread",
|
||||
Staff(StaffSkill::BDamage) => "Staff BDamage",
|
||||
Staff(StaffSkill::BRegen) => "Staff BRegen",
|
||||
Staff(StaffSkill::BRadius) => "Staff BRadius",
|
||||
@ -212,19 +212,19 @@ pub fn db_string_to_skill(skill_string: &str) -> comp::skills::Skill {
|
||||
"Hammer LKnockback" => Hammer(HammerSkill::LKnockback),
|
||||
"Hammer LRange" => Hammer(HammerSkill::LRange),
|
||||
"Bow ProjSpeed" => Bow(BowSkill::ProjSpeed),
|
||||
"Bow BDamage" => Bow(BowSkill::BDamage),
|
||||
"Bow BRegen" => Bow(BowSkill::BRegen),
|
||||
"Bow CDamage" => Bow(BowSkill::CDamage),
|
||||
"Bow CRegen" => Bow(BowSkill::CRegen),
|
||||
"Bow CKnockback" => Bow(BowSkill::CKnockback),
|
||||
"Bow CProjSpeed" => Bow(BowSkill::CProjSpeed),
|
||||
"Bow CDrain" => Bow(BowSkill::CDrain),
|
||||
"Bow CSpeed" => Bow(BowSkill::CSpeed),
|
||||
"Bow CMove" => Bow(BowSkill::CMove),
|
||||
"Bow UnlockRepeater" => Bow(BowSkill::UnlockRepeater),
|
||||
"Bow RDamage" => Bow(BowSkill::RDamage),
|
||||
"Bow RGlide" => Bow(BowSkill::RGlide),
|
||||
"Bow RArrows" => Bow(BowSkill::RArrows),
|
||||
"Bow RCost" => Bow(BowSkill::RCost),
|
||||
"Bow RSpeed" => Bow(BowSkill::RSpeed),
|
||||
"Bow UnlockShotgun" => Bow(BowSkill::UnlockShotgun),
|
||||
"Bow SDamage" => Bow(BowSkill::SDamage),
|
||||
"Bow SCost" => Bow(BowSkill::SCost),
|
||||
"Bow SArrows" => Bow(BowSkill::SArrows),
|
||||
"Bow SSpread" => Bow(BowSkill::SSpread),
|
||||
"Staff BDamage" => Staff(StaffSkill::BDamage),
|
||||
"Staff BRegen" => Staff(StaffSkill::BRegen),
|
||||
"Staff BRadius" => Staff(StaffSkill::BRadius),
|
||||
|
@ -2091,7 +2091,7 @@ impl<'a> AgentData<'a> {
|
||||
agent.action_state.timer += read_data.dt.0;
|
||||
} else if self
|
||||
.skill_set
|
||||
.has_skill(Skill::Bow(BowSkill::UnlockRepeater))
|
||||
.has_skill(Skill::Bow(BowSkill::UnlockShotgun))
|
||||
&& self.energy.current() > 400
|
||||
&& thread_rng().gen_bool(0.8)
|
||||
{
|
||||
|
@ -102,21 +102,21 @@ widget_ids! {
|
||||
skill_hammer_leap_4,
|
||||
skill_hammer_leap_5,
|
||||
bow_render,
|
||||
skill_bow_basic_0,
|
||||
skill_bow_basic_1,
|
||||
skill_bow_basic_2,
|
||||
skill_bow_charged_0,
|
||||
skill_bow_charged_1,
|
||||
skill_bow_charged_2,
|
||||
skill_bow_charged_3,
|
||||
skill_bow_charged_4,
|
||||
skill_bow_charged_5,
|
||||
skill_bow_charged_6,
|
||||
skill_bow_repeater_0,
|
||||
skill_bow_repeater_1,
|
||||
skill_bow_repeater_2,
|
||||
skill_bow_repeater_3,
|
||||
skill_bow_repeater_4,
|
||||
skill_bow_shotgun_0,
|
||||
skill_bow_shotgun_1,
|
||||
skill_bow_shotgun_2,
|
||||
skill_bow_shotgun_3,
|
||||
skill_bow_shotgun_4,
|
||||
skill_bow_passive_0,
|
||||
staff_render,
|
||||
skill_staff_basic_0,
|
||||
@ -538,7 +538,7 @@ impl<'a> Widget for Diary<'a> {
|
||||
SelectedSkillTree::Weapon(ToolKind::Sword) => 5,
|
||||
SelectedSkillTree::Weapon(ToolKind::Axe) => 5,
|
||||
SelectedSkillTree::Weapon(ToolKind::Hammer) => 5,
|
||||
SelectedSkillTree::Weapon(ToolKind::Bow) => 3,
|
||||
SelectedSkillTree::Weapon(ToolKind::Bow) => 6,
|
||||
SelectedSkillTree::Weapon(ToolKind::Staff) => 4,
|
||||
SelectedSkillTree::Weapon(ToolKind::Sceptre) => 5,
|
||||
_ => 0,
|
||||
@ -548,7 +548,7 @@ impl<'a> Widget for Diary<'a> {
|
||||
SelectedSkillTree::Weapon(ToolKind::Sword) => 7,
|
||||
SelectedSkillTree::Weapon(ToolKind::Axe) => 6,
|
||||
SelectedSkillTree::Weapon(ToolKind::Hammer) => 5,
|
||||
SelectedSkillTree::Weapon(ToolKind::Bow) => 7,
|
||||
SelectedSkillTree::Weapon(ToolKind::Bow) => 4,
|
||||
SelectedSkillTree::Weapon(ToolKind::Staff) => 5,
|
||||
SelectedSkillTree::Weapon(ToolKind::Sceptre) => 4,
|
||||
_ => 0,
|
||||
@ -2507,72 +2507,6 @@ impl<'a> Widget for Diary<'a> {
|
||||
Button::image(self.imgs.bow_m1)
|
||||
.w_h(74.0, 74.0)
|
||||
.mid_top_with_margin_on(state.skills_top_l[0], 3.0)
|
||||
.with_tooltip(
|
||||
self.tooltip_manager,
|
||||
&self.localized_strings.get("hud.skill.bow_title"),
|
||||
&self.localized_strings.get("hud.skill.bow"),
|
||||
&diary_tooltip,
|
||||
TEXT_COLOR,
|
||||
)
|
||||
.set(state.skill_bow_basic_0, ui);
|
||||
let skill = Skill::Bow(BDamage);
|
||||
if create_skill_button(
|
||||
self.imgs.physical_damage_skill,
|
||||
state.skills_top_l[1],
|
||||
&self.skill_set,
|
||||
skill,
|
||||
self.fonts,
|
||||
&get_skill_label(skill, &self.skill_set),
|
||||
)
|
||||
.with_tooltip(
|
||||
self.tooltip_manager,
|
||||
&self.localized_strings.get("hud.skill.bow_damage_title"),
|
||||
&add_sp_cost_tooltip(
|
||||
&self.localized_strings.get("hud.skill.bow_damage"),
|
||||
skill,
|
||||
&self.skill_set,
|
||||
&self.localized_strings,
|
||||
),
|
||||
&diary_tooltip,
|
||||
TEXT_COLOR,
|
||||
)
|
||||
.set(state.skill_bow_basic_1, ui)
|
||||
.was_clicked()
|
||||
{
|
||||
events.push(Event::UnlockSkill(skill));
|
||||
};
|
||||
let skill = Skill::Bow(BRegen);
|
||||
if create_skill_button(
|
||||
self.imgs.physical_energy_regen_skill,
|
||||
state.skills_top_l[2],
|
||||
&self.skill_set,
|
||||
skill,
|
||||
self.fonts,
|
||||
&get_skill_label(skill, &self.skill_set),
|
||||
)
|
||||
.with_tooltip(
|
||||
self.tooltip_manager,
|
||||
&self
|
||||
.localized_strings
|
||||
.get("hud.skill.bow_energy_regen_title"),
|
||||
&add_sp_cost_tooltip(
|
||||
&self.localized_strings.get("hud.skill.bow_energy_regen"),
|
||||
skill,
|
||||
&self.skill_set,
|
||||
&self.localized_strings,
|
||||
),
|
||||
&diary_tooltip,
|
||||
TEXT_COLOR,
|
||||
)
|
||||
.set(state.skill_bow_basic_2, ui)
|
||||
.was_clicked()
|
||||
{
|
||||
events.push(Event::UnlockSkill(skill));
|
||||
};
|
||||
// Top right skills
|
||||
Button::image(self.imgs.bow_m2)
|
||||
.w_h(74.0, 74.0)
|
||||
.mid_top_with_margin_on(state.skills_top_r[0], 3.0)
|
||||
.with_tooltip(
|
||||
self.tooltip_manager,
|
||||
&self.localized_strings.get("hud.skill.bow_charged_title"),
|
||||
@ -2584,7 +2518,7 @@ impl<'a> Widget for Diary<'a> {
|
||||
let skill = Skill::Bow(CDamage);
|
||||
if create_skill_button(
|
||||
self.imgs.physical_damage_skill,
|
||||
state.skills_top_r[1],
|
||||
state.skills_top_l[1],
|
||||
&self.skill_set,
|
||||
skill,
|
||||
self.fonts,
|
||||
@ -2609,10 +2543,10 @@ impl<'a> Widget for Diary<'a> {
|
||||
{
|
||||
events.push(Event::UnlockSkill(skill));
|
||||
};
|
||||
let skill = Skill::Bow(CDrain);
|
||||
let skill = Skill::Bow(CRegen);
|
||||
if create_skill_button(
|
||||
self.imgs.physical_energy_drain_skill,
|
||||
state.skills_top_r[2],
|
||||
self.imgs.physical_energy_regen_skill,
|
||||
state.skills_top_l[2],
|
||||
&self.skill_set,
|
||||
skill,
|
||||
self.fonts,
|
||||
@ -2622,9 +2556,11 @@ impl<'a> Widget for Diary<'a> {
|
||||
self.tooltip_manager,
|
||||
&self
|
||||
.localized_strings
|
||||
.get("hud.skill.bow_charged_drain_title"),
|
||||
.get("hud.skill.bow_charged_energy_regen_title"),
|
||||
&add_sp_cost_tooltip(
|
||||
&self.localized_strings.get("hud.skill.bow_charged_drain"),
|
||||
&self
|
||||
.localized_strings
|
||||
.get("hud.skill.bow_charged_energy_regen"),
|
||||
skill,
|
||||
&self.skill_set,
|
||||
&self.localized_strings,
|
||||
@ -2637,10 +2573,10 @@ impl<'a> Widget for Diary<'a> {
|
||||
{
|
||||
events.push(Event::UnlockSkill(skill));
|
||||
};
|
||||
let skill = Skill::Bow(CProjSpeed);
|
||||
let skill = Skill::Bow(CKnockback);
|
||||
if create_skill_button(
|
||||
self.imgs.physical_projectile_speed_skill,
|
||||
state.skills_top_r[3],
|
||||
self.imgs.physical_knockback_skill,
|
||||
state.skills_top_l[3],
|
||||
&self.skill_set,
|
||||
skill,
|
||||
self.fonts,
|
||||
@ -2650,11 +2586,11 @@ impl<'a> Widget for Diary<'a> {
|
||||
self.tooltip_manager,
|
||||
&self
|
||||
.localized_strings
|
||||
.get("hud.skill.bow_charged_projectile_speed_title"),
|
||||
.get("hud.skill.bow_charged_knockback_title"),
|
||||
&add_sp_cost_tooltip(
|
||||
&self
|
||||
.localized_strings
|
||||
.get("hud.skill.bow_charged_projectile_speed"),
|
||||
.get("hud.skill.bow_charged_knockback"),
|
||||
skill,
|
||||
&self.skill_set,
|
||||
&self.localized_strings,
|
||||
@ -2670,7 +2606,7 @@ impl<'a> Widget for Diary<'a> {
|
||||
let skill = Skill::Bow(CSpeed);
|
||||
if create_skill_button(
|
||||
self.imgs.physical_speed_skill,
|
||||
state.skills_top_r[4],
|
||||
state.skills_top_l[4],
|
||||
&self.skill_set,
|
||||
skill,
|
||||
self.fonts,
|
||||
@ -2698,7 +2634,7 @@ impl<'a> Widget for Diary<'a> {
|
||||
let skill = Skill::Bow(CMove);
|
||||
if create_skill_button(
|
||||
self.imgs.physical_speed_skill,
|
||||
state.skills_top_r[5],
|
||||
state.skills_top_l[5],
|
||||
&self.skill_set,
|
||||
skill,
|
||||
self.fonts,
|
||||
@ -2708,11 +2644,9 @@ impl<'a> Widget for Diary<'a> {
|
||||
self.tooltip_manager,
|
||||
&self
|
||||
.localized_strings
|
||||
.get("hud.skill.bow_charged_move_speed_title"),
|
||||
.get("hud.skill.bow_charged_move_title"),
|
||||
&add_sp_cost_tooltip(
|
||||
&self
|
||||
.localized_strings
|
||||
.get("hud.skill.bow_charged_move_speed"),
|
||||
&self.localized_strings.get("hud.skill.bow_charged_move"),
|
||||
skill,
|
||||
&self.skill_set,
|
||||
&self.localized_strings,
|
||||
@ -2725,69 +2659,22 @@ impl<'a> Widget for Diary<'a> {
|
||||
{
|
||||
events.push(Event::UnlockSkill(skill));
|
||||
};
|
||||
let skill = Skill::Bow(CKnockback);
|
||||
if create_skill_button(
|
||||
self.imgs.physical_knockback_skill,
|
||||
state.skills_top_r[6],
|
||||
&self.skill_set,
|
||||
skill,
|
||||
self.fonts,
|
||||
&get_skill_label(skill, &self.skill_set),
|
||||
)
|
||||
.with_tooltip(
|
||||
self.tooltip_manager,
|
||||
&self
|
||||
.localized_strings
|
||||
.get("hud.skill.bow_charged_knockback_title"),
|
||||
&add_sp_cost_tooltip(
|
||||
&self
|
||||
.localized_strings
|
||||
.get("hud.skill.bow_charged_knockback"),
|
||||
skill,
|
||||
&self.skill_set,
|
||||
&self.localized_strings,
|
||||
),
|
||||
&diary_tooltip,
|
||||
TEXT_COLOR,
|
||||
)
|
||||
.set(state.skill_bow_charged_6, ui)
|
||||
.was_clicked()
|
||||
{
|
||||
events.push(Event::UnlockSkill(skill));
|
||||
};
|
||||
// Bottom left skills
|
||||
let skill = Skill::Bow(UnlockRepeater);
|
||||
if create_skill_button(
|
||||
self.imgs.skill_bow_jump_burst,
|
||||
state.skills_bot_l[0],
|
||||
&self.skill_set,
|
||||
skill,
|
||||
self.fonts,
|
||||
&get_skill_label(skill, &self.skill_set),
|
||||
)
|
||||
.with_tooltip(
|
||||
self.tooltip_manager,
|
||||
&self
|
||||
.localized_strings
|
||||
.get("hud.skill.bow_repeater_unlock_title"),
|
||||
&add_sp_cost_tooltip(
|
||||
&self.localized_strings.get("hud.skill.bow_repeater_unlock"),
|
||||
skill,
|
||||
&self.skill_set,
|
||||
&self.localized_strings,
|
||||
),
|
||||
&diary_tooltip,
|
||||
TEXT_COLOR,
|
||||
)
|
||||
.set(state.skill_bow_repeater_0, ui)
|
||||
.was_clicked()
|
||||
{
|
||||
events.push(Event::UnlockSkill(skill));
|
||||
};
|
||||
// Top right skills
|
||||
Button::image(self.imgs.bow_m2)
|
||||
.w_h(74.0, 74.0)
|
||||
.mid_top_with_margin_on(state.skills_top_r[0], 3.0)
|
||||
.with_tooltip(
|
||||
self.tooltip_manager,
|
||||
&self.localized_strings.get("hud.skill.bow_repeater_title"),
|
||||
&self.localized_strings.get("hud.skill.bow_repeater"),
|
||||
&diary_tooltip,
|
||||
TEXT_COLOR,
|
||||
)
|
||||
.set(state.skill_bow_repeater_0, ui);
|
||||
let skill = Skill::Bow(RDamage);
|
||||
if create_skill_button(
|
||||
self.imgs.physical_damage_skill,
|
||||
state.skills_bot_l[1],
|
||||
state.skills_top_r[1],
|
||||
&self.skill_set,
|
||||
skill,
|
||||
self.fonts,
|
||||
@ -2812,38 +2699,10 @@ impl<'a> Widget for Diary<'a> {
|
||||
{
|
||||
events.push(Event::UnlockSkill(skill));
|
||||
};
|
||||
let skill = Skill::Bow(RGlide);
|
||||
if create_skill_button(
|
||||
self.imgs.physical_helicopter_skill,
|
||||
state.skills_bot_l[2],
|
||||
&self.skill_set,
|
||||
skill,
|
||||
self.fonts,
|
||||
&get_skill_label(skill, &self.skill_set),
|
||||
)
|
||||
.with_tooltip(
|
||||
self.tooltip_manager,
|
||||
&self
|
||||
.localized_strings
|
||||
.get("hud.skill.bow_repeater_glide_title"),
|
||||
&add_sp_cost_tooltip(
|
||||
&self.localized_strings.get("hud.skill.bow_repeater_glide"),
|
||||
skill,
|
||||
&self.skill_set,
|
||||
&self.localized_strings,
|
||||
),
|
||||
&diary_tooltip,
|
||||
TEXT_COLOR,
|
||||
)
|
||||
.set(state.skill_bow_repeater_2, ui)
|
||||
.was_clicked()
|
||||
{
|
||||
events.push(Event::UnlockSkill(skill));
|
||||
};
|
||||
let skill = Skill::Bow(RCost);
|
||||
if create_skill_button(
|
||||
self.imgs.physical_cost_skill,
|
||||
state.skills_bot_l[3],
|
||||
state.skills_top_r[2],
|
||||
&self.skill_set,
|
||||
skill,
|
||||
self.fonts,
|
||||
@ -2863,14 +2722,157 @@ impl<'a> Widget for Diary<'a> {
|
||||
&diary_tooltip,
|
||||
TEXT_COLOR,
|
||||
)
|
||||
.set(state.skill_bow_repeater_2, ui)
|
||||
.was_clicked()
|
||||
{
|
||||
events.push(Event::UnlockSkill(skill));
|
||||
};
|
||||
let skill = Skill::Bow(RSpeed);
|
||||
if create_skill_button(
|
||||
self.imgs.physical_speed_skill,
|
||||
state.skills_top_r[3],
|
||||
&self.skill_set,
|
||||
skill,
|
||||
self.fonts,
|
||||
&get_skill_label(skill, &self.skill_set),
|
||||
)
|
||||
.with_tooltip(
|
||||
self.tooltip_manager,
|
||||
&self
|
||||
.localized_strings
|
||||
.get("hud.skill.bow_repeater_speed_title"),
|
||||
&add_sp_cost_tooltip(
|
||||
&self.localized_strings.get("hud.skill.bow_repeater_speed"),
|
||||
skill,
|
||||
&self.skill_set,
|
||||
&self.localized_strings,
|
||||
),
|
||||
&diary_tooltip,
|
||||
TEXT_COLOR,
|
||||
)
|
||||
.set(state.skill_bow_repeater_3, ui)
|
||||
.was_clicked()
|
||||
{
|
||||
events.push(Event::UnlockSkill(skill));
|
||||
};
|
||||
let skill = Skill::Bow(RArrows);
|
||||
// Bottom left skills
|
||||
let skill = Skill::Bow(UnlockShotgun);
|
||||
if create_skill_button(
|
||||
self.imgs.skill_bow_jump_burst,
|
||||
state.skills_bot_l[0],
|
||||
&self.skill_set,
|
||||
skill,
|
||||
self.fonts,
|
||||
&get_skill_label(skill, &self.skill_set),
|
||||
)
|
||||
.with_tooltip(
|
||||
self.tooltip_manager,
|
||||
&self
|
||||
.localized_strings
|
||||
.get("hud.skill.bow_shotgun_unlock_title"),
|
||||
&add_sp_cost_tooltip(
|
||||
&self.localized_strings.get("hud.skill.bow_shotgun_unlock"),
|
||||
skill,
|
||||
&self.skill_set,
|
||||
&self.localized_strings,
|
||||
),
|
||||
&diary_tooltip,
|
||||
TEXT_COLOR,
|
||||
)
|
||||
.set(state.skill_bow_shotgun_0, ui)
|
||||
.was_clicked()
|
||||
{
|
||||
events.push(Event::UnlockSkill(skill));
|
||||
};
|
||||
let skill = Skill::Bow(SDamage);
|
||||
if create_skill_button(
|
||||
self.imgs.physical_damage_skill,
|
||||
state.skills_bot_l[1],
|
||||
&self.skill_set,
|
||||
skill,
|
||||
self.fonts,
|
||||
&get_skill_label(skill, &self.skill_set),
|
||||
)
|
||||
.with_tooltip(
|
||||
self.tooltip_manager,
|
||||
&self
|
||||
.localized_strings
|
||||
.get("hud.skill.bow_shotgun_damage_title"),
|
||||
&add_sp_cost_tooltip(
|
||||
&self.localized_strings.get("hud.skill.bow_shotgun_damage"),
|
||||
skill,
|
||||
&self.skill_set,
|
||||
&self.localized_strings,
|
||||
),
|
||||
&diary_tooltip,
|
||||
TEXT_COLOR,
|
||||
)
|
||||
.set(state.skill_bow_shotgun_1, ui)
|
||||
.was_clicked()
|
||||
{
|
||||
events.push(Event::UnlockSkill(skill));
|
||||
};
|
||||
let skill = Skill::Bow(SCost);
|
||||
if create_skill_button(
|
||||
self.imgs.physical_cost_skill,
|
||||
state.skills_bot_l[2],
|
||||
&self.skill_set,
|
||||
skill,
|
||||
self.fonts,
|
||||
&get_skill_label(skill, &self.skill_set),
|
||||
)
|
||||
.with_tooltip(
|
||||
self.tooltip_manager,
|
||||
&self
|
||||
.localized_strings
|
||||
.get("hud.skill.bow_shotgun_cost_title"),
|
||||
&add_sp_cost_tooltip(
|
||||
&self.localized_strings.get("hud.skill.bow_shotgun_cost"),
|
||||
skill,
|
||||
&self.skill_set,
|
||||
&self.localized_strings,
|
||||
),
|
||||
&diary_tooltip,
|
||||
TEXT_COLOR,
|
||||
)
|
||||
.set(state.skill_bow_shotgun_2, ui)
|
||||
.was_clicked()
|
||||
{
|
||||
events.push(Event::UnlockSkill(skill));
|
||||
};
|
||||
let skill = Skill::Bow(SArrows);
|
||||
if create_skill_button(
|
||||
self.imgs.physical_amount_skill,
|
||||
state.skills_bot_l[3],
|
||||
&self.skill_set,
|
||||
skill,
|
||||
self.fonts,
|
||||
&get_skill_label(skill, &self.skill_set),
|
||||
)
|
||||
.with_tooltip(
|
||||
self.tooltip_manager,
|
||||
&self
|
||||
.localized_strings
|
||||
.get("hud.skill.bow_shotgun_arrow_count_title"),
|
||||
&add_sp_cost_tooltip(
|
||||
&self
|
||||
.localized_strings
|
||||
.get("hud.skill.bow_shotgun_arrow_count"),
|
||||
skill,
|
||||
&self.skill_set,
|
||||
&self.localized_strings,
|
||||
),
|
||||
&diary_tooltip,
|
||||
TEXT_COLOR,
|
||||
)
|
||||
.set(state.skill_bow_shotgun_3, ui)
|
||||
.was_clicked()
|
||||
{
|
||||
events.push(Event::UnlockSkill(skill));
|
||||
};
|
||||
let skill = Skill::Bow(SSpread);
|
||||
if create_skill_button(
|
||||
self.imgs.physical_explosion_skill,
|
||||
state.skills_bot_l[4],
|
||||
&self.skill_set,
|
||||
skill,
|
||||
@ -2881,9 +2883,9 @@ impl<'a> Widget for Diary<'a> {
|
||||
self.tooltip_manager,
|
||||
&self
|
||||
.localized_strings
|
||||
.get("hud.skill.bow_arrow_count_title"),
|
||||
.get("hud.skill.bow_shotgun_spread_title"),
|
||||
&add_sp_cost_tooltip(
|
||||
&self.localized_strings.get("hud.skill.bow_arrow_count"),
|
||||
&self.localized_strings.get("hud.skill.bow_shotgun_spread"),
|
||||
skill,
|
||||
&self.skill_set,
|
||||
&self.localized_strings,
|
||||
@ -2891,7 +2893,7 @@ impl<'a> Widget for Diary<'a> {
|
||||
&diary_tooltip,
|
||||
TEXT_COLOR,
|
||||
)
|
||||
.set(state.skill_bow_repeater_4, ui)
|
||||
.set(state.skill_bow_shotgun_4, ui)
|
||||
.was_clicked()
|
||||
{
|
||||
events.push(Event::UnlockSkill(skill));
|
||||
|
Loading…
Reference in New Issue
Block a user