Add support for swapping in and out of a party.
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:
@@ -23,6 +23,12 @@ namespace CreatureLib::Battling {
|
||||
_party[b] = ca;
|
||||
}
|
||||
|
||||
Creature* SwapInto(size_t index, Creature* creature) {
|
||||
auto p = _party.TakeOwnership(index);
|
||||
_party.Set(index, creature);
|
||||
return p;
|
||||
}
|
||||
|
||||
bool HasAvailableCreatures() const noexcept {
|
||||
for (Creature* c : _party) {
|
||||
if (c == nullptr)
|
||||
|
||||
Reference in New Issue
Block a user