public int GetPriorityIndex(Collection curCollection, Rarities targetRarity) { int rarityIndex = curCollection.Cards.Keys.ToList().IndexOf(targetRarity); Rarities animRarity = curCollection.Cards.Keys.ElementAt(rarityIndex + 1); int[] cardList = curCollection.Cards[targetRarity]; int[] animList = curCollection.Cards[animRarity]; int targetIndex = -1; for (int numCopies = 0; numCopies < 3; numCopies++) { for (int i = 0; i < cardList.Length; i++) { if (cardList[i] + animList[i] == numCopies) { targetIndex = i; break; } } if (targetIndex > -1) { break; } } return(targetIndex); }
private void TurnOptionsOff() { Types.SetActive(false); Rarities.SetActive(false); Plates.SetActive(false); MonsterList.SetActive(false); }
public int GetPriorityIndex(Collection curCollection, Rarities targetRarity) { int rarityIndex = curCollection.Cards.Keys.ToList().IndexOf(targetRarity); Rarities animRarity = curCollection.Cards.Keys.ElementAt(rarityIndex + 1); int[] cardList = curCollection.Cards[targetRarity]; int[] animList = curCollection.Cards[animRarity]; int targetIndex = -1; for (int i = 0; i < cardList.Length; i++) { if (cardList[i] + animList[i] < 2) { targetIndex = i; break; } else if (targetIndex == -1 && cardList[i] + animList[i] < 3) { targetIndex = i; } } return(targetIndex); }
public void Unload() { Log.Info(Log.LogSource.PoxDB, "Database.Unload() called"); if (!ready) { return; } // todo: what if it is loading? Champions.Clear(); Abilities.Clear(); Abilities_similar.Clear(); Spells.Clear(); Relics.Clear(); Equipments.Clear(); Factions.Clear(); Races.Clear(); Classes.Clear(); Rarities.Clear(); Expansions.Clear(); AbilityNames.Clear(); ready = false; }
public static void Initialize() { // Initialize our stuff. CSV.Initialize(); Game_Events.Initialize(); Deck.Initialize(); Files.Cards.Initialize(); Fingerprint.Initialize(); Arenas.Initialize(); Rarities.Initialize(); Logic.Structure.Game.Cards.Initialize(); Chests.Initialize(); ResourcesManager.Initialize(); ObjectManager.Initialize(); Logger.Initialize(); ExceptionLogger.Initialize(); Gateway.Initialize(); Timers.Initialize(); Timers.Run(); // Start listening since we're done initializing. Gateway.Listen(); if (Constants.UseDiscord) { Client.Initialize(); } Events = new EventsHandler(); }
public int GetPriorityIndex(Collection curCollection, Rarities targetRarity) { int[] cardList = curCollection.Cards[targetRarity]; int targetIndex = -1; for (int numCopies = 0; numCopies < 3; numCopies++) { for (int i = 0; i < cardList.Length; i++) { if (cardList[i] == numCopies) { targetIndex = i; break; } } if (targetIndex > -1) { break; } } return(targetIndex); }
public void Init(FishingGameConfig config, FishPatternData patternData, float offsetT) { _config = config; _offsetT = offsetT; _rarity = patternData.rarity; _speed = patternData.speed; if (_speed == 0f) { _speed = 1f; } _scaleFactor = 1f; _reelStrength = 1f; switch (_rarity) { case Rarities.Legendary: _scaleFactor = config.fishScaleLegendary; _reelStrength = config.fishReelStrengthLegendary; break; case Rarities.Rare: _scaleFactor = config.fishScaleRare; _reelStrength = config.fishReelStrengthRare; break; default: _scaleFactor = config.fishScaleCommon; _reelStrength = config.fishReelStrengthCommon; break; } animator.speed = Mathf.Abs(speed); }
public void RecordCardRarity(Rarities rarity) { if (RecordedCards.Count >= _numCardsToRecord) { RecordedCards.Dequeue(); } RecordedCards.Enqueue(rarity); }
public Item(string name = "", string description = "", Sprite sprite = null, GameObject prefab = null, Rarities rarity = Rarities.Common) { itemName = name; itemDescription = description; itemSprite = sprite; itemPrefab = prefab; itemRarity = rarity; amount = 0; }
public Item(string ObjectSlug, string Description, ItemTypes ItemType, Rarities ItemRarity, string ActionName, string ItemName, bool TwoHanded, bool ItemModifier) { this.ObjectSlug = ObjectSlug; this.ActionName = ActionName; this.Description = Description; this.TwoHanded = TwoHanded; this.ItemModifier = ItemModifier; this.ItemName = ItemName; this.ItemType = ItemType; this.ItemRarity = ItemRarity; }
private Npc GenerateNpc(Rarities npcRarity) { var faction = GameManager.Instance.FactionManager.GetRandomEnemyFactionByStanding(); var npcs = faction.GetNpcsByRarity(npcRarity); var npc = GetRandomNpc(npcs); var instantiatedNpc = Instantiate(npc); instantiatedNpc.gameObject.name = npc.Name; return(instantiatedNpc); }
public FilterItem VerifyRarity(string rarity) { var item = Rarities.FirstOrDefault(x => x.NameUri == rarity); if (item != null) { item.Active = true; CurrentRarity = item; return(item); } return(null); }
private WavePack GeneratePack(Rarities packRarity) { var packNpcRarities = WaveData.PackNpcs[packRarity]; var wavePack = new WavePack(); packNpcRarities.ForEach(npcRarity => { wavePack.AddNpc(GenerateNpc(npcRarity)); }); return(wavePack); }
public Shotgun(WeaponTypes type, Rarities rarity, int magSize, int damage, double reloadSpeed, Player player, Background background) { Type = type; Rarity = rarity; Damage = damage; MagazineSize = magSize; ReloadSpeed = reloadSpeed; FireRate = rarity == Rarities.COMMON ? 2 : 1; this.player = player; this.background = background; BulletsInMagazine = MagazineSize; ProjectileColor = rarity == Rarities.LEGENDARY ? ConsoleColor.Red : rarity == Rarities.RARE ? ConsoleColor.Green : ConsoleColor.DarkYellow; }
public Pieza(string name, string description, Rarities rarity, Places place, Elements element, Colors color, int life, int damage, int speed, int cadence) { this.name = name; this.description = description; this.place = place; this.element = element; this.rarity = rarity; this.color = color; this.life = life; this.damage = damage; this.speed = speed; this.cadence = cadence; }
public IdolFilter(AppConfig config, ICollectionView target, bool enableOwnedFilter=true, bool enableCategoryFilter=true, bool enableNameFilter=true, bool enableRarityFilter = true, bool enableCenterEffectFilter = true, bool enableSkillFilter = true, bool enableOwnedOnlyFilter=false) { m_config = config; m_target = target; target.Filter = FilterIdols; EnableOwnedFilter = enableOwnedFilter; EnableRarityFilter = enableRarityFilter; EnableCenterEffectFilter = enableCenterEffectFilter; EnableSkillFilter = enableSkillFilter; EnableCategoryFilter = enableCategoryFilter; EnableNameFilter = enableNameFilter; EnableOwnedOnlyFilter = enableOwnedOnlyFilter; IdolTypes = new List<Tuple<IdolCategory, string>> { Tuple.Create(IdolCategory.All,"全部"), Tuple.Create(IdolCategory.Cute,"キュート"), Tuple.Create(IdolCategory.Cool,"クール"), Tuple.Create(IdolCategory.Passion,"パッション") }; TypeFilter = IdolCategory.All; Rarities = typeof(Rarity).GetEnumValues().Cast<Rarity?>().Reverse().Select(x => Tuple.Create(x, x.Value.ToLocalizedString())).ToList(); Rarities.Insert(0, Tuple.Create(new Rarity?(), "全部")); CenterEffects = new List<Tuple<Type, string>> { Tuple.Create((Type)null,"全部"), Tuple.Create(typeof(CenterEffect.AppealUp),"アピールアップ"), Tuple.Create(typeof(CenterEffect.SkillTriggerProbabilityUp),"スキル発動率アップ"), Tuple.Create(typeof(CenterEffect.LifeUp),"ライフアップ"), Tuple.Create(typeof(CenterEffect.ConditionalAppealUp),"条件付きアピールアップ"), }; Skills = new List<Tuple<Type, string>> { Tuple.Create((Type)null,"全部"), Tuple.Create(typeof(Skill.ScoreBonus),"スコアボーナス"), Tuple.Create(typeof(Skill.ComboBonus),"コンボボーナス"), Tuple.Create(typeof(Skill.JudgeEnhancement),"判定強化"), Tuple.Create(typeof(Skill.ComboContinuation),"コンボ継続"), Tuple.Create(typeof(Skill.Revival),"ライフ回復"), Tuple.Create(typeof(Skill.DamageGuard),"ダメージガード"), Tuple.Create(typeof(Skill.Overload),"オーバーロード") }; }
public static Weapon GenerateRandomWeapon(Rarities weaponRarity) { int rarity = (int)weaponRarity + 1; WeaponGenTemplate template = generateRandomWeaponFramework(); Weapon randomWeapon = template.GenerateWeapon(); randomWeapon.ItemRarity = weaponRarity; randomWeapon.Name = getRandomWeaponName(randomWeapon.StatWeight, randomWeapon.WeaponSubType, weaponRarity); randomWeapon.ModPackage = getRandomStats(randomWeapon.StatWeight, rarity, template.Multiplier); calculateWeaponValue(randomWeapon); return(randomWeapon); }
void setRarity(string r) { if (r == "COMMON") { rarity = Rarities.COMMON; } else if (r == "UNCOMMON") { rarity = Rarities.UNCOMMON; } else if (r == "WILD") { rarity = Rarities.WILD; } }
protected Rarity GetRarity(string rarity) { IList <Rarity> rarities = Rarities.Where(r => r.Name == rarity).ToList(); if (rarities.Count == 1) { return(rarities[0]); } else { return new Rarity() { Id = -1, Name = rarity } }; }
/// <summary> /// Upgrade this instance / card. /// </summary> public void Upgrade() { // var resourceDataTable = ObjectManager.DataTables.GetTable(this.Type); if (this.Type == 26) { Spells_Characters _Card = ObjectManager.DataTables.GetTable((int)Gamefile.Spells_Characters).GetItemById(this.ID) as Spells_Characters; // Spells_Characters _Card = CSV.Tables.Get(Gamefile.Spells_Characters).GetDataWithID(this.ID) as Spells_Characters; // Rarities _Rarity = CSV.Tables.Get(Gamefile.Rarities).GetData(_Card.Rarity) as Rarities; Rarities _Rarity = ObjectManager.DataTables.GetTable((int)Gamefile.Rarities).GetDataByName(_Card.Rarity) as Rarities; if (this.Level < _Rarity.LevelCount) { this.Count -= _Rarity.UpgradeMaterialCount[this.Level]; this.Level++; } } else if (this.Type == 27) { // Spells_Buildings _Card = CSV.Tables.Get(Gamefile.Spells_Buildings).GetDataWithID(this.ID) as Spells_Buildings; // Rarities _Rarity = CSV.Tables.Get(Gamefile.Rarities).GetData(_Card.Rarity) as Rarities; Spells_Buildings _Card = ObjectManager.DataTables.GetTable((int)Gamefile.Spells_Buildings).GetItemById(this.ID) as Spells_Buildings; Rarities _Rarity = ObjectManager.DataTables.GetTable((int)Gamefile.Rarities).GetDataByName(_Card.Rarity) as Rarities; if (this.Level < _Rarity.LevelCount) { this.Count -= _Rarity.UpgradeMaterialCount[this.Level]; this.Level++; } } else if (this.Type == 28) { // Spells_Other _Card = CSV.Tables.Get(Gamefile.Spells_Other).GetDataWithID(this.ID) as Spells_Other; // Rarities _Rarity = CSV.Tables.Get(Gamefile.Rarities).GetData(_Card.Rarity) as Rarities; Spells_Other _Card = ObjectManager.DataTables.GetTable((int)Gamefile.Spells_Other).GetItemById(this.ID) as Spells_Other; Rarities _Rarity = ObjectManager.DataTables.GetTable((int)Gamefile.Rarities).GetDataByName(_Card.Rarity) as Rarities; if (this.Level < _Rarity.LevelCount) { this.Count -= _Rarity.UpgradeMaterialCount[this.Level]; // [this.Level] this.Level++; } } }
public void CraftCards(Collection curCollection, ref int vials) { List <Rarities> prioritySet = rarityStrat.GetRarityPriority(curCollection); for (int pIndex = 0; pIndex < prioritySet.Count(); pIndex++) { Rarities r = prioritySet[pIndex]; int targetIndex = -1; do { targetIndex = dupeStrat.GetPriorityIndex(curCollection, r); if (targetIndex != -1 && vials >= Shop.craftingCosts[r]) { curCollection.Cards[r][targetIndex]++; vials -= Shop.craftingCosts[r]; } } while (vials >= Shop.craftingCosts[r] && targetIndex != -1); } }
public Item(string name, Rarities rarity = Rarities.Common, bool isUnique = false, int level = 1, int gold = 0, int durability = 0, int minDmg = 0, int maxDmg = 0, int defense = 0) { ObjectId = ItemManager.GetUniqueId(); ItemManager.Add(this); Name = name; Rarity = rarity; IsUnique = isUnique; Level = level; Gold = gold; MinDmg = minDmg; MaxDmg = maxDmg; Defense = defense; Durability = durability; MaxDurability = durability; Enchantment = Enchantments.Default; UpgradeLevel = 1; }
private void SetRewards() { int index = 0, count = 0; var gachiaDraw = rand.NextDouble() * 1000; if (!_opponentStats.IsPlayer) { if (Raport.Result == "win") { Raport.Reward.Experience = Monster.Experience; Raport.Reward.Gold = Monster.Gold; Raport.Reward.ItemID = -1; foreach (var rarity in Rarities.OrderBy(r => r.Chance)) { if (gachiaDraw <= rarity.Chance * (1 + _playerStats.ExtraDropPr)) { count = Items.Where(i => i.Rarity.Name == rarity.Name).Count(); if (count > 0) { index = rand.Next(0, count); ItemLooted = Items .Where(i => i.Rarity.Name == rarity.Name) .ElementAt(index); } break; } } if (!(ItemLooted is null)) { Raport.Reward.ItemID = ItemLooted.ID; Raport.Reward.ItemName = ItemLooted.Name; Raport.Reward.ItemRarity = ItemLooted.Rarity.Name; } } else { Raport.Reward.Gold = 0; Raport.Reward.Experience = 0; } } }
public void Create(string[] args) { string[] weaponTypeInfo = args[1].Split(); Rarities weaponRairity = new Rarities(); if (Enum.TryParse(weaponTypeInfo[0], out Rarities rarities)) { weaponRairity = rarities; } Type weaponType = Assembly.GetExecutingAssembly().GetTypes().FirstOrDefault(x => x.Name == weaponTypeInfo[1]); if (weaponType != null) { string weaponName = args[2]; IWeapon instance = (IWeapon)Activator.CreateInstance(weaponType, new object[] { weaponName, weaponRairity }); weapons.Add(instance); } }
public void CheckFull(Collection curCol) { curCol.FullSets.Keys.ToList().ForEach(r => { int rarityIndex = curCol.Cards.Keys.ToList().IndexOf(r); Rarities animRarity = curCol.Cards.Keys.ElementAt(rarityIndex + 1); int[] cardList = curCol.Cards[r]; int[] animList = curCol.Cards[animRarity]; for (int counter = 0; counter < curCol.Cards[r].Length; counter++) { if (cardList[counter] + animList[counter] < 3) { curCol.FullSets[r] = false; return; } } curCol.FullSets[r] = true; }); }
public int GetPriorityIndex(Collection curCollection, Rarities targetRarity) { int[] cardList = curCollection.Cards[targetRarity]; int targetIndex = -1; for (int i = 0; i < cardList.Length; i++) { if (cardList[i] < 2) { targetIndex = i; break; } else if (targetIndex == -1 && cardList[i] < 3) { targetIndex = i; } } return(targetIndex); }
internal Data Create(Row _Row) { Data _Data; switch ((Gamefile)this.Index) { case Gamefile.Treasure_Chests: _Data = new Treasure_Chests(_Row, this); break; case Gamefile.Rarities: _Data = new Rarities(_Row, this); break; case Gamefile.Spells_Characters: _Data = new Spells_Characters(_Row, this); break; case Gamefile.Spells_Buildings: _Data = new Spells_Buildings(_Row, this); break; case Gamefile.Spells_Other: _Data = new Spells_Other(_Row, this); break; case Gamefile.Arenas: _Data = new Arenas(_Row, this); break; default: { _Data = new Data(_Row, this); break; } } return(_Data); }
public Item( ItemTypes _ItemType, ItemObjects _ItemObject, GearTypes _GearType, Rarities _Rarity, List <BaseStat> _BaseStats, List <BaseStat> _BaseSuffixStats, List <BaseStat> _RndSuffixStats, int _ItemLevel, string _ObjectSlug, string _Description, string _ActionName, string _ItemName, bool _IsStackable ) { this.BaseStats = _BaseStats; this.RndSuffixStats = _RndSuffixStats; this.ObjectSlug = _ObjectSlug; this.Description = _Description; this.Rarity = _Rarity; this.ItemObject = _ItemObject; this.ItemType = _ItemType; this.ActionName = _ActionName; this.ItemName = _ItemName; this.IsStackable = _IsStackable; itemToGearTypes = new Dictionary <ItemObjects, List <GearTypes> >(); itemToGearTypes.Add(ItemObjects.Armor, new List <GearTypes> { GearTypes.Armor, GearTypes.Gloves, GearTypes.Helmet, GearTypes.Pants, GearTypes.Shoes }); itemToGearTypes.Add(ItemObjects.Jewelery, new List <GearTypes> { GearTypes.Armor, GearTypes.Gloves, GearTypes.Helmet, GearTypes.Pants, GearTypes.Shoes }); itemToGearTypes.Add(ItemObjects.Weapon, new List <GearTypes> { GearTypes.Armor, GearTypes.Gloves, GearTypes.Helmet, GearTypes.Pants, GearTypes.Shoes }); }
public void Upgrade() { if (this.Type == 26) { Spells_Characters _Card = CSV.Tables.Get(Gamefile.Spells_Characters).GetDataWithID(this.ID) as Spells_Characters; Rarities _Rarity = CSV.Tables.Get(Gamefile.Rarities).GetData(_Card.Rarity) as Rarities; if (this.Level < _Rarity.LevelCount) { this.Count -= _Rarity.UpgradeMaterialCount[this.Level]; this.Level++; } } else if (this.Type == 27) { Spells_Buildings _Card = CSV.Tables.Get(Gamefile.Spells_Buildings).GetDataWithID(this.ID) as Spells_Buildings; Rarities _Rarity = CSV.Tables.Get(Gamefile.Rarities).GetData(_Card.Rarity) as Rarities; if (this.Level < _Rarity.LevelCount) { this.Count -= _Rarity.UpgradeMaterialCount[this.Level]; this.Level++; } } else if (this.Type == 28) { Spells_Others _Card = CSV.Tables.Get(Gamefile.Spells_Others).GetDataWithID(this.ID) as Spells_Others; Rarities _Rarity = CSV.Tables.Get(Gamefile.Rarities).GetData(_Card.Rarity) as Rarities; if (this.Level < _Rarity.LevelCount) { this.Count -= _Rarity.UpgradeMaterialCount[this.Level]; this.Level++; } } }
public Axe(string name, Rarities rarity) : base(name, weaponState, rarity) { }
protected Item(int x, int y, int width, int height, Rarities rarity) : base(x, y, width, height) { this.Rarity = rarity; }
public ImmortalilyPotion(int x, int y, int width, int height, Rarities rarity, int duration) : base(x, y, width, height, rarity) { this.Duration = duration; }
public Armor(int x, int y, int width, int height, Rarities rarity, Armors armorType, double defencePoints) : base(x, y, width, height, rarity) { this.ArmorType = armorType; this.DefencePoints = defencePoints; }
protected Consumable(int x, int y, int width, int height, Rarities rarity) : base(x, y, width, height, rarity) { }
public Weapon(int x, int y, int width, int height, Rarities rarity, Weapons weaponType, double attackPoints) : base(x, y, width, height, rarity) { this.WeaponType = weaponType; this.AttackPoints = attackPoints; }
protected Potion(int x, int y, int width, int height, Rarities rarity) : base(x, y, width, height, rarity) { }
public HealthPotion(int x, int y, int width, int height, Rarities rarity, double health) : base(x, y, width, height, rarity) { this.Health = health; }