jake
4 years ago
3 changed files with 60 additions and 14 deletions
@ -0,0 +1,51 @@ |
|||
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;
|
|||
}
|
Write
Preview
Loading…
Cancel
Save
Reference in new issue