예제 #1
0
        static void AddSpellShortcutsFor(Character player, KnownSpell knownSpell)
        {
            List <PlayerActionShortcut> lastShortcuts = null;
            List <ItemEffect>           spellEffects  = AllSpellEffects.GetAll(knownSpell.SpellName).OrderBy(x => x.index).ToList();

            if (spellEffects.Count == 0)
            {
                lastShortcuts = PlayerActionShortcut.FromItemSpellEffect(knownSpell.SpellName, null, player);
            }
            else
            {
                for (int i = 0; i < spellEffects.Count; i++)
                {
                    ItemEffect itemEffect = spellEffects[i];
                    if (i == 0)
                    {
                        lastShortcuts = PlayerActionShortcut.FromItemSpellEffect(knownSpell.SpellName, itemEffect, player);
                    }
                    else
                    {
                        foreach (PlayerActionShortcut playerActionShortcut in lastShortcuts)
                        {
                            playerActionShortcut.Windups.Add(WindupDto.FromItemEffect(itemEffect, playerActionShortcut.Name));
                        }
                    }
                }
            }
            if (lastShortcuts != null)
            {
                AllShortcuts.AddRange(lastShortcuts);
            }
        }
예제 #2
0
 public static void Invalidate()
 {
     AllActionShortcuts.Invalidate();
     AllDieRollEffects.Invalidate();
     AllFeatures.Invalidate();
     AllFunctions.Invalidate();
     AllPlayers.Invalidate();
     AllProperties.Invalidate();
     AllSpellEffects.Invalidate();
     AllSpells.Invalidate();
     AllTables.Invalidate();
     AllTrailingEffects.Invalidate();
     AllWeaponEffects.Invalidate();
     AllWeapons.Invalidate();
 }