2025-07-07 17:28:16 +03:00
|
|
|
/*
|
2025-07-08 19:20:13 +03:00
|
|
|
* SummonBoatEffect.h, part of VCMI engine
|
2025-07-07 17:28:16 +03:00
|
|
|
*
|
|
|
|
|
* Authors: listed in file AUTHORS in main folder
|
|
|
|
|
*
|
|
|
|
|
* License: GNU General Public License v2.0 or later
|
|
|
|
|
* Full text of license available in license.txt file, in main folder
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2025-07-08 19:20:13 +03:00
|
|
|
#include "AdventureSpellEffect.h"
|
2025-07-07 17:28:16 +03:00
|
|
|
|
|
|
|
|
VCMI_LIB_NAMESPACE_BEGIN
|
|
|
|
|
|
2025-07-08 19:20:13 +03:00
|
|
|
class SummonBoatEffect final : public IAdventureSpellEffect
|
2025-07-07 17:28:16 +03:00
|
|
|
{
|
2025-07-08 19:20:13 +03:00
|
|
|
const CSpell * owner;
|
|
|
|
|
bool useExistingBoat;
|
|
|
|
|
bool createNewBoat;
|
|
|
|
|
|
2025-07-07 17:28:16 +03:00
|
|
|
public:
|
2025-07-08 19:20:13 +03:00
|
|
|
SummonBoatEffect(const CSpell * s, const JsonNode & config);
|
2025-07-07 17:28:16 +03:00
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
bool canBeCastImpl(spells::Problem & problem, const IGameInfoCallback * cb, const spells::Caster * caster) const override;
|
|
|
|
|
|
|
|
|
|
ESpellCastResult applyAdventureEffects(SpellCastEnvironment * env, const AdventureSpellCastParameters & parameters) const override;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
VCMI_LIB_NAMESPACE_END
|