Set data for executing attacks.
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:
@@ -67,6 +67,16 @@ namespace CreatureLib::Battling {
|
||||
LearnedAttack* _attack;
|
||||
Script* _script;
|
||||
public:
|
||||
ExecutingAttack(const std::vector<Creature*>& targets, uint8_t numberHits, Creature* user, LearnedAttack* attack,
|
||||
Script* script)
|
||||
: _user(user), _attack(attack), _script(script)
|
||||
{
|
||||
_targets.reserve(targets.size());
|
||||
for (auto target: targets){
|
||||
_targets.insert({target, TargetData(numberHits)});
|
||||
}
|
||||
}
|
||||
|
||||
virtual ~ExecutingAttack() = default;
|
||||
|
||||
TargetData& GetAttackDataForTarget(Creature* creature){
|
||||
|
||||
Reference in New Issue
Block a user