Skip to content
This repository has been archived by the owner on Sep 19, 2022. It is now read-only.

Commit

Permalink
Merge pull request #14 from grzi/master
Browse files Browse the repository at this point in the history
Add a coffee item, that increase Attack speed
  • Loading branch information
AnneKitsune authored Dec 9, 2020
2 parents 7f460a1 + 571be15 commit 059a3c8
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ids.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,17 @@ pub enum Stats {
pub enum Skills {
AOE,
DoubleDamage,
DoubleAttackSpeed
}

#[derive(PartialEq, Eq, Hash, Copy, Clone, Debug)]
pub enum Items {
TestItem,
Coffee
}

#[derive(PartialEq, Eq, Hash, Copy, Clone, Debug)]
pub enum Effectors {
DoubleDamage,
DoubleAttackSpeed
}
27 changes: 27 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,19 @@ fn main() -> BError {
Effectors::DoubleDamage,
],
),
SkillDefinition::new(
Skills::DoubleAttackSpeed,
String::from("Double Attack Speed"),
String::from("double_attack_speed"),
String::from("Double the attack speed."),
0.0,
false,
vec![],
vec![(Items::Coffee, 1,UseMode::Consume)],
vec![
Effectors::DoubleAttackSpeed,
],
),
]);
world.insert(skill_definitions);

Expand All @@ -317,6 +330,11 @@ fn main() -> BError {
Some(0.0),
vec![(Stats::Attack, EffectorType::MultiplicativeMultiplier(2.0))],
),
EffectorDefinition::new(
Effectors::DoubleAttackSpeed,
Some(5.0),
vec![(Stats::AttackSpeed, EffectorType::MultiplicativeMultiplier(2.0))],
)
]);
world.insert(effector_defs);

Expand All @@ -330,6 +348,15 @@ fn main() -> BError {
None,
None,
),
ItemDefinition::new(
Items::Coffee,
(),
String::from("Coffee"),
String::from("coffee"),
String::from("A cup of coffee. Drinking this will double attack speed for 5 seconds."),
None,
None,
),
]);
world.insert(item_defs);

Expand Down

0 comments on commit 059a3c8

Please # to comment.