Complete ability tooltip modifications for Warrior, Ranger, Wizard. Leave new proposed syntax involving multiplication of two items. Release Build 13607.
This commit is contained in:
parent
443434c30c
commit
4862652593
@ -106,6 +106,10 @@ const std::string Ability::GetDescriptionWithPlayerModifiers()const{
|
||||
int finalDmg{int(damageMult*game->GetPlayer()->GetAttack())};
|
||||
return std::format("{}",finalDmg);
|
||||
}},
|
||||
{"Pct",TranslateFunc{
|
||||
float percentage{stof(data.at(val).GetString())};
|
||||
return std::format("{}%",percentage*100);
|
||||
}},
|
||||
};
|
||||
const Pixel specialValCol{69,249,255};
|
||||
|
||||
@ -129,6 +133,7 @@ const std::string Ability::GetDescriptionWithPlayerModifiers()const{
|
||||
if(!data.HasProperty(separatorVal))return false; //Could not be found in this section, will need to seek in another location.
|
||||
finalText+=specialValCol.toHTMLColorCode()+specialPrefixes[separatorKey](data,separatorVal)+WHITE.toHTMLColorCode();
|
||||
bracesFound=false;
|
||||
variableName="";
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -139,8 +144,7 @@ const std::string Ability::GetDescriptionWithPlayerModifiers()const{
|
||||
const char c{abilityText[marker]};
|
||||
if(!bracesFound&&c=='{')bracesFound=true;
|
||||
else if(bracesFound&&c=='}'){ //Parse the variable.
|
||||
if(!FindAndParse((*abilityConfig).get()))
|
||||
ERR(std::format("Could not find variable {} for Ability {}",variableName,GetName()));
|
||||
if(!FindAndParse((*abilityConfig).get()))ERR(std::format("Could not find variable {} for Ability {}",variableName,GetName()));
|
||||
}else if(bracesFound)variableName+=c;
|
||||
else finalText+=c;
|
||||
marker++;
|
||||
|
||||
@ -66,10 +66,14 @@ protected:
|
||||
window.DrawRectDecal(rect.pos+vi2d{2,2},vi2d{int(rect.size.y)-4,int(rect.size.y)-4});
|
||||
window.DrawDecal(iconPos,GFX[ability->icon].Decal(),{1.33f,1.33f});
|
||||
|
||||
vi2d descriptionPos=iconPos+vi2d{int(rect.size.y)-2,9};
|
||||
vi2d descriptionPos=iconPos+vi2d{int(rect.size.y)-2,8};
|
||||
const std::string description{ability->GetDescriptionWithPlayerModifiers()};
|
||||
const float descriptionTextLabelBoxWidth{rect.size.x-int(rect.size.y)-8};
|
||||
const float descriptionTextLabelBoxHeight{std::floor(rect.size.y-14.f)};
|
||||
const float descriptionHeightRatio{std::min(1.f,descriptionTextLabelBoxHeight/game->GetWrappedTextSizeProp(description,descriptionTextLabelBoxWidth).y)};
|
||||
|
||||
window.DrawShadowStringPropDecal(descriptionPos-vf2d{0,10},ability->name,{0xFF,0xAF,0x56},BLACK,{0.8f,1.f},{0.8f,1.f},int(rect.size.x-(descriptionPos.x-rect.pos.x))-4);
|
||||
window.DrawShadowStringPropDecal(descriptionPos,ability->description,WHITE,BLACK,{0.8f,1.f},{0.8f,1.f},int(rect.size.x-(descriptionPos.x-rect.pos.x))-4);
|
||||
window.DrawShadowStringPropDecal(descriptionPos-vf2d{0,8},ability->GetNameWithPlayerModifiers(),{0xFF,0xAF,0x56},BLACK,{0.8f,1.f},{0.8f,1.f},descriptionTextLabelBoxWidth);
|
||||
window.DrawShadowStringPropDecal(descriptionPos,description,WHITE,BLACK,{0.8f,descriptionHeightRatio},{0.8f,descriptionHeightRatio},descriptionTextLabelBoxWidth);
|
||||
|
||||
InputType controlType=KEY;
|
||||
if(Input::UsingGamepad())controlType=CONTROLLER;
|
||||
|
||||
@ -389,5 +389,5 @@ datafile&ItemEnchantInfo::GetData(){
|
||||
}break;
|
||||
}
|
||||
ERR(std::format("An undefined return path was reached for some reason while trying to retrieve data! Category: {}",int(Category())));
|
||||
return DATA;
|
||||
std::unreachable();
|
||||
}
|
||||
@ -39,7 +39,7 @@ All rights reserved.
|
||||
#define VERSION_MAJOR 1
|
||||
#define VERSION_MINOR 3
|
||||
#define VERSION_PATCH 0
|
||||
#define VERSION_BUILD 13582
|
||||
#define VERSION_BUILD 13607
|
||||
|
||||
#define stringify(a) stringify_(a)
|
||||
#define stringify_(a) #a
|
||||
|
||||
@ -64,7 +64,7 @@ DEFINE_STRATEGY(WARRIORTHIEF)
|
||||
}break;
|
||||
case SPIN:{
|
||||
m.target=game->GetPlayer()->GetPos();
|
||||
m.RunStrategy(RUN_TOWARDS);
|
||||
m.RunStrategy(MonsterStrategy::RUN_TOWARDS);
|
||||
m.F(A::SPIN_ANGLE)+=ConfigFloat("Warrior.Ability 2.SpinSpd")*game->GetElapsedTime();
|
||||
if((m.F(A::SPIN_ATTACK_TIMER)-=game->GetElapsedTime())>0){
|
||||
m.SetZ(float("Warrior.Ability 2.SpinMaxHeight"_I)*sin(PI*(ConfigFloat("Warrior.Ability 2.SpinTime")-m.F(A::SPIN_ATTACK_TIMER))/ConfigFloat("Warrior.Ability 2.SpinTime")));
|
||||
|
||||
@ -104,7 +104,7 @@ Ranger
|
||||
# Whether or not this ability cancels casts.
|
||||
CancelCast = 0
|
||||
|
||||
Description = Fires an ultrasonic arrow towards a location, piercing everything it comes in contact with. Deals {DamageMult:DamageMult} damage.
|
||||
Description = Fires an ultrasonic arrow, piercing through targets. Deals {DamageMult:DamageMult} damage.
|
||||
|
||||
#RGB Values. Color 1 is the circle at full cooldown, Color 2 is the color at empty cooldown.
|
||||
Cooldown Bar Color 1 = 64, 0, 0, 192
|
||||
|
||||
@ -35,7 +35,7 @@ Warrior
|
||||
# Whether or not this ability cancels casts.
|
||||
CancelCast = 1
|
||||
|
||||
Description = Blocks incoming damage for a brief period of time.
|
||||
Description = Reduce all damage to 0 for {Duration}s.
|
||||
|
||||
#RGB Values. Color 1 is the circle at full cooldown, Color 2 is the color at empty cooldown.
|
||||
Cooldown Bar Color 1 = 0, 0, 64, 192
|
||||
@ -45,7 +45,7 @@ Warrior
|
||||
Casting Range = 0
|
||||
Casting Size = 0
|
||||
|
||||
Duration = 3
|
||||
Duration = 3.0
|
||||
|
||||
# Percentage of player's normal movement speed while block is active.
|
||||
SlowAmt = 0.3
|
||||
@ -64,7 +64,7 @@ Warrior
|
||||
# Whether or not this ability cancels casts.
|
||||
CancelCast = 1
|
||||
|
||||
Description = A Battlecry that boosts the Warrior's Damage and Defense capabilities for some time.
|
||||
Description = Boosts the Warrior's Damage by {Pct:AttackIncrease} and Damage Reduction by {Pct:DamageReduction} for some time.
|
||||
|
||||
#RGB Values. Color 1 is the circle at full cooldown, Color 2 is the color at empty cooldown.
|
||||
Cooldown Bar Color 1 = 64, 0, 0, 192
|
||||
@ -112,7 +112,7 @@ Warrior
|
||||
# Whether or not this ability cancels casts.
|
||||
CancelCast = 1
|
||||
|
||||
Description = Leaps and dive into the ground, knocking back and damaging nearby enemies in the process.
|
||||
Description = Leap and dive into the ground, knocking back and damaging nearby enemies for {DamageMult:DamageMult} damage.
|
||||
|
||||
#RGB Values. Color 1 is the circle at full cooldown, Color 2 is the color at empty cooldown.
|
||||
Cooldown Bar Color 1 = 64, 0, 0, 192
|
||||
@ -153,7 +153,7 @@ Warrior
|
||||
# Whether or not this ability cancels casts.
|
||||
CancelCast = 1
|
||||
|
||||
Description = A large sonic wave projectile is released from the Warrior's sword.
|
||||
Description = A large sonic wave projectile is released from the Warrior's sword, striking enemies for {DamageMult:DamageMult} damage.
|
||||
|
||||
#RGB Values. Color 1 is the circle at full cooldown, Color 2 is the color at empty cooldown.
|
||||
Cooldown Bar Color 1 = 64, 0, 0, 192
|
||||
|
||||
@ -92,7 +92,7 @@ Wizard
|
||||
# Maximum distance this attack will travel before it automatically detonates.
|
||||
Max Range = 1000
|
||||
|
||||
Description = Shoots an explosive bolt of fire.
|
||||
Description = Shoots an explosive bolt of fire. Deals {DamageMult:InitialDamageMult} damage, then explodes dealing {DamageMult:BulletHitExplosionDamageMult} damage to nearby targets.
|
||||
|
||||
#RGB Values. Color 1 is the circle at full cooldown, Color 2 is the color at empty cooldown.
|
||||
Cooldown Bar Color 1 = 64, 0, 0, 192
|
||||
@ -163,7 +163,7 @@ Wizard
|
||||
# Maximum distance this attack will travel before it becomes deactivated.
|
||||
Max Range = 1000
|
||||
|
||||
Description = Shoot an electrically charged bolt, spreads to two other targets upon impact.
|
||||
Description = Shoot an electrically charged bolt, spreads to two other targets upon impact. Deals {DamageMult:DamageMult} to all hit targets.
|
||||
|
||||
#RGB Values. Color 1 is the circle at full cooldown, Color 2 is the color at empty cooldown.
|
||||
Cooldown Bar Color 1 = 64, 0, 0, 192
|
||||
@ -224,7 +224,7 @@ Wizard
|
||||
# Whether or not this ability cancels casts.
|
||||
CancelCast = 0
|
||||
|
||||
Description = After channeling, summons a meteorite from the heavens to crash into the planet.
|
||||
Description = Channel for {Precast Time}s, summons a meteorite that strikes for {DamageMult:MeteorDamageMult} damage. Deals additional {DamageMult:FireRingDamageMult} fire damage over {FireRingLifetime*FireRingDamageMult}s.
|
||||
|
||||
#RGB Values. Color 1 is the circle at full cooldown, Color 2 is the color at empty cooldown.
|
||||
Cooldown Bar Color 1 = 64, 0, 0, 192
|
||||
|
||||
@ -605,7 +605,7 @@ Item Enchants
|
||||
METEOR CAST TIME = 3.5s
|
||||
SIZE MULT = 2x
|
||||
METEOR ATTACK = 1600%
|
||||
FIRE RING DURATION MULT = 2x
|
||||
FireRingLifetime = 8s
|
||||
COOLDOWN INCREASE = 8s
|
||||
|
||||
# Stat, Lowest, Highest Value
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user