public BombSquadSequence(MoveAction moveAction, int bombCount) : base(moveAction) { BombCount = bombCount; }
public OuttaSightSecondHalfSequence(MoveAction moveAction, float alphaVal) : base(moveAction) { AlphaVal = alphaVal; }
public MiniEggSequence(MoveAction moveAction) : base(moveAction) { }
public DiveKickSequence(MoveAction moveAction) : base(moveAction) { }
public StarSpiritMoveSequence(MoveAction moveAction) : base(moveAction) { }
//Mega Smash adds 4 damage public MegaSmashSequence(MoveAction moveAction) : base(moveAction, 4) { }
public DisguiseSequence(MoveAction moveAction) : base(moveAction) { }
public TidalWaveSequence(MoveAction moveAction) : base(moveAction) { }
public ArtAttackSequence(MoveAction moveAction) : base(moveAction) { }
public PowerLiftSequence(MoveAction moveAction) : base(moveAction) { }
/// <summary> /// Determines if the BattleEntity gets affected by the Confused status, if it has it. /// If the BattleEntity is affected, it may perform a different action or target different entities with its original one. /// </summary> /// <param name="action">The BattleAction originally used.</param> /// <param name="targets">The original set of BattleEntities to target</param> /// <returns>An ActionHolder with a new BattleAction to perform or a different target list if the entity was affected by Confused. /// If not affected, the originals of each will be returned.</returns> private BattleGlobals.ActionHolder HandleConfusion(MoveAction action, params BattleEntity[] targets) { MoveAction actualAction = action; BattleEntity[] actualTargets = targets; //Check for Confusion's effects and change actions or targets depending on what happens int percent = EntityProperties.GetAdditionalProperty <int>(AdditionalProperty.ConfusionPercent); //See if Confusion should take effect if (UtilityGlobals.TestRandomCondition(percent) == true) { Debug.Log($"{Name} is affected by Confusion and will do something unpredictable!"); //int changeAction = 0; //Check if the action can target entities to see if we should change targets //if (actualAction.MoveProperties.TargetsEntity == true) //{ // //Get the opposite type of entities to target // //Items targets enemies, but attacks target allies // EntityTypes oppositeType = actualAction.MoveProperties.EntityType; // if (oppositeType == EntityTypes.Player) oppositeType = EntityTypes.Enemy; // else if (oppositeType == EntityTypes.Enemy) oppositeType = EntityTypes.Player; //} int changeTargets = 0; //Don't give a chance to change targets if the action doesn't have targets //NOTE: This means we'll need to handle changing actions first, as not all actions target something if (targets != null && targets.Length > 0) { changeTargets = GeneralGlobals.Randomizer.Next(0, 2); } //NOTE: Find a way to make it so we can control what happens based on the type of action. //For example, if Tattle was used, it doesn't target anyone else. //If you use a Healing item, it uses it on the opposing side, whereas if you use an attack it uses it on an ally. //Change to an ally /*Steps: * 1. If the action hits the first entity, find the adjacent allies. If not, find all allies * 2. Filter by heights based on what the action can hit * 3. Filter out dead allies * 4. If the action hits everyone, go with the remaining list. Otherwise, choose a random ally to attack * 5. If there are no allies to attack after all the filtering, make the entity do nothing*/ if (changeTargets == 1) { List <BattleEntity> allies = new List <BattleEntity>(); //If this action targets only the first player/enemy, look for adjacent allies if (actualAction.MoveProperties.SelectionType == TargetSelectionMenu.EntitySelectionType.First) { Debug.Log($"{Name} is looking for valid adjacent allies to attack!"); //Find adjacent allies and filter out all non-ally entities BattleManager.Instance.GetAdjacentEntities(allies, this); allies.RemoveAll((adjacent) => adjacent.EntityType != EntityType); } else { //Find all allies BattleManager.Instance.GetEntityAllies(allies, this); } //Filter by heights BattleManager.Instance.FilterEntitiesByHeights(allies, actualAction.MoveProperties.HeightsAffected); //Filter dead entities BattleManager.Instance.FilterDeadEntities(allies); //Choose a random ally to attack if the action only targets one entity if (allies.Count > 0 && actualAction.MoveProperties.SelectionType != TargetSelectionMenu.EntitySelectionType.All) { int randTarget = GeneralGlobals.Randomizer.Next(0, allies.Count); BattleEntity target = allies[randTarget]; allies.Clear(); allies.Add(target); Debug.Log($"{Name} is choosing to attack ally {allies[0].Name} in Confusion!"); } //If you can't attack any allies, do nothing if (allies.Count == 0) { actualAction = new NoAction(); Debug.Log($"{Name} did nothing as there either are no allies to attack or they're not in range!"); } else { //Set the actual targets to be the set of allies actualTargets = allies.ToArray(); //Disable action commands when attacking allies from Confusion, if the action has an Action Command if (actualAction.HasActionCommand == true) { actualAction.EnableActionCommand = false; } } } } return(new BattleGlobals.ActionHolder(actualAction, actualTargets)); }
public VeilSequence(MoveAction moveAction) : base(moveAction) { }
public TattleSequence(MoveAction moveAction) : base(moveAction) { }
public RefreshSequence(MoveAction moveAction) : base(moveAction) { }
public PowerBounceSequence(MoveAction moveAction) : base(moveAction) { }
public ShellShieldSequence(MoveAction moveAction, int maxShellHP) : base(moveAction) { ShellMaxHP = maxShellHP; }
public MultibounceSequence(MoveAction moveAction) : base(moveAction) { }
public CrystalStarMoveSequence(MoveAction moveAction) : base(moveAction) { }
public ChangePartnerSequence(MoveAction moveAction, BattlePartner newPartner) : base(moveAction) { NewPartner = newPartner; }
public HammerSequence(MoveAction moveAction, int finalDamageAddition) : base(moveAction) { FinalDamageAddition = finalDamageAddition; }
public LickSequence(MoveAction moveAction) : base(moveAction) { }
public KissyKissySequence(MoveAction moveAction, int numAttacks) : base(moveAction) { MaxAttacks = NumAttacks = numAttacks; }
public ShellTossSequence(MoveAction moveAction) : base(moveAction) { }
public RockSpitSequence(MoveAction moveAction, BattleEntity entityUsed) : base(moveAction) { EntityUsed = entityUsed; }
public VeilSecondHalfSequence(MoveAction moveAction, float scaleVal) : base(moveAction) { ScaleVal = scaleVal; }
public JumpSequence(MoveAction moveAction) : base(moveAction) { }
public RunAwaySequence(MoveAction moveAction) : base(moveAction) { }
public ElectroDashSequence(MoveAction moveAction) : base(moveAction) { }
public GulpSequence(MoveAction moveAction) : base(moveAction) { }
public OuttaSightSequence(MoveAction moveAction) : base(moveAction) { }