Assert::AreEqual(false,Item::SelectedEquipIsDifferent(solarFlareRing,EquipSlot::RING2),L"The game should deny equipping the Solar Flare ring with the Summon Comet ring equipped.");
Assert::AreEqual(false,Item::SelectedEquipIsDifferent(solarFlareRing,EquipSlot::RING1),L"The game should deny equipping the Solar Flare ring with the Summon Comet ring equipped.");
Assert::AreEqual(false,Item::SelectedEquipIsDifferent(summonCometRing,EquipSlot::RING1),L"The game should deny equipping the Summon Comet ring with the Solar Flare ring equipped.");
Assert::AreEqual(false,Item::SelectedEquipIsDifferent(summonCometRing,EquipSlot::RING2),L"The game should deny equipping the Summon Comet ring with the Solar Flare ring equipped.");
Inventory::EquipItem(extraRing,EquipSlot::RING1);
Assert::AreEqual(true,Item::SelectedEquipIsDifferent(summonCometRing,EquipSlot::RING2),L"The game should allow equipping the Summon Comet ring when the Solar Flare ring is not present.");
Assert::AreEqual(true,Item::SelectedEquipIsDifferent(solarFlareRing,EquipSlot::RING2),L"The game should allow equipping the Solar Flare ring when the Summon Comet ring is not present.");
Inventory::EquipItem(extraRing,EquipSlot::RING2);
Inventory::EquipItem(extraRing,EquipSlot::RING2);
Assert::AreEqual(true,Item::SelectedEquipIsDifferent(summonCometRing,EquipSlot::RING1),L"The game should allow equipping the Summon Comet ring when the Solar Flare ring is not present.");
Assert::AreEqual(true,Item::SelectedEquipIsDifferent(solarFlareRing,EquipSlot::RING1),L"The game should allow equipping the Solar Flare ring when the Summon Comet ring is not present.");
Assert::AreEqual(true,Item::SelectedEquipIsDifferent(extraRing2,EquipSlot::RING1),L"The game should allow equipping of any two normal rings that are not the same ring.");
Assert::AreEqual(true,Item::SelectedEquipIsDifferent(extraRing2,EquipSlot::RING1),L"The game should allow equipping of any two normal rings that are not the same ring.");
Assert::AreEqual(false,Item::SelectedEquipIsDifferent(extraRing,EquipSlot::RING1),L"The game should not allow equipping the same ring if it's already equipped.");
Assert::AreEqual(false,Item::SelectedEquipIsDifferent(extraRing,EquipSlot::RING1),L"The game should not allow equipping the same ring if it's already equipped.");
boolkeyReleaseRequiredToReactivate{false};//When the player presses an ability, they cannot use it again until they have released the key to press it down again. So this gets set to true everytime an ability activates, and set to false once the player releases that key.
boolkeyReleaseRequiredToReactivate{false};//When the player presses an ability, they cannot use it again until they have released the key to press it down again. So this gets set to true everytime an ability activates, and set to false once the player releases that key.
boolisOriginalAbility{false};
//Ability action function, returns true if the ability can be casted, otherwise returns false.
//Ability action function, returns true if the ability can be casted, otherwise returns false.
// Argument 1: Player* - player pointer
// Argument 1: Player* - player pointer
// Argument 2: vf2d - The returned precast target position (if the ability needs to be aimed, otherwise {})
// Argument 2: vf2d - The returned precast target position (if the ability needs to be aimed, otherwise {})
if(it==Player::ABILITY_LIST.end())ERR(std::format("WARNING! Could not find ability {} in original ability list! This function MUST be supplied with an original ability. Was original ability: {}",originalAbility.name,originalAbility.isOriginalAbility)); \
GetAbility3().COOLDOWN_TIME+="Summon Comet"_ENC["COOLDOWN REDUCTION"];//This is not a typo, we add because the cooldown reduction in the config is NEGATIVE!
GetAbility3().COOLDOWN_TIME+="Summon Comet"_ENC["COOLDOWN REDUCTION"];//This is not a typo, we add because the cooldown reduction in the config is NEGATIVE!
//So this is rather fascinating and only exists because we have the ability to change classes which means we need to initialize a class
//So this is rather fascinating and only exists because we have the ability to change classes which means we need to initialize a class
//using a new object type... Because of that we'll take the pointer reference to the old object and copy some of its properties to this new
//using a new object type... Because of that we'll take the pointer reference to the old object and copy some of its properties to this new
@ -231,6 +230,11 @@ public:
virtualAbility&GetAbility2()=0;
virtualAbility&GetAbility2()=0;
virtualAbility&GetAbility3()=0;
virtualAbility&GetAbility3()=0;
virtualAbility&GetAbility4()=0;
virtualAbility&GetAbility4()=0;
virtualvoidSetAbility4(constAbility&originalAbility)=0;//NOTE: Make sure to provide the original ability and not a current ability!
virtualAbility&GetOriginalAbility1()=0;
virtualAbility&GetOriginalAbility2()=0;
virtualAbility&GetOriginalAbility3()=0;
virtualAbility&GetOriginalRightClickAbility()=0;
virtualstd::string&GetWalkNAnimation()=0;
virtualstd::string&GetWalkNAnimation()=0;
virtualstd::string&GetWalkEAnimation()=0;
virtualstd::string&GetWalkEAnimation()=0;
virtualstd::string&GetWalkSAnimation()=0;
virtualstd::string&GetWalkSAnimation()=0;
@ -337,6 +341,7 @@ public:
voidPrepareCast(Ability&ability);//NOTE: This usually is not called unless we are running tests! PrepareCast is meant to be used before we use CastSpell in unit tests.
voidPrepareCast(Ability&ability);//NOTE: This usually is not called unless we are running tests! PrepareCast is meant to be used before we use CastSpell in unit tests.