public ActionButton(string name, Texture2D buttonImage, MoveCategories moveCategory, ActionSubMenu subMenu) { Name = name; ButtonImage = buttonImage; Category = moveCategory; SubMenu = subMenu; }
private string GetMessageFromCategory(MoveCategories categoryDisabled) { //NOTE: From what I've tested, NoSkills doesn't remove the Item command in TTYD, so the PM message is used //The messages for Tactics, Special, and Enemy are made up, as they are either never disabled //or disabled only in Tutorials where there is no message switch (categoryDisabled) { case MoveCategories.Item: return("You can't use any items now!"); case MoveCategories.Jump: return("You can't jump!"); case MoveCategories.Hammer: return("Can't use a hammer!"); case MoveCategories.Partner: return("You can't use moves!"); case MoveCategories.Tactics: return("You can't use any tactics now!"); case MoveCategories.Special: return("You can't use special moves!"); case MoveCategories.Enemy: return("Enemies can't attack now!"); default: return(string.Empty); } }
protected override void OnPhaseCycleStart() { if (IsSuppressed(StatusSuppressionTypes.TurnCount) == false) { //Go through each disabled move category and progress their turn counts KeyValuePair <MoveCategories, int>[] moveCategories = CategoriesDisabled.ToArray(); for (int i = 0; i < moveCategories.Length; i++) { MoveCategories category = moveCategories[i].Key; CategoriesDisabled[category]--; //Get the number of turns remaining for this disabled category int turnsRemaining = CategoriesDisabled[category]; //If there are no turns left for this category, re-enable it if (turnsRemaining <= 0) { CategoriesDisabled.Remove(category); EntityAfflicted.EntityProperties.EnableMoveCategory(category); } } } ProgressTurnCount(); }
/// <summary> /// Clears a particular MoveCategory from being disabled. /// </summary> /// <param name="category">The type of moves to enable.</param> public void EnableMoveCategory(MoveCategories category) { bool removed = DisabledMoveCategories.Remove(category); if (removed == true) { Debug.Log($"Enabled {category} moves for {Entity.Name} to use once again"); } }
/// <summary> /// Disables a particular MoveCategory from being used by the entity. /// </summary> /// <param name="category">The type of moves to disable.</param> public void DisableMoveCategory(MoveCategories category) { if (IsMoveCategoryDisabled(category) == true) { Debug.LogWarning($"Category {category} is already disabled for {Entity.Name}!"); return; } Debug.Log($"Disabled {category} moves from use for {Entity.Name}"); DisabledMoveCategories.Add(category, true); }
public NoSkillsStatus(MoveCategories categoryDisabled, int duration) { StatusType = StatusTypes.NoSkills; Alignment = StatusAlignments.Negative; StatusIcon = null; Duration = duration; CategoryDisabled = categoryDisabled; AfflictedMessage = GetMessageFromCategory(CategoryDisabled); }
public void ResetMoveData(string moveName, string description, bool recoil, bool highCritRate, bool flinch, bool contact, bool disabled, PokemonTypes type, MoveCategories category, float recoilDamage, int power) { this.moveName = moveName; this.description = description; this.recoil = recoil; this.highCritRate = highCritRate; this.flinch = flinch; this.contact = contact; this.disabled = disabled; this.type = type; this.category = category; this.recoilDamage = recoilDamage; this.basePower = power; this.curPower = this.basePower; }
public NoSkillsStatus(MoveCategories categoryDisabled, int duration) { StatusType = StatusTypes.NoSkills; Alignment = StatusAlignments.Negative; StatusIcon = null; Duration = duration; CategoryDisabled = categoryDisabled; AfflictedMessage = GetMessageFromCategory(CategoryDisabled); //NoSkills doesn't play the end event ShouldQueueEndEvent = false; }
public MoveData(DataRow row) { this.id = (ushort)(long)row["ID"]; this.name = row["Name"] as string; this.description = row["Description"] as string; this.type = GetPokemonTypeFromString(row["Type"] as string); this.power = (byte)(long)row["Power"]; this.accuracy = (byte)(long)row["Accuracy"]; this.pp = (byte)(long)row["PP"]; this.category = GetMoveCategoryFromString(row["Category"] as string); this.conditionType = GetConditionTypeFromString(row["ConditionType"] as string); this.contestDescription = row["ContestDescription"] as string; this.appeal = (byte)(long)row["Appeal"]; this.jam = (byte)(long)row["Jam"]; }
public MoveData(DataRow row) { this.id = (ushort)(long)row["ID"]; this.name = row["Name"] as string; this.description = row["Description"] as string; this.type = GetPokemonTypeFromString(row["Type"] as string); this.power = (byte)(long)row["Power"]; this.accuracy = (byte)(long)row["Accuracy"]; this.pp = (byte)(long)row["PP"]; this.category = GetMoveCategoryFromString(row["Category"] as string); this.conditionType = GetConditionTypeFromString(row["ConditionType"] as string); this.contestDescription = row["ContestDescription"] as string; this.appeal = (byte)(long)row["Appeal"]; this.jam = (byte)(long)row["Jam"]; }
/// <summary> /// Classifies the move under a certain category. /// </summary> /// <param name="moveCategory">The MoveCategories value to classify this move as.</param> public virtual void SetMoveCategory(MoveCategories moveCategory) { MoveCategory = moveCategory; }
public static void Initialize(string CacheFolder = "") { if (Connector.isInitialized) { throw new Exception("PokeAPI is initialized and can only be initialized once"); //May seems a bit over kill but this is nessecery for corrent usage. } #region "Structure" Connector.Berries = new Berries(); Connector.BerryFirmnesses = new BerryFirmnesses(); Connector.BerryFlavors = new BerryFlavors(); Connector.ContestNames = new ContestNames(); Connector.ContestEffects = new ContestEffects(); Connector.SuperContestEffects = new SuperContestEffects(); Connector.EncounterMethods = new EncounterMethods(); Connector.EncounterConditions = new EncounterConditions(); Connector.EncounterConditionValues = new EncounterConditionValues(); Connector.EvolutionChains = new EvolutionChains(); Connector.EvolutionTrigger = new EvolutionTrigger(); Connector.Generations = new Generations(); Connector.Pokedexes = new Pokedexes(); Connector.Versions = new Versions(); Connector.VersionGroups = new VersionGroups(); Connector.Items = new Items(); Connector.ItemAttributes = new ItemAttributes(); Connector.ItemCategories = new ItemCategories(); Connector.ItemFlingEffects = new ItemFlingEffects(); Connector.ItemPockets = new ItemPockets(); Connector.Locations = new Locations(); Connector.LocationAreas = new LocationAreas(); Connector.PalParkAreas = new PalParkAreas(); Connector.Regions = new Regions(); Connector.Machines = new Machines(); Connector.Moves = new Moves(); Connector.MoveAilments = new MoveAilments(); Connector.MoveBattleStyles = new MoveBattleStyles(); Connector.MoveCategories = new MoveCategories(); Connector.MoveDamageClasses = new MoveDamageClasses(); Connector.MoveLearnMethods = new MoveLearnMethods(); Connector.MoveTargets = new MoveTargets(); Connector.Abilities = new Abilities(); Connector.Characteristics = new Characteristics(); Connector.EggGroups = new EggGroups(); Connector.Genders = new Genders(); Connector.GrowthRates = new GrowthRates(); Connector.Natures = new Natures(); Connector.PokeathlonStats = new PokeathlonStats(); Connector.Pokemons = new Pokemons(); Connector.PokemonColors = new PokemonColors(); Connector.PokemonForms = new PokemonForms(); Connector.PokemonHabitats = new PokemonHabitats(); Connector.PokemonShapes = new PokemonShapes(); Connector.PokemonSpecies = new PokemonSpecies(); Connector.Stats = new Stats(); Connector.Types = new Types(); Connector.Languages = new Languages(); #endregion if (CacheFolder == "") { Connector.CacheFolder = AppDomain.CurrentDomain.BaseDirectory + "pokeAPI//"; } else { if (!System.IO.Directory.Exists(CacheFolder)) { throw new Exception("Directory : " + CacheFolder + " was not found"); } Connector.CacheFolder = CacheFolder; } Cacher.Initialize(); Connector.isInitialized = true; }
/// <summary> /// Tells whether a particular MoveCategory is disabled for this entity. /// </summary> /// <param name="category">The type of moves to check.</param> /// <returns>true if the category is in the disabled dictionary, otherwise false.</returns> public bool IsMoveCategoryDisabled(MoveCategories category) { return(DisabledMoveCategories.ContainsKey(category)); }