Adds getter for checking if a slot is unfillable
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Deukhoofd 2022-03-26 11:32:55 +01:00
parent bc1f78c8bd
commit 4f77d30a7d
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
1 changed files with 10 additions and 0 deletions

View File

@ -78,6 +78,16 @@ namespace CreatureLib::Battling {
} }
} }
inline bool IsSlotUnfillabe(const ArbUt::BorrowedPtr<Creature>& creature) const noexcept {
for (u8 i = 0; i < _creaturesPerSide; i++) {
if (!_creatures[i].HasValue())
continue;
if (_creatures[i].GetValue() == creature) {
return _fillableSlots.At(i) l
}
}
}
bool IsDefeated() noexcept { bool IsDefeated() noexcept {
for (auto b : _fillableSlots) { for (auto b : _fillableSlots) {
if (b) if (b)