Grape Beer Re-re-revision no.1
This commit is contained in:
1 parent
cee00b4e75
commit
ee7c9587eb
2 files changed
+4
-5
No files matched your search
@@ -11,10 +11,9 @@ namespace CalamityMod.Items.Potions.Alcohol
|
||||
public class GrapeBeer : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Potions";
|
||||
public static float CloseRangeDistance = 160;
|
||||
public static float LongRangeDistance = 800;
|
||||
public static float CloseRangeDamage = 1f;
|
||||
public static float LongRangeDamage = 0.5f;
|
||||
public static float LongRangeDistance = 1000;
|
||||
public static float CloseRangeDamage = 0.8f;
|
||||
public static float LongRangeDamage = 0.4f;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(LongRangeDamage,LongRangeDistance/16f);
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
|
||||
@@ -4619,7 +4619,7 @@ namespace CalamityMod.Projectiles
|
||||
if (grapeBeer)
|
||||
{
|
||||
var dis = target.Distance(Main.player[projectile.owner].Center);
|
||||
float remap = Utils.Remap(dis, GrapeBeer.CloseRangeDistance, GrapeBeer.LongRangeDistance, GrapeBeer.CloseRangeDamage, GrapeBeer.LongRangeDamage);
|
||||
float remap = Utils.Remap(dis, 0, GrapeBeer.LongRangeDistance, GrapeBeer.CloseRangeDamage, GrapeBeer.LongRangeDamage);
|
||||
modifiers.SourceDamage *= remap;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user