A lot more documentation, some initial work on the script resolver.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-06-30 17:34:57 +02:00
parent 25e2a0dda1
commit 03f5e3bb5a
18 changed files with 450 additions and 210 deletions

View File

@@ -224,10 +224,10 @@ impl<'own, 'library> Battle<'own, 'library> {
);
if !block_critical {
let is_critical = self
.library()
.misc_library()
.is_critical(self, executing_move, target, hit_index);
let is_critical =
self.library()
.damage_calculator()
.is_critical(self, executing_move, target, hit_index);
hit_data.set_critical(is_critical);
}
let base_power = self.library().damage_calculator().get_base_power(
@@ -282,7 +282,7 @@ impl<'own, 'library> Battle<'own, 'library> {
hit_data.set_damage(damage);
}
if damage > 0 {
target.damage(damage, DamageSource::AttackDamage);
target.damage(damage, DamageSource::MoveDamage);
if !target.is_fainted() {
script_hook!(on_incoming_hit, target, executing_move, target, hit_index);
} else {