Skip to content

Commit

Permalink
clear dualmenu rpanel on start
Browse files Browse the repository at this point in the history
  • Loading branch information
Lamby777 committed Aug 19, 2024
1 parent c1ee3a9 commit ea3c86d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pets-lib/src/battle/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,10 @@ impl BattleEngine {
// disable the choice list
self.choices.bind_mut().disable();
// self.other_choices.as_mut().map(|v| v.bind_mut().disable());
self.clear_right_panel();
}

fn clear_right_panel(&mut self) {
self.right_panel_destination
.clone()
.expect("no right panel node exported")
Expand Down Expand Up @@ -366,6 +369,7 @@ impl INode2D for BattleEngine {
self.choices.bind_mut().disable();
self.battlers.init(pcb().bind().new_battlers());
self.update_mana_bar();
self.clear_right_panel();

{
let mut timer = Timer::new_alloc();
Expand Down
2 changes: 2 additions & 0 deletions pets-lib/src/battle/skills/attack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ impl Skill for AttackSkill {
power
);
target.take_damage(damage);

godot_print!("Target HP after damage: {}", target.hp());
}

if let Some(effect) = &self.status_effect {
Expand Down

0 comments on commit ea3c86d

Please sign in to comment.