-
Notifications
You must be signed in to change notification settings - Fork 12
Add a coffee item, that increase Attack speed #14
Conversation
src/main.rs
Outdated
0.0, | ||
true, | ||
vec![], | ||
vec![(Items::Coffee, 1,UseMode::UsePerSecond{ rate: 1.0 } )], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might want to use UseMode::Consume if you want the item to be gone right after usage.
I think the way it is currently define the item could be used 20 times a second, making the attack speed 1,000,000 :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh or alternatively, we could have cooldown + a coffee that has more than 1 "durability". This way, it would work fine with this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oooh, I wanted to make a one time consumable coffee, with a 5 seconds effect duration. I'll go for the Consume instead of UsePerSecond then.
src/main.rs
Outdated
String::from("double_attack_speed"), | ||
String::from("Double the attack speed."), | ||
0.0, | ||
true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it intended that this is a passive skill?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, It's a misunderstanding of the 'passive' flag.
If it's something that is triggered by the consumption of an item, I guess it's not passive then.
String::from("Double Attack Speed"), | ||
String::from("double_attack_speed"), | ||
String::from("Double the attack speed."), | ||
0.0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we decide to keep the item but have a cooldown, this is where we should set it. :)
I added coffee to the game, an item that double attack speed for 5 seconds.