Update to latest Arbutils.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -83,7 +83,7 @@ float PkmnLib::Battling::DamageLibrary::GetDamageModifier(CreatureLib::Battling:
|
||||
PKMN_HOOK(OverrideCriticalModifier, attack, attack, target, hitIndex, &critModifier);
|
||||
mod *= critModifier;
|
||||
}
|
||||
Assert(attack->GetUser()->GetBattle().GetValue());
|
||||
Ensure(attack->GetUser()->GetBattle().GetValue());
|
||||
float randPercentage = 85 + attack->GetUser()->GetBattle().GetValue()->GetRandom()->Get(0, 16);
|
||||
mod *= randPercentage / 100.0;
|
||||
if (attack->GetUser()->HasType(hitData.GetType())) {
|
||||
|
||||
@@ -20,9 +20,8 @@ void PkmnLib::Battling::ExperienceLibrary::HandleExperienceGain(
|
||||
const std::unordered_set<ArbUt::BorrowedPtr<CreatureLib::Battling::Creature>>& opponents) const {
|
||||
|
||||
auto fainted = dynamic_cast<Pokemon*>(faintedMon);
|
||||
AssertNotNull(fainted);
|
||||
EnsureNotNull(fainted);
|
||||
auto& forme = fainted->GetForme();
|
||||
AssertNotNull(forme);
|
||||
auto expGain = forme->GetBaseExperience();
|
||||
auto level = fainted->GetLevel();
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ bool PkmnLib::Battling::MiscLibrary::IsCritical(CreatureLib::Battling::Executing
|
||||
CreatureLib::Battling::Creature* target, uint8_t hit) const {
|
||||
uint8_t critStage = 0;
|
||||
PKMN_HOOK(ModifyCriticalStage, attack, attack, target, hit, &critStage);
|
||||
Assert(target->GetBattle().HasValue());
|
||||
Ensure(target->GetBattle().HasValue());
|
||||
auto rand = target->GetBattle().GetValue()->GetRandom();
|
||||
switch (critStage) {
|
||||
case 0: return rand->Get(24) == 0;
|
||||
|
||||
Reference in New Issue
Block a user