Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using GrimoireTacticsGame.Client;
- using System;
- using System.Collections.Generic;
- using VoidwalkerEngine.Framework.Algorithms;
- using VoidwalkerEngine.Framework.Collections;
- using VoidwalkerEngine.Framework.DataTypes;
- using VoidwalkerEngine.Framework.Logic;
- using VoidwalkerEngine.Framework.Maths;
- using VoidwalkerEngine.Framework.Systems.Items;
- using VoidwalkerEngine.Framework.Systems.Items.Templates;
- namespace GrimoireTacticsGame
- {
- public static class Program
- {
- /// <summary>
- /// The main entry point for the application.
- /// </summary>
- [STAThread]
- public static void Main()
- {
- using (GameWindow client = new GameWindow())
- {
- LegendaryTemplate template = new LegendaryTemplate
- {
- Header = "Wraithskin",
- FlavorText = "Some legendary flavor text",
- ItemConstraints = new List<ItemConstraint>
- {
- ItemConstraint.MediumChestwear
- },
- LevelBracket = new Range(0, 100),
- Modifiers = new ItemModifiers()
- {
- ExplicitModifiers = new ItemModifierList()
- {
- new ItemModifier(ItemModifierTrait.EnhancedArmorRating,25),
- new ItemModifier(ItemModifierTrait.ExtraShadowDamage,10,20),
- new ItemModifier(ItemModifierTrait.ShadowResistance,25),
- new ItemModifier(ItemModifierTrait.RepairDurability,10)
- }
- }
- };
- // Create the base item
- Armor armor = new Armor
- {
- Name = "Leather Vest",
- Weight = ArmorWeight.Medium,
- Category = ArmorCategory.Chestwear,
- BaseDurability = 75,
- BaseArmorRating = 20,
- };
- for(int i = 0; i < 10; i++)
- {
- Console.WriteLine();
- LootDropArgs lootParams = new LootDropArgs(75, 50, 25);
- LootGenerator generator = new LootGenerator(new List<LegendaryTemplate>() { template });
- Armor rolledArmor = generator.Generate(armor, lootParams, 30, 0);
- rolledArmor.Repair();
- // Print the generated item
- Console.WriteLine(rolledArmor.Header);
- Console.WriteLine(rolledArmor.Name);
- Console.WriteLine(rolledArmor.Weight.ToString() + " " + rolledArmor.Category.ToString());
- Console.WriteLine(rolledArmor.GetMaximumArmorRating() + " Armor");
- Console.WriteLine(rolledArmor.Durability + "/" + rolledArmor.GetMaximumDurability() + " Durability");
- ItemModifierList accumulativeModifiers = rolledArmor.Modifiers.GetModifiers();
- foreach (ItemModifier modifier in accumulativeModifiers)
- {
- Console.WriteLine(modifier.ToToolTipText());
- }
- if (!String.IsNullOrEmpty(rolledArmor.FlavorText))
- {
- Console.WriteLine("\"" + rolledArmor.FlavorText + "\"");
- }
- }
- client.Run();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement