Commit d795e4ee authored by AL's avatar AL

added faded skill icons

parent 06247fa8
......@@ -71,7 +71,8 @@ ABoxDrawingInfo ActionBox::GetPickedSkills() const
ABoxDrawingInfo abdi;
for (size_t i = 0;i<pickedSkills.size();i++)
{
if (pickedSkills[i]->get()->GetAvalibility())abdi.s[i] = static_cast<Skill0>(pickedSkills[i]->get()->GetID()); else abdi.s[i] = static_cast<Skill0>(0u);
if (pickedSkills[i]->get()->GetAvalibility())abdi.s[i] = static_cast<Skill0>(pickedSkills[i]->get()->GetID()); //gets normal
else abdi.s[i] = static_cast<Skill0>(pickedSkills[i]->get()->GetID()+static_cast<size_t>(Skill0::CutBlocked)); //gets blocked
}
return std::move(abdi);
}
......@@ -148,9 +149,9 @@ bool ActionBox::ProcessInput(const char input)
return ending;
}
bool ActionBox::UpdateTurnState() //not intuitive
bool ActionBox::UpdateTurnState()
{
bool Finished = 0;
bool Finished = 0; //use std accumulate here?
for (size_t i = 0; i < pickedSkills.size(); i++)
{
Finished = pickedSkills[i]->get()->IsAvalible() || Finished;
......
#pragma once
#include "./SkillStuff/Skill.h"
#include "SoundPlayerInterface.h" //??????
#include "SoundPlayerInterface.h"
#include <assert.h>
enum class Skill0
enum class Skill0 //order matters. is used for indexing
{
Inactive,
Cut,
Deflect,
SandStorm,
SharpenTheBlade,
SandsOfTime,
DustThrow
DustThrow,
CutBlocked,
DeflectBlocked,
SandStormBlocked,
SharpenTheBladeBlocked,
SandsOfTimeBlocked,
DustThrowBlocked,
Inactive
};
class Cut : public Skill
class Cut : public Skill //skill ID has to match skills position in Skill0 enum
{
public:
Cut(CombatEntity* owner) : Skill(owner)
{
id = 1;
id = 0;
valLow = 10.0f;
valHigh = 15.0f;
};
......@@ -39,7 +45,7 @@ class Deflect : public Skill
public:
Deflect(CombatEntity* owner) : Skill(owner)
{
id = 2;
id = 1;
valLow = 10u;
valHigh = 20u;
succChance = 0.0f;
......@@ -61,7 +67,7 @@ class SandStorm : public Skill
public:
SandStorm(CombatEntity* owner) : Skill(owner)
{
id = 3;
id = 2;
valLow = valHigh = 0.7f;
};
void Activate() override
......@@ -85,7 +91,7 @@ class SharpenTheBlade : public Skill
public:
SharpenTheBlade(CombatEntity* owner) : Skill(owner)
{
id = 4;
id = 3;
valLow = valHigh = 0.55f;
quick = 1;
};
......@@ -107,7 +113,7 @@ class SandsOfTime : public Skill
public:
SandsOfTime(CombatEntity* owner) : Skill(owner)
{
id = 5;
id = 4;
valLow = valHigh = 0.15f;
quick = 1;
rewinding = 1;
......@@ -129,7 +135,7 @@ class DustThrow : public Skill
public:
DustThrow(CombatEntity* owner) : Skill(owner)
{
id = 6;
id = 5;
valLow = valHigh = 0.25f;
quick = 1;
};
......@@ -147,5 +153,4 @@ public:
valLow = valHigh = 0.3f;
rewinding = true;
}
};
};
\ No newline at end of file
......@@ -42,26 +42,26 @@ protected:
class AccuracyIcon : public StatusIcon //only enemy is supposed to have accuracy
{
public:
AccuracyIcon(DXGraphics& gfx, StatusOwner owner) : StatusIcon(gfx, L"Media\\Sprites\\acc.png", owner) {};
AccuracyIcon(DXGraphics& gfx, StatusOwner owner) : StatusIcon(gfx, L"Media\\Sprites\\statusBar_acc.png", owner) {};
};
class BleedIcon : public StatusIcon
{
public:
BleedIcon(DXGraphics& gfx, StatusOwner owner) : StatusIcon(gfx, L"Media\\Sprites\\bleed.png", owner)
BleedIcon(DXGraphics& gfx, StatusOwner owner) : StatusIcon(gfx, L"Media\\Sprites\\statusBar_bleed.png", owner)
{
activation.emplace(gfx, L"Media\\Sprites\\bleedAct.png", this);
activation.emplace(gfx, L"Media\\Sprites\\statusBar_bleedAct.png", this);
};
};
class DodgeIcon : public StatusIcon
{
public:
DodgeIcon(DXGraphics& gfx, StatusOwner owner) : StatusIcon(gfx, L"Media\\Sprites\\dodge.png", owner) {};
DodgeIcon(DXGraphics& gfx, StatusOwner owner) : StatusIcon(gfx, L"Media\\Sprites\\statusBar_dodge.png", owner) {};
};
class CritIcon : public StatusIcon
{
public:
CritIcon(DXGraphics& gfx, StatusOwner owner) : StatusIcon(gfx, L"Media\\Sprites\\crit.png", owner) {};
CritIcon(DXGraphics& gfx, StatusOwner owner) : StatusIcon(gfx, L"Media\\Sprites\\statusBar_crit.png", owner) {};
};
\ No newline at end of file
......@@ -118,13 +118,19 @@ ABox::ABox(DXGraphics& gfx, const ActionBox& actBox) :
skillIconInfo(actBox.GetPickedSkillsInfo()),
skillMicroiconPositionReferences(L"Media\\Sprites\\blank.png", gfx)
{
skills.emplace(std::make_pair(Skill0::Inactive, std::make_unique<HudElement>(L"Media//Sprites//SkillSheet.png", gfx, 0, 7, 1)));
skills.emplace(std::make_pair(Skill0::Cut, std::make_unique<HudElement>(L"Media//Sprites//SkillSheet.png", gfx, 1, 7, 1)));
skills.emplace(std::make_pair(Skill0::Deflect, std::make_unique<HudElement>(L"Media//Sprites//SkillSheet.png", gfx, 2, 7, 1)));
skills.emplace(std::make_pair(Skill0::SandStorm, std::make_unique<HudElement>(L"Media//Sprites//SkillSheet.png", gfx, 3, 7, 1)));
skills.emplace(std::make_pair(Skill0::SharpenTheBlade, std::make_unique<HudElement>(L"Media//Sprites//SkillSheet.png", gfx, 4, 7, 1)));
skills.emplace(std::make_pair(Skill0::SandsOfTime, std::make_unique<HudElement>(L"Media//Sprites//SkillSheet.png", gfx, 5, 7, 1)));
skills.emplace(std::make_pair(Skill0::DustThrow, std::make_unique<HudElement>(L"Media//Sprites//SkillSheet.png", gfx, 6, 7, 1)));
skills.emplace(std::make_pair(Skill0::CutBlocked, std::make_unique<HudElement>(L"Media//Sprites//SkillSheetBlocked.png", gfx, 1, 7, 1)));
skills.emplace(std::make_pair(Skill0::DeflectBlocked, std::make_unique<HudElement>(L"Media//Sprites//SkillSheetBlocked.png", gfx, 2, 7, 1)));
skills.emplace(std::make_pair(Skill0::SandStormBlocked, std::make_unique<HudElement>(L"Media//Sprites//SkillSheetBlocked.png", gfx, 3, 7, 1)));
skills.emplace(std::make_pair(Skill0::SharpenTheBladeBlocked, std::make_unique<HudElement>(L"Media//Sprites//SkillSheetBlocked.png", gfx, 4, 7, 1)));
skills.emplace(std::make_pair(Skill0::SandsOfTimeBlocked, std::make_unique<HudElement>(L"Media//Sprites//SkillSheetBlocked.png", gfx, 5, 7, 1)));
skills.emplace(std::make_pair(Skill0::DustThrowBlocked, std::make_unique<HudElement>(L"Media//Sprites//SkillSheetBlocked.png", gfx, 6, 7, 1)));
for (size_t i = 0; i < skills.size(); i++)posSkill.emplace_back();
for (size_t i = 0; i < skills.size(); i++)
{
......@@ -182,7 +188,7 @@ void ABox::SmartSubmit(FrameCommander& fc) const
for (auto& s : skillMicroicons) s.second->ClearDrawingPositions();
for (size_t i = 0; i < skillMicroInfo.size(); i++)
{
if (dispSkills.s[i] != Skill0::Inactive)
if (dispSkills.s[i] < Skill0::CutBlocked)
{
size_t curIconInd = 0u;
if (skillMicroInfo[i].at(SkillInfoMicroicons::TurnEnder))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment