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

Add a coffee item, that increase Attack speed #14

Merged
merged 1 commit into from
Dec 9, 2020
Merged

Add a coffee item, that increase Attack speed #14

merged 1 commit into from
Dec 9, 2020

Conversation

suspistew
Copy link
Contributor

I added coffee to the game, an item that double attack speed for 5 seconds.

src/main.rs Outdated Show resolved Hide resolved
This was referenced Dec 6, 2020
src/main.rs Outdated
0.0,
true,
vec![],
vec![(Items::Coffee, 1,UseMode::UsePerSecond{ rate: 1.0 } )],
Copy link
Contributor

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

Copy link
Contributor

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.

Copy link
Contributor Author

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,
Copy link
Contributor

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?

Copy link
Contributor Author

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,
Copy link
Contributor

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. :)

@AnneKitsune AnneKitsune merged commit 059a3c8 into spicylobstergames:master Dec 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants