Update to latest Arbutils, use new integer defines
This commit is contained in:
@@ -5,7 +5,7 @@ using namespace CreatureLib::Battling;
|
||||
|
||||
using TargetList = List<OptionalBorrowedPtr<Creature>>;
|
||||
|
||||
static inline constexpr uint8_t GetOppositeSide(uint8_t v) {
|
||||
static inline constexpr u8 GetOppositeSide(u8 v) {
|
||||
if (v == 1) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ void TurnHandler::ExecuteAttackChoice(const ArbUt::BorrowedPtr<AttackTurnChoice>
|
||||
}
|
||||
HOOK(OnBeforeAttack, attack, attack);
|
||||
|
||||
for (uint8_t i = 0; i < attack->GetTargetCount(); i++) {
|
||||
for (u8 i = 0; i < attack->GetTargetCount(); i++) {
|
||||
auto target = attack->GetTargets()[i];
|
||||
if (target.HasValue()) {
|
||||
try_creature(HandleAttackForTarget(attack, target.GetValue()), "Exception occurred during handling attack "
|
||||
@@ -200,7 +200,7 @@ void TurnHandler::HandleAttackForTarget(ExecutingAttack* attack, const ArbUt::Bo
|
||||
EnsureNotNull(miscLibrary)
|
||||
|
||||
auto* hitIterator = attack->GetTargetIteratorBegin(target);
|
||||
for (uint8_t hitIndex = 0; hitIndex < numberOfHits; hitIndex++) {
|
||||
for (u8 hitIndex = 0; hitIndex < numberOfHits; hitIndex++) {
|
||||
if (battle.GetValue()->HasEnded()) {
|
||||
return;
|
||||
}
|
||||
@@ -211,7 +211,7 @@ void TurnHandler::HandleAttackForTarget(ExecutingAttack* attack, const ArbUt::Bo
|
||||
break;
|
||||
}
|
||||
auto& hit = hitIterator[hitIndex];
|
||||
uint8_t hitType = attackData->GetType();
|
||||
u8 hitType = attackData->GetType();
|
||||
HOOK(ChangeAttackType, target, attack, target.GetRaw(), hitIndex, &hitType);
|
||||
hit.SetType(hitType);
|
||||
auto effectiveness = typeLibrary->GetEffectiveness(hitType, target->GetTypes());
|
||||
|
||||
Reference in New Issue
Block a user