52 lines
1.5 KiB
Rust
52 lines
1.5 KiB
Rust
|
use crate::entity::gateway::EntityGateway;
|
||
|
use crate::entity::character::CharacterEntity;
|
||
|
use crate::entity::item::ItemDetail;
|
||
|
use crate::entity::item::tool::ToolType;
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
//pub fn use_tool()
|
||
|
|
||
|
pub async fn power_material<EG: EntityGateway>(entity_gateway: &mut EG, character: &mut CharacterEntity) {
|
||
|
character.materials.power += 1;
|
||
|
entity_gateway.save_character(character).await;
|
||
|
}
|
||
|
|
||
|
pub async fn mind_material<EG: EntityGateway>(entity_gateway: &mut EG, character: &mut CharacterEntity) {
|
||
|
character.materials.mind += 1;
|
||
|
entity_gateway.save_character(character).await;
|
||
|
}
|
||
|
|
||
|
pub async fn evade_material<EG: EntityGateway>(entity_gateway: &mut EG, character: &mut CharacterEntity) {
|
||
|
character.materials.evade += 1;
|
||
|
entity_gateway.save_character(character).await;
|
||
|
}
|
||
|
|
||
|
pub async fn def_material<EG: EntityGateway>(entity_gateway: &mut EG, character: &mut CharacterEntity) {
|
||
|
character.materials.def += 1;
|
||
|
entity_gateway.save_character(character).await;
|
||
|
}
|
||
|
|
||
|
pub async fn luck_material<EG: EntityGateway>(entity_gateway: &mut EG, character: &mut CharacterEntity) {
|
||
|
character.materials.luck += 1;
|
||
|
entity_gateway.save_character(character).await;
|
||
|
}
|
||
|
|
||
|
pub async fn hp_material<EG: EntityGateway>(entity_gateway: &mut EG, character: &mut CharacterEntity) {
|
||
|
character.materials.hp += 1;
|
||
|
entity_gateway.save_character(character).await;
|
||
|
}
|
||
|
|
||
|
pub async fn tp_material<EG: EntityGateway>(entity_gateway: &mut EG, character: &mut CharacterEntity) {
|
||
|
character.materials.tp += 1;
|
||
|
entity_gateway.save_character(character).await;
|
||
|
}
|