Added Warrior HUD ability icons
This commit is contained in:
parent
b9e1352288
commit
9d08c2547f
@ -14,5 +14,5 @@ InputGroup Ability::DEFAULT;
|
||||
|
||||
Ability::Ability()
|
||||
:name("???"),shortName("???"),cooldown(0),COOLDOWN_TIME(0),input(&DEFAULT){};
|
||||
Ability::Ability(std::string name,std::string shortName,float cooldownTime,int manaCost,InputGroup*input,Pixel barColor1,Pixel barColor2,PrecastData precastInfo,bool canCancelCast)
|
||||
:name(name),shortName(shortName),cooldown(0),COOLDOWN_TIME(cooldownTime),manaCost(manaCost),input(input),barColor1(barColor1),barColor2(barColor2),precastInfo(precastInfo),canCancelCast(canCancelCast){}
|
||||
Ability::Ability(std::string name,std::string shortName,float cooldownTime,int manaCost,InputGroup*input,std::string icon,Pixel barColor1,Pixel barColor2,PrecastData precastInfo,bool canCancelCast)
|
||||
:name(name),shortName(shortName),cooldown(0),COOLDOWN_TIME(cooldownTime),manaCost(manaCost),input(input),icon("Ability Icons/"+icon),barColor1(barColor1),barColor2(barColor2),precastInfo(precastInfo),canCancelCast(canCancelCast){}
|
||||
@ -27,8 +27,10 @@ struct Ability{
|
||||
PrecastData precastInfo;
|
||||
bool canCancelCast=false;
|
||||
InputGroup*input;
|
||||
std::string icon;
|
||||
std::function<bool(Player*,vf2d)>action=[](Player*,vf2d){return false;};
|
||||
static InputGroup DEFAULT;
|
||||
Ability();
|
||||
Ability(std::string name,std::string shortName,float cooldownTime,int manaCost,InputGroup*input,Pixel barColor1=VERY_DARK_RED,Pixel barColor2=DARK_RED,PrecastData precastInfo={},bool canCancelCast=false);
|
||||
//NOTE: icon expects the actual name relative to the "Ability Icons" directory for this constructor!
|
||||
Ability(std::string name,std::string shortName,float cooldownTime,int manaCost,InputGroup*input,std::string icon,Pixel barColor1=VERY_DARK_RED,Pixel barColor2=DARK_RED,PrecastData precastInfo={},bool canCancelCast=false);
|
||||
};
|
||||
@ -1043,11 +1043,15 @@ void Crawler::RenderCooldowns(){
|
||||
const auto DrawCooldown=[&](vf2d pos,Ability&a){
|
||||
if(a.name!="???"){
|
||||
if(a.cooldown>0.1){
|
||||
DrawDecal(pos,GFX[a.icon].Decal(),{1,1},{255,255,255,64});
|
||||
DrawPie(pos+vf2d{12,12},12,360-(a.cooldown/a.COOLDOWN_TIME)*360,PixelLerp(a.barColor1,a.barColor2,(a.cooldown/a.COOLDOWN_TIME)));
|
||||
std::stringstream cooldownTimeDisplay;
|
||||
cooldownTimeDisplay<<std::fixed<<std::setprecision(1)<<a.cooldown;
|
||||
DrawShadowStringPropDecal(pos+vf2d{12,12}-vf2d{float(GetTextSizeProp(cooldownTimeDisplay.str()).x*0.5),float(GetTextSizeProp(cooldownTimeDisplay.str()).y*1)}/2,cooldownTimeDisplay.str(),WHITE,BLACK,{0.5,1});
|
||||
}else{
|
||||
DrawDecal(pos,GFX[a.icon].Decal(),{1,1},WHITE);
|
||||
}
|
||||
|
||||
DrawDecal(pos,GFX["skill_overlay_icon.png"].Decal());
|
||||
|
||||
Pixel shortNameCol=BLUE,manaCostShadowCol=DARK_BLUE,keyDisplayCol=YELLOW;
|
||||
|
||||
@ -357,6 +357,7 @@ struct Witch:Player{
|
||||
#class".Right Click Ability.Cooldown"_F, \
|
||||
#class".Right Click Ability.Mana Cost"_I, \
|
||||
&KEY_DEFENSIVE, \
|
||||
#class".Right Click Ability.Icon"_S, \
|
||||
{uint8_t(#class".Right Click Ability.Cooldown Bar Color 1"_f[0]),uint8_t(#class".Right Click Ability.Cooldown Bar Color 1"_f[1]),uint8_t(#class".Right Click Ability.Cooldown Bar Color 1"_f[2]),uint8_t(#class".Right Click Ability.Cooldown Bar Color 1"_f[3]==0?255:#class".Right Click Ability.Cooldown Bar Color 1"_f[3])}, \
|
||||
{uint8_t(#class".Right Click Ability.Cooldown Bar Color 2"_f[0]),uint8_t(#class".Right Click Ability.Cooldown Bar Color 2"_f[1]),uint8_t(#class".Right Click Ability.Cooldown Bar Color 2"_f[2]),uint8_t(#class".Right Click Ability.Cooldown Bar Color 2"_f[3]==0?255:#class".Right Click Ability.Cooldown Bar Color 2"_f[3])}, \
|
||||
{#class".Right Click Ability.Precast Time"_F,#class".Right Click Ability.Casting Range"_I/100.f*24,#class".Right Click Ability.Casting Size"_I/100.f*24}, \
|
||||
@ -368,6 +369,7 @@ struct Witch:Player{
|
||||
#class".Ability 1.Cooldown"_F, \
|
||||
#class".Ability 1.Mana Cost"_I, \
|
||||
&KEY_ABILITY1, \
|
||||
#class".Ability 1.Icon"_S, \
|
||||
{uint8_t(#class".Ability 1.Cooldown Bar Color 1"_f[0]),uint8_t(#class".Ability 1.Cooldown Bar Color 1"_f[1]),uint8_t(#class".Ability 1.Cooldown Bar Color 1"_f[2]),uint8_t(#class".Ability 1.Cooldown Bar Color 1"_f[3]==0?255:#class".Ability 1.Cooldown Bar Color 1"_f[3])}, \
|
||||
{uint8_t(#class".Ability 1.Cooldown Bar Color 2"_f[0]),uint8_t(#class".Ability 1.Cooldown Bar Color 2"_f[1]),uint8_t(#class".Ability 1.Cooldown Bar Color 2"_f[2]),uint8_t(#class".Ability 1.Cooldown Bar Color 2"_f[3]==0?255:#class".Ability 1.Cooldown Bar Color 2"_f[3])}, \
|
||||
{#class".Ability 1.Precast Time"_F,#class".Ability 1.Casting Range"_I/100.f*24,#class".Ability 1.Casting Size"_I/100.f*24}, \
|
||||
@ -379,6 +381,7 @@ struct Witch:Player{
|
||||
#class".Ability 2.Cooldown"_F, \
|
||||
#class".Ability 2.Mana Cost"_I, \
|
||||
&KEY_ABILITY2, \
|
||||
#class".Ability 2.Icon"_S, \
|
||||
{uint8_t(#class".Ability 2.Cooldown Bar Color 1"_f[0]),uint8_t(#class".Ability 2.Cooldown Bar Color 1"_f[1]),uint8_t(#class".Ability 2.Cooldown Bar Color 1"_f[2]),uint8_t(#class".Ability 2.Cooldown Bar Color 1"_f[3]==0?255:#class".Ability 2.Cooldown Bar Color 1"_f[3])}, \
|
||||
{uint8_t(#class".Ability 2.Cooldown Bar Color 2"_f[0]),uint8_t(#class".Ability 2.Cooldown Bar Color 2"_f[1]),uint8_t(#class".Ability 2.Cooldown Bar Color 2"_f[2]),uint8_t(#class".Ability 2.Cooldown Bar Color 2"_f[3]==0?255:#class".Ability 2.Cooldown Bar Color 2"_f[3])}, \
|
||||
{#class".Ability 2.Precast Time"_F,#class".Ability 2.Casting Range"_I/100.f*24,#class".Ability 2.Casting Size"_I/100.f*24}, \
|
||||
@ -390,6 +393,7 @@ struct Witch:Player{
|
||||
#class".Ability 3.Cooldown"_F, \
|
||||
#class".Ability 3.Mana Cost"_I, \
|
||||
&KEY_ABILITY3, \
|
||||
#class".Ability 3.Icon"_S, \
|
||||
{uint8_t(#class".Ability 3.Cooldown Bar Color 1"_f[0]),uint8_t(#class".Ability 3.Cooldown Bar Color 1"_f[1]),uint8_t(#class".Ability 3.Cooldown Bar Color 1"_f[2]),uint8_t(#class".Ability 3.Cooldown Bar Color 1"_f[3]==0?255:#class".Ability 3.Cooldown Bar Color 1"_f[3])}, \
|
||||
{uint8_t(#class".Ability 3.Cooldown Bar Color 2"_f[0]),uint8_t(#class".Ability 3.Cooldown Bar Color 2"_f[1]),uint8_t(#class".Ability 3.Cooldown Bar Color 2"_f[2]),uint8_t(#class".Ability 3.Cooldown Bar Color 2"_f[3]==0?255:#class".Ability 3.Cooldown Bar Color 2"_f[3])}, \
|
||||
{#class".Ability 3.Precast Time"_F,#class".Ability 3.Casting Range"_I/100.f*24,#class".Ability 3.Casting Size"_I/100.f*24}, \
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
#define VERSION_MAJOR 0
|
||||
#define VERSION_MINOR 2
|
||||
#define VERSION_PATCH 0
|
||||
#define VERSION_BUILD 1553
|
||||
#define VERSION_BUILD 1559
|
||||
|
||||
#define stringify(a) stringify_(a)
|
||||
#define stringify_(a) #a
|
||||
|
||||
BIN
Crawler/assets/Ability Icons/battlecry.png
Normal file
BIN
Crawler/assets/Ability Icons/battlecry.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.7 KiB |
BIN
Crawler/assets/Ability Icons/block.png
Normal file
BIN
Crawler/assets/Ability Icons/block.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.6 KiB |
BIN
Crawler/assets/Ability Icons/groundslam.png
Normal file
BIN
Crawler/assets/Ability Icons/groundslam.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.5 KiB |
BIN
Crawler/assets/Ability Icons/sonicslash.png
Normal file
BIN
Crawler/assets/Ability Icons/sonicslash.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.5 KiB |
@ -17,6 +17,7 @@ Ranger
|
||||
{
|
||||
Name = Retreat
|
||||
Short Name = B.STEP
|
||||
Icon = block.png
|
||||
Cooldown = 7
|
||||
Mana Cost = 0
|
||||
# Whether or not this ability cancels casts.
|
||||
@ -39,6 +40,7 @@ Ranger
|
||||
{
|
||||
Name = Rapid Fire
|
||||
Short Name = RAPID
|
||||
Icon = block.png
|
||||
Cooldown = 12
|
||||
Mana Cost = 35
|
||||
# Whether or not this ability cancels casts.
|
||||
@ -70,6 +72,7 @@ Ranger
|
||||
{
|
||||
Name = Charged Shot
|
||||
Short Name = CHRG.S
|
||||
Icon = block.png
|
||||
Cooldown = 15
|
||||
Mana Cost = 40
|
||||
# Whether or not this ability cancels casts.
|
||||
@ -99,6 +102,7 @@ Ranger
|
||||
{
|
||||
Name = Multishot
|
||||
Short Name = MULTI
|
||||
Icon = block.png
|
||||
Cooldown = 25
|
||||
Mana Cost = 50
|
||||
# Whether or not this ability cancels casts.
|
||||
|
||||
@ -6,6 +6,7 @@ Thief
|
||||
{
|
||||
Name = ???
|
||||
Short Name = ???
|
||||
Icon = block.png
|
||||
Cooldown = 8
|
||||
Mana Cost = 5
|
||||
# Whether or not this ability cancels casts.
|
||||
@ -23,6 +24,7 @@ Thief
|
||||
{
|
||||
Name = ???
|
||||
Short Name = ???
|
||||
Icon = block.png
|
||||
Cooldown = 6
|
||||
Mana Cost = 30
|
||||
# Whether or not this ability cancels casts.
|
||||
@ -40,6 +42,7 @@ Thief
|
||||
{
|
||||
Name = ???
|
||||
Short Name = ???
|
||||
Icon = block.png
|
||||
Cooldown = 6
|
||||
Mana Cost = 25
|
||||
# Whether or not this ability cancels casts.
|
||||
@ -57,6 +60,7 @@ Thief
|
||||
{
|
||||
Name = ???
|
||||
Short Name = ???
|
||||
Icon = block.png
|
||||
Cooldown = 40
|
||||
Mana Cost = 75
|
||||
# Whether or not this ability cancels casts.
|
||||
|
||||
@ -6,6 +6,7 @@ Trapper
|
||||
{
|
||||
Name = ???
|
||||
Short Name = ???
|
||||
Icon = block.png
|
||||
Cooldown = 8
|
||||
Mana Cost = 5
|
||||
# Whether or not this ability cancels casts.
|
||||
@ -23,6 +24,7 @@ Trapper
|
||||
{
|
||||
Name = ???
|
||||
Short Name = ???
|
||||
Icon = block.png
|
||||
Cooldown = 6
|
||||
Mana Cost = 30
|
||||
# Whether or not this ability cancels casts.
|
||||
@ -40,6 +42,7 @@ Trapper
|
||||
{
|
||||
Name = ???
|
||||
Short Name = ???
|
||||
Icon = block.png
|
||||
Cooldown = 6
|
||||
Mana Cost = 25
|
||||
# Whether or not this ability cancels casts.
|
||||
@ -57,6 +60,7 @@ Trapper
|
||||
{
|
||||
Name = ???
|
||||
Short Name = ???
|
||||
Icon = block.png
|
||||
Cooldown = 40
|
||||
Mana Cost = 75
|
||||
# Whether or not this ability cancels casts.
|
||||
|
||||
@ -16,6 +16,7 @@ Warrior
|
||||
{
|
||||
Name = Block
|
||||
Short Name = BLOCK
|
||||
Icon = block.png
|
||||
Cooldown = 15
|
||||
Mana Cost = 0
|
||||
# Whether or not this ability cancels casts.
|
||||
@ -41,6 +42,7 @@ Warrior
|
||||
{
|
||||
Name = Battlecry
|
||||
Short Name = B.CRY
|
||||
Icon = battlecry.png
|
||||
Cooldown = 12
|
||||
Mana Cost = 40
|
||||
# Whether or not this ability cancels casts.
|
||||
@ -86,6 +88,7 @@ Warrior
|
||||
{
|
||||
Name = Ground Slam
|
||||
Short Name = SLAM
|
||||
Icon = groundslam.png
|
||||
Cooldown = 15
|
||||
Mana Cost = 50
|
||||
# Whether or not this ability cancels casts.
|
||||
@ -117,6 +120,7 @@ Warrior
|
||||
{
|
||||
Name = Sonic Slash
|
||||
Short Name = S.SLASH
|
||||
Icon = sonicslash.png
|
||||
Cooldown = 40
|
||||
Mana Cost = 60
|
||||
# Whether or not this ability cancels casts.
|
||||
|
||||
@ -6,6 +6,7 @@ Witch
|
||||
{
|
||||
Name = ???
|
||||
Short Name = ???
|
||||
Icon = block.png
|
||||
Cooldown = 8
|
||||
Mana Cost = 5
|
||||
# Whether or not this ability cancels casts.
|
||||
@ -23,6 +24,7 @@ Witch
|
||||
{
|
||||
Name = ???
|
||||
Short Name = ???
|
||||
Icon = block.png
|
||||
Cooldown = 6
|
||||
Mana Cost = 30
|
||||
# Whether or not this ability cancels casts.
|
||||
@ -40,6 +42,7 @@ Witch
|
||||
{
|
||||
Name = ???
|
||||
Short Name = ???
|
||||
Icon = block.png
|
||||
Cooldown = 6
|
||||
Mana Cost = 25
|
||||
# Whether or not this ability cancels casts.
|
||||
@ -57,6 +60,7 @@ Witch
|
||||
{
|
||||
Name = ???
|
||||
Short Name = ???
|
||||
Icon = block.png
|
||||
Cooldown = 40
|
||||
Mana Cost = 75
|
||||
# Whether or not this ability cancels casts.
|
||||
|
||||
@ -29,6 +29,7 @@ Wizard
|
||||
{
|
||||
Name = Teleport
|
||||
Short Name = TELE
|
||||
Icon = block.png
|
||||
Cooldown = 8
|
||||
Mana Cost = 5
|
||||
# Whether or not this ability cancels casts.
|
||||
@ -68,6 +69,7 @@ Wizard
|
||||
{
|
||||
Name = Firebolt
|
||||
Short Name = F.BOLT
|
||||
Icon = block.png
|
||||
Cooldown = 6
|
||||
Mana Cost = 30
|
||||
# Whether or not this ability cancels casts.
|
||||
@ -133,6 +135,7 @@ Wizard
|
||||
{
|
||||
Name = Lightning Bolt
|
||||
Short Name = L.BOLT
|
||||
Icon = block.png
|
||||
Cooldown = 6
|
||||
Mana Cost = 25
|
||||
# Whether or not this ability cancels casts.
|
||||
@ -188,6 +191,7 @@ Wizard
|
||||
{
|
||||
Name = Meteor
|
||||
Short Name = METEOR
|
||||
Icon = block.png
|
||||
Cooldown = 40
|
||||
Mana Cost = 75
|
||||
# Whether or not this ability cancels casts.
|
||||
|
||||
@ -38,4 +38,10 @@ Images
|
||||
GFX_SlimeKing_Cast = monsters/Slime King - Cast.png
|
||||
GFX_SkillOverlayIcon = skill_overlay_icon.png
|
||||
GFX_SkillOverlayIconOverlay = skill_overlay_icon_overlay.png
|
||||
|
||||
# Ability Icons
|
||||
GFX_Warrior_BattleCry_Icon = Ability Icons/battlecry.png
|
||||
GFX_Warrior_Block_Icon = Ability Icons/block.png
|
||||
GFX_Warrior_GroundSlam_Icon = Ability Icons/groundslam.png
|
||||
GFX_Warrior_SonicSlash_Icon = Ability Icons/sonicslash.png
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user