Skip to content

Commit

Permalink
feat: add challenges collection
Browse files Browse the repository at this point in the history
  • Loading branch information
DorielRivalet committed Jul 23, 2023
1 parent c6416dc commit 5640f0e
Show file tree
Hide file tree
Showing 9 changed files with 290 additions and 10 deletions.
27 changes: 27 additions & 0 deletions MHFZ_Overlay/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -927,6 +927,33 @@
<setting name="MonsterBlastBarBorderColor" serializeAs="String">
<value>#11111b</value>
</setting>
<setting name="GauntletProgressX" serializeAs="String">
<value>0</value>
</setting>
<setting name="GauntletProgressY" serializeAs="String">
<value>0</value>
</setting>
<setting name="GauntletProgressWidth" serializeAs="String">
<value>0</value>
</setting>
<setting name="GauntletProgressHeight" serializeAs="String">
<value>0</value>
</setting>
<setting name="BingoProgressX" serializeAs="String">
<value>0</value>
</setting>
<setting name="BingoProgressY" serializeAs="String">
<value>0</value>
</setting>
<setting name="BingoProgressSize" serializeAs="String">
<value>0</value>
</setting>
<setting name="GauntletProgressShown" serializeAs="String">
<value>False</value>
</setting>
<setting name="BingoProgressShown" serializeAs="String">
<value>False</value>
</setting>
</MHFZ_Overlay.Settings>
</userSettings>
</configuration>
Binary file added MHFZ_Overlay/Assets/Icons/png/transcend.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 14 additions & 5 deletions MHFZ_Overlay/Models/Challenge.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,24 @@ public sealed class Challenge
public DataTemplateKey? ChallengeDataTemplateKey { get; set; }

/// <summary>
/// The amount of achievements required in order to unlock the challenge
/// The amount of bronze achievements required in order to unlock the challenge
/// </summary>
public int AchievementsRequired { get; set; }
public int AchievementsBronzeRequired { get; set; }

/// <summary>
/// The rank of the achievements required in order to unlock the challenge.
/// If set to none, it does not require any particular achievement type and any achievement counts for the requirement.
/// The amount of silver achievements required in order to unlock the challenge
/// </summary>
public AchievementRank AchievementRankRequired { get; set; }
public int AchievementsSilverRequired { get; set; }

/// <summary>
/// The amount of gold achievements required in order to unlock the challenge
/// </summary>
public int AchievementsGoldRequired { get; set; }

/// <summary>
/// The amount of platinum achievements required in order to unlock the challenge
/// </summary>
public int AchievementsPlatinumRequired { get; set; }

/// <summary>
/// The achievement ID required (e.g. to unlock zenith gauntlet, you should beat gasura solo first). It should be a valid ID.
Expand Down
6 changes: 3 additions & 3 deletions MHFZ_Overlay/Models/Collections/Achievements.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5560,7 +5560,7 @@ public static class Achievements
Description = string.Empty,
Rank = AchievementRank.Platinum,
Image = @"pack://application:,,,/MHFZ_Overlay;component/Assets/Icons/achievement/medal_platinum.png",
Objective = "Complete a zenith gauntlet without fainting.",
Objective = "Complete a Zenith Gauntlet without fainting.",
IsSecret = false,
Hint = string.Empty,
}
Expand All @@ -5573,7 +5573,7 @@ public static class Achievements
Description = string.Empty,
Rank = AchievementRank.Platinum,
Image = @"pack://application:,,,/MHFZ_Overlay;component/Assets/Icons/achievement/medal_platinum.png",
Objective = "Complete a solstice gauntlet without fainting.",
Objective = "Complete a Solstice Gauntlet without fainting.",
IsSecret = false,
Hint = string.Empty,
}
Expand All @@ -5586,7 +5586,7 @@ public static class Achievements
Description = string.Empty,
Rank = AchievementRank.Platinum,
Image = @"pack://application:,,,/MHFZ_Overlay;component/Assets/Icons/achievement/medal_platinum.png",
Objective = "Complete a musou gauntlet without fainting.",
Objective = "Complete a Musou Gauntlet without fainting.",
IsSecret = false,
Hint = string.Empty,
}
Expand Down
84 changes: 84 additions & 0 deletions MHFZ_Overlay/Models/Collections/Challenges.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
// © 2023 The mhfz-overlay developers.
// Use of this source code is governed by a MIT license that can be
// found in the LICENSE file.

namespace MHFZ_Overlay.Models.Collections;

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

public static class Challenges
{
public static List<Challenge> ChallengeList { get; private set; } = new List<Challenge>
{
{
new Challenge()
{
Name = "Bingo",
AchievementIDRequired = 214, // Zenny Galore
AchievementsBronzeRequired = 10,
AchievementsSilverRequired = 5,
AchievementsGoldRequired = 1,
AchievementsPlatinumRequired = 0,
ChallengeDataTemplateKey = null,
Description = "CURRENTLY UNAVAILABLE. You are presented with a variable sized grid depending on the bingo difficulty. In each grid is a monster icon which upon hunting marks the square as completed. Try to complete a fully diagonal, vertical or horizontal line in order to finish the game, and strive for the maximum bingo points!",
}
},
{
new Challenge()
{
Name = "Gacha",
AchievementIDRequired = 218, // Road Champion
AchievementsBronzeRequired = 20,
AchievementsSilverRequired = 10,
AchievementsGoldRequired = 5,
AchievementsPlatinumRequired = 1,
ChallengeDataTemplateKey = null,
Description = "CURRENTLY UNAVAILABLE. This is a minigame where you collect gacha cards and buy many sorts of upgrades with gacha coins (of the overlay) in order to help you get more cards! Can you get every single card?",
}
},
{
new Challenge()
{
Name = "Zenith Gauntlet",
AchievementIDRequired = 34, // Gasura nightmare
AchievementsBronzeRequired = 50,
AchievementsSilverRequired = 20,
AchievementsGoldRequired = 10,
AchievementsPlatinumRequired = 5,
ChallengeDataTemplateKey = null,
Description = "CURRENTLY UNAVAILABLE. A challenge only for the best of hunters. You have to hunt all 23 Zenith★4 monsters in any order you want, all in one go! Includes a real-time timer.",
}
},
{
new Challenge()
{
Name = "Solstice Gauntlet",
AchievementIDRequired = 319, // Bloodthirsty Moon
AchievementsBronzeRequired = 60,
AchievementsSilverRequired = 50,
AchievementsGoldRequired = 20,
AchievementsPlatinumRequired = 10,
ChallengeDataTemplateKey = null,
Description = "CURRENTLY UNAVAILABLE. A supreme challenge that tests the limits of even the most skilled hunters. This challenge demands the defeat of all Conquest Lv9999 and Upper Shiten monsters in a relentless, back-to-back confrontation. Only those who can conquer this formidable trial in one go shall earn the right to claim victory under the Bloodthirsty Moon.",
}
},
{
new Challenge()
{
Name = "Musou Gauntlet",
AchievementIDRequired = 317, // Elze bane
AchievementsBronzeRequired = 70,
AchievementsSilverRequired = 60,
AchievementsGoldRequired = 50,
AchievementsPlatinumRequired = 20,
ChallengeDataTemplateKey = null,
Description = "CURRENTLY UNAVAILABLE. Embark on a herculean trial that pushes hunters to the brink of their abilities. This challenge commands the defeat of all Musou monsters in an unyielding, consecutive battle. This merciless gauntlet demands more than mere strength; it calls for tactical finesse and the will to triumph against insurmountable odds. Only those who can surmount this grueling challenge shall earn the title of Unstoppable, showcasing their prowess to the world.",
}
},
};
}
108 changes: 108 additions & 0 deletions MHFZ_Overlay/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions MHFZ_Overlay/Settings.settings
Original file line number Diff line number Diff line change
Expand Up @@ -920,5 +920,32 @@
<Setting Name="MonsterBlastBarBorderColor" Type="System.String" Scope="User">
<Value Profile="(Default)">#11111b</Value>
</Setting>
<Setting Name="GauntletProgressX" Type="System.Double" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="GauntletProgressY" Type="System.Double" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="GauntletProgressWidth" Type="System.Double" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="GauntletProgressHeight" Type="System.Double" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="BingoProgressX" Type="System.Double" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="BingoProgressY" Type="System.Double" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="BingoProgressSize" Type="System.Double" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="GauntletProgressShown" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="BingoProgressShown" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
</Settings>
</SettingsFile>
27 changes: 26 additions & 1 deletion MHFZ_Overlay/Views/Windows/ConfigWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -1915,7 +1915,32 @@
</Grid>
</Grid>
</TabItem>
</TabControl>
<TabItem ToolTip="View Challenges" Background="{StaticResource Crust}" Foreground="{StaticResource Text}">
<TabItem.Header>
<StackPanel Orientation="Horizontal">
<Image Source="../../Assets/Icons/png/transcend.png" Width="32" Height="32"/>
<TextBlock Foreground="{StaticResource Text}" Text="Challenges" Margin="4,0,0,0" VerticalAlignment="Center" />
</StackPanel>
</TabItem.Header>
<Grid Background="Transparent" Margin="20" x:Name="ChallengesGrid" ToolTip="Right-click for more options">
<Grid.ContextMenu>
<StaticResource ResourceKey="HunterNotesContextMenuImageCSV" />
</Grid.ContextMenu>
<Grid Background="Transparent" Style="{StaticResource ConfigSingleGrid}" Margin="0" Height="Auto" Width="Auto">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="3*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
</Grid>
</Grid>
</TabItem>
</TabControl>
</Grid>
</TabItem>
<TabItem ToolTip="Player Settings" Background="{StaticResource Mantle}" Foreground="{StaticResource Text}">
Expand Down
2 changes: 1 addition & 1 deletion MHFZ_Overlay/Views/Windows/ConfigWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4142,7 +4142,7 @@ private void UpdateAchievementsProgress()
AchievementTotalProgressTextBlock.Fill = (Brush?)brushConverter.ConvertFromString(CatppuccinMochaColors.NameHex["Teal"]);
AchievementTotalProgressPercentTextBlock.Fill = (Brush?)brushConverter.ConvertFromString(CatppuccinMochaColors.NameHex["Teal"]);
}
else if (true || obtainedAchievements == totalAchievements) // all
else if (obtainedAchievements == totalAchievements) // all
{
AchievementsProgressBar.Foreground = (Brush?)brushConverter.ConvertFromString(CatppuccinMochaColors.NameHex["Teal"]);
AchievementsProgressTextBlock.Fill = (Brush?)brushConverter.ConvertFromString(CatppuccinMochaColors.NameHex["Teal"]);
Expand Down

0 comments on commit 5640f0e

Please sign in to comment.