예제 #1
0
        static void AddWeaponShortcutsFor(Character player, CarriedWeapon carriedWeapon)
        {
            List <PlayerActionShortcut> lastShortcuts = null;

            List <ItemEffect> weaponEffects = AllWeaponEffects.GetAll(carriedWeapon.Weapon.Name).OrderBy(x => x.index).ToList();;

            if (weaponEffects.Count == 0)
            {
                lastShortcuts = PlayerActionShortcut.FromWeapon(carriedWeapon, null, player);
            }
            else
            {
                for (int i = 0; i < weaponEffects.Count; i++)
                {
                    ItemEffect itemEffect = weaponEffects[i];
                    if (i == 0)
                    {
                        lastShortcuts = PlayerActionShortcut.FromWeapon(carriedWeapon, itemEffect, player);
                    }
                    else
                    {
                        foreach (PlayerActionShortcut playerActionShortcut in lastShortcuts)
                        {
                            playerActionShortcut.Windups.Add(WindupDto.FromItemEffect(itemEffect, PlayerActionShortcut.WeaponWindupPrefix + 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();
 }