2017-07-20 06:08:49 +02:00
|
|
|
/*
|
|
|
|
* DamageTest.cpp, part of VCMI engine
|
|
|
|
*
|
|
|
|
* 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
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
#include "StdInc.h"
|
|
|
|
|
|
|
|
#include "EffectFixture.h"
|
|
|
|
|
|
|
|
#include <vstd/RNG.h>
|
|
|
|
|
|
|
|
#include "../../../lib/battle/CUnitState.h"
|
2024-02-11 23:09:01 +02:00
|
|
|
#include "../../../lib/json/JsonNode.h"
|
2017-07-20 06:08:49 +02:00
|
|
|
|
|
|
|
#include "mock/mock_UnitEnvironment.h"
|
|
|
|
|
|
|
|
namespace test
|
|
|
|
{
|
|
|
|
using namespace ::spells;
|
|
|
|
using namespace ::spells::effects;
|
|
|
|
using namespace ::testing;
|
|
|
|
|
|
|
|
class DamageTest : public Test, public EffectFixture
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
DamageTest()
|
|
|
|
: EffectFixture("core:damage")
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void SetUp() override
|
|
|
|
{
|
|
|
|
EffectFixture::setUp();
|
Entities redesign and a few ERM features
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2018-03-17 16:58:30 +02:00
|
|
|
EffectFixture::setupEffect(JsonNode());
|
2017-07-20 06:08:49 +02:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
TEST_F(DamageTest, ApplicableToAliveUnit)
|
|
|
|
{
|
|
|
|
auto & unit = unitsFake.add(BattleSide::ATTACKER);
|
|
|
|
EXPECT_CALL(unit, isValidTarget(Eq(false))).WillOnce(Return(true));
|
|
|
|
|
|
|
|
EXPECT_CALL(mechanicsMock, isSmart()).WillOnce(Return(false));
|
|
|
|
|
|
|
|
EffectTarget target;
|
|
|
|
target.emplace_back(&unit, BattleHex());
|
|
|
|
|
|
|
|
EXPECT_TRUE(subject->applicable(problemMock, &mechanicsMock, target));
|
|
|
|
}
|
|
|
|
|
|
|
|
TEST_F(DamageTest, NotApplicableToDeadUnit)
|
|
|
|
{
|
|
|
|
auto & unit = unitsFake.add(BattleSide::ATTACKER);
|
|
|
|
EXPECT_CALL(unit, isValidTarget(Eq(false))).WillOnce(Return(false));
|
|
|
|
|
|
|
|
EXPECT_CALL(mechanicsMock, isSmart()).Times(AtMost(1)).WillRepeatedly(Return(false));
|
|
|
|
EXPECT_CALL(mechanicsMock, ownerMatches(Eq(&unit))).Times(AtMost(1)).WillRepeatedly(Return(true));
|
|
|
|
|
|
|
|
EffectTarget target;
|
|
|
|
target.emplace_back(&unit, BattleHex());
|
|
|
|
|
|
|
|
EXPECT_FALSE(subject->applicable(problemMock, &mechanicsMock, target));
|
|
|
|
}
|
|
|
|
|
|
|
|
class DamageApplyTest : public Test, public EffectFixture
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
UnitEnvironmentMock unitEnvironmentMock;
|
|
|
|
|
|
|
|
DamageApplyTest()
|
|
|
|
: EffectFixture("core:damage")
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void SetUp() override
|
|
|
|
{
|
|
|
|
EffectFixture::setUp();
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2024-01-03 02:26:15 +02:00
|
|
|
TEST_F(DamageApplyTest, DISABLED_DoesDamageToAliveUnit)
|
2017-07-20 06:08:49 +02:00
|
|
|
{
|
Entities redesign and a few ERM features
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2018-03-17 16:58:30 +02:00
|
|
|
EffectFixture::setupEffect(JsonNode());
|
2017-07-20 06:08:49 +02:00
|
|
|
using namespace ::battle;
|
|
|
|
|
|
|
|
const int64_t effectValue = 123;
|
|
|
|
const int32_t unitAmount = 25;
|
|
|
|
const int32_t unitHP = 100;
|
|
|
|
const uint32_t unitId = 42;
|
|
|
|
auto & targetUnit = unitsFake.add(BattleSide::ATTACKER);
|
|
|
|
|
2023-10-21 13:50:42 +02:00
|
|
|
targetUnit.addNewBonus(std::make_shared<Bonus>(BonusDuration::PERMANENT, BonusType::STACK_HEALTH, BonusSource::CREATURE_ABILITY, unitHP, BonusSourceID()));
|
2017-07-20 06:08:49 +02:00
|
|
|
EXPECT_CALL(targetUnit, unitId()).WillRepeatedly(Return(unitId));
|
|
|
|
EXPECT_CALL(targetUnit, unitBaseAmount()).WillRepeatedly(Return(unitAmount));
|
|
|
|
EXPECT_CALL(targetUnit, alive()).WillRepeatedly(Return(true));
|
|
|
|
|
|
|
|
EXPECT_CALL(mechanicsMock, adjustEffectValue(Eq(&targetUnit))).WillOnce(Return(effectValue));
|
|
|
|
|
|
|
|
unitsFake.setDefaultBonusExpectations();
|
|
|
|
|
2024-01-17 14:50:00 +02:00
|
|
|
auto targetUnitState = std::make_shared<CUnitStateDetached>(&targetUnit, &targetUnit);
|
2017-07-20 06:08:49 +02:00
|
|
|
targetUnitState->localInit(&unitEnvironmentMock);
|
|
|
|
EXPECT_CALL(targetUnit, acquireState()).WillOnce(Return(targetUnitState));
|
|
|
|
EXPECT_CALL(*battleFake, setUnitState(Eq(unitId),_, Lt(0))).Times(1);
|
Entities redesign and a few ERM features
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2018-03-17 16:58:30 +02:00
|
|
|
EXPECT_CALL(serverMock, apply(Matcher<StacksInjured *>(_))).Times(1);
|
|
|
|
EXPECT_CALL(serverMock, describeChanges()).WillRepeatedly(Return(false));
|
2017-07-20 06:08:49 +02:00
|
|
|
|
|
|
|
setupDefaultRNG();
|
|
|
|
|
|
|
|
EffectTarget target;
|
|
|
|
target.emplace_back(&targetUnit, BattleHex());
|
|
|
|
|
Entities redesign and a few ERM features
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2018-03-17 16:58:30 +02:00
|
|
|
subject->apply(&serverMock, &mechanicsMock, target);
|
2017-07-20 06:08:49 +02:00
|
|
|
|
|
|
|
EXPECT_EQ(targetUnitState->getCount(), unitAmount - 1);
|
|
|
|
}
|
|
|
|
|
2024-01-03 02:26:15 +02:00
|
|
|
TEST_F(DamageApplyTest, DISABLED_IgnoresDeadUnit)
|
2017-07-20 06:08:49 +02:00
|
|
|
{
|
Entities redesign and a few ERM features
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2018-03-17 16:58:30 +02:00
|
|
|
EffectFixture::setupEffect(JsonNode());
|
2017-07-20 06:08:49 +02:00
|
|
|
using namespace ::battle;
|
|
|
|
|
|
|
|
auto & targetUnit = unitsFake.add(BattleSide::ATTACKER);
|
|
|
|
|
|
|
|
EXPECT_CALL(targetUnit, alive()).WillRepeatedly(Return(false));
|
|
|
|
EXPECT_CALL(targetUnit, acquireState()).Times(0);
|
|
|
|
EXPECT_CALL(*battleFake, setUnitState(_,_,_)).Times(0);
|
Entities redesign and a few ERM features
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2018-03-17 16:58:30 +02:00
|
|
|
EXPECT_CALL(serverMock, describeChanges()).WillRepeatedly(Return(false));
|
|
|
|
|
|
|
|
setupDefaultRNG();
|
2017-07-20 06:08:49 +02:00
|
|
|
|
|
|
|
EffectTarget target;
|
|
|
|
target.emplace_back(&targetUnit, BattleHex());
|
|
|
|
|
Entities redesign and a few ERM features
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2018-03-17 16:58:30 +02:00
|
|
|
subject->apply(&serverMock, &mechanicsMock, target);
|
2017-07-20 06:08:49 +02:00
|
|
|
}
|
|
|
|
|
2024-01-03 02:26:15 +02:00
|
|
|
TEST_F(DamageApplyTest, DISABLED_DoesDamageByPercent)
|
2017-07-20 06:08:49 +02:00
|
|
|
{
|
|
|
|
using namespace ::battle;
|
|
|
|
|
|
|
|
{
|
2024-02-13 14:34:16 +02:00
|
|
|
JsonNode config;
|
2017-07-20 06:08:49 +02:00
|
|
|
config["killByPercentage"].Bool() = true;
|
|
|
|
EffectFixture::setupEffect(config);
|
|
|
|
}
|
|
|
|
|
|
|
|
const int64_t effectValue = 27;
|
|
|
|
const int32_t unitAmount = 200;
|
|
|
|
const int32_t unitHP = 100;
|
|
|
|
const uint32_t unitId = 42;
|
|
|
|
auto & targetUnit = unitsFake.add(BattleSide::ATTACKER);
|
|
|
|
|
2023-10-21 13:50:42 +02:00
|
|
|
targetUnit.addNewBonus(std::make_shared<Bonus>(BonusDuration::PERMANENT, BonusType::STACK_HEALTH, BonusSource::CREATURE_ABILITY, unitHP, BonusSourceID()));
|
2017-07-20 06:08:49 +02:00
|
|
|
EXPECT_CALL(targetUnit, unitId()).WillRepeatedly(Return(unitId));
|
|
|
|
EXPECT_CALL(targetUnit, unitBaseAmount()).WillRepeatedly(Return(unitAmount));
|
|
|
|
EXPECT_CALL(targetUnit, getCount()).WillOnce(Return(unitAmount));
|
|
|
|
EXPECT_CALL(targetUnit, alive()).WillRepeatedly(Return(true));
|
|
|
|
|
|
|
|
EXPECT_CALL(mechanicsMock, adjustEffectValue(Eq(&targetUnit))).Times(0);
|
|
|
|
EXPECT_CALL(mechanicsMock, getEffectValue()).WillOnce(Return(effectValue));
|
|
|
|
|
|
|
|
unitsFake.setDefaultBonusExpectations();
|
|
|
|
|
2024-01-17 14:50:00 +02:00
|
|
|
auto targetUnitState = std::make_shared<CUnitStateDetached>(&targetUnit, &targetUnit);
|
2017-07-20 06:08:49 +02:00
|
|
|
targetUnitState->localInit(&unitEnvironmentMock);
|
|
|
|
EXPECT_CALL(targetUnit, acquireState()).WillOnce(Return(targetUnitState));
|
|
|
|
|
|
|
|
EXPECT_CALL(*battleFake, setUnitState(Eq(unitId),_, Lt(0))).Times(1);
|
Entities redesign and a few ERM features
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2018-03-17 16:58:30 +02:00
|
|
|
EXPECT_CALL(serverMock, apply(Matcher<StacksInjured *>(_))).Times(1);
|
|
|
|
EXPECT_CALL(serverMock, describeChanges()).WillRepeatedly(Return(false));
|
2017-07-20 06:08:49 +02:00
|
|
|
|
|
|
|
setupDefaultRNG();
|
|
|
|
|
|
|
|
EffectTarget target;
|
|
|
|
target.emplace_back(&targetUnit, BattleHex());
|
|
|
|
|
Entities redesign and a few ERM features
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2018-03-17 16:58:30 +02:00
|
|
|
subject->apply(&serverMock, &mechanicsMock, target);
|
2017-07-20 06:08:49 +02:00
|
|
|
|
|
|
|
EXPECT_EQ(targetUnitState->getCount(), unitAmount - (unitAmount * effectValue / 100));
|
|
|
|
}
|
|
|
|
|
2024-01-03 02:26:15 +02:00
|
|
|
TEST_F(DamageApplyTest, DISABLED_DoesDamageByCount)
|
2017-07-20 06:08:49 +02:00
|
|
|
{
|
|
|
|
using namespace ::battle;
|
|
|
|
|
|
|
|
{
|
2024-02-13 14:34:16 +02:00
|
|
|
JsonNode config;
|
2017-07-20 06:08:49 +02:00
|
|
|
config["killByCount"].Bool() = true;
|
|
|
|
EffectFixture::setupEffect(config);
|
|
|
|
}
|
|
|
|
|
|
|
|
const int64_t effectValue = 27;
|
|
|
|
const int32_t unitAmount = 200;
|
|
|
|
const int32_t unitHP = 100;
|
|
|
|
const uint32_t unitId = 42;
|
|
|
|
auto & targetUnit = unitsFake.add(BattleSide::ATTACKER);
|
|
|
|
|
2023-10-21 13:50:42 +02:00
|
|
|
targetUnit.addNewBonus(std::make_shared<Bonus>(BonusDuration::PERMANENT, BonusType::STACK_HEALTH, BonusSource::CREATURE_ABILITY, unitHP, BonusSourceID()));
|
2017-07-20 06:08:49 +02:00
|
|
|
EXPECT_CALL(targetUnit, unitId()).WillRepeatedly(Return(unitId));
|
|
|
|
EXPECT_CALL(targetUnit, unitBaseAmount()).WillRepeatedly(Return(unitAmount));
|
|
|
|
EXPECT_CALL(targetUnit, alive()).WillRepeatedly(Return(true));
|
|
|
|
|
|
|
|
EXPECT_CALL(mechanicsMock, adjustEffectValue(Eq(&targetUnit))).Times(0);
|
|
|
|
EXPECT_CALL(mechanicsMock, getEffectValue()).WillOnce(Return(effectValue));
|
|
|
|
|
|
|
|
unitsFake.setDefaultBonusExpectations();
|
|
|
|
|
2024-01-17 14:50:00 +02:00
|
|
|
auto targetUnitState = std::make_shared<CUnitStateDetached>(&targetUnit, &targetUnit);
|
2017-07-20 06:08:49 +02:00
|
|
|
targetUnitState->localInit(&unitEnvironmentMock);
|
|
|
|
EXPECT_CALL(targetUnit, acquireState()).WillOnce(Return(targetUnitState));
|
|
|
|
|
|
|
|
EXPECT_CALL(*battleFake, setUnitState(Eq(unitId), _, Lt(0))).Times(1);
|
Entities redesign and a few ERM features
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2018-03-17 16:58:30 +02:00
|
|
|
EXPECT_CALL(serverMock, apply(Matcher<StacksInjured *>(_))).Times(1);
|
|
|
|
EXPECT_CALL(serverMock, describeChanges()).WillRepeatedly(Return(false));
|
2017-07-20 06:08:49 +02:00
|
|
|
|
|
|
|
setupDefaultRNG();
|
|
|
|
|
|
|
|
EffectTarget target;
|
|
|
|
target.emplace_back(&targetUnit, BattleHex());
|
|
|
|
|
Entities redesign and a few ERM features
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2018-03-17 16:58:30 +02:00
|
|
|
subject->apply(&serverMock, &mechanicsMock, target);
|
2017-07-20 06:08:49 +02:00
|
|
|
|
|
|
|
EXPECT_EQ(targetUnitState->getCount(), unitAmount - effectValue);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|