Skip to content

Commit

Permalink
wip: Start ChargedStrike
Browse files Browse the repository at this point in the history
  • Loading branch information
futile committed Jul 26, 2024
1 parent 35f13b7 commit c689074
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/abilities.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use bevy::{ecs::system::SystemParam, prelude::*, utils::HashMap};

use crate::game_logic::ability::{Ability, AbilityId};

pub mod charged_strike;
pub mod needling_hex;
pub mod weapon_attack;

Expand Down
34 changes: 34 additions & 0 deletions src/abilities/charged_strike.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
use bevy::prelude::*;

use super::AbilityCatalog;
use crate::game_logic::ability::{Ability, AbilityId, AbilitySlotType};

const THIS_ABILITY_ID: AbilityId = AbilityId::ChargedStrike;

fn add_to_ability_catalog(mut abilties_catalog: ResMut<AbilityCatalog>) {
abilties_catalog.0.insert(
THIS_ABILITY_ID,
Ability {
name: "Charged Strike".into(),
id: THIS_ABILITY_ID,
slot_type: Some(AbilitySlotType::WeaponAttack),
cast_time: None,
#[expect(clippy::useless_format, reason = "Just like this better for now")]
description: format!("Charge an extra strong strike!").into(),
},
);
}

#[derive(Debug)]
pub struct NeedlingHexPlugin;

impl Plugin for NeedlingHexPlugin {
fn build(&self, app: &mut App) {
app.add_systems(Startup, add_to_ability_catalog);
// .add_systems(
// FixedUpdate,
// tick_needling_hex_effects.in_set(PerUpdateSet::LogicUpdate),
// )
// .add_systems(Update, cast_ability.in_set(PerUpdateSet::CommandResolution));
}
}
5 changes: 1 addition & 4 deletions src/abilities/needling_hex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ use crate::{

const THIS_ABILITY_ID: AbilityId = AbilityId::NeedlingHex;

const THIS_ABILITY_DAMAGE: f64 = 51.0;

fn add_to_ability_catalog(mut abilties_catalog: ResMut<AbilityCatalog>) {
abilties_catalog.0.insert(
THIS_ABILITY_ID,
Expand All @@ -28,8 +26,7 @@ fn add_to_ability_catalog(mut abilties_catalog: ResMut<AbilityCatalog>) {
id: THIS_ABILITY_ID,
slot_type: None,
cast_time: None,
description: format!("Hex your enemy with repeated damage. {THIS_ABILITY_DAMAGE}")
.into(),
description: format!("Hex your enemy with repeated damage.").into(),
},
);
}
Expand Down
1 change: 1 addition & 0 deletions src/game_logic/ability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ pub enum AbilitySlotType {
pub enum AbilityId {
Attack,
NeedlingHex,
ChargedStrike,
}

#[derive(Debug, Clone, Reflect)]
Expand Down

0 comments on commit c689074

Please sign in to comment.