示例#1
0
 protected Simulator(
     IRandom random,
     AvatarState avatarState,
     List <Guid> foods,
     SimulatorSheets simulatorSheets
     )
 {
     Random                      = random;
     MaterialItemSheet           = simulatorSheets.MaterialItemSheet;
     SkillSheet                  = simulatorSheets.SkillSheet;
     SkillBuffSheet              = simulatorSheets.SkillBuffSheet;
     BuffSheet                   = simulatorSheets.BuffSheet;
     CharacterSheet              = simulatorSheets.CharacterSheet;
     CharacterLevelSheet         = simulatorSheets.CharacterLevelSheet;
     EquipmentItemSetEffectSheet = simulatorSheets.EquipmentItemSetEffectSheet;
     Log    = new BattleLog();
     Player = new Player(avatarState, this);
     Player.Use(foods);
     Player.Stats.EqualizeCurrentHPWithHP();
 }
示例#2
0
 public RankingSimulatorSheets(
     MaterialItemSheet materialItemSheet,
     SkillSheet skillSheet,
     SkillBuffSheet skillBuffSheet,
     BuffSheet buffSheet,
     CharacterSheet characterSheet,
     CharacterLevelSheet characterLevelSheet,
     EquipmentItemSetEffectSheet equipmentItemSetEffectSheet,
     WeeklyArenaRewardSheet weeklyArenaRewardSheet
     ) : base(
         materialItemSheet,
         skillSheet,
         skillBuffSheet,
         buffSheet,
         characterSheet,
         characterLevelSheet,
         equipmentItemSetEffectSheet
         )
 {
     WeeklyArenaRewardSheet = weeklyArenaRewardSheet;
 }
    public override void OnInspectorGUI()
    {
        SkillSheet myTarget = (SkillSheet)target;

        showSkills = EditorGUILayout.Foldout(showSkills, "Expand", true); //Hides the controls behind a Foldout UI element to preserve space
        if (showSkills)
        {
            foreach (CascadiaSkill casSkill in myTarget.mySkills)
            {
                EditorGUILayout.LabelField(casSkill.skillName.ToUpper());
                //EditorGUILayout.LabelField("Current Value");
                casSkill.skillValue = EditorGUILayout.IntSlider(casSkill.skillValue, 0, 100); //sets the CascadiaSkill to the slider value


                //casSkill.skillValue = EditorGUILayout.IntField(casSkill.skillValue);
                //EditorGUILayout.LabelField("Lower Bound");
                //casSkill.lowBound = EditorGUILayout.IntField(casSkill.lowBound);
                //EditorGUILayout.LabelField("Upper Bound");
                //casSkill.highBound = EditorGUILayout.IntField(casSkill.highBound);
                EditorGUILayout.Space();
            }
        }
        DrawDefaultInspector();
    }
示例#4
0
        public static void AddItem(CostumeItemSheet costumeItemSheet,
                                   EquipmentItemSheet equipmentItemSheet,
                                   EquipmentItemOptionSheet optionSheet,
                                   SkillSheet skillSheet,
                                   MaterialItemSheet materialItemSheet,
                                   ConsumableItemSheet consumableItemSheet,
                                   IRandom random,
                                   Item item,
                                   AddedItemInfo addedItemInfo,
                                   AvatarState avatarState)
        {
            switch (item.ItemSubType)
            {
            case ItemSubType.FullCostume:
            case ItemSubType.HairCostume:
            case ItemSubType.EarCostume:
            case ItemSubType.EyeCostume:
            case ItemSubType.TailCostume:
            case ItemSubType.Title:
                if (costumeItemSheet.TryGetValue(item.ID, out var costumeRow))
                {
                    var costume =
                        ItemFactory.CreateCostume(costumeRow, addedItemInfo.TradableId);
                    avatarState.inventory.AddItem(costume);
                }

                break;

            case ItemSubType.Weapon:
            case ItemSubType.Armor:
            case ItemSubType.Belt:
            case ItemSubType.Necklace:
            case ItemSubType.Ring:
                if (equipmentItemSheet.TryGetValue(item.ID, out var equipmentRow))
                {
                    var equipment = (Equipment)ItemFactory.CreateItemUsable(equipmentRow,
                                                                            addedItemInfo.TradableId,
                                                                            0,
                                                                            item.Level);

                    if (item.OptionIds.Length > 0)
                    {
                        var optionRows = new List <EquipmentItemOptionSheet.Row>();
                        foreach (var optionId in item.OptionIds)
                        {
                            if (!optionSheet.TryGetValue(optionId, out var optionRow))
                            {
                                continue;
                            }

                            optionRows.Add(optionRow);
                        }

                        AddOption(skillSheet, equipment, optionRows, random);
                    }

                    avatarState.inventory.AddItem(equipment);
                }

                break;

            case ItemSubType.Hourglass:
            case ItemSubType.ApStone:
                if (materialItemSheet.TryGetValue(item.ID, out var materialRow))
                {
                    var material = ItemFactory.CreateTradableMaterial(materialRow);
                    avatarState.inventory.AddItem(material, item.Count);
                    addedItemInfo.TradableId = material.TradableId;
                }

                break;

            case ItemSubType.Food:
                if (consumableItemSheet.TryGetValue(item.ID, out var consumableRow))
                {
                    var consumable = (Consumable)ItemFactory.CreateItemUsable(consumableRow,
                                                                              addedItemInfo.TradableId,
                                                                              0,
                                                                              item.Level);
                    avatarState.inventory.AddItem(consumable);
                }

                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
示例#5
0
 public SkillsTest()
 {
     _skillSheet = new SkillSheet();
     _skillSheet.Set(TableSheetsImporter.ImportSheets()[nameof(SkillSheet)]);
     _random = new TestRandom();
 }
示例#6
0
 void Start()
 {
     data  = datasource;
     sheet = data.FindSkillSheet();
     plans = data.FindSkillPlans(this).ToArray();
 }
示例#7
0
文件: Actor.cs 项目: foxor/unity-nls
 void Start()
 {
     data = datasource;
     sheet = data.FindSkillSheet();
     plans = data.FindSkillPlans(this).ToArray();
 }
示例#8
0
 // Start is called before the first frame update
 void Start()
 {
     skillSheet = GetComponent <SkillSheet>();
 }
示例#9
0
 public void Start()
 {
     thisSkillSheet = GetComponent <SkillSheet>();
     FillSkills();
 }